Fix device_class.capitalize() in Point (#101440)

pull/101548/head
Fredrik Erlandsson 2023-10-06 18:23:18 +02:00 committed by GitHub
parent b2cad2370b
commit d654c4bc1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -277,7 +277,8 @@ class MinutPointEntity(Entity):
sw_version=device["firmware"]["installed"],
via_device=(DOMAIN, device["home"]),
)
self._attr_name = f"{self._name} {device_class.capitalize()}"
if device_class:
self._attr_name = f"{self._name} {device_class.capitalize()}"
def __str__(self):
"""Return string representation of device."""