Skip to content

Commit 8f38c22

Browse files
committed
+ Added support for display Vacuum Cleaner/Cooker Hood/CDI not selectable modes
+ Added more sensors reading (heater/circular pump/etc)
1 parent c2d4299 commit 8f38c22

File tree

8 files changed

+386
-3
lines changed

8 files changed

+386
-3
lines changed

custom_components/systemair/api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232
(1101, 80),
3333
(1271, 4),
3434
(1353, 1),
35-
(2001, 50),
35+
(2001, 149),
36+
(2317, 2),
37+
(2419, 1),
38+
(2453, 1),
3639
(2505, 1),
3740
(3002, 116),
3841
(4001, 12),
@@ -45,6 +48,7 @@
4548
(14001, 4),
4649
(14101, 5),
4750
(14201, 2),
51+
(14301, 6),
4852
(14381, 1),
4953
(15016, 125),
5054
(15141, 125),

custom_components/systemair/binary_sensor.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,60 @@ class SystemairBinarySensorEntityDescription(BinarySensorEntityDescription):
9090
device_class=BinarySensorDeviceClass.RUNNING,
9191
registry=parameter_map["REG_FUNCTION_ACTIVE_COOKER_HOOD"],
9292
),
93+
SystemairBinarySensorEntityDescription(
94+
key="heating_active",
95+
translation_key="heating_active",
96+
device_class=BinarySensorDeviceClass.RUNNING,
97+
registry=parameter_map["REG_FUNCTION_ACTIVE_HEATING"],
98+
),
99+
SystemairBinarySensorEntityDescription(
100+
key="heater_cool_down_active",
101+
translation_key="heater_cool_down_active",
102+
device_class=BinarySensorDeviceClass.RUNNING,
103+
registry=parameter_map["REG_FUNCTION_ACTIVE_HEATER_COOL_DOWN"],
104+
),
105+
SystemairBinarySensorEntityDescription(
106+
key="heater_digital_output",
107+
translation_key="heater_digital_output",
108+
device_class=BinarySensorDeviceClass.RUNNING,
109+
registry=parameter_map["REG_OUTPUT_Y1_DIGITAL"],
110+
),
111+
SystemairBinarySensorEntityDescription(
112+
key="emergency_thermostat",
113+
translation_key="emergency_thermostat",
114+
device_class=BinarySensorDeviceClass.PROBLEM,
115+
registry=parameter_map["REG_SENSOR_EMT"],
116+
),
117+
SystemairBinarySensorEntityDescription(
118+
key="heating_circ_pump",
119+
translation_key="heating_circ_pump",
120+
device_class=BinarySensorDeviceClass.RUNNING,
121+
registry=parameter_map["REG_OUTPUT_Y1_CIRC_PUMP"],
122+
),
123+
SystemairBinarySensorEntityDescription(
124+
key="cooling_circ_pump",
125+
translation_key="cooling_circ_pump",
126+
device_class=BinarySensorDeviceClass.RUNNING,
127+
registry=parameter_map["REG_OUTPUT_Y3_CIRC_PUMP"],
128+
),
129+
SystemairBinarySensorEntityDescription(
130+
key="changeover_circ_pump",
131+
translation_key="changeover_circ_pump",
132+
device_class=BinarySensorDeviceClass.RUNNING,
133+
registry=parameter_map["REG_OUTPUT_Y1_Y3_CIRC_PUMP"],
134+
),
135+
SystemairBinarySensorEntityDescription(
136+
key="extra_controller_circ_pump",
137+
translation_key="extra_controller_circ_pump",
138+
device_class=BinarySensorDeviceClass.RUNNING,
139+
registry=parameter_map["REG_OUTPUT_Y4_CIRC_PUMP"],
140+
),
141+
SystemairBinarySensorEntityDescription(
142+
key="changeover_feedback",
143+
translation_key="changeover_feedback",
144+
device_class=BinarySensorDeviceClass.RUNNING,
145+
registry=parameter_map["REG_SENSOR_DI_CHANGE_OVER_FEEDBACK"],
146+
),
93147
)
94148

95149

custom_components/systemair/climate.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,17 @@
2525
MIN_TEMP,
2626
PRESET_MODE_AUTO,
2727
PRESET_MODE_AWAY,
28+
PRESET_MODE_CDI1,
29+
PRESET_MODE_CDI2,
30+
PRESET_MODE_CDI3,
31+
PRESET_MODE_COOKER_HOOD,
2832
PRESET_MODE_CROWDED,
2933
PRESET_MODE_FIREPLACE,
3034
PRESET_MODE_HOLIDAY,
3135
PRESET_MODE_MANUAL,
36+
PRESET_MODE_PRESSURE_GUARD,
3237
PRESET_MODE_REFRESH,
38+
PRESET_MODE_VACUUM_CLEANER,
3339
)
3440
from .coordinator import SystemairDataUpdateCoordinator
3541
from .entity import SystemairEntity
@@ -43,6 +49,12 @@
4349
PRESET_MODE_FIREPLACE: 5,
4450
PRESET_MODE_AWAY: 6,
4551
PRESET_MODE_HOLIDAY: 7,
52+
PRESET_MODE_COOKER_HOOD: 8,
53+
PRESET_MODE_VACUUM_CLEANER: 9,
54+
PRESET_MODE_CDI1: 10,
55+
PRESET_MODE_CDI2: 11,
56+
PRESET_MODE_CDI3: 12,
57+
PRESET_MODE_PRESSURE_GUARD: 13,
4658
}
4759

4860
VALUE_TO_PRESET_MODE_MAP = {value - 1: key for key, value in PRESET_MODE_TO_VALUE_MAP.items()}

custom_components/systemair/const.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,9 @@
109109
PRESET_MODE_FIREPLACE = "fireplace"
110110
PRESET_MODE_AWAY = "away"
111111
PRESET_MODE_HOLIDAY = "holiday"
112+
PRESET_MODE_COOKER_HOOD = "cooker_hood"
113+
PRESET_MODE_VACUUM_CLEANER = "vacuum_cleaner"
114+
PRESET_MODE_CDI1 = "cdi1"
115+
PRESET_MODE_CDI2 = "cdi2"
116+
PRESET_MODE_CDI3 = "cdi3"
117+
PRESET_MODE_PRESSURE_GUARD = "pressure_guard"

custom_components/systemair/number.py

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,76 @@ class SystemairNumberEntityDescription(NumberEntityDescription):
160160
mode=NumberMode.BOX,
161161
registry=parameter_map["REG_FREE_COOLING_END_TIME_M"],
162162
),
163+
SystemairNumberEntityDescription(
164+
key="heating_circ_pump_start_temp",
165+
translation_key="heating_circ_pump_start_temp",
166+
entity_category=EntityCategory.CONFIG,
167+
device_class=NumberDeviceClass.TEMPERATURE,
168+
native_step=0.1,
169+
mode=NumberMode.BOX,
170+
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
171+
registry=parameter_map["REG_HEATER_CIRC_PUMP_START_T"],
172+
),
173+
SystemairNumberEntityDescription(
174+
key="heating_circ_pump_stop_delay",
175+
translation_key="heating_circ_pump_stop_delay",
176+
entity_category=EntityCategory.CONFIG,
177+
device_class=NumberDeviceClass.DURATION,
178+
native_step=1,
179+
mode=NumberMode.BOX,
180+
native_unit_of_measurement=UnitOfTime.MINUTES,
181+
registry=parameter_map["REG_HEATER_CIRC_PUMP_STOP_DELAY"],
182+
),
183+
SystemairNumberEntityDescription(
184+
key="cooling_circ_pump_stop_delay",
185+
translation_key="cooling_circ_pump_stop_delay",
186+
entity_category=EntityCategory.CONFIG,
187+
device_class=NumberDeviceClass.DURATION,
188+
native_step=1,
189+
mode=NumberMode.BOX,
190+
native_unit_of_measurement=UnitOfTime.MINUTES,
191+
registry=parameter_map["REG_COOLER_CIRC_PUMP_STOP_DELAY"],
192+
),
193+
SystemairNumberEntityDescription(
194+
key="changeover_circ_pump_start_temp",
195+
translation_key="changeover_circ_pump_start_temp",
196+
entity_category=EntityCategory.CONFIG,
197+
device_class=NumberDeviceClass.TEMPERATURE,
198+
native_step=0.1,
199+
mode=NumberMode.BOX,
200+
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
201+
registry=parameter_map["REG_CHANGE_OVER_CIRC_PUMP_START_T"],
202+
),
203+
SystemairNumberEntityDescription(
204+
key="changeover_circ_pump_stop_delay",
205+
translation_key="changeover_circ_pump_stop_delay",
206+
entity_category=EntityCategory.CONFIG,
207+
device_class=NumberDeviceClass.DURATION,
208+
native_step=1,
209+
mode=NumberMode.BOX,
210+
native_unit_of_measurement=UnitOfTime.MINUTES,
211+
registry=parameter_map["REG_CHANGE_OVER_CIRC_PUMP_STOP_DELAY"],
212+
),
213+
SystemairNumberEntityDescription(
214+
key="extra_controller_circ_pump_start_temp",
215+
translation_key="extra_controller_circ_pump_start_temp",
216+
entity_category=EntityCategory.CONFIG,
217+
device_class=NumberDeviceClass.TEMPERATURE,
218+
native_step=0.1,
219+
mode=NumberMode.BOX,
220+
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
221+
registry=parameter_map["REG_EXTRA_CONTROLLER_CIRC_PUMP_START_T"],
222+
),
223+
SystemairNumberEntityDescription(
224+
key="extra_controller_circ_pump_stop_delay",
225+
translation_key="extra_controller_circ_pump_stop_delay",
226+
entity_category=EntityCategory.CONFIG,
227+
device_class=NumberDeviceClass.DURATION,
228+
native_step=1,
229+
mode=NumberMode.BOX,
230+
native_unit_of_measurement=UnitOfTime.MINUTES,
231+
registry=parameter_map["REG_EXTRA_CONTROLLER_CIRC_PUMP_STOP_DELAY"],
232+
),
163233
)
164234

165235

custom_components/systemair/sensor.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,66 @@ class SystemairEnergySensorEntityDescription(SensorEntityDescription):
245245
native_unit_of_measurement=PERCENTAGE,
246246
registry=parameter_map["REG_PWM_TRIAC_OUTPUT"],
247247
),
248+
SystemairSensorEntityDescription(
249+
key="heating_demand",
250+
translation_key="heating_demand",
251+
state_class=SensorStateClass.MEASUREMENT,
252+
native_unit_of_measurement=PERCENTAGE,
253+
registry=parameter_map["REG_HEATER_FROM_SATC"],
254+
entity_category=EntityCategory.DIAGNOSTIC,
255+
),
256+
SystemairSensorEntityDescription(
257+
key="heater_analog_output",
258+
translation_key="heater_analog_output",
259+
state_class=SensorStateClass.MEASUREMENT,
260+
native_unit_of_measurement=PERCENTAGE,
261+
registry=parameter_map["REG_OUTPUT_Y1_ANALOG"],
262+
entity_category=EntityCategory.DIAGNOSTIC,
263+
),
264+
SystemairSensorEntityDescription(
265+
key="changeover_analog_output",
266+
translation_key="changeover_analog_output",
267+
state_class=SensorStateClass.MEASUREMENT,
268+
native_unit_of_measurement=PERCENTAGE,
269+
registry=parameter_map["REG_OUTPUT_Y1_Y3_ANALOG"],
270+
entity_category=EntityCategory.DIAGNOSTIC,
271+
),
272+
SystemairSensorEntityDescription(
273+
key="heating_circ_pump_counter",
274+
translation_key="heating_circ_pump_counter",
275+
device_class=SensorDeviceClass.DURATION,
276+
state_class=SensorStateClass.MEASUREMENT,
277+
native_unit_of_measurement=UnitOfTime.SECONDS,
278+
registry=parameter_map["REG_HEATER_CIRC_PUMP_COUNTER"],
279+
entity_category=EntityCategory.DIAGNOSTIC,
280+
),
281+
SystemairSensorEntityDescription(
282+
key="cooling_circ_pump_counter",
283+
translation_key="cooling_circ_pump_counter",
284+
device_class=SensorDeviceClass.DURATION,
285+
state_class=SensorStateClass.MEASUREMENT,
286+
native_unit_of_measurement=UnitOfTime.SECONDS,
287+
registry=parameter_map["REG_COOLER_CIRC_PUMP_COUNTER"],
288+
entity_category=EntityCategory.DIAGNOSTIC,
289+
),
290+
SystemairSensorEntityDescription(
291+
key="changeover_circ_pump_counter",
292+
translation_key="changeover_circ_pump_counter",
293+
device_class=SensorDeviceClass.DURATION,
294+
state_class=SensorStateClass.MEASUREMENT,
295+
native_unit_of_measurement=UnitOfTime.SECONDS,
296+
registry=parameter_map["REG_CHANGE_OVER_CIRC_PUMP_COUNTER"],
297+
entity_category=EntityCategory.DIAGNOSTIC,
298+
),
299+
SystemairSensorEntityDescription(
300+
key="extra_controller_circ_pump_counter",
301+
translation_key="extra_controller_circ_pump_counter",
302+
device_class=SensorDeviceClass.DURATION,
303+
state_class=SensorStateClass.MEASUREMENT,
304+
native_unit_of_measurement=UnitOfTime.SECONDS,
305+
registry=parameter_map["REG_EXTRA_CONTROLLER_CIRC_PUMP_COUNTER"],
306+
entity_category=EntityCategory.DIAGNOSTIC,
307+
),
248308
SystemairSensorEntityDescription(
249309
key="filter_remaining_time",
250310
translation_key="filter_remaining_time",
@@ -271,6 +331,15 @@ class SystemairEnergySensorEntityDescription(SensorEntityDescription):
271331
registry=parameter_map["REG_DEMC_ACTIVE_CONTROLLER"],
272332
entity_category=EntityCategory.DIAGNOSTIC,
273333
),
334+
SystemairSensorEntityDescription(
335+
key="auto_mode_source",
336+
translation_key="auto_mode_source",
337+
icon="mdi:auto-mode",
338+
device_class=SensorDeviceClass.ENUM,
339+
options=["External control", "Demand control", "Week schedule", "Configuration fault"],
340+
registry=parameter_map["REG_DEMC_AUTO_MODE_SOURCE"],
341+
entity_category=EntityCategory.DIAGNOSTIC,
342+
),
274343
SystemairSensorEntityDescription(
275344
key="defrosting_state",
276345
translation_key="defrosting_state",

0 commit comments

Comments
 (0)