is there a possibility that instead of the delay in the automation creates a sensor indicating the remaining time until the switch is turned off?
My automation…
- alias: "Telegram - Bewässerung Garten 30 Minuten"
initial_state: 'on'
hide_entity: true
trigger:
platform: event
event_type: telegram_callback
event_data:
data: '/30minuten'
action:
- service: telegram_bot.answer_callback_query
data_template:
callback_query_id: '{{ trigger.event.data.id }}'
message: 'Gartenbewässerung AKTIV!'
- service: switch.turn_on
entity_id: switch.brunnen
- service: camera.snapshot
data:
entity_id: camera.garten
filename: '/Kamera/snapshot2.jpg'
- delay: '00:00:05'
- service: telegram_bot.send_photo
data:
file: '/Kamera/snapshot2.jpg'
caption: Snapshot vom Garten
- delay: '00:30:00' ## --> This Time will ich see!
- service: switch.turn_off
entity_id: switch.brunnen
- service: telegram_bot.send_message
data:
message: 'Gartenbewässerung für 30 Minuten beendet!'