Fix order of arguments in rainmachine sensors (#57895)
This commit is contained in:
parent
58f13e4e34
commit
2edad82078
2 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
]
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue