zachowj / hass-node-red

Companion Component for node-red-contrib-home-assistant-websocket to help integrate Node-RED with Home Assistant Core
MIT License
442 stars 181 forks source link

Sentence trigger function signature has changed in HA 2024.4 #260

Closed synesthesiam closed 3 months ago

synesthesiam commented 3 months ago

As of 2024.4, the callback function signature for sentence triggers has an additional parameter (device_id).

This code here needs to change: https://github.com/zachowj/hass-node-red/blob/16b40cda30b0ca11811813e7fc90d57fff431c56/custom_components/nodered/websocket.py#L311

It needs to become:

async def handle_trigger(sentence: str, result: RecognizeResult = None, device_id : str | None) -> str: