I have 3 automations for my doorbell in combination with a sonoff module:
let’s ring the doorbell between 07:00 and 19:00
don’t ring the doorbell but push a notify message between 19:00 and 07:10
the last one lets the doorbell rings for the whole day for example when somebody comes to visit ut after 19:00.
But when i restart HASS this automations will be triggered, so when i change some config or something and i want to restart HASS my doorbell rings. I don’t want that
How can i fix my problem?
Thank you for your quick reply.
When i switch off the automation and restart HASS the doorbell doesn’t ring.
But when i switch on the automation the doorbell does ring, so the problem is in the automation…
This is my automation:
- id: '1535832688944'
alias: Deurbel overdag geluid
trigger:
- payload: 'ON'
platform: mqtt
topic: cmnd/Klik/POWER1
condition:
- after: 07:00
before: '19:00'
condition: time
action:
- data:
payload: '3'
topic: cmnd/sonoff-bel/power
service: mqtt.publish
- data:
message: Er staat iemand voor de deur
service: notify.pushover
I dont understand what you mean.
I dont make any switch of my doorbell in my configuration.
Can i use the retain option in the condition part of the automation?
At my light switches i use the retain option so home assistant knows what the status of my lights are.
I haven’t a mqtt topic for my doorbell.
I read the info from my sonoff device log and put in an automation.
I want also make a sensor to read the last time when my doorbell is triggered but also that doesn’t work.
i use that within the connection with the sonoff device.
Both are connected with the same MQTT broker.
What i want is when somebody is pressing the doorbell (the trigger at “cmnd/Klik/Power1”) i receive a message at my phone and the doorbell rings.
Thanks for this… I used it… only issue I had was that while developing, and reloading automations, the automations that are intended to be delayed are never started (until a restart of home assistant).
I played around a bit and found a work around for that by firing the turn_on action also after a reload of the automation component… posted on another similar query: