#Assit reply with sensor value?

1 messages · Page 1 of 1 (latest)

scenic bear
#

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!

near sparrow
#

Need more details on the automation, like what are the steps in it?

scenic bear
lucid loom
#

We can help you better if you'd actually share the YAML of the automation

kindred pendantBOT
#

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.

scenic bear
# lucid loom We can help you better if you'd actually share the YAML of the automation
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.

lucid loom
#

Don't use assist_satellite.announce

#
action:
  - set_response: "Yes, at least one window is open"
scenic bear
lucid loom
#

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

scenic bear
#

Oh cool! I'll try asap. Thanks again!

lucid loom
#

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
scenic bear
lucid loom
#

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)

scenic bear
#

Message malformed: Unable to determine action @ data['actions'][0]['then'][0]

Maybe it's "action" instead of "actions"?