#实时统计此时未知用电功率(未扣除弱电)
- platform: template
sensors:
delta_power:
unique_id: "delta_power"
friendly_name: "delta_power"
unit_of_measurement: W
icon_template: mdi:lightning-bolt
value_template: >
{% set P = states('sensor.ju_wei_dian_neng_bao_xi_lie_at2pl_gr2p_power') | float %}
{% set P1 = states('sensor.ykcn_cbcsmj_d0d2_electric_power') | float %}
{% set P2 = states('sensor.ykcn_cbcsmj_3979_electric_power') | float %}
{% set P3 = states('sensor.ykcn_cbcsmj_d2f4_electric_power') | float %}
{% set P4 = states('sensor.ykcn_cbcsmj_356f_electric_power') | float %}
{% set P5 = states('sensor.ykcn_cbcsmj_d264_electric_power') | float %}
{% set P6 = states('sensor.ykcn_cbcsmj_e887_electric_power') | float %}
{% set P7 = states('sensor.zimi_zncz01_1c5f_electric_power_2') | float % }
{% set P8 = states('sensor.zimi_zncz01_fe85_electric_power_2') | float % }
{{ P - P1 - P2 - P3 - P4 - P5 - P6 - P7 - P8 }}
这样写有问题吗?怎么老是识别不了?
|