From b616aa6128a189c9a2cb56557f7ffa2b839a0240 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 16 Apr 2025 08:17:17 +0200 Subject: [PATCH] Clean up non working example from Edimax integration docs (#38557) --- source/_integrations/edimax.markdown | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/source/_integrations/edimax.markdown b/source/_integrations/edimax.markdown index 818c7a2116b..5550feaeb27 100644 --- a/source/_integrations/edimax.markdown +++ b/source/_integrations/edimax.markdown @@ -15,7 +15,7 @@ related: ha_quality_scale: legacy --- -This `edimax` switch {% term integration %} allows you to control the state of your [Edimax](https://www.edimax.com/edimax/merchandise/merchandise_list/data/edimax/global/home_automation_smart_plug/) switches. +This Edimax {% term integration %} allows you to control the state of your [Edimax](https://www.edimax.com/edimax/merchandise/merchandise_list/data/edimax/global/home_automation_smart_plug/) switches. To use your Edimax switch in your installation, add the following to your {% term "`configuration.yaml`" %} file. {% include integrations/restart_ha_after_config_inclusion.md %} @@ -48,25 +48,3 @@ name: default: Edimax Smart Plug type: string {% endconfiguration %} - -## Power consumption sensor - -Starting with [version 2 of the firmware](https://www.edimax.com/edimax/download/download/data/edimax/global/download/), the Edimax switches can also report the current and accumulated daily power consumption in their state objects. Use a [template sensor](/integrations/template) to extract their values: - -{% raw %} - -```yaml -template: - - sensor: - - name: Edimax Current power consumption - unit_of_measurement: "W" - state: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | default(0, true) }}" - - - name: Edimax Accumulated daily power consumption - unit_of_measurement: "kWh" - state: "{{ state_attr('switch.edimax_smart_plug', 'today_energy_kwh') | default(0, true) }}" -``` - -{% endraw %} - -Note that if the smart plug is off, these states report the string `None`. By using a `replace()` in the template, these sensors report purely numerical values.