I’ve added a new automation to my HASS install, but it does not get initialized. It’s a fairly simple rule so I’m unsure what the problem is and I’m not sure what to do to debug. All other automations are initialized and functioning properly including other rules depending on the same sensor.
What can I do to figure out why an automation rule is not initialized?
Broken automation:
- alias: "Toilet Motion Off and Diffuser On"
trigger:
platform: state
entity_id: sensor.aeotec_zw100_multisensor_toilet_burglar
to: '0'
condition:
- condition: state
entity_id: input_boolean.enable_bathroom_automation
state: 'on'
action:
- service: script.turn_on
data:
entity_id: script.timed_bathroom_diffuser_on
- alias: "Timer Finished and Diffuser Off"
trigger:
platform: event
event_type: timer.finished
event_data:
entity_id: timer.bathroom_diffuser_timer
action:
- service: script.turn_on
data:
entity_id: script.timed_bathroom_diffuser_off
Working automation using same sensor:
- alias: "Toilet Motion On (Day)"
initial_state: 'true'
# hide_entity: true
trigger:
platform: state
entity_id: sensor.aeotec_zw100_multisensor_toilet_burglar
to: '8'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.bathroom_light_dim
state: 'off'
- condition: state
entity_id: input_boolean.enable_bathroom_automation
state: 'on'
action:
- service: script.turn_on
data:
entity_id: script.timed_bathroom_bright
Proof ‘Toilet Motion On (Day)’ is initialized:
INFO (MainThread) [homeassistant.components.automation] Initialized trigger Toilet Motion On (Day)
Proof ‘Toilet Motion Off and Diffuser On’ is not initialized:
[root@host homeassistant]# grep -Hrni diffuser logs/home-assistant.log
[root@host homeassistant]#
Can there be automation conflicts? Might some other rule prevent the diffuser rule from running? The working rule is triggered by the sensor state transitioning to ‘8’ whereas the broken automation is triggered by the sensor state transitioning to ‘0’.
I can see the sensor state change in the UI, so I know that the sensor is not the problem.
Any pointers would be greatly appreciated!