Explicitly use device name as entity name for Xiaomi fan and humidifier (#95986)

This commit is contained in:
Jan-Philipp Benecke 2023-07-06 13:25:34 +02:00 committed by GitHub
parent de24860c87
commit be01eb5aad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -292,6 +292,8 @@ async def async_setup_entry(
class XiaomiGenericDevice(XiaomiCoordinatedMiioEntity, FanEntity):
"""Representation of a generic Xiaomi device."""
_attr_name = None
def __init__(self, device, entry, unique_id, coordinator):
"""Initialize the generic Xiaomi device."""
super().__init__(device, entry, unique_id, coordinator)

View File

@ -118,6 +118,7 @@ class XiaomiGenericHumidifier(XiaomiCoordinatedMiioEntity, HumidifierEntity):
_attr_device_class = HumidifierDeviceClass.HUMIDIFIER
_attr_supported_features = HumidifierEntityFeature.MODES
_attr_name = None
def __init__(self, device, entry, unique_id, coordinator):
"""Initialize the generic Xiaomi device."""