Repository navigation
Add "timed open" to the valve entity #1491
Replies: 3 comments 2 replies
|
At least for Zigbee, support for |
|
We discussed this in the architecture meeting and there was general support for the idea. Having the device itself handle the auto-off/close is a valuable safety mechanism, since it keeps working when Home Assistant restarts, crashes, or loses connectivity. That matters for valves especially, but applies to probably all toggle entities. The consensus was to consider this more broadly than valves: ideally the same concept should apply to toggle entities ( During the discussion we came up with the idea to keep the state as it is and add a state attribute holding the time at which the device will automatically revert (e.g. when the valve will close). In addition, the open/close (turn on/off) actions would get an optional @puddly could you put together an analysis of the timed-off/timed-open support across the different integrations?
@nielsrowinbik can you please look into this topic from the product/UX side, e.g. how the duration is exposed in the UI and in actions, and how the auto-off time is shown to users? Once we have both, we can come back with a concrete proposal covering valves and toggle entities. |
|
There is exactly one Z-Wave irrigation system on the market. The |
Uh oh!
There was an error while loading. Please reload this page.
Problem
If a simple automation opens a valve and uses a
delayto close it, Home Assistant restarting, crashing, losing wireless connectivity, etc. will cause the valve to stay open. For lights this is at most an annoyance but irrigation valves failing in an "open" state are much more of a danger.Background
Many protocols already have a "timed open" concept for most things that can be turned on: Zigbee
On With Timed Off, MatterValveConfigurationAndControl.Open(openDuration, targetLevel), Z-Wave IrrigationValve Run. Integrations currently use custom actions (hydrawise.start_watering,rainbird.start_irrigation,rachio.start_watering) or config entities (MatterDefaultOpenDuration, Gardena Bluetoothmanual_watering_time) to represent this.This is a valve-only version of #615 (but I think this concept really should be extended to anything that supports it, lights and switches included).
Proposal
ValveEntityFeature.OPEN_TIMED.ValveEntity.async_open_valve_for(duration: timedelta)andValveEntity.async_set_valve_position_for(position: int, duration: timedelta).durationfield tovalve.open_valveandvalve.set_valve_position, filtered onOPEN_TIMED. As today,valve.open_valveon a valve withSET_POSITIONcallsasync_set_valve_position_for(100, duration).auto_close_atstate attribute: the time at which the valve closes by itself, orNone.Integrations
valveplatform is a WIP but we have a few devices that expose this functionality already)switchtodayzwave_jshas avalveplatform, the specification supports it)All reactions