MarkR
February 14, 2020, 4:36pm
1
Hello
I have a sensor in HA that pulls the power (w) reading via MQTT but they are different from what I see on the sonoff page. Anyone know why this would happen please? sometimes it is 1 or 2w other times it is 20-30w different
- platform: mqtt
name: "TV Power"
state_topic: "tele/tv/SENSOR"
value_template: '{{ value_json["ENERGY"]["Power"] }}'
unit_of_measurement: "W"
tom_l
February 14, 2020, 5:14pm
2
The sampling of the two displays are not synchronised in time in any way. So if the value is changing or noisy the two values will not be the same.
MarkR
February 14, 2020, 5:24pm
3
I figured that would be the case… I take it there is no way to force to to update the mqtt quicker? or to me more accurate?
tom_l
February 14, 2020, 5:46pm
4
It’s not inaccurate, just sampling a changing signal at different times.
If you want the home assistant sensor to update more often get your sensor to publish more often.
MarkR
February 14, 2020, 7:17pm
5
figured it out… you can force Tasmota to update more frequently…
cmnd/tasmota/TelePeriod 30 - forces an update every 30 seconds.