Franck Nijhof 1833c32a2c Cleans up front matter (#9835)
* Sets front matter defaults

* Removes default front matter from section templates/pages

* Removes default front matter from addon pages

* Removes default front matter from integration pages

* Removes default front matter from posts

* Removes default front matter from docs pages

* Removes default front matter from other pages

* Fixes blog category pages
2019-07-11 14:35:08 -07:00

2.1 KiB

title, description, logo, ha_category, ha_release, redirect_from
title description logo ha_category ha_release redirect_from
Edimax Switch Instructions on how to integrate Edimax switches into Home Assistant. edimax.png
Switch
pre 0.7
/components/switch.edimax/

This edimax switch platform allows you to control the state of your Edimax switches.

To use your Edimax switch in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
switch:
  - platform: edimax
    host: 192.168.1.32

{% configuration %} host: description: "The IP address of your Edimax switch, e.g., 192.168.1.32." required: true type: string username: description: Your username for the Edimax switch. required: false default: admin type: string password: description: Your password for the Edimax switch. required: false default: 1234 type: string name: description: The name to use when displaying this switch. required: false default: Edimax Smart Plug type: string {% endconfiguration %}

Power consumption sensor

Starting with version 2 of the firmware, the Edimax switches can also report the current and accumulated daily power consumption in their state objects. Use a template sensor to extract their values:

{% raw %}

  - platform: template
    sensors:
      edimax_current_power:
        friendly_name: Edimax Current power consumption
        unit_of_measurement: 'W'
        value_template: "{{ state_attr('switch.edimax_smart_plug',  'current_power_w') | replace('None', 0) }}"

      edimax_total_power:
        friendly_name: Edimax Accumulated daily power consumption
        unit_of_measurement: 'kWh'
        value_template: "{{ state_attr('switch.edimax_smart_plug',  'today_energy_kwh') | replace('None', 0) }}"

{% 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.