mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-04-29 06:48:16 +00:00
Add outlet_1 power monitoring in living room
This commit is contained in:
@@ -98,6 +98,18 @@ cards:
|
||||
entities:
|
||||
- binary_sensor.living_room_right_window_on_off_wrapper
|
||||
- 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
|
||||
cards:
|
||||
|
||||
@@ -227,7 +227,7 @@ sensor:
|
||||
payload_not_available: "Offline"
|
||||
state_topic: "tele/pc_light/STATE"
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json['Wifi'].RSSI }}"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_le_1_wifi"
|
||||
@@ -237,7 +237,7 @@ sensor:
|
||||
payload_not_available: "Offline"
|
||||
state_topic: "tele/light_le_1/STATE"
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json['Wifi'].RSSI }}"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_le_2_wifi"
|
||||
@@ -247,7 +247,7 @@ sensor:
|
||||
payload_not_available: "Offline"
|
||||
state_topic: "tele/light_le_2/STATE"
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json['Wifi'].RSSI }}"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_le_3_wifi"
|
||||
@@ -257,7 +257,7 @@ sensor:
|
||||
payload_not_available: "Offline"
|
||||
state_topic: "tele/light_le_3/STATE"
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json['Wifi'].RSSI }}"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_le_4_wifi"
|
||||
@@ -267,7 +267,7 @@ sensor:
|
||||
payload_not_available: "Offline"
|
||||
state_topic: "tele/light_le_4/STATE"
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json['Wifi'].RSSI }}"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_lohas_1_wifi"
|
||||
@@ -277,7 +277,7 @@ sensor:
|
||||
payload_not_available: "Offline"
|
||||
state_topic: "tele/light_lohas_1/STATE"
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json['Wifi'].RSSI }}"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_lohas_2_wifi"
|
||||
@@ -287,7 +287,7 @@ sensor:
|
||||
payload_not_available: "Offline"
|
||||
state_topic: "tele/light_lohas_2/STATE"
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json['Wifi'].RSSI }}"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_lohas_3_wifi"
|
||||
@@ -297,7 +297,7 @@ sensor:
|
||||
payload_not_available: "Offline"
|
||||
state_topic: "tele/light_lohas_3/STATE"
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json['Wifi'].RSSI }}"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: "light_lohas_4_wifi"
|
||||
@@ -307,7 +307,7 @@ sensor:
|
||||
payload_not_available: "Offline"
|
||||
state_topic: "tele/light_lohas_4/STATE"
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ value_json['Wifi'].RSSI }}"
|
||||
value_template: "{{ value_json.Wifi.RSSI }}"
|
||||
|
||||
switch:
|
||||
- platform: mqtt
|
||||
|
||||
63
config/packages/modules/power.yaml
Normal file
63
config/packages/modules/power.yaml
Normal 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
|
||||
Reference in New Issue
Block a user