-
Notifications
You must be signed in to change notification settings - Fork 7
/
komfovent.yaml
922 lines (877 loc) · 27.9 KB
/
komfovent.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
modbus:
name: "Komfovent"
type: tcp
host: 192.168.7.32
port: 502
switches:
- name: "Komfovent Switch Power"
# slave: 1
address: 0
command_on: 1
command_off: 0
verify:
- name: "Komfovent Switch Eco"
# slave: 1
address: 2
command_on: 1
command_off: 0
verify:
- name: "Komfovent Switch Auto"
address: 3
command_on: 1
command_off: 0
verify:
# Logic
# Away,Intensive or Boost off, switch to Normal
# Switch Normal Off go to Away
- name: "Komfovent Switch Away"
# slave: 2
address: 4
command_on: 1
command_off: 2
verify:
- name: "Komfovent Switch Normal"
# slave: 2
address: 4
command_on: 2
command_off: 1
verify:
- name: "Komfovent Switch Intensive"
# slave: 2
address: 4
command_on: 3
command_off: 2
verify:
- name: "Komfovent Switch Boost"
# slave: 2
address: 4
command_on: 4
command_off: 2
verify:
- name: "Komfovent Switch Normal Heater"
# slave: 1
address: 110
command_on: 1
command_off: 0
verify:
- name: "Komfovent Switch Eco Free Cooling Heating"
# slave: 1
address: 201
command_on: 1
command_off: 0
verify:
- name: "Komfovent Switch Eco Heater Blocking"
# slave: 1
address: 202
command_on: 1
command_off: 0
verify:
- name: "Komfovent Switch Eco Cooler Blocking"
# slave: 1
address: 203
command_on: 1
command_off: 0
verify:
- name: "Komfovent Switch Eco Constant Heat Recovery"
# slave: 1
address: 216
command_on: 1
command_off: 0
verify:
sensors:
- name: "Komfovent on off num"
address: 0
input_type: holding
data_type: uint16
scan_interval: 5
# unique_id: kom_s_power
- name: "Komfovent Eco num"
address: 2
input_type: holding
data_type: uint16
# unique_id: kom_s_eco
- name: "Komfovent Auto num"
address: 3
input_type: holding
data_type: uint16
# unique_id: kom_s_auto
- name: "Komfovent Mode num"
address: 4
input_type: holding
data_type: uint16
scan_interval: 5
# unique_id: kom_s_mode
- name: "Komfovent Scheduler num"
address: 5
input_type: holding
data_type: uint16
- name: "Komfovent Temp Control num"
address: 10
input_type: holding
data_type: uint16
- name: "Komfovent Flow Control num"
address: 11
input_type: holding
data_type: uint16
- name: "Komfovent Control Indoor Humidity %"
address: 40
input_type: holding
data_type: int16
unit_of_measurement: '%'
scan_interval: 30
- name: "Komfovent Status Normal Fan Supply Setpoint"
address: 105
input_type: holding
data_type: uint32
unit_of_measurement: '%'
# device_class: temperature
state_class: measurement
scan_interval: 5
- name: "Komfovent Status Normal Fan Extract Setpoint"
address: 107
input_type: holding
data_type: uint32
unit_of_measurement: '%'
# device_class: temperature
state_class: measurement
scan_interval: 5
- name: "Komfovent Status Normal Setpoint C"
address: 109
input_type: holding
data_type: int16
unit_of_measurement: °C
scale: 0.1
precision: 1
device_class: temperature
state_class: measurement
scan_interval: 5
- name: "Komfovent Eco Min Supply temperature C"
address: 199
input_type: holding
data_type: int16
unit_of_measurement: °C
scale: 0.1
precision: 1
device_class: temperature
state_class: measurement
scan_interval: 5
- name: "Komfovent Eco Max Supply temperature C"
address: 200
input_type: holding
data_type: int16
unit_of_measurement: °C
scale: 0.1
precision: 1
device_class: temperature
state_class: measurement
scan_interval: 5
- name: "Komfovent Eco Free Heating/Cooling Status Num"
address: 201
input_type: holding
data_type: uint16
scan_interval: 5
- name: "Komfovent Eco Heating Enabled Status Num"
address: 202
input_type: holding
data_type: uint16
scan_interval: 5
- name: "Komfovent Eco Cooling Enabled Status Num"
address: 203
input_type: holding
data_type: uint16
scan_interval: 5
- name: "Komfovent Eco Constant HR Enabled Status Num"
address: 216
input_type: holding
data_type: uint16
scan_interval: 5
- name: "Komfovent Supply temperature 'C"
address: 901
input_type: holding
data_type: int16
unit_of_measurement: °C
scale: 0.1
precision: 1
device_class: temperature
state_class: measurement
scan_interval: 10
# unique_id: kom_m_sup_temp
- name: "Komfovent Extract temperature 'C"
address: 902
input_type: holding
data_type: int16
scale: 0.1
unit_of_measurement: °C
precision: 1
device_class: temperature
state_class: measurement
scan_interval: 10
# unique_id: kom_m_extract_temp
- name: "Komfovent Outdoor temperature 'C"
address: 903
input_type: holding
data_type: int16
scale: 0.1
unit_of_measurement: °C
precision: 1
device_class: temperature
state_class: measurement
scan_interval: 10
- name: "Komfovent Supply Flow volume"
address: 905
count: 2
data_type: uint32
input_type: holding
precision: 0
unit_of_measurement: 'm³/h'
scan_interval: 10
- name: "Komfovent Extract Flow volume"
address: 907
count: 2
data_type: uint32
input_type: holding
precision: 0
unit_of_measurement: 'm³/h'
scan_interval: 10
- name: "Komfovent Supply Fan Intensivity '%"
address: 909
data_type: uint16
input_type: holding
scale: 0.1
precision: 1
unit_of_measurement: '%'
state_class: measurement
scan_interval: 30
- name: "Komfovent Extract Fan Intensivity '%"
address: 910
data_type: uint16
input_type: holding
scale: 0.1
precision: 1
unit_of_measurement: '%'
state_class: measurement
scan_interval: 30
- name: "Komfovent Electric Heater %"
address: 912
data_type: uint16
input_type: holding
scale: 0.1
precision: 1
unit_of_measurement: '%'
state_class: measurement
scan_interval: 10
- name: "Komfovent Filter Impurity, %"
address: 916
data_type: uint16
input_type: holding
unit_of_measurement: '%'
state_class: measurement
scan_interval: 60
# - name: "Komfovent Supply Pressure"
# address: 918
# data_type: uint16
# input_type: holding
# unit_of_measurement: Pa
# state_class: measurement
# scan_interval: 10
- name: "Komfovent Status"
address: 899
data_type: uint16
input_type: holding
scan_interval: 5
- name: "Komfovent Power consumption, W"
address: 920
data_type: uint16
input_type: holding
unit_of_measurement: W
device_class: power
state_class: measurement
scan_interval: 10
- name: "Komfovent Heater Power, W"
address: 921
data_type: uint16
input_type: holding
unit_of_measurement: W
device_class: power
state_class: measurement
scan_interval: 30
- name: "Komfovent Heat Recovery, W"
address: 922
data_type: uint16
input_type: holding
unit_of_measurement: W
device_class: power
state_class: measurement
scan_interval: 10
- name: "Komfovent Heat exchanger efficiency, %"
address: 923
data_type: uint16
input_type: holding
unit_of_measurement: '%'
state_class: measurement
scan_interval: 10
- name: "Komfovent Energy saving, %"
address: 924
data_type: uint16
input_type: holding
unit_of_measurement: '%'
state_class: measurement
scan_interval: 10
- name: "Komfovent Specific power (SPI)"
address: 925
data_type: uint16
input_type: holding
scale: 0.001
precision: 2
unit_of_measurement: W/(m3/h)
state_class: measurement
scan_interval: 10
#Consumption
- name: "Komfovent AHU Consumption Day, kWh"
address: 926
data_type: uint32
input_type: holding
count: 2
precision: 2
scale: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 30
- name: "Komfovent AHU Consumption Month, kWh"
address: 928
data_type: uint32
input_type: holding
count: 2
precision: 2
scale: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 30
- name: "Komfovent AHU Consumption Total, kWh"
address: 930
data_type: uint32
input_type: holding
count: 2
precision: 2
scale: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 30
- name: "Komfovent Heater Consumption Day, kWh"
address: 932
data_type: uint32
input_type: holding
count: 2
precision: 2
scale: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 30
- name: "Komfovent Heater Consumption Month, kWh"
address: 934
data_type: uint32
input_type: holding
count: 2
precision: 2
scale: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 30
- name: "Komfovent Heater Consumption Total, kWh"
address: 936
data_type: uint32
input_type: holding
count: 2
precision: 2
scale: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 30
- name: "Komfovent Heating Recovery Day, kWh"
address: 938
data_type: uint32
input_type: holding
count: 2
precision: 2
scale: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 30
- name: "Komfovent Heating Recovery Month, kWh"
address: 940
data_type: uint32
input_type: holding
count: 2
precision: 2
scale: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 30
- name: "Komfovent Heating Recovery Total, kWh"
address: 942
data_type: uint32
input_type: holding
count: 2
precision: 2
scale: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 30
- name: "Komfovent Status Panel Temperature"
address: 945
input_type: holding
data_type: int16
scale: 0.1
unit_of_measurement: °C
precision: 1
device_class: temperature
state_class: measurement
scan_interval: 10
- name: "Komfovent Status Panel Humidity"
address: 946
input_type: holding
data_type: int16
unit_of_measurement: '%'
device_class: humidity
state_class: measurement
scan_interval: 10
sensor:
- platform: template
sensors:
komfovent_on_off:
friendly_name: "Komfovent On Off"
unit_of_measurement: "State"
value_template: >-
{% set mapper = {
'0' : 'Off',
'1' : 'On'} %}
{% set state = states('sensor.komfovent_on_off_num') %}
{{ mapper[state] if state in mapper else 'Unknown' }}
komfovent_eco_mode:
friendly_name: "Komfovent Eco Mode"
unit_of_measurement: "State"
value_template: >-
{% set mapper = {
'0' : 'Off',
'1' : 'On'} %}
{% set state = states('sensor.komfovent_eco_num') %}
{{ mapper[state] if state in mapper else 'Unknown' }}
komfovent_auto_mode:
friendly_name: "Komfovent Auto Mode"
unit_of_measurement: "State"
value_template: >-
{% set mapper = {
'0' : 'Off',
'1' : 'On'} %}
{% set state = states('sensor.komfovent_auto_num') %}
{{ mapper[state] if state in mapper else 'Unknown' }}
komfovent_operation_mode:
friendly_name: "Komfovent Operation Mode"
unit_of_measurement: "State"
value_template: >-
{% set mapper = {
'0' : 'Standby',
'1' : 'Away',
'2' : 'Normal',
'3' : 'Intensive',
'4' : 'Boost',
'5' : 'Kitchen',
'6' : 'Fireplace',
'7' : 'Overide',
'8' : 'Holiday',
'9' : 'Air Quality',
'10' : 'Off' } %}
{% set state = states('sensor.komfovent_mode_num') %}
{{ mapper[state] if state in mapper else 'Unknown' }}
komfovent_scheduler_mode:
friendly_name: "Komfovent Scheduler Mode"
unit_of_measurement: "State"
value_template: >-
{% set mapper = {
'0' : 'StayAtHome',
'1' : 'WorkingWeek',
'2' : 'Office',
'3' : 'Custom'} %}
{% set state = states('sensor.komfovent_scheduler_num') %}
{{ mapper[state] if state in mapper else 'Unknown' }}
komfovent_temp_control_mode:
friendly_name: "Komfovent Temperature Control Mode"
unit_of_measurement: "State"
value_template: >-
{% set mapper = {
'0' : 'Supply',
'1' : 'Extract',
'2' : 'Balance',
'3' : 'Room'} %}
{% set state = states('sensor.komfovent_temp_control_num') %}
{{ mapper[state] if state in mapper else 'Unknown' }}
komfovent_flow_control_mode:
friendly_name: "Komfovent Flow Control Mode"
unit_of_measurement: "State"
value_template: >-
{% set mapper = {
'0' : 'CAV',
'1' : 'VAV',
'2' : 'DCV',
'3' : 'OFF'} %}
{% set state = states('sensor.komfovent_flow_control_num') %}
{{ mapper[state] if state in mapper else 'Unknown' }}
komfovent_eco_free_heat_cool_mode:
friendly_name: "Komfovent Eco Free Heating/Cooling Status Mode"
unit_of_measurement: "State"
value_template: >-
{% set mapper = {
'0' : 'Off',
'1' : 'On'} %}
{% set state = states('sensor.komfovent_eco_free_heating_cooling_status_num') %}
{{ mapper[state] if state in mapper else 'Unknown' }}
komfovent_eco_heater_blocking:
friendly_name: "Komfovent Eco Heating Blocking"
unit_of_measurement: "State"
value_template: >-
{% set mapper = {
'0' : 'Off',
'1' : 'On'} %}
{% set state = states('sensor.komfovent_eco_heating_enabled_status_num') %}
{{ mapper[state] if state in mapper else 'Unknown' }}
komfovent_eco_cooler_blocking:
friendly_name: "Komfovent Eco Cooler Blocking"
unit_of_measurement: "State"
value_template: >-
{% set mapper = {
'0' : 'Off',
'1' : 'On'} %}
{% set state = states('sensor.komfovent_eco_cooling_enabled_status_num') %}
{{ mapper[state] if state in mapper else 'Unknown' }}
komfovent_eco_constant_heat_recovery:
friendly_name: "Komfovent Eco Constant Heat Recovery"
unit_of_measurement: "State"
value_template: >-
{% set mapper = {
'0' : 'Off',
'1' : 'On'} %}
{% set state = states('sensor.komfovent_eco_constant_hr_enabled_status_num') %}
{{ mapper[state] if state in mapper else 'Unknown' }}
# - platform: number
# komfovent_yesterday_heater_total_kwh:
# name: "Komfovent Yesterday Heater Total"
# unit_of_measurement: kWh
input_number:
komfovent_set_fan:
name: "Komfovent Set Fan"
unit_of_measurement: '%'
min: 20
max: 70
step: 5
komfovent_set_fan_vol:
name: "Komfovent Set Fan Vol"
unit_of_measurement: 'm³/h'
min: 136
max: 491
step: 25
komfovent_set_temp:
name: "Komfovent Set Temp"
unit_of_measurement: °C
min: 15.0
max: 26.0
step: 0.1
komfovent_set_eco_max_temp:
name: "Komfovent Set Eco Max Temp"
unit_of_measurement: °C
min: 15.0
max: 26.0
step: 0.1
komfovent_set_eco_min_temp:
name: "Komfovent Set Eco Min Temp"
unit_of_measurement: °C
min: 15.0
max: 26.0
step: 0.1
shell_command:
#set modes for 20 minutes (the =20 part)
komfovent_kitchen_mode: >-
curl 'http://192.168.7.32/' --data-raw '1=user&2=user' &&
curl 'http://192.168.7.32/ajax.xml' --data-raw '282=20'
komfovent_fireplace_mode: >-
curl 'http://192.168.7.32/' --data-raw '1=user&2=user' &&
curl 'http://192.168.7.32/ajax.xml' --data-raw '283=20'
komfovent_overide_mode: >-
curl 'http://192.168.7.32/' --data-raw '1=user&2=user' &&
curl 'http://192.168.7.32/ajax.xml' --data-raw '284=20'
binary_sensor:
- platform: template
sensors:
komfovent_status_starting:
friendly_name: "Komfovent Status - Starting"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(1) > 0 }}"
komfovent_status_stopping:
friendly_name: "Komfovent Status - Stopping"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(2) > 0 }}"
komfovent_status_fan:
friendly_name: "Komfovent Status - Fan"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(4) > 0 }}"
komfovent_status_rotor:
friendly_name: "Komfovent Status - Rotor"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(8) > 0 }}"
komfovent_status_heating:
friendly_name: "Komfovent Status - Heating"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(16) > 0 }}"
komfovent_status_cooling:
friendly_name: "Komfovent Status - Cooling"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(32) > 0 }}"
komfovent_status_heatingdenied:
friendly_name: "Komfovent Status - Heating Denied"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(64) > 0 }}"
komfovent_status_coolingdenied:
friendly_name: "Komfovent Status - Cooling Denied"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(128) > 0 }}"
komfovent_status_flow_down:
friendly_name: "Komfovent Status - Flow Down"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(256) > 0 }}"
komfovent_status_free_heating:
friendly_name: "Komfovent Status - Free Heating"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(512) > 0 }}"
komfovent_status_free_cooling:
friendly_name: "Komfovent Status - Free Cooling"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(1024) > 0 }}"
komfovent_status_alarm_f:
friendly_name: "Komfovent Status - Alarm F"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(2048) > 0 }}"
komfovent_status_alarm_w:
friendly_name: "Komfovent Status - Alarm W"
value_template: "{{ states('sensor.Komfovent_status')|int(0)|bitwise_and(4096) > 0 }}"
# Scripts to write values to the MODBUS Registers
script:
komfovent_write_temp_setpoint_normal:
alias: Komfovent Write Temp Setpoint Normal
variables:
valuetosend: 45
fields:
komfovent_temp_setpoint:
name: Komfovent Temp Setpoint Value
example: '195'
description: Actual value is * 10; 19.5°C = 195
sequence:
- service: modbus.write_register
data_template:
hub: "Komfovent"
address: 109
unit: 1
value: '{{ komfovent_temp_setpoint }}'
mode: single
komfovent_write_temp_to_reg:
alias: Komfovent Write Temp to Register
# variables:
# temptosend: 45
fields:
komfovent_temp:
name: Value
example: '195'
description: Actual value is * 10; 19.5°C = 195
komfovent_register:
name: Register
example: '0-999'
description: The Modbus Register value to use (register - 1)
sequence:
- service: modbus.write_register
data_template:
hub: "Komfovent"
address: '{{komfovent_register}}'
unit: 1
value: '{{ komfovent_temp }}'
mode: single
komfovent_write_fan_intensity_normal:
alias: Komfovent Write Fan Intensity Normal
variables:
valuetosend: 45
fields:
komfovent_fan_intensity:
name: Komfovent Fan Intensity Value
example: '[0,40]'
description: Writes same value to both fans and assumes intensity is set as a %
selector:
number:
min: 0
max: 100
unit_of_measurement: "%"
sequence:
- service: modbus.write_register
data_template:
hub: "Komfovent"
address: 105
unit: 2
value: '{{ komfovent_fan_intensity }}'
- service: modbus.write_register
data_template:
hub: "Komfovent"
address: 107
unit: 2
value: '{{ komfovent_fan_intensity }}'
mode: single
komfovent_dummy:
alias: 'Komfovent Dummy script'
sequence:
delay: 00:00:00
automation:
- alias: Komfovent Set Normal Temperature Input Number
description: 'Set the input number to the Normal Setpoint value on HA start and if changed elsewhere (app or web)'
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: sensor.komfovent_status_normal_setpoint_c
condition: []
action:
- service: input_number.set_value
data:
value: "{{states('sensor.komfovent_status_normal_setpoint_c')}}"
target:
entity_id: input_number.komfovent_set_temp
mode: single
- alias: Komfovent Write Normal Temp Setpoint on Input change
description: 'Write Normal Setpoint when input_number changes'
trigger:
- platform: state
entity_id: input_number.komfovent_set_temp
condition: []
action:
- service: script.komfovent_write_temp_setpoint_normal
data:
komfovent_temp_setpoint: "{{(states('input_number.komfovent_set_temp') | float(2.0) * 10) | int(20)}}"
mode: single
# {{(states('sensor.komfovent_extract_fan_intensivity') | round(0,"common",20))
# != (states('input_number.komfovent_set_fan') | round(0,"common",20))}}
- alias: Komfovent Set Normal Fan Input Number
description: 'Set the input number to the Extract Normal Fan Setpoint value on HA start and if changed elsewhere (app or web)'
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: sensor.komfovent_extract_fan_intensivity
condition:
- condition: and
conditions:
# Only set if using % i.e. under 90 (max %).
- condition: numeric_state
entity_id: sensor.komfovent_extract_fan_intensivity
below: '90'
- condition: template
value_template: >-
{{(states('sensor.komfovent_status_normal_fan_extract_setpoint') | int(20))
!= (states('input_number.komfovent_set_fan') | int(20)) }}
action:
- service: input_number.set_value
data:
value: "{{states('sensor.komfovent_status_normal_fan_extract_setpoint') | int(20)}}"
target:
entity_id: input_number.komfovent_set_fan
mode: single
- alias: Komfovent Write Normal Fan Setpoint on Input change
description: 'Write Normal Fan Setpoint (Sup & Extract) when input_number changes'
trigger:
- platform: state
entity_id: input_number.komfovent_set_fan
condition: []
action:
- service: script.komfovent_write_fan_intensity_normal
data:
komfovent_fan_intensity: ["0","{{states('input_number.komfovent_set_fan')}}"]
mode: single
- alias: Komfovent Record daily Heater consumption kWh
description: ''
mode: single
trigger:
- platform: numeric_state
entity_id: sensor.komfovent_ahu_consumption_day_kwh
below: 0.01
action:
- service: notify.persistent_notification
data:
message: Heater consumption yesterday {{trigger.from_state.state}}kWh
- service: mqtt.publish
data:
topic: ha/kom_heater_yesterday
retain: true
payload: '{{trigger.from_state.state}}'
- alias: Komfovent Write Eco Max Temp on Input change
description: 'Write Eco Max Temp when input_number changes'
trigger:
- platform: state
entity_id: input_number.komfovent_set_eco_max_temp
condition: []
action:
- service: script.komfovent_write_temp_to_reg
data:
komfovent_temp: "{{(states('input_number.komfovent_set_eco_max_temp') | float(2.0) * 10) | int(20)}}"
komfovent_register: 200
mode: single
- alias: Komfovent Set Eco Max Temp Input Number
description: 'Set the input number to the Eco Max Temp value on HA start and if changed elsewhere (app or web)'
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: sensor.komfovent_eco_max_supply_temperature_c
condition:
- condition: template
value_template: >-
{{(states('sensor.komfovent_eco_max_supply_temperature_c') | int(20))
!= (states('input_number.komfovent_set_eco_max_temp') | int(20))}}
action:
- service: input_number.set_value
data:
value: "{{states('sensor.komfovent_eco_max_supply_temperature_c')}}"
target:
entity_id: input_number.komfovent_set_eco_max_temp
mode: single
- alias: Komfovent Write Eco Min Temp on Input change
description: 'Write Eco Min Temp when input_number changes'
trigger:
- platform: state
entity_id: input_number.komfovent_set_eco_min_temp
condition: []
action:
- service: script.komfovent_write_temp_to_reg
data:
komfovent_temp: "{{(states('input_number.komfovent_set_eco_min_temp') | float(2.0) * 10) | int(20)}}"
komfovent_register: 199
mode: single
- alias: Komfovent Set Eco Min Temp Input Number
description: 'Set the input number to the Eco Min Temp value on HA start and if changed elsewhere (app or web)'
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: sensor.komfovent_eco_min_supply_temperature_c
condition:
- condition: template
value_template: >-
{{(states('sensor.komfovent_eco_min_supply_temperature_c') | int(20))
!= (states('input_number.komfovent_set_eco_min_temp') | int(20))}}
action:
- service: input_number.set_value
data:
value: "{{states('sensor.komfovent_eco_min_supply_temperature_c')}}"
target:
entity_id: input_number.komfovent_set_eco_min_temp
mode: single
# - alias: Komfovent Exercise Fans
# description: 'Write Normal Fan Setpoint (Sup & Extract) when input_number changes'
# trigger:
# - platform: state
# entity_id: input_number.komfovent_set_fan
# condition: []
# action:
# - service: script.komfovent_write_fan_intensity_normal
# data:
# komfovent_fan_intensity: ["0","{{states.input_number.komfovent_set_fan.state}}"]
# mode: single