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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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