TTS_say_Message-2024-06-08 by SirGoodenough
๐ฃ This is a script that can use any of the 11 integrated TTS Platforms in Home Assistant to send a message to a media player. Some will require Google Type Speakers, some will require Non-Google type speakers.
These integrations are listed here. Please refer to these pages for care and feeding of the *tts_say method you choose. โ https://www.home-assistant.io/integrations/#text-to-speech
This blueprint WILL NOT set-up TTS for you. You will be given the opportunity to add the incorrect options that will NOT allow your TTS to function. Your best road to success will be to add a TTS session with UI, and only after that is successfully talking to you should you take the languages and options that work there and apply them in this Blueprint. The safest thing to do other than that is to start with the basic sonfiguration for the TTS_say integration that you are using and add options one at a time.
The very basic requirements are for you to provide the *tts_say method that you have installed and tested, the entity that you want to send it to, and the message you want to send. Beyond that likely involves trial and error that may best be done in the Developer Tools Services area here:
I have added an action statement both before and after the main TTS call. You can choose to ignore these, or you can use them to change volume, add a media player to play a doorbell, turn on a light, add a delay, whatever you want to do.
The Scripts produced by this blueprint can be called from an automation & variable values for the message and the media_player can be sent on the fly. For details check out the instructions here.
โ ๏ธ This Blueprint makes the assumption that you already have a tested & proven TTS integration installed and you know how it works and how to use it โ ๏ธ
You will need to verify that the name you have given to the TTS integration in your system configuration is the Default name or you need to change this blueprint to use the custom name you have set in the tts: section of configuration.yaml.
This will be a way to streamline your automations and scripts. It provides specific services that can be called with a single line service call. This is contrasted to the multiline service calls of repeating values spread throughout your configuration.
In addition it puts all your TTS specific code in 1 spot, the blueprint, and that allows it to be called over and over. Plus it gives you one place, the blueprint, to repair issues should they arrise. ๐
Community link for this blueprint
๐ฟNotice๐ฎ๐ฟโโ๏ธ:
-
Copies of the original Blueprint that were converted via the 'Take Control' feature or other means are officially not supported by me.
-
I may or may not be able to support you when you have a problem after you make changes to my code, as some of the code is no longer mine.
-
I & my license also require attribution as a link back to the original should you use this code in your own creation.
-
Here is a link to my license & the original github post expected to be followed & referenced as attribution should you use this code elsewhere.
Import to Home Assistant
Click to import this blueprint directly into your Home Assistant instance.
Configuration
Requires 11 inputs to configure
Source Code
View on GitHubDetails
Related Blueprints
More device control automations you might like
Motion-activated Light
Example Automation Blueprint
On-Off schedule with state persistence
On-Off schedule with state persistence
A simple on-off schedule, with the addition of state persistence across disruptive events, making sure the target device is always in the expected state. ๐ Full documentation regarding this blueprint is available here. ๐ This blueprint is part of the Awesome HA Blueprints project. โน๏ธ Version 2021.10.26Simple Safe Scheduler
Simple Safe Scheduler
Scheduling a periodic action in Home Assistant might be trickier than what it looks at first glance. Not only the available automation triggers are limited to only time-based schedules (requiring the user to either use template triggers or install additional integrations for more complex scheduling options), but they also do not guarantee that the automation is executed at the provided time. As an example, let's assume automation A is scheduled to run at 12:00. If the Home Assistant server goes down at 11:59 due to a disruptive event (e.g. power outage, planned maintenance, hardware failure etc.) and comes back up at 12:01, the A automation run scheduled for 12:00 would simply be skipped, without any warning to the user. The Simple Safe Scheduler blueprint tries to mitigate scheduling limitations in Home Assistant by providing an easy interface to configure periodic actions, with built-in safety checks to ensure the action actually runs even in case of a disruptive event. The configured automation acts as a simple scheduler, allowing to flexibly program any kind of action based on the following parameters:- Time of the day (dynamically provided as an
input_datetimeentity); - Day of the week (multiple days can be selected);
- Week frequency (allowing to schedule the action to run i.e. every 2 weeks).