Here's the relevant part of one of my automations. It's for a light sensor I have attached to my washing machine:
trigger:
- platform: state
entity_id:
- binary_sensor.washer_light_sensor_sensor_state_any
from: "on"
to: "off"
Here's the relevant part of one of my automations. It's for a light sensor I have attached to my washing machine:
trigger:
- platform: state
entity_id:
- binary_sensor.washer_light_sensor_sensor_state_any
from: "on"
to: "off"