mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
edimax update template sensor example (#19970)
This commit is contained in:
parent
c2d567b80e
commit
df52f0eb3c
@ -50,17 +50,15 @@ Starting with [version 2 of the firmware](https://www.edimax.com/edimax/download
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
- platform: template
|
||||
sensors:
|
||||
edimax_current_power:
|
||||
friendly_name: Edimax Current power consumption
|
||||
template:
|
||||
- sensor:
|
||||
- name: Edimax Current power consumption
|
||||
unit_of_measurement: "W"
|
||||
value_template: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | replace('None', 0) }}"
|
||||
state: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | default(0, true) }}"
|
||||
|
||||
edimax_total_power:
|
||||
friendly_name: Edimax Accumulated daily power consumption
|
||||
- name: Edimax Accumulated daily power consumption
|
||||
unit_of_measurement: "kWh"
|
||||
value_template: "{{ state_attr('switch.edimax_smart_plug', 'today_energy_kwh') | replace('None', 0) }}"
|
||||
state: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | default(0, true) }}"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user