Hi I’m just starting with the automation configuration through homeassistant rather than in YAML.
I have created an automation using an MQTT sensor to advise if my garage door is open. However I want to add a condition that its open for say 60 mins. Given its a MQTT sensor and not an entity how do I achieve this?
Thanks
Use
for:
minutes: 60
In the trigger
There’s not that option as I’m not using YAML - I’m using the drop downs in the automation section under configuration.
I could add another trigger type of time but thats not really a “for”.
Appreciate advice.
Make a binary MQTT sensor for the door status, and then you can use a state trigger, as suggested by Marc
Its because as Tinkerer says I need to make a Binary sensor for the MQTT sensor then it will be there. Thanks for all advice, I now need to find how to make a binary sensor and should be ok.
Why does it need to be a binary sensor? Any kind of sensor will do and you said you already had an mqtt sensor
I don’t know. But I’ve seen a mention of that elsewhere. The MQTT isn’t actually a sensor I guess. Perhaps someone else can answer. All I know is it doesn’t actually appear as a sensor.
A binary sensor makes most sense for a door, and then you can apply a device class of garage_door
so that it looks like one in the UI.
I cannot get the drop down:
Theres no From/To/For as in your example. What am I missing?
For goes on the trigger not the condition, usually. ie trigger when garage door is in state open for 60 minutes.
Are you on a really old version of homeassistant?
No Im an Idiot! Yes of course its a TRIGGER! Many thanks - sorry to waste your time. All sorted.
Ha, no worries, glad you’re sorted