Outlets switches

Device Quantity Connection Integration Notes
Wemo Smart Plug 1 Wi-Fi WeMo Spare smart outlet, currently not being used.
TP Link Kasa Smart Plug 2 Wi-Fi TP-Link, Template Sensors Power monitoring smart outlets; used in washing machine automation. A newer model is available.
Sonoff Basic R2 6 Wi-Fi MQTT Tasmota converted.
White Label ESP8266 Smart Plugs 2 Wi-Fi MQTT Tasmota converted; energy monitoring.
CE Smart Home LA-WF3 2 Wi-Fi MQTT Tasmota converted
CE Smart Home LA-WF7 2 Wi-Fi esphome Similar to the above model, but report energy usage.

Kasa Smart plugs do not automatically report energy usage when using the TP-Link platform. However, template sensors can be created to extract these values. When configured using Integration in the frontend, they are not very reliable. I hard-coded their IP addresses in YAML mode and they are better.

Power monitoring values from TP-Link Smart Plugs can be extracted using template sensors. Here is sample code:

- platform: template

    sensors:

        switch_bed_warmer_amps:

            friendly_name_template: "{{ states.switch.bed_warmer}} Current"

            value_template: '{{ states.switch.bed_warmer.attributes["current_a"] | float }}'

            unit_of_measurement: 'A'

        switch_bed_warmer_watts:

            friendly_name_template: "{{ states.switch.bed_warmer}} Current Consumption"

            value_template: '{{ states.switch.bed_warmer.attributes["current_power_w"] | float }}'

            unit_of_measurement: 'W'

        switch_bed_warmer_total_kwh:

            friendly_name_template: "{{ states.switch.bed_warmer}} Total Consumption"

            value_template: '{{ states.switch.bed_warmer.attributes["total_energy_kwh"] | float }}'

            unit_of_measurement: 'kWh'

        switch_bed_warmer_volts:

            friendly_name_template: "{{ states.switch.bed_warmer}} Voltage"

            value_template: '{{ states.switch.bed_warmer.attributes["voltage"] | float }}'

            unit_of_measurement: 'V'

        switch_bed_warmer_today_kwh:

            friendly_name_template: "{{ states.switch.bed_warmer}} Today's Consumption"

            value_template: '{{ states.switch.bed_warmer.attributes["today_energy_kwh"] | float }}'

            unit_of_measurement: 'kWh'

CE Smart LA-WF7 is now running on esphome, but require an intermediate tasmota firmware through Tuya Convert hack. Compated to TP Link Kasa smart plugs these are more reliable in reporting energy usage. Esphome makes extracting energy data very easy, compared to using MQTT to connect and creating a series of template sensors. At $10 apiece, these are of very good value.

Comments