Using Custom Data with HASS


#1

Hi!

I am trying to use PsychoKillers answerYesOrNo add on for snips. He doesn’t use HASS so can’t be much help on this.

I am triggering a snips.say_action asking a question. The YesOrNo by Psycho allows me to answer yes or no to the question but I need it to trigger a certain action on HASS based on the question asked. I though Custom_data would be best for this.

How do I set a custom)data attribute and get that attribute to filter an action inside of an intent_script. This is what I have at the moment:

snips:
intent_script:
answerYesOrNo:
action:
- service: input_boolean.turn_on
data_template:
entity_id: ‘input_boolean.tvon’

I want it to trigger that action under answerYesOrNo only if custom data contains tvon.

Thanks for any help!


#2

Really sorry about the delay seeing this. I will look at adding customData to the snips component so you can use this. I do the same thing but putting the thing I am sayign yes or no to in the custom data and having the yesno intent handle it that way.

There would probably be a way to work around it using something like listening on the mqtt message directly. I do this to pass my mqtt topics to appdaemon and perfom actions there.

- alias: jarvis_intent
  trigger:
    platform: mqtt
    topic: hermes/intent/#
  action:
    event: JARVIS_MQTT
    event_data_template:
      topic: '{{ trigger.topic }}'
      payload: '{{ trigger.payload }}'

But I’ll try to update when I add that customData to the available variables.