No problem.
It works in two parts .
first part
Item select to speak.yaml
This automation use two input selects to hold the data and extracts the attributes from the entities listed (entity_list ) and convents them into a readable format for alexa to speak (speak list).
The entity_list
Holds all the entities you want alexa to speak . These are referenced from 0 so in my example list entity 0 (e00) is binary_sensor.front_door and entity 4 (e04) is light.living_room
The speak list
This holds the sentences you want alexa to speak . Every thing inside the brackets is replaced with data from the entities list or HA time and date. Again the list starts from 0. The first entry in speak list must be do not use. as it is used by the automation . So the real trick here is you have 99 different messages you can call from the input select or use a number from 1 to 99 to select the message.
The codes inside the brackets will extract information from the entities in the entity_list.
So normally if you were sending a message to alexa or anything else you would need some coding wizardry to extract the data . So you can replace
âThe patio door is {{states.binary_sensor.patio_door.state|replace(âoffâ,âclosedâ)|replace(âonâ,âopenâ)}}â
with
âThe patio door is (e01s)â
My code handles all device types and unit of measure . It can also be polite and say morning, afternoon or evening depending on time of day.
Second part
Dummy lights to item select.yaml
This automation uses the dummy light trick . If you create a template light with nothing in it. You can use the brightness level 1 to 99 to trigger the input select , so brightness 1 selects input select speak_list option 1 and so on
If you get Alexa to recognise this light ( Alexa cannot see input selects). You can use the alexa app on your phone to program a routine to trigger the bulb.
So in your alexa app you can program for example âis the patio door openâ and get the alexa app to set the bulb to brightness that matches the speak_list âThe patio door is (e01s)â
So now you can get alexa to speak any attribute without coding . You can change the lists in the file editor and test simply by selecting the speak_list in lovelace.
Simple example
entity_list:
name : Entity List
options:
- binary_sensor.front_door
speak_list:
name: Speak List
options:
- do not use
- Good (gr) the (e00f) is currently (e00s)
This will send the following message âGood evening the front door is currently closedâ