From db1797beb4abee166a689115813f3404d4cb3bf0 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Thu, 29 Sep 2022 08:58:16 -0600 Subject: [PATCH] Use correct exception type for RainMachine select API error (#79309) --- homeassistant/components/rainmachine/select.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/rainmachine/select.py b/homeassistant/components/rainmachine/select.py index 41383bffc4e..33a0a38ed15 100644 --- a/homeassistant/components/rainmachine/select.py +++ b/homeassistant/components/rainmachine/select.py @@ -9,6 +9,7 @@ from homeassistant.components.select import SelectEntity, SelectEntityDescriptio from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_UNIT_SYSTEM_IMPERIAL from homeassistant.core import HomeAssistant, callback +from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers.entity import EntityCategory from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -145,7 +146,7 @@ class FreezeProtectionTemperatureSelect(RainMachineEntity, SelectEntity): {self.entity_description.data_key: self._label_to_api_value_map[option]} ) except RainMachineError as err: - raise ValueError(f"Error while setting {self.name}: {err}") from err + raise HomeAssistantError(f"Error while setting {self.name}: {err}") from err @callback def update_from_latest_data(self) -> None: