jofr
(jofr)
October 11, 2020, 11:30am
1
I can turn the plug on/off but the energy values will not change.
I upgraded from 0.114 to 0.116.2 but no change.
I used the GUI to integrate the plug and adapted the configuration file as follewed
and the result is:
and the values will not change.
In the TP link smart app it is changing.
jofr
(jofr)
October 15, 2020, 1:34pm
2
I changed it to this and now is it working
sensor:
- platform: template
sensors:
tp1_amps:
friendly_name_template: "{{ states.switch.tp1.name}} Stroom"
value_template: '{{ states.switch.tp1.attributes["current_a"] | replace(" A", "") | float }}'
#value_template: '{{ states.switch.tp1.attributes["current_a"] | float }}'
unit_of_measurement: 'A'
tp1_watts:
friendly_name_template: "{{ states.switch.tp1.name}} Moment_verbruik"
value_template: '{{ states.switch.tp1.attributes["current_power_w"] | replace(" W", "") | float }}'
unit_of_measurement: 'W'
tp1_t_kwh:
friendly_name_template: "{{ states.switch.tp1.name}} Tot_energie"
value_template: '{{ states.switch.tp1.attributes["total_consumption"] | replace(" kWh", "") | float }}'
#value_template: '{{ states.switch.tp1.attributes["total_consumption"] | float }}'
unit_of_measurement: 'kWh'
tp1_volts:
friendly_name_template: "{{ states.switch.tp1.name}} Spanning"
value_template: '{{ states.switch.tp1.attributes["voltage"] | replace(" V", "") | float }}'
#value_template: '{{ states.switch.tp1.attributes["voltage"] | float }}'
unit_of_measurement: 'V'
tp1_d_kwh:
friendly_name_template: "{{ states.switch.tp1.name}} Energie_vandaag"
value_template: '{{ states.switch.tp1.attributes["today_energy_kwh"] | replace(" kWh", "") | float }}'
#value_template: '{{ states.switch.tp1.attributes["today_energy_kwh"] | float }}'
unit_of_measurement: 'kWh'