Use case: Basement utility closet with a Z-wave door/window sensor and a Z-wave light switch. When the door sensor is open, I want the light to turn on. When closed, light turned off.
Is there an existing integration where I can combine these two? Or do I need two automations (or one automation that just sets the sate of the light to the state of the sensor)?
Any way to have a single automation like this where the ligt turns off on a timer AND/OR if the automation is re-triggered with a state change, to immediately turn the light off?
The automation is in mode: single… So when the automation has been triggered any new trigger while running will not do anything (you should have a warning in the logfile)… The mode should be “restart” to stop the current execution and start a new run with the new trigger…
This worked great for a while (and still does) but I am getting frequent error alerts in restart like:
" The automation “Cabinet Lights Lutron Keypad Light” (automation.counter_lights_lutron_keypad_light_2 ) has an action that calls an unknown service: switch.turn_unavailable ."
Like it is trying to validate the automation before the switch service reports an on/off status and instead reports unavailable which causes an issue. Any way to suppress these alerts?
That’s probably due to the fact that the entity triggering the automation is unavailable at startup which is a change of state… So in your automation you have to check that the state triggering the automation is ON or OFF all the other value should not start the actions… So I would do something like this…
trigger:
- platform: state
entity_id: binary_sensor.your_z_wave_door
to:
- "on"
- "off"