forked from UbhiTS/ha-config-ataraxis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfg_sensor.yaml
255 lines (228 loc) · 7.97 KB
/
cfg_sensor.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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
- platform: yr
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /
- type: disk_use
arg: /
- type: disk_free
arg: /
- type: memory_use_percent
- type: memory_use
- type: memory_free
- type: swap_use_percent
- type: swap_use
- type: swap_free
- type: load_1m
- type: load_5m
- type: load_15m
- type: network_in
arg: eth0
- type: network_out
arg: eth0
- type: ipv4_address
arg: eth0
- type: processor_use
- type: last_boot
- platform: time_date
display_options:
- 'time'
- 'date'
- 'date_time'
- 'time_date'
- 'time_utc'
- 'beat'
- platform: google_wifi
host: !secret google_wifi_host
- platform: uptime
- platform: qnap
host: !secret ubhinas_ip
port: !secret ubhinas_port
username: !secret ubhinas_username
password: !secret ubhinas_password
timeout: !secret ubhinas_timeout
ssl: !secret ubhinas_ssl
verify_ssl: !secret ubhinas_verify_ssl
monitored_conditions:
- status
- system_temp
- cpu_temp
- cpu_usage
- memory_free
- memory_used
- memory_percent_used
- network_link_status
- network_tx
- network_rx
- drive_smart_status
- drive_temp
- volume_size_free
- volume_size_used
- volume_percentage_used
- platform: rest
name: Grid Status
resource: !secret energy_gateway_grid_status_url
method: GET
verify_ssl: !secret energy_gateway_verify_ssl
scan_interval: !secret energy_gateway_scan_interval
value_template: "{{ value_json.grid_status }}"
- platform: rest
name: House Load
resource: !secret energy_gateway_aggregates_url
method: !secret energy_gateway_method
verify_ssl: !secret energy_gateway_verify_ssl
scan_interval: !secret energy_gateway_scan_interval
value_template: '{{ value_json.load.instant_power | float | multiply(0.001) | round(1) }}'
unit_of_measurement: kW
device_class: power
- platform: rest
name: Grid Power
resource: !secret energy_gateway_aggregates_url
method: !secret energy_gateway_method
verify_ssl: !secret energy_gateway_verify_ssl
scan_interval: !secret energy_gateway_scan_interval
value_template: '{{ value_json.site.instant_power | float | multiply(0.001) | round(1) }}'
unit_of_measurement: kW
device_class: power
- platform: rest
name: Grid Bar Target
resource: !secret energy_gateway_aggregates_url
method: !secret energy_gateway_method
verify_ssl: !secret energy_gateway_verify_ssl
scan_interval: !secret energy_gateway_scan_interval
value_template: >
{% if value_json.site.instant_power | float > 0 %}
0
{% else %}
{{ value_json.site.instant_power | float | multiply(-0.001) | round(1) }}
{% endif %}
unit_of_measurement: kW
device_class: power
- platform: rest
name: Solar Power
resource: !secret energy_gateway_aggregates_url
method: !secret energy_gateway_method
verify_ssl: !secret energy_gateway_verify_ssl
scan_interval: !secret energy_gateway_scan_interval
value_template: '{{ value_json.solar.instant_power | float | multiply(0.001) | round(1) }}'
unit_of_measurement: kW
device_class: power
- platform: rest
name: PowerWall Power
resource: !secret energy_gateway_aggregates_url
method: !secret energy_gateway_method
verify_ssl: !secret energy_gateway_verify_ssl
scan_interval: !secret energy_gateway_scan_interval
value_template: '{{ value_json.battery.instant_power | float | multiply(0.001) | round(1) }}'
unit_of_measurement: kW
device_class: power
- platform: rest
name: PowerWall Capacity
resource: !secret energy_gateway_soe_url
method: !secret energy_gateway_method
verify_ssl: !secret energy_gateway_verify_ssl
scan_interval: !secret energy_gateway_scan_interval
value_template: '{{ (value_json.percentage | float | round(1)) }}'
unit_of_measurement: '%'
device_class: battery
- platform: rest
name: PowerWall Bar Target
resource: !secret energy_gateway_soe_url
method: !secret energy_gateway_method
verify_ssl: !secret energy_gateway_verify_ssl
scan_interval: !secret energy_gateway_scan_interval
value_template: '{{ (value_json.percentage | float | multiply(0.08) | round(1)) }}'
unit_of_measurement: 'kW'
device_class: battery
- platform: rest
name: PowerWall Charge
resource: !secret energy_gateway_soe_url
method: !secret energy_gateway_method
verify_ssl: !secret energy_gateway_verify_ssl
scan_interval: !secret energy_gateway_scan_interval
value_template: '{{ (13500 / (100 / value_json.percentage) | float) | round(0) }}'
unit_of_measurement: 'W'
device_class: battery
- platform: template
sensors:
grid_status_display:
friendly_name: "PG&E Status"
value_template: >-
{% if is_state('sensor.grid_status', 'SystemGridConnected') %}
Up
{% else %}
Down
{% endif %}
icon_template: >-
{% if is_state('sensor.grid_status', 'SystemGridConnected') %}
mdi:flash
{% else %}
mdi:flash-off
{% endif %}
powerwall_power_display:
friendly_name: "Powerwall Power"
unit_of_measurement: W
device_class: power
value_template: "{{ states('sensor.powerwall_power') }}"
icon_template: >-
{% if states('sensor.powerwall_power') | float > 0 %}
mdi:battery
{% else %}
mdi:battery-charging
{% endif %}
powerwall_capacity_display:
friendly_name: "Powerwall Capacity"
unit_of_measurement: '%'
device_class: battery
value_template: "{{ states('sensor.powerwall_capacity') }}"
icon_template: >-
{% set battery = states('sensor.powerwall_capacity') | float %}
{% if battery > 90 %}
mdi:battery
{% elif battery > 80 %}
mdi:battery-90
{% elif battery > 70 %}
mdi:battery-80
{% elif battery > 60 %}
mdi:battery-70
{% elif battery > 50 %}
mdi:battery-60
{% elif battery > 40 %}
mdi:battery-50
{% elif battery > 30 %}
mdi:battery-40
{% elif battery > 20 %}
mdi:battery-30
{% elif battery > 10 %}
mdi:battery-20
{% else %}
mdi:battery-outline
{% endif %}
fan_mode_master_bedroom:
value_template: '{{ (states.climate.thermostat_master_bedroom_mode.attributes.fan_mode) }}'
friendly_name: 'Master Bedroom'
icon_template: mdi:fan
fan_mode_living_room:
value_template: '{{ (states.climate.thermostat_living_room_mode.attributes.fan_mode) }}'
friendly_name: 'Living Room'
icon_template: mdi:fan
fan_mode_entertainment_room:
value_template: '{{ (states.climate.thermostat_entertainment_room_mode.attributes.fan_mode) }}'
friendly_name: 'Entertainment Room'
icon_template: mdi:fan
fan_mode_upper_big_bedroom:
value_template: '{{ (states.climate.thermostat_upper_big_bedroom_mode.attributes.fan_mode) }}'
friendly_name: 'Upper Big Bedroom'
icon_template: mdi:fan
fan_mode_upper_small_bedroom:
value_template: '{{ (states.climate.thermostat_upper_small_bedroom_mode.attributes.fan_mode) }}'
friendly_name: 'Upper Small Bedroom'
icon_template: mdi:fan
fan_mode_upper_guest_bedroom:
value_template: '{{ (states.climate.thermostat_upper_guest_bedroom_mode.attributes.fan_mode) }}'
friendly_name: 'Upper Guest Bedroom'
icon_template: mdi:fan
fan_mode_attic:
value_template: '{{ (states.climate.thermostat_attic_mode.attributes.fan_mode) }}'
friendly_name: 'Attic'
icon_template: mdi:fan