mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Move shorthand attributes out of Snooz constructor (#99842)
This commit is contained in:
parent
dcd00546ba
commit
a00cbe2677
@ -74,15 +74,15 @@ class SnoozFan(FanEntity, RestoreEntity):
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_supported_features = FanEntityFeature.SET_SPEED
|
||||
_attr_should_poll = False
|
||||
_is_on: bool | None = None
|
||||
_percentage: int | None = None
|
||||
|
||||
def __init__(self, data: SnoozConfigurationData) -> None:
|
||||
"""Initialize a Snooz fan entity."""
|
||||
self._device = data.device
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user