File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments