mirror of
https://github.com/lehanspb/tuya-mqtt.git
synced 2025-12-16 17:54:36 +00:00
Update tuya-mqtt.js
This commit is contained in:
@@ -123,7 +123,7 @@ function publishDeviceTopics(device, dps) {
|
||||
const topic = baseTopic + stateTopic
|
||||
let state
|
||||
// Only publish state updates for DPS values included in device data
|
||||
if (dps.hasOwnProperty('dpsKey')) {
|
||||
if (dps.hasOwnProperty(template.dpsType)) {
|
||||
switch (template.dpsType) {
|
||||
case "bool":
|
||||
state = (dps[template.dpsKey]) ? 'ON' : 'OFF';
|
||||
|
||||
Reference in New Issue
Block a user