Add outlet_1 power monitoring in living room

This commit is contained in:
2020-04-20 00:16:34 +03:00
parent ea059b9971
commit b1f1cd4706
3 changed files with 84 additions and 9 deletions

View File

@@ -98,6 +98,18 @@ cards:
entities: entities:
- binary_sensor.living_room_right_window_on_off_wrapper - binary_sensor.living_room_right_window_on_off_wrapper
- sensor.living_room_right_window_power - sensor.living_room_right_window_power
- type: entities
title: Power
entities:
- switch.outlet_1_switch
- sensor.outlet_1_power
- sensor.outlet_1_voltage
- sensor.outlet_1_current
- sensor.outlet_1_energy_today
- sensor.outlet_1_energy_yesterday
- sensor.outlet_1_energy_total
- sensor.outlet_1_energy_total_start_time
- sensor.outlet_1_wifi
- type: vertical-stack - type: vertical-stack
cards: cards:

View File

@@ -227,7 +227,7 @@ sensor:
payload_not_available: "Offline" payload_not_available: "Offline"
state_topic: "tele/pc_light/STATE" state_topic: "tele/pc_light/STATE"
unit_of_measurement: "%" unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}" value_template: "{{ value_json.Wifi.RSSI }}"
- platform: mqtt - platform: mqtt
name: "light_le_1_wifi" name: "light_le_1_wifi"
@@ -237,7 +237,7 @@ sensor:
payload_not_available: "Offline" payload_not_available: "Offline"
state_topic: "tele/light_le_1/STATE" state_topic: "tele/light_le_1/STATE"
unit_of_measurement: "%" unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}" value_template: "{{ value_json.Wifi.RSSI }}"
- platform: mqtt - platform: mqtt
name: "light_le_2_wifi" name: "light_le_2_wifi"
@@ -247,7 +247,7 @@ sensor:
payload_not_available: "Offline" payload_not_available: "Offline"
state_topic: "tele/light_le_2/STATE" state_topic: "tele/light_le_2/STATE"
unit_of_measurement: "%" unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}" value_template: "{{ value_json.Wifi.RSSI }}"
- platform: mqtt - platform: mqtt
name: "light_le_3_wifi" name: "light_le_3_wifi"
@@ -257,7 +257,7 @@ sensor:
payload_not_available: "Offline" payload_not_available: "Offline"
state_topic: "tele/light_le_3/STATE" state_topic: "tele/light_le_3/STATE"
unit_of_measurement: "%" unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}" value_template: "{{ value_json.Wifi.RSSI }}"
- platform: mqtt - platform: mqtt
name: "light_le_4_wifi" name: "light_le_4_wifi"
@@ -267,7 +267,7 @@ sensor:
payload_not_available: "Offline" payload_not_available: "Offline"
state_topic: "tele/light_le_4/STATE" state_topic: "tele/light_le_4/STATE"
unit_of_measurement: "%" unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}" value_template: "{{ value_json.Wifi.RSSI }}"
- platform: mqtt - platform: mqtt
name: "light_lohas_1_wifi" name: "light_lohas_1_wifi"
@@ -277,7 +277,7 @@ sensor:
payload_not_available: "Offline" payload_not_available: "Offline"
state_topic: "tele/light_lohas_1/STATE" state_topic: "tele/light_lohas_1/STATE"
unit_of_measurement: "%" unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}" value_template: "{{ value_json.Wifi.RSSI }}"
- platform: mqtt - platform: mqtt
name: "light_lohas_2_wifi" name: "light_lohas_2_wifi"
@@ -287,7 +287,7 @@ sensor:
payload_not_available: "Offline" payload_not_available: "Offline"
state_topic: "tele/light_lohas_2/STATE" state_topic: "tele/light_lohas_2/STATE"
unit_of_measurement: "%" unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}" value_template: "{{ value_json.Wifi.RSSI }}"
- platform: mqtt - platform: mqtt
name: "light_lohas_3_wifi" name: "light_lohas_3_wifi"
@@ -297,7 +297,7 @@ sensor:
payload_not_available: "Offline" payload_not_available: "Offline"
state_topic: "tele/light_lohas_3/STATE" state_topic: "tele/light_lohas_3/STATE"
unit_of_measurement: "%" unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}" value_template: "{{ value_json.Wifi.RSSI }}"
- platform: mqtt - platform: mqtt
name: "light_lohas_4_wifi" name: "light_lohas_4_wifi"
@@ -307,7 +307,7 @@ sensor:
payload_not_available: "Offline" payload_not_available: "Offline"
state_topic: "tele/light_lohas_4/STATE" state_topic: "tele/light_lohas_4/STATE"
unit_of_measurement: "%" unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}" value_template: "{{ value_json.Wifi.RSSI }}"
switch: switch:
- platform: mqtt - platform: mqtt

View File

@@ -0,0 +1,63 @@
switch:
- platform: mqtt
name: "Outlet 1 switch"
state_topic: "stat/outlet_1/RESULT"
value_template: "{{ value_json.POWER }}"
command_topic: "cmnd/outlet_1/POWER"
payload_on: "ON"
payload_off: "OFF"
availability_topic: "tele/outlet_1/LWT"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
sensor:
- platform: mqtt
name: "Outlet 1 Energy today"
state_topic: "tele/outlet_1/SENSOR"
value_template: '{{ value_json.ENERGY.Today }}'
device_class: power
unit_of_measurement: "kWh"
- platform: mqtt
name: "Outlet 1 Energy yesterday"
state_topic: "tele/outlet_1/SENSOR"
value_template: '{{ value_json.ENERGY.Yesterday }}'
device_class: power
unit_of_measurement: "kWh"
- platform: mqtt
name: "Outlet 1 Energy total"
state_topic: "tele/outlet_1/SENSOR"
value_template: '{{ value_json.ENERGY.Total }}'
device_class: power
unit_of_measurement: "kWh"
- platform: mqtt
name: "Outlet 1 Energy total start time"
state_topic: "tele/outlet_1/SENSOR"
value_template: '{{ value_json.ENERGY.TotalStartTime }}'
device_class: timestamp
- platform: mqtt
name: "Outlet 1 Power"
state_topic: "tele/outlet_1/SENSOR"
value_template: '{{ value_json.ENERGY.Power }}'
device_class: power
unit_of_measurement: "W"
- platform: mqtt
name: "Outlet 1 Voltage"
state_topic: "tele/outlet_1/SENSOR"
value_template: '{{ value_json.ENERGY.Voltage }}'
unit_of_measurement: "V"
- platform: mqtt
name: "Outlet 1 Current"
state_topic: "tele/outlet_1/SENSOR"
value_template: '{{ value_json.ENERGY.Current }}'
unit_of_measurement: "A"
- platform: mqtt
name: "Outlet 1 WiFi"
state_topic: "tele/outlet_1/STATE"
unit_of_measurement: "%"
value_template: "{{value_json.Wifi.RSSI }}"
availability_topic: "tele/outlet_1/LWT"
payload_available: "Online"
payload_not_available: "Offline"
device_class: signal_strength