Fix order of arguments in rainmachine sensors (#57895)

This commit is contained in:
J. Nick Koston 2021-10-17 05:44:48 -10:00 committed by GitHub
parent 58f13e4e34
commit 2edad82078
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -115,23 +115,26 @@ async def async_setup_entry(
if api_category == DATA_PROVISION_SETTINGS:
return partial(
ProvisionSettingsBinarySensor,
entry,
coordinators[DATA_PROVISION_SETTINGS],
)
if api_category == DATA_RESTRICTIONS_CURRENT:
return partial(
CurrentRestrictionsBinarySensor,
entry,
coordinators[DATA_RESTRICTIONS_CURRENT],
)
return partial(
UniversalRestrictionsBinarySensor,
entry,
coordinators[DATA_RESTRICTIONS_UNIVERSAL],
)
async_add_entities(
[
async_get_sensor(description.api_category)(entry, controller, description)
async_get_sensor(description.api_category)(controller, description)
for description in BINARY_SENSOR_DESCRIPTIONS
]
)

View File

@ -104,17 +104,19 @@ async def async_setup_entry(
if api_category == DATA_PROVISION_SETTINGS:
return partial(
ProvisionSettingsSensor,
entry,
coordinators[DATA_PROVISION_SETTINGS],
)
return partial(
UniversalRestrictionsSensor,
entry,
coordinators[DATA_RESTRICTIONS_UNIVERSAL],
)
async_add_entities(
[
async_get_sensor(description.api_category)(entry, controller, description)
async_get_sensor(description.api_category)(controller, description)
for description in SENSOR_DESCRIPTIONS
]
)