Only write schedules to lights and pumps #6

Merged
r3pek merged 1 commit from gulaschcowboy/support-tier-dose into main 2026-11-12 09:40:24 +00:00 AGit
Contributor

As discussed in r3pek/python-mobius#2.

_live_group_members() in services.py rejected schedule-write targets by a denylist ("pump (experimental)", "unsupported"). With python-mobius reporting dosing pumps as "dose" (r3pek/python-mobius#3), a dosing pump would pass it, and write_schedule_group would take the non-light branch and call set_pump_schedule() on it, plus on lights sharing its group mask. It's an allowlist ("light", "pump") now.

  • Tests: a "dose" target is rejected, and a write to a dosing pump sharing a light's group mask writes nothing to either. Both fail with the old denylist.
  • The two existing "unsupported target" tests used DoseV1 as their example; they use an unknown primitive type now, since DoseV1 is "dose" with the new library.
  • websocket_api.py (_resolve_tank_groups()) already used an allowlist, so the cards were never affected.
  • CHANGELOG entry under Unreleased.

This works with the current python-mobius too (it only makes the check stricter); the dose tier itself shows up once python-mobius#3 is released. Tested on my tank with a fork build (two Versa, lights, pumps).

As discussed in r3pek/python-mobius#2. `_live_group_members()` in `services.py` rejected schedule-write targets by a denylist (`"pump (experimental)"`, `"unsupported"`). With python-mobius reporting dosing pumps as `"dose"` (r3pek/python-mobius#3), a dosing pump would pass it, and `write_schedule_group` would take the non-light branch and call `set_pump_schedule()` on it, plus on lights sharing its group mask. It's an allowlist (`"light"`, `"pump"`) now. - Tests: a `"dose"` target is rejected, and a write to a dosing pump sharing a light's group mask writes nothing to either. Both fail with the old denylist. - The two existing "unsupported target" tests used `DoseV1` as their example; they use an unknown primitive type now, since `DoseV1` is `"dose"` with the new library. - `websocket_api.py` (`_resolve_tank_groups()`) already used an allowlist, so the cards were never affected. - CHANGELOG entry under Unreleased. This works with the current python-mobius too (it only makes the check stricter); the `dose` tier itself shows up once python-mobius#3 is released. Tested on my tank with a fork build (two Versa, lights, pumps).
Only write schedules to lights and pumps
All checks were successful
Test / test (HA latest) (pull_request) Successful in 6m33s
Test / test (HA 2026.8) (pull_request) Successful in 6m40s
Test / frontend (pull_request) Successful in 1m21s
92185ad02f
_live_group_members() rejected targets by a denylist ("pump (experimental)", "unsupported"). With python-mobius reporting dosing pumps as "dose" (python-mobius#2), a dosing pump would pass it and write_schedule_group would write a pump schedule to it, plus to lights sharing its group mask. Use an allowlist instead, with tests for a dosing pump target and its group.
r3pek merged commit 548ee14e50 into main 2026-11-12 09:40:24 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
r3pek/ha-mobius!6
No description provided.