def test_speed_to_homekit(): """Test speed conversion from HA to Homekit.""" speed_mapping = HomeKitSpeedMapping(['off', 'low', 'high']) assert speed_mapping.speed_to_homekit(None) is None assert speed_mapping.speed_to_homekit('off') == 0 assert speed_mapping.speed_to_homekit('low') == 50 assert speed_mapping.speed_to_homekit('high') == 100
def test_speed_to_homekit(): """Test speed conversion from HA to Homekit.""" speed_mapping = HomeKitSpeedMapping(["off", "low", "high"]) assert speed_mapping.speed_to_homekit(None) is None assert speed_mapping.speed_to_homekit("off") == 0 assert speed_mapping.speed_to_homekit("low") == 50 assert speed_mapping.speed_to_homekit("high") == 100
def test_speed_to_homekit(): """Test speed conversion from HA to Homekit.""" speed_mapping = HomeKitSpeedMapping(['off', 'low', 'high']) assert speed_mapping.speed_to_homekit('off') == 0 assert speed_mapping.speed_to_homekit('low') == 50 assert speed_mapping.speed_to_homekit('high') == 100