Honeywell disable detergent level by default (#88040)
* Disable fill by default * Fix tests * use TANK_FILL.get * Remove None from attribute get add reload to sensor test * Typing fix iteration error
This commit is contained in:
parent
a704e7b40d
commit
2af4d2152b
3 changed files with 45 additions and 13 deletions
|
@ -119,11 +119,12 @@ SENSORS: tuple[WhirlpoolSensorEntityDescription, ...] = (
|
|||
key="DispenseLevel",
|
||||
name="Detergent Level",
|
||||
translation_key="whirlpool_tank",
|
||||
entity_registry_enabled_default=False,
|
||||
device_class=SensorDeviceClass.ENUM,
|
||||
options=list(TANK_FILL.values()),
|
||||
value_fn=lambda WasherDryer: TANK_FILL[
|
||||
value_fn=lambda WasherDryer: TANK_FILL.get(
|
||||
WasherDryer.get_attribute("WashCavity_OpStatusBulkDispense1Level")
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -265,6 +266,7 @@ class WasherDryerTimeClass(RestoreSensor):
|
|||
|
||||
async def async_will_remove_from_hass(self) -> None:
|
||||
"""Close Whrilpool Appliance sockets before removing."""
|
||||
self._wd.unregister_attr_callback(self.update_from_latest_data)
|
||||
await self._wd.disconnect()
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue