Home Assistant - Doing something every X minutes
Emiliano Guerzoni
Project Manager | BESS Development | Driving 3+ GW of Energy Storage Projects in Italy
Hi guys,
Today let me introduce this super easy automation to do something repeatedly.
Use case
You want to set the volume on your google home at a specific value every 15 minutes if not playing.
Software configuration
Home Assistant code (yaml)
This is the piece of code -?Automation?- you have to write down:
alias: Volume - Set the volume of your google home every 15 minutes if not playing
description: Volume - Set the volume of your google home every 15 minutes if not playing
? - platform: time_pattern
? ? minutes: /15
condition:
? - condition: state
? ? entity_id: media_player.yourgooglehome
? ? state: "off"
action:
? - data:
? ? ? volume_level: XXX
? ? entity_id: media_player.yourgooglehome
? ? service: media_player.volume_set
mode: single
Some specifics about the code above
I do hope you have enjoyed this article.
I'm available for any feedback so, feel free to contact me or share your thoughts in the comments section below!
Have a nice sunday, thank you for reading. ??
--------------------------------------------------------------------------------------------------------
Hereafter other articles about Home Assistant :