(first post from a new Home Assistant fan ) I’ve created an automation that’s triggered by turning on a Sonoff S26 plug (running Tasmota). As actions, first I have a delay of 60 minutes, and then that plug is powered off. This works great, when I activate the plug, it stays on for 60 minutes and then turns off. (I use it to water my plants, so I can’t forget to stop the water pump)
Would it be possible to display (in a card?) the status of a running automation? So I could see that the plug/pump was started for example 23 minutes ago, and will run for 37 minutes? I know you can go into the Configuration/Automations section, and see the last triggered timestamp. So basically I would like to present that timestamp on my startpage somehow.
I haven’t tried exactly this, so it might need some tweaking, but that should show the last time the automation was trigger as “xx min ago” or “xx hours ago”, something like that. E.g., I have my “sun2” sunrise sensor (which has device_class: timestamp) shown in an entities type card, and it shows this way.
@jtlns, I’d also suggest changing your automation slightly so something like this:
- trigger:
- platform: state
entity_id: switch.XXX
to: 'on'
for:
hours: 1
action:
- service: switch.turn_off
entity_id: switch.XXX
Without getting into details, you want to avoid using a delay step in an automation’s action. The above avoids the issues associated with that, and it handles the case where the switch is turned off another way before the 60 minutes expires.