Improve device naming for ViCare integration (#138240)

Update entity.py
This commit is contained in:
Christopher Fenner 2025-02-11 11:42:21 +01:00 committed by GitHub
parent e71f8c444b
commit 0d605f9f74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,6 +28,7 @@ class ViCareEntity(Entity):
"""Initialize the entity."""
gateway_serial = device_config.getConfig().serial
device_id = device_config.getId()
model = device_config.getModel().replace("_", " ")
identifier = (
f"{gateway_serial}_{device_serial.replace('zigbee-', 'zigbee_')}"
@ -45,8 +46,8 @@ class ViCareEntity(Entity):
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, identifier)},
serial_number=device_serial,
name=device_config.getModel(),
name=model,
manufacturer="Viessmann",
model=device_config.getModel(),
model=model,
configuration_url="https://developer.viessmann.com/",
)