I thought it was a Home Assistant issue, but looking at the Rhasspy logs, it might be buried somewhere here in Rhasspy.
I previously had TP-Link switches controlling lamps. I’ve since removed the switches and now am using Zigbee bulbs, seen as ‘light’ entities in Home Assistant.
Here is the Rhasspy sentence:
[ChangeLightState]
light_name = (brass | dog | rabbit | bedroom) {name}
light_state = (on | off) {state}
turn <light_state> [the] <light_name>
turn [the] <light_name> <light_state>
<light_name> <light_state>
and this is shown in the Rhasspy logs:
DEBUG:2021-10-26 14:38:19,674] rhasspyserver_hermes: <- NluIntent(input='switch.living_room_3 on', intent=Intent(intent_name='ChangeLightState', confidence_score=1.0), site_id='Listener1', id=None, slots=[Slot(entity='light', value={'kind': 'Unknown', 'value': 'switch.living_room_3'}, slot_name='light', raw_value='dog lamp', confidence=1.0, range=SlotRange(start=0, end=20, raw_start=0, raw_end=8)), Slot(entity='state_on_off', value={'kind': 'Unknown', 'value': 'on'}, slot_name='state', raw_value='on', confidence=1.0, range=SlotRange(start=21, end=23, raw_start=9, raw_end=11))], session_id='Listener1-porcupine_raspberry-pi-91e9865f-4593-4b98-80f8-8e3985349d72', custom_data='porcupine_raspberry-pi', asr_tokens=[[AsrToken(value='switch.living_room_3', confidence=1.0, range_start=0, range_end=20, time=None), AsrToken(value='on', confidence=1.0, range_start=21, range_end=23, time=None)]], asr_confidence=1.0, raw_input='dog lamp on', wakeword_id='porcupine_raspberry-pi', lang=None)
[DEBUG:2021-10-26 14:38:16,185] rhasspyserver_hermes: <- HotwordDetected(model_id='/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/pvporcupine/resources/keyword_files/raspberry-pi/porcupine_raspberry-pi.ppn', model_version='', model_type='personal', current_sensitivity=0.318, site_id='Listener1', session_id=None, send_audio_captured=None, lang=None, custom_entities=None)
My question is, why does Rhasspy form the intent using a Home Assistant entity name? Should it not simply pass < light > and < state > values to Home Assistant in the intent?
DOH!! It’s a SLOT definition causing the issue, and it’s in Rhasspy, and it’s all MY FAULT.