Add explicit device name to Switchbot (#95512)

pull/95520/head
Joost Lekkerkerker 2023-06-29 11:25:39 +02:00 committed by GitHub
parent e6c4f98354
commit 9fb3d4de30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 0 deletions

View File

@ -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."""

View File

@ -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:

View File

@ -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."""

View File

@ -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:

View File

@ -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: