Skip to content

Commit c557399

Browse files
committed
Fix tests
1 parent 1dfd0a9 commit c557399

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_entity.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ async def test_sensor_enum_value_is_normalized_for_state_translation(
180180
"""VictronEnum sensor values should map to enum codes for translations."""
181181

182182
class AirQuality(VictronEnum):
183-
GOOD = (100, "Good")
184-
SLIGHTLY_UNHEALTHY = (200, "Slightly unhealthy")
183+
GOOD = (100, "good", "Good")
184+
SLIGHTLY_UNHEALTHY = (200, "slightly_unhealthy", "Slightly unhealthy")
185185

186186
device_info: DeviceInfo = {"identifiers": {("victron_mqtt", "dev_1")}}
187187
sensor = VictronSensor(
@@ -190,5 +190,5 @@ class AirQuality(VictronEnum):
190190

191191
with patch.object(sensor, "async_write_ha_state") as mock_sched:
192192
sensor._on_update_task(AirQuality.SLIGHTLY_UNHEALTHY)
193-
assert sensor.native_value == 200
193+
assert sensor.native_value == "slightly_unhealthy"
194194
mock_sched.assert_called_once()

0 commit comments

Comments
 (0)