Quick-fix to force switch devices to the light mqtt domain
This commit is contained in:
parent
74e381f009
commit
a633ffacb3
1 changed files with 1 additions and 1 deletions
|
|
@ -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}`;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue