Home Asstant Linux

Home Assistant and Alexa TTS when laundry is ready

I have just started to use Node Red and has finally got text to speech working with Alexa. It is awsome. I just wantet to share an example. When done you will have Alexa notify you when the laundry is ready. I have used the following hardware:

  • RPI with Aeotec Z Wave Stick
  • Amazon Echo connected to an US account
  • Fibaro Z Wave switch

And software:

  • Home Assistant
  • Alexa TTS component (3rd party)
  • Node Red (installed within HA)

Start by installing the Alexa TTS. Visit here to read the full instructions. https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639

In short you will just have to download this file. Put it in config directory under a folder named custom_components/media_player.

Add this to your configuration.yaml

I have found this to be the hard part. Some use ” and some use US accounts. Sometimes I have had to restart it. If everything works you should see it in HA on the startpage. Also make sure Alexa is online and has played something in the last 15 minutes.

You will also have to create a value_template. You can read more about this here. https://www.home-assistant.io/components/sensor.template/ The purpose of this is to be able to get the power consumtion attribute and be able to tell if the switch has been dropping power and the machine is done.

 

Add this to sensors.yaml (in my case)

 

I suppose you have Node Red up and running. I have added a flow like this.

  • Washer status has Entity ID sensor.washer_w_lav
  • Switch is True or False
  • Was just false? is like below:
  • Reset is set to True
  • Wait 2 mins is just a wait.
  • TTS Ready has domain media_player, service alexa_tts and data {“entity_id”: “media_player.my_echo_plus”, “message”: “The laundry is ready!”}

Done. You will now be notified when laudry is done!

My github and config: https://github.com/planet4/HomeAssistant