Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt committed Dec 6, 2023
1 parent c85bc32 commit ba35062
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/entities/homeAssistantHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const startup = ({
}
sendonce++;
} else if (lightmode === 'dimmer') {
publish_topic = true;
payload = {
"~": `${mqttConfig.topic_prefix}/a${areaKey}c${channelKey}`,
name,
Expand All @@ -69,6 +70,7 @@ export const startup = ({
brightness: true
};
} else {
publish_topic = true;
payload = {
"~": `${mqttConfig.topic_prefix}/a${areaKey}c${channelKey}`,
name,
Expand All @@ -82,6 +84,7 @@ export const startup = ({
}

} else if (type === 'motion') {
publish_topic = true;
topic = `${mqttConfig.discovery_prefix}/binary_sensor/a${areaKey}c${channelKey}/config`;
payload = {
name: `${bridges.area[areaKey].name} ${channelName}`,
Expand All @@ -90,6 +93,7 @@ export const startup = ({
availability_topic: `${mqttConfig.availability_topic}`
};
} else if (type === 'temperature') {
publish_topic = true;
topic = `${mqttConfig.discovery_prefix}/sensor/a${areaKey}c${channelKey}/config`;
payload = {
name: `${bridges.area[areaKey].name} ${channelName}`,
Expand Down

0 comments on commit ba35062

Please sign in to comment.