-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddon_configuration.yaml
More file actions
148 lines (129 loc) · 5.31 KB
/
Copy pathAddon_configuration.yaml
File metadata and controls
148 lines (129 loc) · 5.31 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#This file is not needed anymore with the newest version of https://github.com/kamilkosek/EZHI Integration
#since the missing sensors and binary_sensors are now integrated within the Integration.
#If you do not use this Integration, than you can use the code below instead
# --- Add this to your existing HA configuration.yaml and add your EZHI IP adresse ---
#rest:
# - resource: http://your_EZHI_IP/getOutputData
# scan_interval: 30
# sensor:
# - name: "EZHI Outputdaten Kurz"
# value_template: "{{ value_json.message }}"
# json_attributes:
# - batS
# Only batS because all the other values within getOutputData are already provided by kamilkosek/EZHI Integration
# - resource: http://your_EZHI_IP/getAlarm
# scan_interval: 30
# sensor:
# - name: "EZHI Alarmdaten"
# value_template: "{{ value_json.message }}"
# json_attributes_path: "$.data"
# json_attributes:
# - BatLTP
# - BatHTP
# - BatCE
# - BatHV
# - BatLV
# - BatHI
# - BatE
# - DTP
# - EE
# - SBS
# - ACA
# - OfOI
# - PvHV
# - PvOC
# - IRDE
# - PVWE
# - OfGS
# - BCC
#New template syntax for HA 6/2026
#template:
# - sensor:
# - name: "EZHI Battery Status"
# unique_id: ezhi_battery_status
# state: >
# {% set s = state_attr('sensor.ezhi_outputdaten_kurz','batS') %}
# {% if s == '1' %} Leerlauf
# {% elif s == '2' %} Laden
# {% elif s == '3' %} Entladen
# {% elif s == '4' %} Fehler
# {% elif s == '5' %} Shutdown
# {% elif s == '6' %} Keine Kommunikation
# {% else %} Unbekannt
# {% endif %}
# icon: >
# {% set s = state_attr('sensor.ezhi_outputdaten_kurz','batS') %}
# {% if s == '3' %} mdi:flash
# {% elif s == '2' %} mdi:battery-charging
# {% elif s == '4' %} mdi:alert-circle
# {% else %} mdi:battery
# {% endif %}#
- binary_sensor:
- name: "Batterie Übertemperatur"
unique_id: ezhi_battery_overtemp
state: "{{ state_attr('sensor.ezhi_alarmdaten','BatHTP') | int(0) == 1 }}"
device_class: problem
- name: "Batterie Untertemperatur"
unique_id: ezhi_battery_undertemp
state: "{{ state_attr('sensor.ezhi_alarmdaten','BatLTP') | int(0) == 1 }}"
device_class: problem
- name: "Batterie Kommunikationsfehler"
unique_id: ezhi_battery_comm_error
state: "{{ state_attr('sensor.ezhi_alarmdaten','BatCE') | int(0) == 1 }}"
device_class: problem
- name: "Batterie Überspannung"
unique_id: ezhi_battery_overvoltage
state: "{{ state_attr('sensor.ezhi_alarmdaten','BatHV') | int(0) == 1 }}"
device_class: problem
- name: "Batterie Unterspannung"
unique_id: ezhi_battery_undervoltage
state: "{{ state_attr('sensor.ezhi_alarmdaten','BatLV') | int(0) == 1 }}"
device_class: problem
- name: "Batterie Überstrom"
unique_id: ezhi_battery_overcurrent
state: "{{ state_attr('sensor.ezhi_alarmdaten','BatHI') | int(0) == 1 }}"
device_class: problem
- name: "Allgemeiner Batteriefehler"
unique_id: ezhi_battery_error
state: "{{ state_attr('sensor.ezhi_alarmdaten','BatE') | int(0) == 1 }}"
device_class: problem
- name: "Gerät Übertemperatur"
unique_id: ezhi_device_overtemp
state: "{{ state_attr('sensor.ezhi_alarmdaten','DTP') | int(0) == 1 }}"
device_class: problem
- name: "Gerätefehler"
unique_id: ezhi_device_error
state: "{{ state_attr('sensor.ezhi_alarmdaten','EE') | int(0) == 1 }}"
device_class: problem
- name: "AC Fehler"
unique_id: ezhi_ac_abnormal
state: "{{ state_attr('sensor.ezhi_alarmdaten','ACA') | int(0) == 1 }}"
device_class: problem
- name: "Off-Grid Überstrom"
unique_id: ezhi_offgrid_overcurrent
state: "{{ state_attr('sensor.ezhi_alarmdaten','OfOI') | int(0) == 1 }}"
device_class: problem
- name: "Off-Grid Kurzschluss"
unique_id: ezhi_offgrid_short
state: "{{ state_attr('sensor.ezhi_alarmdaten','OfGS') | int(0) == 1 }}"
device_class: problem
- name: "PV Überspannung"
unique_id: ezhi_pv_overvoltage
state: "{{ state_attr('sensor.ezhi_alarmdaten','PvHV') | int(0) == 1 }}"
device_class: problem
- name: "PV Überstrom"
unique_id: ezhi_pv_overcurrent
state: "{{ state_attr('sensor.ezhi_alarmdaten','PvOC') | int(0) == 1 }}"
device_class: problem
- name: "PV Verdrahtungsfehler"
unique_id: ezhi_pv_wiring_error
state: "{{ state_attr('sensor.ezhi_alarmdaten','PVWE') | int(0) == 1 }}"
device_class: problem
- name: "IRD Fehler"
unique_id: ezhi_ird_error
state: "{{ state_attr('sensor.ezhi_alarmdaten','IRDE') | int(0) == 1 }}"
device_class: problem
- name: "Batterie Shutdown"
unique_id: ezhi_battery_shutdown
state: "{{ state_attr('sensor.ezhi_alarmdaten','SBS') | int(0) == 1 }}"
device_class: problem