mirror of
https://github.com/home-assistant/core.git
synced 2026-07-13 01:27:57 +01:00
Remove previously deprecated battery props from xiaomi_miio (#175687)
This commit is contained in:
@@ -92,7 +92,6 @@ class MiroboVacuum(
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.START
|
||||
)
|
||||
@@ -114,12 +113,6 @@ class MiroboVacuum(
|
||||
|
||||
return super().activity
|
||||
|
||||
@property
|
||||
@override
|
||||
def battery_level(self) -> int:
|
||||
"""Return the battery level of the vacuum cleaner."""
|
||||
return self.coordinator.data.status.battery
|
||||
|
||||
@property
|
||||
@override
|
||||
def fan_speed(self) -> str:
|
||||
|
||||
@@ -9,7 +9,6 @@ from miio import DeviceException
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.vacuum import (
|
||||
ATTR_BATTERY_ICON,
|
||||
ATTR_FAN_SPEED,
|
||||
ATTR_FAN_SPEED_LIST,
|
||||
DOMAIN as VACUUM_DOMAIN,
|
||||
@@ -263,9 +262,8 @@ async def test_xiaomi_vacuum_services(
|
||||
state = hass.states.get(entity_id)
|
||||
|
||||
assert state.state == VacuumActivity.ERROR
|
||||
assert state.attributes.get(ATTR_SUPPORTED_FEATURES) == 14204
|
||||
assert state.attributes.get(ATTR_SUPPORTED_FEATURES) == 14140
|
||||
assert state.attributes.get(ATTR_ERROR) == "Error message"
|
||||
assert state.attributes.get(ATTR_BATTERY_ICON) == "mdi:battery-80"
|
||||
assert state.attributes.get(ATTR_TIMERS) == [
|
||||
{
|
||||
"enabled": True,
|
||||
@@ -449,9 +447,8 @@ async def test_xiaomi_specific_services(
|
||||
# Check state attributes
|
||||
state = hass.states.get(entity_id)
|
||||
assert state.state == VacuumActivity.CLEANING
|
||||
assert state.attributes.get(ATTR_SUPPORTED_FEATURES) == 14204
|
||||
assert state.attributes.get(ATTR_SUPPORTED_FEATURES) == 14140
|
||||
assert state.attributes.get(ATTR_ERROR) is None
|
||||
assert state.attributes.get(ATTR_BATTERY_ICON) == "mdi:battery-30"
|
||||
assert state.attributes.get(ATTR_TIMERS) == [
|
||||
{
|
||||
"enabled": True,
|
||||
|
||||
Reference in New Issue
Block a user