Anyone know how to check for this ?
Related to this “feature” request (may already exist!)
Basically a way to provide a pathway to two different options after a button press depending on whether the button has been recently pressed or not.
In HA, I would be check for this in a template condition.
Why cant you use a if condition combined with else like this
on_...:
if:
condition:
- script.is_running: my_script
then:
- logger.log: Script is running!
else:
- switch.turn_on: relay
Thanks - that’s precisely what I want to do - I just didn’t know how with Esphome YAML but it looks like @sheminasalam has shown the way - thanks - I didn’t know an else condition could be used here with Esphome
Sam what is this choose: function you’ve mentioned twice ?
I removed it as initially I didn’t realise this was about esphome… it’s an option for ha scripts and automations