I am trying to make an app that will connect to the HomeAssistant Rest API (not legacy http api). I know how to make the calls and everything… I am having trouble surfacing the the intent value. For some reason I am getting the intent synonym. Any Idea how to get the real value?
the slot for “state” has 3 values
query (synonyms are,is)
on (synonyms turn on)
off (synonyms turn off)
if len(intentMessage.slots.state) > 0: myState = intentMessage.slots.state.first().value if len(intentMessage.slots.device_name) > 0: myDeviceId = intentMessage.slots.device_name.first().value
in the case of triggering the intent are the lights turned on
myState should be query
myDeviceId should be group.all_lights
but instead I am getting myState = are and myDeviceId = all lights
what am I missing and how can I get the real value when leveraging synonyms? As a workaround I can hardcode some if’s but i’d prefer to find a solution.