Enable basic type checking in demo platforms (#66212)

* Adjust type hints in demo platforms

* Adjust mypy config

* Adjust name
This commit is contained in:
epenet 2022-02-10 10:05:58 +01:00 committed by GitHub
parent b3814aa4e6
commit ea325ef027
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 47 deletions

View file

@ -105,13 +105,10 @@ class DemoNumber(NumberEntity):
if step is not None:
self._attr_step = step
@property
def device_info(self) -> DeviceInfo:
"""Return device info."""
return DeviceInfo(
self._attr_device_info = DeviceInfo(
identifiers={
# Serial numbers are unique identifiers within a specific domain
(DOMAIN, self.unique_id)
(DOMAIN, unique_id)
},
name=self.name,
)