Skip to content

feat(motion): motion units with sensitivity and daylight controls - #1065

Merged
eetu merged 3 commits into
mainfrom
feat/motion-units
Oct 4, 2026
Merged

eetu merged 3 commits into
mainfrom
feat/motion-units

Conversation

@eetu

@eetu eetu commented Oct 4, 2026

Copy link
Copy Markdown
Owner

The motion tab lists motion units: a Hue service_group (sensor plus MotionAware fixtures behind one grouped_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: /api/hue gains motionUnits; motion fields leave Sensor. setMotionEnabled, setMotionSensitivity and setDaylight replace toggleMotion. Live events are keyed by service ID.
  • Daylight lives in the automation (behavior_instance), not the sensor; setDaylight writes back the whole configuration with only dark_threshold changed.
  • One bridge request: /api/hue reads GET /clip/v2/resource once. 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.

eetu added 3 commits October 4, 2026 12:34
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.
@eetu
eetu merged commit b8e4f76 into main Oct 4, 2026
3 checks passed
@eetu
eetu deleted the feat/motion-units branch October 4, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant