|
121 | 121 | # radiator_valve: 'uncorrected_temperature', 'temperature_offset' |
122 | 122 |
|
123 | 123 | DEVICE_MEASUREMENTS: Final[dict[str, DATA | UOM]] = { |
124 | | - # HA Core thermostat current_temperature |
125 | | - "temperature": UOM(TEMP_CELSIUS), |
126 | | - # HA Core thermostat setpoint |
127 | | - "thermostat": DATA("setpoint", TEMP_CELSIUS), |
128 | | - # Specific for an Anna |
129 | | - "illuminance": UOM(UNIT_LUMEN), |
| 124 | + "humidity": UOM(PERCENTAGE), # Specific for a Jip |
| 125 | + "illuminance": UOM(UNIT_LUMEN), # Specific for an Anna |
| 126 | + "temperature": UOM(TEMP_CELSIUS), # HA Core thermostat current_temperature |
| 127 | + "thermostat": DATA("setpoint", TEMP_CELSIUS), # HA Core thermostat setpoint |
| 128 | + ######################################################## |
130 | 129 | # Specific for an Anna with heatpump extension installed |
131 | 130 | "cooling_activation_outdoor_temperature": UOM(TEMP_CELSIUS), |
132 | 131 | "cooling_deactivation_threshold": UOM(TEMP_CELSIUS), |
133 | | - # Specific for a Lisa a Tom/Floor |
| 132 | + ################################## |
| 133 | + # Specific for a Lisa or Tom/Floor |
134 | 134 | "battery": UOM(PERCENTAGE), |
135 | 135 | "temperature_difference": UOM(DEGREE), |
136 | 136 | "valve_position": UOM(PERCENTAGE), |
137 | | - # Specific for a Jip |
138 | | - "humidity": UOM(PERCENTAGE), |
| 137 | + ##################### |
139 | 138 | # Specific for a Plug |
140 | 139 | "electricity_consumed": UOM(POWER_WATT), |
141 | 140 | "electricity_produced": UOM(POWER_WATT), |
|
144 | 143 |
|
145 | 144 | # Heater Central related measurements |
146 | 145 | HEATER_CENTRAL_MEASUREMENTS: Final[dict[str, DATA | UOM]] = { |
| 146 | + "boiler_state": DATA( |
| 147 | + "flame_state", NONE |
| 148 | + ), # Legacy Anna: similar to flame-state on Anna/Adam |
147 | 149 | "boiler_temperature": DATA("water_temperature", TEMP_CELSIUS), |
| 150 | + "central_heating_state": DATA( |
| 151 | + "c_heating_state", NONE |
| 152 | + ), # For Elga (heatpump) use this instead of intended_central_heating_state |
| 153 | + "central_heater_water_pressure": DATA("water_pressure", PRESSURE_BAR), |
| 154 | + "compressor_state": UOM(NONE), # present with heatpump |
| 155 | + "cooling_enabled": UOM( |
| 156 | + NONE |
| 157 | + ), # Available with the Loria and Elga (newer Anna firmware) heatpumps |
| 158 | + "cooling_state": UOM(NONE), |
148 | 159 | "domestic_hot_water_mode": DATA("select_dhw_mode", NONE), |
149 | 160 | "domestic_hot_water_setpoint": UOM(TEMP_CELSIUS), |
150 | 161 | "domestic_hot_water_state": DATA("dhw_state", NONE), |
151 | 162 | "domestic_hot_water_temperature": DATA("dhw_temperature", TEMP_CELSIUS), |
152 | 163 | "elga_status_code": UOM(NONE), |
| 164 | + "intended_boiler_state": DATA( |
| 165 | + "heating_state", NONE |
| 166 | + ), # Legacy Anna: shows when heating is active, we don't show dhw_state, cannot be determined reliably |
| 167 | + "flame_state": UOM( |
| 168 | + NONE |
| 169 | + ), # Also present when there is a single gas-heater |
153 | 170 | "intended_boiler_temperature": UOM( |
154 | 171 | TEMP_CELSIUS |
155 | 172 | ), # Non-zero when heating, zero when dhw-heating |
156 | | - "central_heating_state": DATA( |
157 | | - "c_heating_state", NONE |
158 | | - ), # For Elga (heatpump) use this instead of intended_central_heating_state |
159 | 173 | "intended_central_heating_state": DATA( |
160 | 174 | "heating_state", NONE |
161 | 175 | ), # This key shows in general the heating-behavior better than c-h_state. except when connected to a heatpump |
162 | 176 | "modulation_level": UOM(PERCENTAGE), |
163 | 177 | "return_water_temperature": DATA("return_temperature", TEMP_CELSIUS), |
164 | | - # Used with the Elga heatpump - marcelveldt |
165 | | - "compressor_state": UOM(NONE), |
166 | | - "cooling_state": UOM(NONE), |
167 | | - "thermostat_supports_cooling": UOM(NONE), |
168 | | - # Available with the Loria and Elga (newer Anna firmware) heatpumps |
169 | | - "cooling_enabled": UOM(NONE), |
170 | | - # Next 2 keys are used to show the state of the gas-heater used next to the Elga heatpump - marcelveldt |
| 178 | + "outdoor_temperature": DATA( |
| 179 | + "outdoor_air_temperature", TEMP_CELSIUS |
| 180 | + ), # Outdoor temperature from APPLIANCES - present for a heatpump |
171 | 181 | "slave_boiler_state": DATA("secondary_boiler_state", NONE), |
172 | | - "flame_state": UOM(NONE), # Also present when there is a single gas-heater |
173 | | - "central_heater_water_pressure": DATA("water_pressure", PRESSURE_BAR), |
174 | | - # Legacy Anna: similar to flame-state on Anna/Adam |
175 | | - "boiler_state": DATA("flame_state", NONE), |
176 | | - # Legacy Anna: shows when heating is active, we don't show dhw_state, cannot be determined reliably |
177 | | - "intended_boiler_state": DATA("heating_state", NONE), |
178 | | - # Outdoor temperature from APPLIANCES - present for a heatpump |
179 | | - "outdoor_temperature": DATA("outdoor_air_temperature", TEMP_CELSIUS), |
| 182 | + "thermostat_supports_cooling": UOM(NONE), # present with heatpump |
180 | 183 | } |
181 | 184 |
|
182 | 185 | OBSOLETE_MEASUREMENTS: Final[tuple[str, ...]] = ( |
|
253 | 256 | ] |
254 | 257 |
|
255 | 258 | BinarySensorType = Literal[ |
256 | | - "cooling_enabled", |
257 | 259 | "compressor_state", |
| 260 | + "cooling_enabled", |
258 | 261 | "cooling_state", |
259 | 262 | "dhw_state", |
260 | 263 | "flame_state", |
|
265 | 268 | BINARY_SENSORS: Final[tuple[str, ...]] = get_args(BinarySensorType) |
266 | 269 |
|
267 | 270 | LIMITS: Final[tuple[str, ...]] = ( |
| 271 | + "lower_bound", |
268 | 272 | "offset", |
269 | | - "setpoint", |
270 | 273 | "resolution", |
271 | | - "lower_bound", |
| 274 | + "setpoint", |
272 | 275 | "upper_bound", |
273 | 276 | ) |
274 | 277 |
|
|
329 | 332 |
|
330 | 333 | SPECIAL_PLUG_TYPES: Final[tuple[str, ...]] = ( |
331 | 334 | "central_heating_pump", |
332 | | - "valve_actuator", |
333 | 335 | "heater_electric", |
| 336 | + "valve_actuator", |
334 | 337 | ) |
335 | 338 |
|
336 | 339 | SpecialType = Literal[ |
|
350 | 353 | ] |
351 | 354 | SWITCHES: Final[tuple[str, ...]] = get_args(SwitchType) |
352 | 355 |
|
353 | | -SWITCH_GROUP_TYPES: Final[tuple[str, ...]] = ("switching", "report") |
| 356 | +SWITCH_GROUP_TYPES: Final[tuple[str, ...]] = ("report", "switching") |
354 | 357 |
|
355 | 358 | THERMOSTAT_CLASSES: Final[tuple[str, ...]] = ( |
356 | 359 | "thermostat", |
| 360 | + "thermostatic_radiator_valve", |
357 | 361 | "thermo_sensor", |
358 | 362 | "zone_thermometer", |
359 | 363 | "zone_thermostat", |
360 | | - "thermostatic_radiator_valve", |
361 | 364 | ) |
362 | 365 |
|
363 | 366 | ToggleNameType = Literal[ |
@@ -392,19 +395,19 @@ class ModelData(TypedDict): |
392 | 395 | """The ModelData class.""" |
393 | 396 |
|
394 | 397 | contents: bool |
395 | | - vendor_name: str | None |
396 | | - vendor_model: str | None |
397 | | - hardware_version: str | None |
398 | 398 | firmware_version: str | None |
399 | | - zigbee_mac_address: str | None |
| 399 | + hardware_version: str | None |
400 | 400 | reachable: bool | None |
| 401 | + vendor_model: str | None |
| 402 | + vendor_name: str | None |
| 403 | + zigbee_mac_address: str | None |
401 | 404 |
|
402 | 405 |
|
403 | 406 | class SmileBinarySensors(TypedDict, total=False): |
404 | 407 | """Smile Binary Sensors class.""" |
405 | 408 |
|
406 | | - cooling_enabled: bool |
407 | 409 | compressor_state: bool |
| 410 | + cooling_enabled: bool |
408 | 411 | cooling_state: bool |
409 | 412 | dhw_state: bool |
410 | 413 | flame_state: bool |
|
0 commit comments