diff --git a/custom_components/localtuya/__init__.py b/custom_components/localtuya/__init__.py index e4893de0d..90bbc7ffe 100644 --- a/custom_components/localtuya/__init__.py +++ b/custom_components/localtuya/__init__.py @@ -91,6 +91,8 @@ async def _handle_set_dp(event: ServiceCall): raise HomeAssistantError("unknown device id") host = entry.data[CONF_DEVICES][dev_id].get(CONF_HOST) + if node_id := entry.data[CONF_DEVICES][dev_id].get(CONF_NODE_ID): + host = f"{host}_{node_id}" device: TuyaDevice = hass.data[DOMAIN][entry.entry_id].devices[host] if not device.connected: raise HomeAssistantError("not connected to device")