Repository navigation
feat(motion): motion units with sensitivity and daylight controls - #1065
Merged
Merged
Conversation
A unit is a Hue service group or a sensor/area on its own. Members keep their own sensitivity; daylight is the automation dark_threshold. /api/hue reads every resource in one request: the bridge answers parallel per-type fetches with 429. setMotionEnabled replaces toggleMotion.
The reading is the one the automation compares: a sensor light_level, or a group grouped_light_level.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The motion tab lists motion units: a Hue
service_group(sensor plus MotionAware fixtures behind onegrouped_motion), or a sensor or area on its own. Opening a unit shows a switch and sensitivity scale per member, and the daylight threshold of the automation on it, with the current light reading marked./api/huegainsmotionUnits; motion fields leaveSensor.setMotionEnabled,setMotionSensitivityandsetDaylightreplacetoggleMotion. Live events are keyed by service ID.behavior_instance), not the sensor;setDaylightwrites back the wholeconfigurationwith onlydark_thresholdchanged./api/huereadsGET /clip/v2/resourceonce. The bridge answered the 12 parallel per-type fetches with 429.Tested against the real bridge from a dev instance: member enable, sensor and fixture sensitivity, and the daylight threshold all apply.