In early 2022 I started playing with Home Assistant to increase my control over my home's smart devices. I've created a number of automations and scripts and I've started converting relevent ones into blueprints to share. Here is what I've converted so far.
My goal is to create high quality blueprints that ease HA automation significantly.
Name / Code | HA Integration | Details |
---|---|---|
Announce Sonos Alarm | Announces when the next alarm is set on the specified Sonos speaker within the requested time period. This is helpful as part of an automation when going to bed so you don't need to use a phone app to see when/if an alarm is set. Additional details here. | |
Play Media | Plays the specified media with shuffle, repeat and volume options. If you have a multi-room setup (e.g. Sonos) additional media players can be specified. The script will place all players into a group and if a volume is specified it will be applied to all players. Additional details here. | |
Play Random Media | This is the same as Play Media except you can specify a list of media content ids that the script will randomly choose from whenever the script is invoked. Additional details here. |
|
Sonos Say | Uses Text-to-Speech to play a message on Sonos speakers. The script handles oddities I've observed including handling Sonos saving/restore state, handling speaker groups, pausing music, managing volume, disabling repeat, etc. Additional details here. | |
Stop Sonos Alarm | Stops current audio on the specified Sonos speaker but if nothing is playing the script checks if an alarm is coming soon and if so, prevents it from going off by disabling the alarm and then re-enabling after it would have gone off. Only one alarm is impacted. This is perfect for when you wake up earlier than your alarm and don't want the alarm to wake others. Additional details here. |
Name / Code | HA Integration | Details |
---|---|---|
Contextual Pico Media Remote | Allows a Lutron Caseta 5 button Pico remote to contextually control music or an Xbox. It assumes Sonos speakers are being used, and the same speakers are used for both music and the Xbox. Additional details here. | |
Sonos Sleep / Alarm Handler | Listens for a button press and depending on when, will either disable an upcoming alarm and run a configurable action, or will announce the next alarm, play sleep music and run a configurable action. This uses a variety of the script blueprints found above. Additional details here. | |
Automatic Timed Turn Off | Automatically turns off the specified switch after a given time period whenever the specified switch is turned on. This was my equivalent of hello world to figure out how to create blueprints. |
In addition to actual blueprints, I have put together some thoughts on enhancements to blueprints.
Name | Details |
---|---|
Dependency support in Blueprints | Blueprints do not have dependency support leading to either cutting and pasting of code, or requiring users of blueprints to manually install multiple blueprints. This is a proposal to address the issue. |