Simple open door - turn on light not working

I’ve run into this now with a few different items, either I’m not using the right verbiage or past/present tense. Not super user friendly with guessing what it has to be…

This is a very basic automation, open the door > turn light on. Can someone tell me what I’m doing wrong?

- id: '1590694301917'
  alias: Toilet Lights - Day
  description: ''
  trigger:
  - entity_id: binary_sensor.doorsensor_toilet_contact
    platform: state
    to: 'Opened'
  condition:
  - after: sunrise
    before: sunset
    condition: sun
  action:
  - scene: scene.bathroom_lights_on_day

You probably have the state spelled wrong in the “to:” parameter. Check what the state looks like on the STATES tab of the Developer Tools page.

EDIT: Binary sensors are usually 'on' or 'off'. What you used was how that is translated in the frontend.

Hi. Are you sure „opened“ is the correct value? Normally it would be „on“ with binary_sensor

Great, thanks. Now I know where to find those, appreciate it.

1 Like