(solved)Empty siteId recieved in intent


#1

I’m successfully using snips in combination with Home Assistant which is awesome.
Right now I am about to integrate snips sonos and home assistant and therefore need to access the siteId within the snips intent part of coresponding home assistant component.

This is what I have right now:

TVOFF:
  action:
    - service: switch.turn_off
      data_template:
         entity_id: switch.{{ device }}
    - service: script.turn_on
      entity_id: script.say
      data_template:
        variables:
          where: '{{siteId}}'
          what: 'OK, Ich mache {{device}} aus'

Regarding to this documentation: https://www.home-assistant.io/components/snips/ the siteId is provided as a “special slot”.

When trying to access it I just recieve a empty string. It seems that siteId is not populated.

Can anyone shed some light on this?

Thanks!


#2

Found the solution, just seconds after posting this…

it is "site_id" not “siteId

the working script is:

TVOFF:
  action:
    - service: switch.turn_off
      data_template:
         entity_id: switch.{{ device }}
    - service: script.turn_on
      entity_id: script.say
      data_template:
        variables:
          where: '{{site_id}}'
          what: 'OK, Ich mache {{device}} aus'

#3

Good deal, was about to reply. Snips uses the mixed cast siteId and HA uses _ so site_id. It can make it confusing but we want to be consistent within HA.