I built the below automation. When the doorbell button is pressed it doesn’t turn on the lights, but when I manually trigger the automation the lights turn on. Therefore I’m assuming something with my trigger is wrong. Any ideas? I’m not sure the “to:” is correct, I just pulled that from other articles I read and that’s what they had.
alias: Doorbell lights on
description: ''
trigger:
- platform: state
entity_id: binary_sensor.skybell_front_door_button
to: 'on'
condition: []
action:
- service: switch.turn_on
data: {}
entity_id: switch.led_lights
mode: single
On the face of it it should work - but when I set up all my momentary switch (i.e. button) automations I used the from / to trigger for some reason. See below. I don’t know why, these were done well over a year ago but maybe worth a try.
trigger:
platform: state
entity_id: binary_sensor.button
from: 'off'
to: 'on'
I have seen this happen with my own stuff. Your automation is probably defaulting to Disabled. Try including initial_state: true and I bet it will work!
alias: Doorbell lights on
description: ''
initial_state: true
trigger:
...
@_Mike looks like your suggestion in adding “initial_state: true” did the job, thanks!
However, there appears to be a significant delay from when the button is pressed to when the light turns on.
Any ideas on that one by chance?
I wonder if its because I’m going through Smarthings. There could be a delay there, but i’m not sure how to tweak that.
Skybell doorbell
Light switch: GE Zwave (not sure model as it came with the house) This is connected through my smartthings hub.
alias: Doorbell lights on
description: ''
trigger:
- platform: state
entity_id: binary_sensor.skybell_front_door_button
from: 'off'
to: 'on'
condition: []
action:
- service: switch.turn_on
data: {}
entity_id: switch.led_lights
initial_state: true
mode: single
To confuse me more, I see this error now.
Log Details (WARNING)
Logger: homeassistant.components.binary_sensor
Source: helpers/entity_platform.py:603
Integration: Binary sensor (documentation, issues)
First occurred: 10:48:48 AM (3 occurrences)
Last logged: 10:49:08 AM
Updating skybell binary_sensor took longer than the scheduled update interval 0:00:05
I’m trying to do the same automation but binary_sensor.skybell_front_door_button always stay to “off” when I press the door bell button. What’s going on?