mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 22:25:13 +02:00
Check type key of zone exists in geniushub (#86798)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
This commit is contained in:
@@ -41,7 +41,7 @@ async def async_setup_platform(
|
||||
[
|
||||
GeniusClimateZone(broker, z)
|
||||
for z in broker.client.zone_objs
|
||||
if z.data["type"] in GH_ZONES
|
||||
if z.data.get("type") in GH_ZONES
|
||||
]
|
||||
)
|
||||
|
||||
|
@@ -42,7 +42,7 @@ async def async_setup_platform(
|
||||
[
|
||||
GeniusSwitch(broker, z)
|
||||
for z in broker.client.zone_objs
|
||||
if z.data["type"] == GH_ON_OFF_ZONE
|
||||
if z.data.get("type") == GH_ON_OFF_ZONE
|
||||
]
|
||||
)
|
||||
|
||||
|
@@ -48,7 +48,7 @@ async def async_setup_platform(
|
||||
[
|
||||
GeniusWaterHeater(broker, z)
|
||||
for z in broker.client.zone_objs
|
||||
if z.data["type"] in GH_HEATERS
|
||||
if z.data.get("type") in GH_HEATERS
|
||||
]
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user