本帖最后由 killadm 于 2018-1-8 23:19 编辑
版本 Sonoff-Tasmota 5.10.0d
我的sonoff pow控制台里边显示的是
把楼主的代码改成下边这样就能用了
sensor:
#功率
- platform: mqtt
name: "power"
state_topic: "tele/sonoffpow/SENSOR"
value_template: "{{value_json.ENERGY.Power}}"
unit_of_measurement: "W"
#电压
- platform: mqtt
name: "voltage"
state_topic: "tele/sonoffpow/SENSOR"
value_template: "{{value_json.ENERGY.Voltage}}"
unit_of_measurement: "V"
#今天耗电
- platform: mqtt
name: "today"
state_topic: "tele/sonoffpow/SENSOR"
value_template: "{{value_json.ENERGY.Today}}"
unit_of_measurement: "kWh"
#昨天耗电
- platform: mqtt
name: "yesterday"
state_topic: "tele/sonoffpow/SENSOR"
value_template: "{{value_json.ENERGY.Yesterday}}"
unit_of_measurement: "kWh"
#总耗电
- platform: mqtt
name: "total"
state_topic: "tele/sonoffpow/SENSOR"
value_template: "{{value_json.ENERGY.Total}}"
unit_of_measurement: "kWh"
原因找到了
From the release notes:
/* 5.10.0b
Add support for PZEM004T energy sensor to be enabled with define USE_PZEM004T in user_config.h
Change Sonoff Pow Energy MQTT data message and consolidate Status 8 into Status 10
|