forked from bieniu/home-assistant-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsensors.yaml
230 lines (207 loc) · 6.96 KB
/
sensors.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
- platform: integration
source: sensor.light_salon_power_sum
name: "Light Salon Energy"
unit_prefix: k
round: 2
- platform: integration
source: sensor.computer_gabinet_power
name: "Computer Gabinet Energy"
unit_prefix: k
round: 2
- platform: integration
source: sensor.servers_gabinet_power
name: "Servers Gabinet Energy"
unit_prefix: k
round: 2
- platform: integration
source: sensor.dishwasher_kuchnia_power
name: "Dishwasher Kuchnia Energy"
unit_prefix: k
round: 2
- platform: rest
name: "ESPHome Version Current"
resource: "https://api.github.com/repos/esphome/esphome/releases/latest"
value_template: "{{ value_json.tag_name | replace('v', '') }}"
username: !secret github_username
password: !secret github_token_access
authentication: basic
scan_interval: 7200
headers:
Accept: application/vnd.github.v3+json
Content-Type: application/json
User-Agent: Home Assistant REST sensor
- platform: rest
name: "Caddy Version Current"
resource: "https://api.github.com/repos/mholt/caddy/releases/latest"
value_template: "{{ value_json.tag_name | replace('v', '') }}"
username: !secret github_username
password: !secret github_token_access
authentication: basic
scan_interval: 7200
headers:
Accept: application/vnd.github.v3+json
Content-Type: application/json
User-Agent: Home Assistant REST sensor
- platform: command_line
name: "Supervisor Updates"
command: 'curl http://supervisor/supervisor/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version,"addons":[.data.addons[] | select(.version != .installed)]}'''
value_template: "{{ value_json.addons | length }}"
json_attributes:
- newest_version
- current_version
- addons
- platform: sql
db_url: !secret mysql_db_url
queries:
- name: "HA Database Size"
query: 'SELECT table_schema "database", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "value" FROM information_schema.tables WHERE table_schema="homeassistant" GROUP BY table_schema;'
column: "value"
unit_of_measurement: "MB"
- platform: version
name: "HA Version Installed"
- platform: version
name: "HA Version Current"
source: hassio
image: intel-nuc
- platform: uptime
name: "Home Assistant Uptime"
unit_of_measurement: minutes
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /
- type: memory_use_percent
- type: processor_use
- type: last_boot
- platform: darksky
api_key: !secret darksky_api_key
scan_interval:
minutes: 15
language: "pl"
forecast:
- 1
- 2
- 3
- 4
- 5
monitored_conditions:
- icon
- summary
- temperature_high
- temperature_low
- apparent_temperature
- wind_speed
- wind_bearing
- precip_probability
- daily_summary
- visibility
- uv_index
- platform: min_max
type: mean
name: "Temperature Indoor"
entity_ids:
- sensor.temperature_kuchnia
- sensor.temperature_salon
- sensor.temperature_antresola
- sensor.temperature_gabinet
- sensor.temperature_antek
- sensor.temperature_sypialnia
- sensor.temperature_lazienka
- sensor.temperature_goscinny
- sensor.temperature_pracownia
round_digits: 1
- platform: min_max
type: mean
name: "Humidity Indoor"
entity_ids:
- sensor.humidity_kuchnia
- sensor.humidity_salon
- sensor.humidity_antresola
- sensor.humidity_gabinet
- sensor.humidity_antek
- sensor.humidity_sypialnia
- sensor.humidity_lazienka
- sensor.humidity_goscinny
- sensor.humidity_pracownia
round_digits: 0
- platform: template
sensors:
dishwasher_kuchnia:
friendly_name: "Zmywarka"
value_template: >-
{% if states('sensor.dishwasher_kuchnia_power') != ('unavailable' or 'unknown') %}
{% if states('sensor.dishwasher_kuchnia_power') | int > 1 %}
zmywanie
{% else %}
wyłączona
{% endif %}
{% else %}
{{ states('sensor.dishwasher_kuchnia') }}
{% endif %}
light_salon_power_sum:
friendly_name: "Oświetlenie salonu"
unit_of_measurement: "W"
value_template: >-
{{ (states('sensor.light_salon_power') | float +
states('sensor.lamp_salon_power') | float) | round(1) }}
airly_info:
friendly_name: "Jakość powietrza"
value_template: >-
{% if state_attr('air_quality.airly', 'air_quality_index') | int <= 25 %}
bardzo dobra
{% elif state_attr('air_quality.airly', 'air_quality_index') | int <= 50 %}
dobra
{% elif state_attr('air_quality.airly', 'air_quality_index') | int <= 75 %}
średnia
{% elif state_attr('air_quality.airly', 'air_quality_index') | int <= 100 %}
zła
{% elif state_attr('air_quality.airly', 'air_quality_index') | int > 100 %}
bardzo zła
{% endif %}
airly_pm10:
friendly_name: "PM10"
unit_of_measurement: "µg/m³"
value_template: "{{ state_attr('air_quality.airly', 'particulate_matter_10') }}"
airly_pm2_5:
friendly_name: "PM2.5"
unit_of_measurement: "µg/m³"
value_template: "{{ state_attr('air_quality.airly', 'particulate_matter_2_5') }}"
printer_last_boot:
friendly_name: "Ostatni restart"
value_template: "{{ (as_timestamp(now()) - states('sensor.printer_uptime') | int * 24 * 60 * 60) | timestamp_custom('%Y-%m-%d %H:%M:%S') }}"
device_class: timestamp
ha_last_restart:
friendly_name: "Ostatni restart"
value_template: "{{ (as_timestamp(now()) - states('sensor.home_assistant_uptime') | int * 60) | timestamp_custom('%Y-%m-%d %H:%M:%S') }}"
device_class: timestamp
humidifier_water_level:
friendly_name: "Poziom wody"
unit_of_measurement: "%"
value_template: >-
{% if state_attr('fan.humidifier_salon', 'depth') is number %}
{% if state_attr('fan.humidifier_salon', 'depth') < 127 %}
{{ (state_attr('fan.humidifier_salon', 'depth') * 0.89 - 11.6) | round | min(100) | max(0) }}
{% else %}
0
{% endif %}
{% else %}
0
{% endif %}
ups_status:
friendly_name: "Status"
value_template: >-
{% if is_state('sensor.ups_status_data', 'OL') %}
zasilanie sieciowe
{% elif is_state('sensor.ups_status_data', 'OL CHRG') or is_state('sensor.ups_status_data', 'OL CHRG LB')%}
ładowanie baterii
{% elif is_state('sensor.ups_status_data', 'OL DISCHRG') %}
zasilanie bateryjne
{% elif is_state('sensor.ups_status_data', 'OB DISCHRG') %}
zasilanie bateryjne
{% elif is_state('sensor.ups_status_data', 'LB') %}
słaba bateria
{% elif is_state('sensor.ups_status_data', 'SD') or is_state('sensor.ups_status_data', 'FSD OB DISCHRG') %}
wyłączanie
{% else %}
{{ states('sensor.ups_status_data') }}
{% endif %}