Hi i would like to trigger an automation when an light becomes online
specifically a light is switched on at the mains (not by smart /hassio)
i can find lots about atomations when a sensor goes offline but not for going online
i have tried all sorts off settings from device, to state, to numeric state, using On, Off, Unavailavble Available, Online, Offline but just cant find a setting that works
There are many light platforms, so without extra information an answer is impossible.
What is the state ( developer tools ->state) when the light is switched off at the mains ?
What is the state if the light is switched on again ?
It goes from unavailable to on
So something like this :
- id: '1589698429560'
alias: Light from unavailabe to on
description: ''
trigger:
- entity_id: light.yourlight
platform: state
from: 'unavailable'
to: 'on'
condition: []
action:
your_action