mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add explicit device name to Switchbot (#95512)
This commit is contained in:
parent
e6c4f98354
commit
9fb3d4de30
@ -52,6 +52,7 @@ class SwitchBotCurtainEntity(SwitchbotEntity, CoverEntity, RestoreEntity):
|
||||
| CoverEntityFeature.SET_POSITION
|
||||
)
|
||||
_attr_translation_key = "cover"
|
||||
_attr_name = None
|
||||
|
||||
def __init__(self, coordinator: SwitchbotDataUpdateCoordinator) -> None:
|
||||
"""Initialize the Switchbot."""
|
||||
|
@ -41,6 +41,7 @@ class SwitchBotHumidifier(SwitchbotSwitchedEntity, HumidifierEntity):
|
||||
_device: switchbot.SwitchbotHumidifier
|
||||
_attr_min_humidity = 1
|
||||
_attr_translation_key = "humidifier"
|
||||
_attr_name = None
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool | None:
|
||||
|
@ -46,6 +46,7 @@ class SwitchbotLightEntity(SwitchbotEntity, LightEntity):
|
||||
"""Representation of switchbot light bulb."""
|
||||
|
||||
_device: SwitchbotBaseLight
|
||||
_attr_name = None
|
||||
|
||||
def __init__(self, coordinator: SwitchbotDataUpdateCoordinator) -> None:
|
||||
"""Initialize the Switchbot light."""
|
||||
|
@ -27,6 +27,7 @@ class SwitchBotLock(SwitchbotEntity, LockEntity):
|
||||
"""Representation of a Switchbot lock."""
|
||||
|
||||
_attr_translation_key = "lock"
|
||||
_attr_name = None
|
||||
_device: switchbot.SwitchbotLock
|
||||
|
||||
def __init__(self, coordinator: SwitchbotDataUpdateCoordinator) -> None:
|
||||
|
@ -35,6 +35,7 @@ class SwitchBotSwitch(SwitchbotSwitchedEntity, SwitchEntity, RestoreEntity):
|
||||
|
||||
_attr_device_class = SwitchDeviceClass.SWITCH
|
||||
_attr_translation_key = "bot"
|
||||
_attr_name = None
|
||||
_device: switchbot.Switchbot
|
||||
|
||||
def __init__(self, coordinator: SwitchbotDataUpdateCoordinator) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user