From f4b0aa62c5e9052be7d169c1d6a5834a80c49c25 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 15 Dec 2024 19:44:51 +0900 Subject: [PATCH] Himox H06: add test for mapped speed being mapped to integer When mapping specifies an integer without quotes, we expect the result of the mapping to be an integer, even if the dps type was string. User reports that percentage is not working correctly when they map from string values, but it is not what was expected. PR #2586 --- tests/devices/test_himox_h06_purifier.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/devices/test_himox_h06_purifier.py b/tests/devices/test_himox_h06_purifier.py index 984c6262ce..ac4bdd5749 100644 --- a/tests/devices/test_himox_h06_purifier.py +++ b/tests/devices/test_himox_h06_purifier.py @@ -103,6 +103,7 @@ def test_supported_features(self): def test_speed(self): self.dps[SPEED_DPS] = "low" self.assertEqual(self.subject.percentage, 33) + self.assertEqual(type(self.subject.percentage), int) def test_speed_step(self): self.assertAlmostEqual(self.subject.percentage_step, 33, 0)