Repository navigation
feat(message): protocol boundary cleanup APIs for MyHOME #736 - #123
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
fedem95
left a comment
There was a problem hiding this comment.
Tested c31b0c6: 1554 passed locally, CI green. I ran the new command accessors on frames built by OWNd's own builders: set_brightness("21", 50) → brightness 50; set_color_temperature("21", 250) → 250 mired / 4000 K, same as the event side for *#1*21*14*250##; set_hsv_color("21", 120, 50, 80) → hs (120, 50). area_of_where("1015") → "100" matches is_area in base.py, and 1001/1101 match the existing volume_up/volume_down builders. Approving, with one thing to do before merge:
- It conflicts with master in
tests/test_who18_stop_and_go.py: #122 rewrotetest_stop_and_go_firmware_oracle_conformance(exact product set, NACK asserted for F460/F461/MyHomeServer1), so on rebase please keep master's version and drop this hunk.
Non-blocking:
normalize_where("0109")returns"109":is_apl_address("0109")isFalse(area 01-09 needs PL 10-15, per the docstring), so it falls through toint(). Maybe leave such input unchanged, or reject it.- The description lost a few characters to escapes: a newline where
\nwas ("ormalize_where") and a backspace where\bwas ("rightness").
… helpers (2.0.0b11)
c31b0c6 to
746d52f
Compare
|
Thanks @fedem95! Addressed all points in
|
fedem95
left a comment
There was a problem hiding this comment.
Thanks, the follow-up changes address my previous notes. The rebase, normalize_where("0109") behavior, and PR description look good. Approving.
Non-blocking note: hs checks that hue is at most 360, but doesn’t reject negative hue or out-of-range saturation values. It may be worth tightening that validation.
Companion PR for OpenWebNet-HA/MyHOME#736 (OpenWebNet-HA/MyHOME#737).
Summary
OWNMessageparameter properties: Exposeswhat,what_param,where_param,dimension_param, anddimension_valuepublicly onOWNMessageso downstream consumers do not reach into_what,_where,_dimension, or_dimension_value.WHEREaddress grammar helpers: Exportsis_apl_address,area_of_where, andnormalize_wherefromOWNd.message.lighting(andOWNd.message).color_temp_kelvinandhs_coloronOWNLightingEventandbrightness,color_temp,color_temp_kelvin,hs, andhs_coloronOWNLightingCommand.WHAT=1001..1015(+1..+15) andWHAT=1101..1115(-1..-15) onOWNSoundEvent.volume_step_delta.