How to configure multiple Edimax switches

I have integrated one of two Edimax switches in my Configuration.yaml with the following code. It works like expected. But somehow I don’t seem to be able to integrate the second switch with IP 192.168.1.90. I have tried various ways but did not succeed. Solutions anyone?

switch:
  - platform: edimax
    host: 192.168.1.89
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) }}"

Hi Josephus, I try to integrate my 4 Edimax SP1101 switches. I extended the switch section like this:

switch:

  • platform: edimax
    host: 192.168.178.198
    name: edi198
  • platform: edimax
    host: 192.168.178.199
    name: edi199
  • platform: edimax
    host: 192.168.178.200
    name: edi200

The I extended the template section with the 4 sensors, referring to the name definitions for the 3 switches.

template:

  • sensor:
    • name: Edi198 Accumulated daily power consumption
      unit_of_measurement: “kWh”
      state: “{{ state_attr(‘switch.edi198’, ‘today_energy_kwh’) | default(0, true) }}”
  • sensor:
    • name: Edi199 Current power consumption
      unit_of_measurement: “W”
      state: “{{ state_attr(‘switch.edi199’, ‘current_power_w’) | default(0, true) }}”
  • sensor:
    • name: Edi200 Accumulated daily power consumption
      unit_of_measurement: “kWh”
      state: “{{ state_attr(‘switch.edi200’, ‘today_energy_kwh’) | default(0, true) }}”

Now I can see and operate the switches in the entity section of settings.

Open question for me. I can manually operate the switches in the entity section, but they are not visible in the automation section. An integration is missing ?

Hi, I am currently trying to get my Edimax 2101 V2 to work.
The first one can now sucessfully be switched from HA but for whatever reason I do not see any actual current values.
@JosephusZanders , @Winfried3 , have you seen actual watt values from your switch?

Here is my current config:

# Edimax switches
switch:
  - platform: edimax
    host: 192.168.2.21
    username: admin
    password: XXXXXXXX
    name: dsem_spare_b43
template:
  - sensor:
    - name: dsem_spare_b43_power_consumption
      unit_of_measurement: "W"
      state: "{{ state_attr('switch.dsem_spare_b43', 'current_power_w') | default(0, true) }}"

I now followed this great work from Fantomas. He wrote a REST template sensor which worked from the first moment for me.

Just leaving this for others looking for a solution.
Thanks Fantomas.