mirror of
https://github.com/home-assistant/core
synced 2024-09-06 10:29:55 +02: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
|
||||
)
|
||||
for description in BINARY_SENSOR_DESCRIPTIONS
|
||||
if (coordinator := coordinators[description.api_category]) is not None
|
||||
and key_exists(coordinator.data, description.data_key)
|
||||
if (
|
||||
(coordinator := coordinators[description.api_category]) is not None
|
||||
and coordinator.data
|
||||
and key_exists(coordinator.data, description.data_key)
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
|
@ -133,8 +133,11 @@ async def async_setup_entry(
|
||||
entry, coordinator, controller, description
|
||||
)
|
||||
for description in SENSOR_DESCRIPTIONS
|
||||
if (coordinator := coordinators[description.api_category]) is not None
|
||||
and key_exists(coordinator.data, description.data_key)
|
||||
if (
|
||||
(coordinator := coordinators[description.api_category]) is not None
|
||||
and coordinator.data
|
||||
and key_exists(coordinator.data, description.data_key)
|
||||
)
|
||||
]
|
||||
|
||||
zone_coordinator = coordinators[DATA_ZONES]
|
||||
|
Loading…
Reference in New Issue
Block a user