mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Fix unhandled exception when RainMachine coordinator data doesn't exist (#73055)
This commit is contained in:
parent
9ea504dd7b
commit
a6f6f0ac5e
@ -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]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user