vesync update template sensors examples (#20018)

This commit is contained in:
SNoof85 2021-10-28 08:58:18 +02:00 committed by GitHub
parent 21609245a9
commit 0566ada748
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,20 +110,16 @@ Adapted from the [TP-Link integration](https://www.home-assistant.io/integration
{% raw %} {% raw %}
```yaml ```yaml
sensor: template:
- platform: template - sensor:
sensors: - name: "Vesync current comsumption"
vesync_switch_watts: state: "{{ state_attr('switch.vesync_switch', 'current_power_w') | float(default=0) }}"
friendly_name_template: "{{ states.switch.vesync_switch.name}} Current Consumption"
value_template: '{{ states.switch.vesync_switch.attributes["current_power_w"] | float }}'
unit_of_measurement: "W" unit_of_measurement: "W"
vesync_switch_total_kwh: - name: "Vesync total consumption"
friendly_name_template: "{{ states.switch.vesync_switch.name}} Total Consumption" state: "{{ state_attr('switch.vesync_switch', 'today_energy_kwh') | float(default=0) }}"
value_template: '{{ states.switch.vesync_switch.attributes["today_energy_kwh"] | float }}'
unit_of_measurement: "kWh" unit_of_measurement: "kWh"
vesync_switch_volts: - name: "Vesync voltage"
friendly_name_template: "{{ states.switch.vesync_switch.name}} Voltage" state: "{{ state_attr('switch.vesync_switch', 'voltage') | float(default=0) }}"
value_template: '{{ states.switch.vesync_switch.attributes["voltage"] | float }}'
unit_of_measurement: "V" unit_of_measurement: "V"
``` ```
{% endraw %} {% endraw %}