Using siteid as HASS entity?

I’m experimenting with Rhasspy + HASS integration and it works beautifully, but it leaves me wanting in one specific area.

I have light groups for each room, and intend to put a pi with a mic in each room with a satellite on it. I can now do "turn on the lights in (the) ‘Living Room’, with the room name corresponding to a group in HASS and it works great.

But what I really want is to be able to say “turn on the lights” and “Living Room” being implied by the satellite that received the command.

Can it be done?

Edit: I ended up doing it like this, which also uses Area names instead of having to create groups, pretty happy with it:

intent_script:
  ChangeRoomLightState:
    speech:
      text: 'Lights in {{ _intent.siteId }} turned {{ state }}.'
    action:
      service: light.turn_{{ state }}
      target:
          area_id: '{{ _intent.siteId | regex_replace("\W", "_") }}'
1 Like

Give this a shot.

I believe you just call {{ siteId }} or {{ site_id }} i don’t think you need _intent.