-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclimate_sensors.yaml
156 lines (115 loc) · 4.14 KB
/
climate_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
######## Sensors #########
sensor:
- platform: history_stats
name: valvMatrimonialeDay
entity_id: binary_sensor.valore_matrimoniale
state: "on"
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
- platform: statistics
name: "Matrimoniale min"
entity_id: sensor.temperatura_camera_da_letto
state_characteristic: value_min
sampling_size: 20
max_age:
hours: 168
- platform: statistics
name: "Matrimoniale max"
entity_id: sensor.temperatura_camera_da_letto
state_characteristic: value_max
sampling_size: 20
max_age:
hours: 168
template:
- sensor:
- name: Temperatura Camera da Letto
state: "{{ states.climate.calorifero_camera_da_letto.attributes.current_temperature }}°C"
- sensor:
- name: Valvola Camera da Letto
state: "{{ states.climate.calorifero_camera_da_letto.attributes.heating_power_request }}"
- sensor:
- name: Valvola Matrimoniale day Definitivo
state: "{% set hours = states('sensor.valvmatrimonialeday') | float %}
{% set minutes = ((hours % 1) * 60) | int %}
{% set hours = (hours - (hours % 1)) | int %}
{{ '%02i:%02i'%(hours, minutes) }} H"
- sensor:
- name: Valvola Matrimoniale month Definitivo
state: "{% set hours = states('sensor.valvola_matrimoniale_month') | float %}
{% set minutes = ((hours % 1) * 60) | int %}
{% set hours = (hours - (hours % 1)) | int %}
{{ '%02i:%02i'%(hours, minutes) }} H"
- sensor:
- name: Valvola Matrimoniale Year Definitivo
state: "{% set hours = states('sensor.valvola_matrimoniale_year') | float %}
{% set minutes = ((hours % 1) * 60) | int %}
{% set hours = (hours - (hours % 1)) | int %}
{{ '%02i:%02i'%(hours, minutes) }} H"
- sensor:
- name: 'Stato Valvola Camera da Letto'
state: >-
{% if is_state('climate.calorifero_camera_da_letto', 'heat') %}
Boost
{% elif is_state('climate.calorifero_camera_da_letto', 'auto') %}
Automatico
{% elif is_state('climate.calorifero_camera_da_letto', 'off') %}
Spenta
{% endif %}
- sensor:
- name: 'Presetting Matrimoniale'
state: '{{ states.climate.calorifero_camera_da_letto.attributes.preset_mode }}'
- binary_sensor:
- platform: template
sensors:
valore_matrimoniale_cucina:
friendly_name: "Valore Matrimoniale"
value_template: >-
{% set hvac_action = state_attr('climate.calorifero_camera_da_letto', 'hvac_action') %}
{% if hvac_action == 'idle' %}
off
{% elif hvac_action == 'heating' %}
on
{% else %}
off
{% endif %}
entity_id: climate.calorifero_camera_da_letto
###### Utility Meter ######
utility_meter:
valvola_matrimoniale_day:
source: sensor.valvmatrimonialeday
cycle: daily
name: Valvola Matrimoniale Day
valvola_matrimoniale_month:
source: sensor.valvmatrimonialeday
cycle: monthly
name: Valvola Matrimoniale Month
valvola_matrimoniale_year:
source: sensor.valvmatrimonialeday
cycle: yearly
name: Valvola Matrimoniale Year
#### Input_number ####
input_number:
input_temp_matrimoniale:
name: input_temp_matrimoniale
min: 0
max: 30
step: 0.5
initial: 7
##### Termostato ####
template:
- sensor:
- name: 'Stato Termostato Emma'
state: >-
{% if is_state('climate.termostato_emma', 'heat') %}
Boost
{% elif is_state('climate.termostato_emma', 'auto') %}
Automatico
{% elif is_state('climate.termostato_emma', 'off') %}
Spenta
{% elif is_state('climate.termostato_emma', 'cool') %}
Freddo
{% endif %}
- sensor:
- name: 'Presetting Termostato Emma'
state: '{{ states.climate.termostato_emma.attributes.preset_mode }}'