I have a big problem and I cannot find the solution in topics it’s crary
My code is correct but don’t work correctly
- alias: 'light on' initial_state: 'on' trigger: platform: state entity_id: binary_sensor.door_window_sensor_158d0002431944 from: 'off' to: 'on' action: - service: light.turn_on entity_id: light.yeelight_strip1_7811dcfdc835 - delay: 00:04:00 - service: light.turn_off entity_id: light.yeelight_strip1_7811dcfdc835 - alias: 'light off' trigger: platform: state entity_id: binary_sensor.door_window_sensor_158d0002431944 to: 'closed' action: - service: light.turn_off entity_id: light.yeelight_strip1_7811dcfdc835
When I open the door the light comes on: perfect
When I close the door, unfortunately it stays on when it should go out…
AND when I open the door again the light comes off!
Anyone can understand what is happening?