mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 05:05:09 +02:00
Fix unhandled exception when RainMachine coordinator data doesn't exist (#73055)
This commit is contained in:
@@ -139,8 +139,11 @@ async def async_setup_entry(
|
|||||||
entry, coordinator, controller, description
|
entry, coordinator, controller, description
|
||||||
)
|
)
|
||||||
for description in BINARY_SENSOR_DESCRIPTIONS
|
for description in BINARY_SENSOR_DESCRIPTIONS
|
||||||
if (coordinator := coordinators[description.api_category]) is not None
|
if (
|
||||||
|
(coordinator := coordinators[description.api_category]) is not None
|
||||||
|
and coordinator.data
|
||||||
and key_exists(coordinator.data, description.data_key)
|
and key_exists(coordinator.data, description.data_key)
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -133,8 +133,11 @@ async def async_setup_entry(
|
|||||||
entry, coordinator, controller, description
|
entry, coordinator, controller, description
|
||||||
)
|
)
|
||||||
for description in SENSOR_DESCRIPTIONS
|
for description in SENSOR_DESCRIPTIONS
|
||||||
if (coordinator := coordinators[description.api_category]) is not None
|
if (
|
||||||
|
(coordinator := coordinators[description.api_category]) is not None
|
||||||
|
and coordinator.data
|
||||||
and key_exists(coordinator.data, description.data_key)
|
and key_exists(coordinator.data, description.data_key)
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
zone_coordinator = coordinators[DATA_ZONES]
|
zone_coordinator = coordinators[DATA_ZONES]
|
||||||
|
Reference in New Issue
Block a user