mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Use correct exception type for RainMachine select API error (#79309)
This commit is contained in:
parent
da445e515b
commit
db1797beb4
@ -9,6 +9,7 @@ from homeassistant.components.select import SelectEntity, SelectEntityDescriptio
|
|||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import CONF_UNIT_SYSTEM_IMPERIAL
|
from homeassistant.const import CONF_UNIT_SYSTEM_IMPERIAL
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
from homeassistant.helpers.entity import EntityCategory
|
from homeassistant.helpers.entity import EntityCategory
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
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]}
|
{self.entity_description.data_key: self._label_to_api_value_map[option]}
|
||||||
)
|
)
|
||||||
except RainMachineError as err:
|
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
|
@callback
|
||||||
def update_from_latest_data(self) -> None:
|
def update_from_latest_data(self) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user