Fix missing RainMachine restrictions switches (#81673)

This commit is contained in:
Aaron Bach 2022-11-06 12:38:55 -07:00 committed by GitHub
parent 496f78bae5
commit d62bac9c59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -241,6 +241,7 @@ async def async_setup_entry(
# Add switches to control restrictions:
for description in RESTRICTIONS_SWITCH_DESCRIPTIONS:
coordinator = data.coordinators[description.api_category]
if not key_exists(coordinator.data, description.data_key):
continue
entities.append(RainMachineRestrictionSwitch(entry, data, description))