Update __init__.py

This commit is contained in:
Christopher Fenner
2023-10-06 08:16:31 +02:00
committed by GitHub
parent 454cb960fb
commit a6e1a816f4

View File

@@ -93,6 +93,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
class ViCareEntity(Entity):
"""Base class for ViCare entities."""
def __init__(self, device_config, hasMultipleDevices: bool) -> None:
"""Initialize the entity."""
device_name = device_config.getModel()
if hasMultipleDevices:
device_name = f"{device_config.getModel()}-{device_config.getConfig().serial}"