diff --git a/plejd/MqttClient.js b/plejd/MqttClient.js index 92d7f4c..c316798 100644 --- a/plejd/MqttClient.js +++ b/plejd/MqttClient.js @@ -26,7 +26,7 @@ const TOPICS = { COMMAND: 'set', }; -const getMqttType = (/** @type {{ uniqueId: string; type: string; }} */ plug) => (plug.type === 'scene' ? MQTT_TYPES.SCENE : plug.type); +const getMqttType = (/** @type {{ uniqueId: string; type: string; }} */ plug) => (plug.type === 'switch' ? MQTT_TYPES.LIGHT : plug.type); const getBaseTopic = (/** @type {{ uniqueId: string; type: string; }} */ plug) => `${discoveryPrefix}/${getMqttType(plug)}/${nodeId}/${plug.uniqueId}`;