Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95964

Need help on automation trigger from/with rhasspy

$
0
0

@pploume wrote:

Hi,

I’m using on 2x Pi3B+ : 1x Home Assistant (not hass.io) and 1x rhasspy.
Every thing is ok …

In rhasspy, I use the example [SetLight] with room, in slot :
(from rhasspy)

"hass_event":
"event_data":
"_raw_text": "allume tout"
"_text": "allume tout"
"piece": "bureau"                                               <---- piece = room in french !!! 
"event_type": "rhasspy_SetLight"

well received by Home Assistant (function “Listen to event” )

But, I don’t understand how to “script” into automation.yaml.

What I want to do is :
Make a test on the value of (the slot) room
and tts something different depending of the value
and tts the slot (too …)

- alias: 'rhasspy 2'
  trigger:
    platform: event
    event_type: rhasspy_SetLight
    event_data: 
      piece: rhasspy_SetLight.piece
  action:
    - service: light.turn_on
      entity_id: light.bureau
    - service: rest_command.tts
      data_template: 
        #{payload: "Office switched on at {{now().hour}} and {{ now().minute }} minutes"}
        {payload: "I switched on  {{ piece }}"}

A first sight, ‘event_data’ blocks HA … or it is SetLight.piece
I don’t know/understand

I’ve tryied some examples from this forum / web, but they generates errors or hang

Help mucho mucho appreciated
Link to up2date documentation / examples welcome.

Thanks to share and help

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>