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 %}
|
{% raw %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- platform: template
|
template:
|
||||||
sensors:
|
- sensor:
|
||||||
edimax_current_power:
|
- name: Edimax Current power consumption
|
||||||
friendly_name: Edimax Current power consumption
|
unit_of_measurement: "W"
|
||||||
unit_of_measurement: "W"
|
state: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | default(0, true) }}"
|
||||||
value_template: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | replace('None', 0) }}"
|
|
||||||
|
- name: Edimax Accumulated daily power consumption
|
||||||
edimax_total_power:
|
unit_of_measurement: "kWh"
|
||||||
friendly_name: Edimax Accumulated daily power consumption
|
state: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | default(0, true) }}"
|
||||||
unit_of_measurement: "kWh"
|
|
||||||
value_template: "{{ state_attr('switch.edimax_smart_plug', 'today_energy_kwh') | replace('None', 0) }}"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user