Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
version bump + rbr zone optional (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgermain authored Oct 23, 2021
1 parent 41e244f commit fc29941
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions custom_components/multimatic/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
climates.append(ZoneClimate(zones_coo, zone, ventilation_coo.data))

if rooms_coo.data:
rbr_zone = [zone for zone in zones_coo.data if zone.rbr][0]
rbr_zone = next((zone for zone in zones_coo.data if zone.rbr), None)
for room in rooms_coo.data:
climates.append(RoomClimate(rooms_coo, zones_coo, room, rbr_zone))

Expand Down Expand Up @@ -240,7 +240,7 @@ def __init__(
) -> None:
"""Initialize entity."""
super().__init__(coordinator, room.name)
self._zone_id = zone.id
self._zone_id = zone.id if zone else None
self._room_id = room.id
self._supported_hvac = list(RoomClimate._HA_MODE_TO_MULTIMATIC.keys())
self._supported_presets = list(RoomClimate._HA_PRESET_TO_MULTIMATIC.keys())
Expand Down Expand Up @@ -287,7 +287,7 @@ def max_temp(self):
@property
def zone(self):
"""Return the zone the current room belongs."""
if self._zone_coo.data:
if self._zone_coo.data and self._zone_id:
return next(
(zone for zone in self._zone_coo.data if zone.id == self._zone_id), None
)
Expand Down
4 changes: 2 additions & 2 deletions custom_components/multimatic/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"documentation": "https://github.com/thomasgermain/vaillant-component",
"issue_tracker": "https://github.com/thomasgermain/vaillant-component/issues",
"requirements": [
"pymultimatic==0.6.1"
"pymultimatic==0.6.2"
],
"ssdp": [],
"zeroconf": [],
Expand All @@ -14,6 +14,6 @@
"codeowners": [
"@thomasgermain"
],
"version": "1.10.0",
"version": "1.10.1",
"iot_class": "cloud_polling"
}

0 comments on commit fc29941

Please sign in to comment.