#turn off a strip light when I turn off my lights from the light switch
1 messages · Page 1 of 1 (latest)
when you switch the lights off for trigger, are they "offline" or "unavailable"?
I have a helper that becomes "unavailable"
but the helper doesn't apepar in device or entity list
the automation I have just doesn't work:
post the yaml please
alias: Downstairs bathroom Lights Off
description: ""
triggers:
- device_id: 42cb5254df2ffb2f50a7e5f92948ce62
domain: zha
type: device_offline
subtype: device_offline
trigger: device - trigger: state
entity_id:- light.downstairs_bathroom_centre_light_2
from: "on"
to: unavailable
conditions: []
actions:
- light.downstairs_bathroom_centre_light_2
- action: light.turn_off
metadata: {}
data:
transition: 0.5
target:
device_id: 24ed819c53619cf9f23f0ba59e3b986c
mode: single
because I'm turning the power off
the switch is not a smart switch, it's the switch to power it
ah
they go unavailable within the polling frequency if it's even turned on
and when turned on, its 10 minutes
so there's no way to know in a decent time the light has been switched off
not with zigbee
unless you hammer the network by checking the heartbeat
(not suggested)
so I have to use a smart switch
Yes