-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpower_meter_common.yaml
34 lines (29 loc) · 1.08 KB
/
power_meter_common.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# ----------------------------------------------------------------------------------------------------
# User interaction
# ----------------------------------------------------------------------------------------------------
substitutions:
power_meter_activated_at_start: "0"
# Activate or not power meter
globals:
- id: power_meter_activated
type: int
initial_value: ${power_meter_activated_at_start}
restore_value: True
# ----------------------------------------------------------------------------------------------------
# Sensor updated every second to give feedback in Home Assistant
# ----------------------------------------------------------------------------------------------------
sensor:
# Sensor showing the actual power consumption
- id: real_power
platform: template
name: "Real Power"
device_class: "power"
unit_of_measurement: "W"
update_interval: 1s
# Sensor showing the actual power consumption
- id: consumption
platform: template
name: "Consumption"
device_class: "power"
unit_of_measurement: "W"
update_interval: 1s