diff --git a/homeassistant/components/snooz/fan.py b/homeassistant/components/snooz/fan.py index a34989d1a03..c5b3e5b5b69 100644 --- a/homeassistant/components/snooz/fan.py +++ b/homeassistant/components/snooz/fan.py @@ -21,6 +21,7 @@ from homeassistant.const import STATE_OFF, STATE_ON from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers import entity_platform +from homeassistant.helpers.device_registry import DeviceInfo from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.restore_state import RestoreEntity @@ -71,15 +72,18 @@ async def async_setup_entry( class SnoozFan(FanEntity, RestoreEntity): """Fan representation of a Snooz device.""" + _attr_has_entity_name = True + _attr_name = None + def __init__(self, data: SnoozConfigurationData) -> None: """Initialize a Snooz fan entity.""" self._device = data.device - self._attr_name = data.title self._attr_unique_id = data.device.address self._attr_supported_features = FanEntityFeature.SET_SPEED self._attr_should_poll = False self._is_on: bool | None = None self._percentage: int | None = None + self._attr_device_info = DeviceInfo(identifiers={(DOMAIN, data.device.address)}) @callback def _async_write_state_changed(self) -> None: