1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-23 12:29:55 +00:00

Use enum sensor device class in Litter-Robot (#83290)

This commit is contained in:
Franck Nijhof
2022-12-06 11:08:05 +01:00
committed by GitHub
parent d62bdbb9ff
commit c25ba19ffd
5 changed files with 96 additions and 33 deletions

View File

@@ -86,7 +86,7 @@ async def test_litter_robot_sensor(
assert sensor.attributes["device_class"] == SensorDeviceClass.TIMESTAMP
sensor = hass.states.get("sensor.test_status_code")
assert sensor.state == "dfs"
assert sensor.attributes["device_class"] == "litterrobot__status_code"
assert sensor.attributes["device_class"] == SensorDeviceClass.ENUM
sensor = hass.states.get("sensor.test_litter_level")
assert sensor.state == "70.0"
assert sensor.attributes["unit_of_measurement"] == PERCENTAGE