Hassio any Light on off

How do I connect and control my two lights with rhasspy by home assistant?
Thanks

Hi @czadikem
There is a good example in Documentation
https://rhasspy.readthedocs.io/en/latest/tutorials/#rgb-light-example

Also you can find there a lot of information regarding initial setup, tuning, etc

What should my automations.yaml file look like? After I have it setup?

I’ve been re-writing my slots, sentences, and automations today. Just completed debugging this particular configuration, with the generous assistance of another user here @TinyDoT :slight_smile:

slots definition for all lights:

    "lights": [
        "(outside lights):group.lights_outdoor",
        "(inside lights):group.lights_indoor",
        "(downstairs lights):group.lights_downstairs",
        "(indoor lights):group.lights_indoor",
        "(bedroom lamp):switch.bedroom_lamp",
        "(dog lamp):switch.living_room_3",
        "(upstairs lights):group.lights_upstairs",
        "(brass lamp):switch.living_room_2",
        "(outdoor lights):group.lights_outdoor",
        "(rabbit lamp):switch.sunroom_rabbit_lamp",
        "(all lights):group.all_lights"
    ],

Sentences definition for turning lights on and off:

[ChangeLightState]
(turn | switch) ($state_on_off){state}  [the] ($lights){light}
(turn | switch) [the] ($lights){light} ($state_on_off){state}
($lights){light} ($state_on_off){state}

Automation to fire on this Rhasspy event:

- id: '0991'
  alias: "Rhasspy Turn lights on/off"
  trigger:
    platform: event
    event_type: rhasspy_ChangeLightState
  action:
    service_template: 'switch.turn_{{ trigger.event.data["state"] }}'
    data_template:
      entity_id: '{{ trigger.event.data["light"] }}'
3 Likes

Thank you I got it know.