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:
|
if api_category == DATA_PROVISION_SETTINGS:
|
||||||
return partial(
|
return partial(
|
||||||
ProvisionSettingsBinarySensor,
|
ProvisionSettingsBinarySensor,
|
||||||
|
entry,
|
||||||
coordinators[DATA_PROVISION_SETTINGS],
|
coordinators[DATA_PROVISION_SETTINGS],
|
||||||
)
|
)
|
||||||
|
|
||||||
if api_category == DATA_RESTRICTIONS_CURRENT:
|
if api_category == DATA_RESTRICTIONS_CURRENT:
|
||||||
return partial(
|
return partial(
|
||||||
CurrentRestrictionsBinarySensor,
|
CurrentRestrictionsBinarySensor,
|
||||||
|
entry,
|
||||||
coordinators[DATA_RESTRICTIONS_CURRENT],
|
coordinators[DATA_RESTRICTIONS_CURRENT],
|
||||||
)
|
)
|
||||||
|
|
||||||
return partial(
|
return partial(
|
||||||
UniversalRestrictionsBinarySensor,
|
UniversalRestrictionsBinarySensor,
|
||||||
|
entry,
|
||||||
coordinators[DATA_RESTRICTIONS_UNIVERSAL],
|
coordinators[DATA_RESTRICTIONS_UNIVERSAL],
|
||||||
)
|
)
|
||||||
|
|
||||||
async_add_entities(
|
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
|
for description in BINARY_SENSOR_DESCRIPTIONS
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
|
@ -104,17 +104,19 @@ async def async_setup_entry(
|
||||||
if api_category == DATA_PROVISION_SETTINGS:
|
if api_category == DATA_PROVISION_SETTINGS:
|
||||||
return partial(
|
return partial(
|
||||||
ProvisionSettingsSensor,
|
ProvisionSettingsSensor,
|
||||||
|
entry,
|
||||||
coordinators[DATA_PROVISION_SETTINGS],
|
coordinators[DATA_PROVISION_SETTINGS],
|
||||||
)
|
)
|
||||||
|
|
||||||
return partial(
|
return partial(
|
||||||
UniversalRestrictionsSensor,
|
UniversalRestrictionsSensor,
|
||||||
|
entry,
|
||||||
coordinators[DATA_RESTRICTIONS_UNIVERSAL],
|
coordinators[DATA_RESTRICTIONS_UNIVERSAL],
|
||||||
)
|
)
|
||||||
|
|
||||||
async_add_entities(
|
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
|
for description in SENSOR_DESCRIPTIONS
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue