mirror of
https://github.com/home-assistant/core.git
synced 2026-08-28 10:16:02 -05:00
Remove previously deprecated battery prop from LG thinq (#175685)
This commit is contained in:
@@ -65,15 +65,6 @@ ROBOT_STATUS_TO_HA = {
|
||||
"clean_select_gozone": VacuumActivity.CLEANING,
|
||||
"error": VacuumActivity.ERROR,
|
||||
}
|
||||
ROBOT_BATT_TO_HA = {
|
||||
"moveless": 5,
|
||||
"dock_level": 5,
|
||||
"low": 30,
|
||||
"mid": 50,
|
||||
"high": 90,
|
||||
"full": 100,
|
||||
"over_charge": 100,
|
||||
}
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -106,7 +97,6 @@ class ThinQStateVacuumEntity(ThinQEntity, StateVacuumEntity):
|
||||
_attr_supported_features = (
|
||||
VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
@@ -120,19 +110,12 @@ class ThinQStateVacuumEntity(ThinQEntity, StateVacuumEntity):
|
||||
# Update state.
|
||||
self._attr_activity = ROBOT_STATUS_TO_HA.get(self.data.current_state)
|
||||
|
||||
# Update battery.
|
||||
if (level := self.data.battery) is not None:
|
||||
self._attr_battery_level = (
|
||||
level if isinstance(level, int) else ROBOT_BATT_TO_HA.get(level, 0)
|
||||
)
|
||||
|
||||
_LOGGER.debug(
|
||||
"[%s:%s] update status: %s -> %s (battery_level=%s)",
|
||||
"[%s:%s] update status: %s -> %s",
|
||||
self.coordinator.device_name,
|
||||
self.property_id,
|
||||
self.data.current_state,
|
||||
self.state,
|
||||
self.battery_level,
|
||||
)
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user