forked from hmn/home-assistant-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.yaml
executable file
·1697 lines (1494 loc) · 55.2 KB
/
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
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: !secret latitude
longitude: !secret longitude
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: !secret elevation
unit_system: metric
currency: DKK
temperature_unit: C
time_zone: "Europe/Copenhagen"
external_url: !secret external_url
internal_url: !secret internal_url
customize: !include customize.yaml
packages: !include_dir_named packages
default_config:
config:
api:
system_health:
frontend:
themes: !include_dir_merge_named themes
person:
browser_mod:
http:
# Uncomment this to add a password (recommended!)
# api_password: !secret password
ssl_certificate: !secret ssl_certificate
ssl_key: !secret ssl_key
# Uncomment this if you are using SSL or running in Docker etc
# base_url: example.duckdns.org:8123
# depricated
# base_url: !secret base_url
use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24
- 192.168.8.0/24
- 172.30.0.0/16
- 10.0.0.0/8
cors_allowed_origins:
- https://google.com
- https://home-assistant.io
- https://www.home-assistant.io
# trusted_networks:
# - 127.0.0.1
# - ::1
#ip_ban_enabled: True
#login_attempts_threshold: 5
# history_graph:
# energy_today:
# entities:
# - sensor.smappee_power
# - sensor.smappee_fase_1_power
# - sensor.smappee_fase_2_power
# - sensor.smappee_fase_3_power
# temperature:
# entities:
# - sensor.bedroom_motion_sensor_1
# - sensor.entrance_motion_sensor_1
# - sensor.kitchen_motion_sensor_1_2
#influxdb:
# host: 127.0.0.1
# database: home_assistant
# username: !secret influxdb_username
# password: !secret influxdb_password
# ssl: true
# verify_ssl: false
# default_measurement: state
# blacklist:
# - entity.id1
# - entity.id2
# whitelist:
# - entity.id3
# - entity.id4
# tags:
# instance: prod
# source: hass
# influxdb:
# host: !secret influxdb_host
# port: 8086
# database: home_assistant
# username: !secret influxdb_username
# password: !secret influxdb_password
# max_retries: 3
# default_measurement: state
# tags:
# source: hass
# panel_iframe:
# grafana:
# title: Grafana
# icon: mdi:chart-timeline
# url: !secret grafana_url
# influxdb:
# title: Chronograf
# icon: mdi:chart-areaspline
# url: !secret influxdb_url
#prometheus:
# Enables support for tracking state changes over time.
history:
use_include_order: true
exclude:
domains:
- script
- weblink
- homekit
- updater
- light
entity_globs:
- binary_sensor.hmnmbp*
- sensor.hmnmbp*
- sensor.clock*
- sensor.date*
- sensor.glances*
- sensor.load_*m
- sensor.time*
- sensor.uptime*
- input_boolean.*_motion
- binary_sensor.*_motion_sensor_*
- automation.motion*
- automation.*lights_timer*
entities:
- sensor.date
- sensor.time
- sensor.time_utc
- sensor.time_date
- sensor.date_time
- sensor.date_time_iso
- sensor.date_time_utc
- sensor.internet_time
- sensor.henriks_iphone_battery_state
- sensor.henriks_ipad_battery_state
- sensor.smappee_power
- sensor.smappee_usage_today
- sensor.smappee_fase_1_power
- sensor.smappee_fase_2_power
- sensor.smappee_fase_3_power
- sensor.henriks_iphone_bssid
# The recorder component is storing details in a database which then are handled by the history component.
recorder:
db_url: !secret db_url
exclude:
domains:
- weblink
- homekit
- uptime
- updater
- light
- scene
entity_globs:
- binary_sensor.hmnmbp*
- sensor.hmnmbp*
- sensor.clock*
- sensor.date*
- sensor.glances*
- sensor.load_*m
- sensor.time*
- sensor.uptime*
- input_boolean.*_motion
- binary_sensor.*_motion_sensor_*
- automation.motion*
- automation.*lights_timer*
entities:
- sensor.date
- sensor.time
- sensor.time_utc
- sensor.time_date
- sensor.date_time
- sensor.date_time_iso
- sensor.date_time_utc
- sensor.internet_time
- sensor.henriks_iphone_battery_state
- sensor.henriks_ipad_battery_state
- sensor.henriks_iphone_bssid
#event_types:
# -
# View all events in a logbook
logbook:
exclude:
domains:
- weblink
- light
- homekit
- timer
- uptime
- updater
- scene
entity_globs:
- binary_sensor.hmnmbp*
- sensor.hmnmbp*
- sensor.clock*
- sensor.date*
- sensor.glances*
- sensor.load_*m
- sensor.time*
- sensor.uptime*
- input_boolean.*_motion
- binary_sensor.*_motion_sensor_*
- automation.motion*
- automation.*lights_timer*
entities:
- sensor.date
- sensor.time
- sensor.time_utc
- sensor.time_date
- sensor.date_time
- sensor.date_time_iso
- sensor.date_time_utc
- sensor.internet_time
- sensor.henriks_iphone_battery_state
- sensor.henriks_ipad_battery_state
- sensor.smappee_power
- sensor.smappee_usage_today
- sensor.smappee_fase_1_power
- sensor.smappee_fase_2_power
- sensor.smappee_fase_3_power
- sensor.henriks_iphone_bssid
cloud:
zeroconf:
ssdp:
ios:
alexa:
mobile_app:
prometheus:
energy:
sun:
wake_on_lan:
ifttt:
key: !secret ifttt_key
mqtt:
sensor:
- name: Smappee power
state_topic: "servicelocation/579acd67-d672-11e7-ac58-022d286959f5/realtime"
unit_of_measurement: "W"
icon: "mdi:power-plug"
value_template: "{{ value_json.totalPower }}"
device_class: power
state_class: measurement
- name: Smappee usage today (raw)
state_topic: "servicelocation/579acd67-d672-11e7-ac58-022d286959f5/realtime"
unit_of_measurement: "W"
icon: "mdi:power-plug"
value_template: "{{ value_json.totalImportEnergy }}"
device_class: power
state_class: measurement
- name: Smappee usage today
state_topic: "servicelocation/579acd67-d672-11e7-ac58-022d286959f5/realtime"
unit_of_measurement: "kWh"
icon: "mdi:power-plug"
value_template: "{{ ((value_json.totalImportEnergy / 3600000) | float | round(2, default=0)) }}"
device_class: energy
state_class: measurement
- name: Smappee fase 1 power
state_topic: "servicelocation/579acd67-d672-11e7-ac58-022d286959f5/realtime"
unit_of_measurement: "W"
icon: "mdi:power-plug"
value_template: "{{ value_json.channelPowers[0].power }}"
device_class: power
state_class: measurement
- name: Smappee fase 2 power
state_topic: "servicelocation/579acd67-d672-11e7-ac58-022d286959f5/realtime"
unit_of_measurement: "W"
icon: "mdi:power-plug"
value_template: "{{ value_json.channelPowers[1].power }}"
device_class: power
state_class: measurement
- name: Smappee fase 3 power
state_topic: "servicelocation/579acd67-d672-11e7-ac58-022d286959f5/realtime"
unit_of_measurement: "W"
icon: "mdi:power-plug"
value_template: "{{ value_json.channelPowers[2].power }}"
device_class: power
state_class: measurement
- name: Smappee always on
state_topic: "servicelocation/579acd67-d672-11e7-ac58-022d286959f5/aggregated"
unit_of_measurement: "W"
icon: "mdi:power-plug"
value_template: "{{ (value_json.intervalDatas[0].alwaysOn | multiply(0.001)) | round(2, default=0) }}"
device_class: power
state_class: measurement
homekit:
filter:
include_domains:
- script
- input_boolean
- switch
- timer
zha:
zigpy_config:
ota:
ikea_provider: true # Auto update Trådfri devices
ledvance_provider: true # Auto update LEDVANCE/OSRAM devices
salus_provider: true # Auto update SALUS/Computime devices
inovelli_provider: true # Auto update INOVELLI devices
#otau_directory: /path/to/your/ota/folder # Utilize .ota files to update everything else
# smappee:
# host: 192.168.7.116
# client_id: !secret smappee_client_id
# client_secret: !secret smappee_client_secret
# username: !secret smappee_username
# password: !secret smappee_password
apple_tv:
host: 192.168.8.199
# login_id: !secret apple_tv_login_id
# credentials: !secret apple_tv_credentials
denonavr:
host: 192.168.8.198
# logi_circle:
# client_id: !secret logi_circle_client_id
# client_secret: !secret logi_circle_client_secret
# api_key: !secret logi_circle_api_key
# redirect_uri: !secret logi_circle_redirect_url
#nest:
# client_id: !secret nest_client_id
# client_secret: !secret nest_client_secret
nissan_leaf:
username: !secret nissan_leaf_username
password: !secret nissan_leaf_password
region: !secret nissan_leaf_region
roomba:
- host: !secret roomba_host
blid: !secret roomba_username
password: !secret roomba_password
# withings:
# client_id: !secret withings_client_id
# client_secret: !secret withings_client_secret
# use_webhook: true
plex:
host: !secret plex_host
port: 32400
token: !secret plex_token
ssl: true
verify_ssl: false
media_player:
use_episode_art: true
#hue:
# bridges:
# - host: 192.168.7.105
# allow_hue_groups: true
# webostv:
# host: 192.168.8.197
# name: LG OLED
# turn_on_action:
# service: wake_on_lan.send_magic_packet
# data:
# mac: !secret lg_oled_wifi_mac
# customize:
# sources:
# - Apple TV
# - PS5
# - HDMI4
# - Netflix
# - YouTube
# - Plex
#spotify:
# client_id: !secret spotify_client_id
# client_secret: !secret spotify_client_secret
weather:
- platform: darksky
api_key: !secret darksky_api_key
- platform: pirateweather
api_key: !secret pirateweather_api_key
- platform: template
name: "Netatmo Current Conditions"
condition_template: "{{ states('sensor.netatmo_outdoor_temperature') }}"
temperature_template: "{{ states('sensor.netatmo_outdoor_temperature') | float }}"
temperature_unit: "°C"
humidity_template: "{{ states('sensor.netatmo_outdoor_humidity') | float }}"
forecast_template: "{{ state_attr('weather.my_region', 'forecast') }}"
#cast:
stream:
#netatmo:
# client_id: !secret netatmo_client_id
# client_secret: !secret netatmo_client_secret
aws:
credentials:
- name: hass
aws_access_key_id: !secret aws_access_key_id
aws_secret_access_key: !secret aws_secret_access_key
notify:
- service: sns
name: awssns
region_name: !secret aws_region_name
utility_meter:
smappee_usage_hourly:
source: sensor.smappee_usage_today
name: Smappee hourly energy
cycle: hourly
smappee_usage_daily:
source: sensor.smappee_usage_today
name: Smappee daily energy
cycle: daily
smappee_usage_monthly:
source: sensor.smappee_usage_today
name: Smappee monthly energy
cycle: monthly
energy_spent_hourly:
source: sensor.energy_spent
name: Hourly energy spent
cycle: hourly
energy_spent_daily:
source: sensor.energy_spent
name: Daily energy spent
cycle: daily
energy_spent_monthly:
source: sensor.energy_spent
name: Monthly energy spent
cycle: monthly
car_charger_spent_hourly:
source: sensor.car_charger_spent
name: Hourly car charger spent
cycle: hourly
car_charger_spent_daily:
source: sensor.car_charger_spent
name: Daily car charger spent
cycle: daily
car_charger_spent_monthly:
source: sensor.car_charger_spent
name: Monthly car charger spent
cycle: monthly
# rest_command:
# particle_relay1_on:
# url: !secret particle_relay_post_url
# method: post
# payload: '{ "arg": "relay1:on" }'
# timeout: 5
# content_type: 'application/json'
# particle_relay1_off:
# url: !secret particle_relay_post_url
# method: post
# payload: '{ "arg": "relay1:off" }'
# timeout: 5
# content_type: 'application/json'
timer:
sleep:
duration: '00:30:00'
icon: mdi:sleep
entrance_lights:
duration: '00:02:00'
icon: mdi:lightbulb-on
kitchen_lights:
duration: '00:05:00'
icon: mdi:lightbulb-on
bedroom_lights:
duration: '00:05:00'
icon: mdi:lightbulb-on
office_lights:
duration: '00:10:00'
icon: mdi:lightbulb-on
fan_change_timer:
duration: '00:30:00'
icon: mdi:fan
#nordpool:
#pfsense:
#eloverblik:
#wavinsentio:
#zaptec:
python_script:
switch:
- platform: template
switches:
servers:
friendly_name: Servers
value_template: "{{ is_state('switch.synology_power_state', 'on') or is_state('switch.genie_power_state', 'on') }}"
turn_on:
service: script.servers_on
turn_off:
service: script.servers_off
genie_power_state:
friendly_name: genie power state
value_template: "{{ is_state('binary_sensor.genie_ping', 'on') }}"
turn_on:
service: shell_command.genie_poweron
data:
username: !secret genie_idrac_username
password: !secret genie_idrac_password
turn_off:
service: shell_command.genie_poweroff
data:
username: !secret genie_idrac_username
password: !secret genie_idrac_password
- platform: wake_on_lan
name: LG OLED
host: 192.168.8.197
mac: !secret lg_oled_wifi_mac
turn_off:
service: media_player.turn_off
data:
entity_id: media_player.lg_oled
- platform: wake_on_lan
name: Synology power state
host: 192.168.8.10
mac: 00:11:32:c6:cd:7b
# turn_off:
# service: button.press
# data:
# entity_id: button.alladin_shutdown
turn_off:
service: shell_command.alladin_shutdown
# - platform: wake_on_lan
# name: genie power state
# host: 192.168.8.2
# mac: 6c:2b:59:95:82:94
# turn_off:
# service: shell_command.genie_shutdown
template:
- trigger:
- platform: time_pattern
seconds: "/30"
sensor:
- name: "Car charger power"
#icon: mdi:power-plug
device_class: "power"
unit_of_measurement: "W"
state_class: "measurement"
state: "{{ state_attr('sensor.zaptec_charger_zap016548', 'total_charge_power') | round(0, default=0) }}"
- name: "Car charger voltage"
#icon: mdi:flash
device_class: "voltage"
unit_of_measurement: "V"
state_class: "measurement"
state: "{{ state_attr('sensor.zaptec_charger_zap016548', 'voltage_phase1') | round(0, default=0) }}"
- name: "Car charger temperature"
#icon: mdi:thermometer
device_class: "temperature"
unit_of_measurement: '°C'
state_class: "measurement"
state: "{{ state_attr('sensor.zaptec_charger_zap016548', 'temperature_internal5') | round(2, default=0) }}"
- name: "Car charger humidity"
#icon: mdi:water-percent
device_class: "humidity"
unit_of_measurement: "%"
state_class: "measurement"
state: "{{ state_attr('sensor.zaptec_charger_zap016548', 'humidity') | round(0, default=0) }}"
- name: "Car charger energy session"
#icon: mdi:counter
device_class: "energy"
unit_of_measurement: "kWh"
state_class: "measurement"
state: "{{ state_attr('sensor.zaptec_charger_zap016548', 'total_charge_power_session') | round(2, default=0) }}"
- name: "Car charger energy total"
#icon: mdi:counter
device_class: "energy"
unit_of_measurement: "kWh"
state_class: "total_increasing"
state: "{{ state_attr('sensor.zaptec_charger_zap016548', 'signed_meter_value_kwh') }}"
- name: "Car charger current"
#icon: mdi:current-ac
device_class: "current"
unit_of_measurement: "A"
state_class: "measurement"
state: "{{ state_attr('sensor.zaptec_charger_zap016548', 'current_phase1') | round(0, default=0) }}"
- name: "Car charger allocated current"
#icon: mdi:waves
device_class: "current"
unit_of_measurement: "A"
state_class: "measurement"
state: "{{ state_attr('sensor.zaptec_charger_zap016548', 'charge_current_set') | round(0, default=0) }}"
- name: "Car charger signal strength"
icon: mdi:wifi-strength-outline
device_class: "signal_strength"
unit_of_measurement: "dBm"
state_class: "measurement"
state: "{{ state_attr('sensor.zaptec_charger_zap016548', 'communication_signal_strength') }}"
- name: "Car charger software app firmware"
icon: mdi:label
state: "{{ state_attr('sensor.zaptec_charger_zap016548', 'smart_computer_software_application_version') }}"
- name: "Car charger current firmware"
icon: mdi:label
state: "{{ state_attr('sensor.zaptec_charger_zap016548', 'current_firmware_version') }}"
- name: "Car charger available firmware"
icon: mdi:label
state: "{{ state_attr('sensor.zaptec_charger_zap016548', 'available_firmware_version') }}"
- name: "Car charger mode"
icon: mdi:alpha-z-circle-outline
state: >-
{% if is_state_attr('sensor.zaptec_charger_zap016548', 'charger_operation_mode', '1') %}
Disconnected
{% elif is_state_attr('sensor.zaptec_charger_zap016548', 'charger_operation_mode', '2') %}
Waiting
{% elif is_state_attr('sensor.zaptec_charger_zap016548', 'charger_operation_mode', '3') %}
Charging
{% elif is_state_attr('sensor.zaptec_charger_zap016548', 'charger_operation_mode', '5') %}
Finished
{% else %}
Unknown
{% endif %}
- sensor:
- name: NordPool today hr 00:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[0] }}'
- name: NordPool today hr 01:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[1] }}'
- name: NordPool today hr 02:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[2] }}'
- name: NordPool today hr 03:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[3] }}'
- name: NordPool today hr 04:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[4] }}'
- name: NordPool today hr 05:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[5] }}'
- name: NordPool today hr 06:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[6] }}'
- name: NordPool today hr 07:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[7] }}'
- name: NordPool today hr 08:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[8] }}'
- name: NordPool today hr 09:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[9] }}'
- name: NordPool today hr 10:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[10] }}'
- name: NordPool today hr 11:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[11] }}'
- name: NordPool today hr 12:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[12] }}'
- name: NordPool today hr 13:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[13] }}'
- name: NordPool today hr 14:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[14] }}'
- name: NordPool today hr 15:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[15] }}'
- name: NordPool today hr 16:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[16] }}'
- name: NordPool today hr 17:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[17] }}'
- name: NordPool today hr 18:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[18] }}'
- name: NordPool today hr 19:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[19] }}'
- name: NordPool today hr 20:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[20] }}'
- name: NordPool today hr 21:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[21] }}'
- name: NordPool today hr 22:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[22] }}'
- name: NordPool today hr 23:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "today")[23] }}'
- name: NordPool tomorrow hr 00:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[0] }}'
- name: NordPool tomorrow hr 01:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[1] }}'
- name: NordPool tomorrow hr 02:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[2] }}'
- name: NordPool tomorrow hr 03:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[3] }}'
- name: NordPool tomorrow hr 04:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[4] }}'
- name: NordPool tomorrow hr 05:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[5] }}'
- name: NordPool tomorrow hr 06:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[6] }}'
- name: NordPool tomorrow hr 07:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[7] }}'
- name: NordPool tomorrow hr 08:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[8] }}'
- name: NordPool tomorrow hr 09:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[9] }}'
- name: NordPool tomorrow hr 10:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[10] }}'
- name: NordPool tomorrow hr 11:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[11] }}'
- name: NordPool tomorrow hr 12:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[12] }}'
- name: NordPool tomorrow hr 13:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[13] }}'
- name: NordPool tomorrow hr 14:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[14] }}'
- name: NordPool tomorrow hr 15:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[15] }}'
- name: NordPool tomorrow hr 16:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[16] }}'
- name: NordPool tomorrow hr 17:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[17] }}'
- name: NordPool tomorrow hr 18:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[18] }}'
- name: NordPool tomorrow hr 19:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[19] }}'
- name: NordPool tomorrow hr 20:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[20] }}'
- name: NordPool tomorrow hr 21:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[21] }}'
- name: NordPool tomorrow hr 22:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[22] }}'
- name: NordPool tomorrow hr 23:00
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "tomorrow")[23] }}'
- name: NordPool current price
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "current_price") }}'
- name: NordPool min price
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "min") }}'
- name: NordPool max price
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "max") }}'
- name: NordPool off peak 1
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "off_peak_1") }}'
- name: NordPool off peak 2
device_class: "monetary"
unit_of_measurement: DKK
state_class: "measurement"
state: '{{ state_attr("sensor.nordpool_kwh_dk1_dkk_3_095_025", "off_peak_2") }}'
- name: "Other power"
device_class: "power"
unit_of_measurement: "W"
state_class: "measurement"
state: >
{% set total = states('sensor.smappee_power') | float(default=0.0) %}
{% set internet = states('sensor.internet_plug_power') | float(default=0.0) %}
{% set office = states('sensor.office_plug_power') | float(default=0.0) %}
{% set ps5 = states('sensor.ps5_power') | float(default=0.0) %}
{% set server = states('sensor.server_plug_power') | float(default=0.0) %}
{% set cinema = states('sensor.cinema_plug_power') | float(default=0.0) %}
{% set cinema_chargers = states('sensor.cinema_chargers_power') | float(default=0.0) %}
{% set bathroom_fan = states('sensor.bathroom_fan_power') | float(default=0.0) %}
{% set bedroom = states('sensor.bedroom_plug_power') | float(default=0.0) %}
{% set fridge = states('sensor.fridge_and_microwave_power') | float(default=0.0) %}
{% set kitchen = states('sensor.kitchen_group_power') | float(default=0.0) %}
{% set ev = states('sensor.car_charger_power') | float(default=0.0) %}
{% set entrance_phase1 = states('sensor.entrance_phase_1_power') | float(default=0.0) %}
{% set entrance_phase2 = states('sensor.entrance_phase_2_power') | float(default=0.0) %}
{% set entrance_phase3 = states('sensor.entrance_phase_3_power') | float(default=0.0) %}
{% set outdoor_light = states('sensor.outdoor_light_plug_power') | float(default=0.0) %}
{% set ac = states('sensor.aircon_plug_power') | float(default=0.0) %}
{% set entrance_plug = states('sensor.entrance_plug_power') | float(default=0.0) %}
{{ (total - (bathroom_fan + internet + server + cinema + ps5 + cinema_chargers + ev + office + bedroom + fridge + kitchen + entrance_phase1 + entrance_phase2 + entrance_phase3 + outdoor_light + ac + entrance_plug)) | round(1, default=0) }}
- name: "Kitchen Temperature"
device_class: "temperature"
unit_of_measurement: '°C'
state_class: "measurement"
state: >
{% set count = 0 %}
{% set netatmo = states('sensor.netatmo_kitchen_temperature') | float(default=0.0) %}
{% set motion1 = states('sensor.kitchen_motion_sensor_1_temperature') | float(default=0.0) %}
{% set count = count + 1 if is_number(netatmo) and netatmo > 0.0 else count %}
{% set count = count + 1 if is_number(motion1) and motion1 > 0.0 else count %}
{{ ((netatmo + motion1) / count) | round(1, default=0) }}