forked from seanauff/metermon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhass_example.yaml
55 lines (50 loc) · 1.97 KB
/
hass_example.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# add this to your "sensor:" block
# replace <meterID> with the unique ID of the meter you want to measure
# also make sure to run the metermon container with the "METERMON_SEND_BY_ID" environment variable set to true
- platform: mqtt
name: "Electric Meter Consumption"
state_topic: "metermon/<meterID>" # <--- change this
value_template: "{{ value_json.Consumption }}"
unit_of_measurement: 'kWh'
device_class: 'energy'
state_class: 'total_increasing'
availability:
- topic: "metermon/status"
payload_available: "Online"
payload_not_available: "Offline"
json_attributes_topic: "metermon/<meterID>" # <--- change this
- platform: mqtt
name: "Gas Meter Consumption"
state_topic: "metermon/<meterID>" # <--- change this
value_template: "{{ value_json.Consumption }}"
unit_of_measurement: 'ft³'
device_class: 'gas'
state_class: 'total_increasing'
availability:
- topic: "metermon/status"
payload_available: "Online"
payload_not_available: "Offline"
json_attributes_topic: "metermon/<meterID>" # <--- change this
- platform: mqtt
name: "Water Meter Consumption"
state_topic: "metermon/<meterID>" # <--- change this
value_template: "{{ value_json.Consumption }}"
unit_of_measurement: 'gal'
#device_class:
state_class: 'total_increasing'
availability:
- topic: "metermon/status"
payload_available: "Online"
payload_not_available: "Offline"
json_attributes_topic: "metermon/<meterID>" # <--- change this
#create a 'utility_meter:' block
utility_meter:
gas_utility:
source: sensor.gas_meter_consumption
cycle: monthly #replace with daily|monthly|bimonthly, etc to have usage reset rather than always incrementing (as some meters do)
water_utility:
source: sensor.water_meter_consumption
cycle: monthly
gas_utility:
source: sensor.electric_meter_consumption
cycle: monthly