diff --git a/homeassistant/components/fjaraskupan/__init__.py b/homeassistant/components/fjaraskupan/__init__.py index f5cedad243d..babcdc6649a 100644 --- a/homeassistant/components/fjaraskupan/__init__.py +++ b/homeassistant/components/fjaraskupan/__init__.py @@ -23,7 +23,7 @@ from homeassistant.helpers.update_coordinator import DataUpdateCoordinator from .const import DISPATCH_DETECTION, DOMAIN -PLATFORMS = ["binary_sensor", "fan", "light", "sensor", "number"] +PLATFORMS = ["binary_sensor", "fan", "light", "number", "sensor"] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/fjaraskupan/fan.py b/homeassistant/components/fjaraskupan/fan.py index 7cb7c7cd18e..bbc04a9607c 100644 --- a/homeassistant/components/fjaraskupan/fan.py +++ b/homeassistant/components/fjaraskupan/fan.py @@ -17,6 +17,7 @@ from homeassistant.components.fan import ( ) from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, callback +from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.update_coordinator import ( @@ -50,7 +51,7 @@ PRESET_TO_COMMAND = { } -class UnsupportedPreset(Exception): +class UnsupportedPreset(HomeAssistantError): """The preset is unsupported.""" diff --git a/homeassistant/components/fjaraskupan/number.py b/homeassistant/components/fjaraskupan/number.py index d5862bf2e7f..66f719abd6f 100644 --- a/homeassistant/components/fjaraskupan/number.py +++ b/homeassistant/components/fjaraskupan/number.py @@ -22,7 +22,7 @@ async def async_setup_entry( config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: - """Set up sensors dynamically through discovery.""" + """Set up number entities dynamically through discovery.""" def _constructor(device_state: DeviceState) -> list[Entity]: return [ @@ -40,7 +40,6 @@ class PeriodicVentingTime(CoordinatorEntity[State], NumberEntity): _attr_max_value: float = 59 _attr_min_value: float = 0 _attr_step: float = 1 - _attr_entity_registry_enabled_default = True _attr_entity_category = ENTITY_CATEGORY_CONFIG _attr_unit_of_measurement = TIME_MINUTES @@ -50,7 +49,7 @@ class PeriodicVentingTime(CoordinatorEntity[State], NumberEntity): device: Device, device_info: DeviceInfo, ) -> None: - """Init sensor.""" + """Init number entities.""" super().__init__(coordinator) self._device = device self._attr_unique_id = f"{device.address}-periodic-venting"