forked from mrWheel/DSMRloggerAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HA_Configuration.yaml
89 lines (89 loc) · 4.98 KB
/
HA_Configuration.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
rest:
- resource: http://dsmr-api.local/api/v1/sm/actual
scan_interval: 10
sensor:
- name: DSMR LastUpdate
value_template: >
{{ as_local(strptime(value_json.actual[0].value[0:12], "%y%m%d%H%M%S")) }}
device_class: "Timestamp"
- name: DSMR Energy Consumption Tariff 1
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'energy_delivered_tariff1') | map(attribute='value') | first | float }}"
device_class: "energy"
state_class: "total_increasing"
unit_of_measurement: "kWh"
- name: DSMR Energy Consumption Tariff 2
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'energy_delivered_tariff2') | map(attribute='value') | first | float }}"
device_class: "energy"
unit_of_measurement: "kWh"
state_class: "total_increasing"
- name: DSMR Energy Returned Tariff 1
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'energy_returned_tariff1') | map(attribute='value') | first | float }}"
device_class: "energy"
unit_of_measurement: "kWh"
state_class: "total_increasing"
- name: DSMR Energy Returned Tariff 2
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'energy_returned_tariff2') | map(attribute='value') | first | float }}"
device_class: "energy"
unit_of_measurement: "kWh"
state_class: "total_increasing"
- name: DSMR Power Consumption Actual Total
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'power_delivered') | map(attribute='value') | first | float }}"
device_class: "power"
unit_of_measurement: "kW"
- name: DSMR Power Returned Actual Total
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'power_returned') | map(attribute='value') | first | float }}"
device_class: "power"
unit_of_measurement: "kW"
- name: DSMR Voltage Phase 1
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'voltage_l1') | map(attribute='value') | first | float }}"
device_class: "voltage"
unit_of_measurement: "V"
- name: DSMR Voltage Phase 2
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'voltage_l2') | map(attribute='value') | first | float }}"
device_class: "voltage"
unit_of_measurement: "V"
- name: DSMR Voltage Phase 3
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'voltage_l3') | map(attribute='value') | first | float }}"
device_class: "voltage"
unit_of_measurement: "V"
- name: DSMR Current Phase 1
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'current_l1') | map(attribute='value') | first | float }}"
device_class: "current"
unit_of_measurement: "A"
- name: DSMR Current Phase 2
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'current_l2') | map(attribute='value') | first | float }}"
device_class: "current"
unit_of_measurement: "A"
- name: DSMR Current Phase 3
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'current_l3') | map(attribute='value') | first | float }}"
device_class: "current"
unit_of_measurement: "A"
- name: DSMR Power Consumption Phase 1
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'power_delivered_l1') | map(attribute='value') | first | float }}"
device_class: "power"
unit_of_measurement: "kW"
- name: DSMR Power Consumption Phase 2
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'power_delivered_l2') | map(attribute='value') | first | float }}"
device_class: "power"
unit_of_measurement: "kW"
- name: DSMR Power Consumption Phase 3
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'power_delivered_l3') | map(attribute='value') | first | float }}"
device_class: "power"
unit_of_measurement: "kW"
- name: DSMR Power Returned Phase 1
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'power_returned_l1') | map(attribute='value') | first | float }}"
device_class: "power"
unit_of_measurement: "kW"
- name: DSMR Power Returned Phase 2
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'power_returned_l2') | map(attribute='value') | first | float }}"
device_class: "power"
unit_of_measurement: "kW"
- name: DSMR Power Returned Phase 3
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'power_returned_l3') | map(attribute='value') | first | float }}"
device_class: "power"
unit_of_measurement: "kW"
- name: DSMR Gas Consumption
value_template: "{{ value_json.actual | selectattr('name', 'eq', 'gas_delivered') | map(attribute='value') | first | float }}"
device_class: "gas"
state_class: "total_increasing"
unit_of_measurement: "m³"