Skip to content

Commit

Permalink
Fix no energy reported for TuYa TS011F_plug. Koenkk#5052
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Dec 2, 2022
1 parent b21905b commit d704181
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions devices/tuya.js
Original file line number Diff line number Diff line change
Expand Up @@ -2346,7 +2346,7 @@ module.exports = [
},
},
{
fingerprint: [160, 69, 68, 65, 64].map((applicationVersion) => {
fingerprint: [160, 69, 68, 65, 64, 66].map((applicationVersion) => {
return {modelID: 'TS011F', applicationVersion, priority: -1};
}),
model: 'TS011F_plug_3',
Expand All @@ -2365,7 +2365,10 @@ module.exports = [
},
options: [exposes.options.measurement_poll_interval()],
onEvent: (type, data, device, options) =>
tuya.onEventMeasurementPoll(type, data, device, options, true, device.applicationVersion === 160),
tuya.onEventMeasurementPoll(type, data, device, options,
device.applicationVersion !== 66, // polling for voltage, current and power
device.applicationVersion === 160 || device.applicationVersion === 66, // polling for energy
),
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_ntcy3xu1']),
Expand Down

0 comments on commit d704181

Please sign in to comment.