Use correct exception type for RainMachine select API error (#79309)
This commit is contained in:
parent
da445e515b
commit
db1797beb4
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue