I can't find any way anywhere to get my assistant to reply with the value of a given helper or sensor. I could only manage to get an automation to give me a static answer back if a sensor is in the "on" state. If it's "off" it just says "done". I'd like to use a single automation to get a more specific answer or get back the value of a sensor. Thanks to anyone that will help me!
#Assit reply with sensor value?
1 messages · Page 1 of 1 (latest)
Need more details on the automation, like what are the steps in it?
The automation starts with a speech recognition and, if a condition is verified, it announces a specific answer. What I would've liked to do is ask about a sensor and not having to wait for the LLM to go through the entities and answer, but to just read the value of the sensor
We can help you better if you'd actually share the YAML of the automation
Sadly we're not mind readers (any more anyway, not after the last time we tried). Please share the YAML and any errors so we can see what you've done.
alias: Open Windows
description: ""
triggers:
- trigger: conversation
command: Are there open windows?
conditions:
- condition: state
entity_id: binary_sensor.windows
state: "on"
actions:
- action: assist_satellite.announce
metadata: {}
data:
message: Yes, at least one window is open
target:
device_id: 75221b0fa31c2bd500812254ed02b696
mode: single
You're right. Here's what I got. I want to improve this to give tell me which window is open. And I wanted to create one that tells me what's the temperature inside the house (I created an helper that gives me an average). For the windows automation I created an helper that pools the status of all the window sensors because I didn't know how to poll and return the status of each window.
P.S. I'm using your weather automation, it's awesome! Thank you for your work.
Don't use assist_satellite.announce
action:
- set_response: "Yes, at least one window is open"
I took a look at it and makes sense. But how do I specify what device this output should be played back on?
That's the beauty of it, you don't have to. It will be the response issued by the device you issued the command on
Oh cool! I'll try asap. Thanks again!
Ah, wait, it will still issue Done when there is no open window
Do this instead
alias: Open Windows
description: ""
triggers:
- trigger: conversation
command: Are there open windows?
actions:
- if:
- condition: state
entity_id: binary_sensor.windows
state: "on"
then:
- set_response: "Yes, at least one window is open"
else:
- set_response: "No, all windows are closed"
mode: single
It didn't work unfortunately. As soon as I save it, HA empties most of it and it's back to saying "Done" instead of answering with the second response
What do you mean with empties most of it?
Oh, wait, I see what's wrong
Fixed above
There was a duplicate key (both actions and action)
Message malformed: Unable to determine action @ data['actions'][0]['then'][0]
Maybe it's "action" instead of "actions"?