Can't get Automation with 2 Conditions to work

Hey all,

i have this automation which is not working.

- alias: "Light on"
  trigger:
    platform: state
    entity_id: binary_sensor.fibaro_system_fgms001_motion_sensor_sensor_2_0
    to: 'on'
  condition:
    condition: and
    conditions:
      - condition: state
        entitiy_id: input_boolean.tini_mode
        state: 'off'
      - condition: numeric_state
        entity_id: sensor.fibaro_system_fgms001_motion_sensor_luminance_2_3
        below: 15.0
  action:
    service: switch.turn_on
    entity_id: switch.fibaro_system_fgs223_double_relay_switch_5_0

Maybe someone can give me a hint on what I have wrong here?
I already checked the YAML format, it is valid.

It looks like, when binary_sensor.fibaro_system_fgms001_motion_sensor_sensor_2_0 turns on, if tini_mode is off and Luminance is below 15 it will turn on double relay switch 5.

First things first, did you try to trigger this automation in the GUI, by clicking on it and clicking on “trigger”?

Also, did you try to remove all of the conditions and see if motion sensor going on will trigger the double relay switch by itself?

Thanks for your reply,

You got it right.
I had this already working without the tini_mode condition and it worked fine.
But now i want to add this second condition (input_boolean). On startup it already says error on loading platform automation.

Maybe there is something wrong with my automation but I don’t know what.

In the GUI, go to configuration and click on reload automation. Then go to developer tools and then click on the (i) to see the homeassistant log to see what your problem could be…

Nope, there is nothing about the automation in the Logs. I have already set the logging to Debug.

When you reload the automation, you typically can see what the problem is right after by looking at the logs, if there is a problem. If you had a problem with automations, it should show up in the log, without turning it to debug. On the commandline you would go to the /home/homeassistant/.homeassistant/ directory and type “cat home-assistant.log” to see if there is a problem, after you click on reload automation. If you still see that there is a problem with the automation, sometimes that “problem with component automation” flag is not cleared even when you fix things…

You’ve mispelled entity_id to entitiy_id

1 Like

Oh… what a dumb mistake…

Thank you! Now it is working :smile: