šŸ§Æ Door open tts.cloud_say and Piper Announcer (Piper OR Nabu-Casa required)

@rudy12767
Hi, here is that guy :slight_smile:

The way Iā€™ve set up my variables is also why Iā€™m not sure if I can create a blueprint out of my script. I basically also donā€™t see the need, because, as I see it, a blueprint is to make it easy to setup difficult things multiple times.
I do see other advantages of a bleuprint, the way they can be shared, imported and updated through the community forum are very nice.

I think @rudy12767 can import your blueprint and change the tts part to a script call to my script, however that will be overwritten when the blueprint is updated.

I also donā€™t feel like forking your blueprint and adapting it to my needs since I donā€™t use it myself, and then will have to maintain it and check for changes and everything.

@rudy12767
You can import the blueprint and replace this part

    - service: tts.cloud_say
      data:
        entity_id: !input 'speaker_target'
        message: !input 'announcement_message'
        options:
          gender: !input 'speaker_gender'
        language: !input 'speaker_language'

with

    - service: script.google_home_say
      data:
        tts_target: !input 'speaker_target'
        tts_message: !input 'announcement_message'

That will probably work, but as I said, that will be overwritten when you import the blueprint again.
And it will not use the language and gender settings, you will have to set those in my script (or leave default for the settings of your tts service)

Dear Sir_Goodenough and ā€œthat guyā€, thanks for the imput both.

If you want to put this together like he suggested, I have no problem with you posting it back in to the exchange as long as you add links back to the originals in your descriptionā€¦

  • 2022-2-15 - added link to new blueprint.
  • 2022-3-10 - added link to new blueprint.
  • 2022-4-17 - added new blueprint link to family
  • 2022-04-11: Add multiple to Speaker Selection and changed minimum HA to 2022.4.0

New Version today.
I did this a couple of days ago but released it today because of the problems with 2033.5.0 and 2022.5.1 releases not allowing Blueprint Imports.

Please Click the :orange_heart: at the end of the Top Post if you find this Useful

  • 2022-05-05: Updated for 2022.5.0 HA. Added Markdown to !input Descriptions.

Updated the ā€˜other blueprintsā€™ links.

How do I set it up to let it know which window or door is open (entity/device)?

You use the blueprint to make an automation that uses the code in the blueprint.
Simply add a new automation in the automation editor and use this blueprint. It will ask you for the entities.

I have a problem with the automation.
When i set it to remind me that a door/window is open after 120 seconds. It keeps repeating this every 2 minutes.
At night i keep doors open, verry irritating @ night.

Mayby ad a timespan when this may happen, or a option to not repeat the announcement would be a nice addition to the automation :slight_smile:

That is how it was designed. Kind of meant for doors that are normally closed, and it will keep nagging until you close it again.
If something else is desired, the Blueprint would need modification. Perhaps I can take that on as a winter project, but I do not have the ability to do this at this time.

If you want to test and suggest modifications, I could add them in for others and I will give you credit.

It would also be VERY easy to stop and disable the automation during certain hours with a separate automation.

November 30, 2022 > Update. Added ZHA Cube Controller version to library.
December 11, 2022 > Update. Added Device Tracker Blueprint to the list.

  • 2022-12-12: Add Update Method Note, minor code change.
    • Name of Blueprint may have changed meaing you have to re-download with a new link.
    • If name changed, it is similar. Variables have not changed.

2023-01-26 Added new Bluprint

:fire_extinguisher: Zigbee2MQTT Aqara Magic Cube T1-Pro CTP-R01 Xiaomi Lumi cagl02

This Blueprint gives you literally hundreds of actions available on the new Magic Cube.

New Version:

:bookmark_tabs: Changelog

  • 2023-03-01: Add Author Tag. Bump HA required Version to 2023-3-0

Hello! Is it possible to make him speak only if the door is open? Now heā€™s constantly talking when the door opens and closes. Thanks

Change the closing messageā€¦

    final_message:
      name: Final message
      description: 'What to say when door is closed.

        This can be set to "" if you do not want a message after the sensor is reset.'
      default: Thank you for closing the barn door.
1 Like

strong text
I didnā€™t understand how a little.
Did I correct it correctly?

alias: open door
description: ""
use_blueprint:
  path: SirGoodenough/door_open_tts_cloud_say_announcer_nabu_casa_required.yaml
  input:
    door_entity:
      - binary_sensor.datchik_dveri_v_dom_contact
    speaker_target:
      - media_player.googlehome2753
    speaker_gender: female
    speaker_language: ru-RU
    announcement_message: Open door?
    final_message:
      name: Final message
      description: Thank you for closing the barn door.
      default: Thank you for closing the barn door.
    start_time: "09:00:00"
    end_time: "22:00:00"
    cooldown: 40

You should not have had to edit any yaml at all. The blueprint needs to be in the original config to work.
You need to have an original version of the blueprint again (delete it and download a new copy if you need to.)

When you have that back where it was, go into the automation that you created while initializing the BluePrint actions. That is where you can edit what it says an open and at close properly.

Then delete the old calling automation.
You can open the old one in the automation UI editor if you like as well, but I suggest it may be better to delete the old and build a new one.

I explained it wrong. Automation works correctly!
I would like to receive messages only if the door is opened more than the set time.
Now it works like this:
Opened and closed the door = message ā„–1 came
Opened the door, time passed = received message ā„–2. After I closed the door, I received message ā„– 1.

Thatā€™s not how this was made and there is no plan to do that as it is too much work maintaining simple single action automations (as BluePrints).

If you just want the sound once when the door is opened, a simple automation is in order using the automation ui. Trigger door is open. action do a tts.

I have a script BP that will do a TTS for you if that helps. you would generate what you want to say using that BP and call that script as the action of the automation you make above.

Thanks, I understand now

Hi,

Love the blueprint works great, just a small? Request or I hope it is, Iā€™m not a developer :stuck_out_tongue:

But is it possible to add the voice option, like in the play media service?
Creating a setup for my brother and my niece likes this voice for her room, but the parents donā€™t want to have it as the default voice for the rest of the house :wink:

image

FYI: Language support - Speech service - Azure AI services | Microsoft Learn

Thanks in advance!

Kind regards,

D

I am about to release a new version of all my Blueprints to cover recent HA changes. So I canā€™t look at this this week.

Would you be so kind as to add a feature request into my Github so I will not lose this request?

This is a link to the feature request page:

Also watch for an update to this and all of my Blueprints in the coming couple of days.

Done!

Thanks for looking into this!

Kind regards,

D

1 Like

UPDATE:
2023-08-07: Updates for Home Assistant 2023.8

I have a new version in a test branch. Load it up and let me know what you think.

This is a version on a branch that will not always exist, so if you look for this in a couple of weeks, it will likely be merged and this link dead. In that case, look at the master branch.

1 Like

New version released.

  • 2023-08-17: Add voice ability
    • Fix language list
    • Add Weekday ability
    • Set door close timing to soon after door closes

9-22-2023 NEW VERSION

:bookmark_tabs: Changelog

  • 2023-09-22: Add silencing ability if the warning never triggers.

10-05-2023 NEW VERSION

:bookmark_tabs: Changelog

  • 2023-10-02: Add the ability to use Piper TTS.
    • File Rename to reflect new function.
    • Old Automatons will still work when pointed to new BP file name.
    • Added {{ door }} variable for users to plug into the messages.
    • Fixed Bug where crashed if multiple door sensors were selected.

NOTE: For version 2023-10-02 the filename was changed to reflect the large change in function. To update, import the new Blueprint, and edit the prior automation to use the filename for the new BluePrint. Then delete the old BluePrint. Your old Automation for the prior version is compatible with the new blueprint with the exception of the path/name.