Use DeviceInfo in switchbot (#58578)

Co-authored-by: epenet <epenet@users.noreply.github.com>
pull/58594/head
epenet 2021-10-28 09:40:35 +02:00 committed by GitHub
parent 1a5333f376
commit d579d90f10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -28,12 +28,12 @@ class SwitchbotEntity(CoordinatorEntity, Entity):
self._idx = idx self._idx = idx
self._mac = mac self._mac = mac
self._attr_name = name self._attr_name = name
self._attr_device_info: DeviceInfo = { self._attr_device_info = DeviceInfo(
"connections": {(dr.CONNECTION_NETWORK_MAC, self._mac)}, connections={(dr.CONNECTION_NETWORK_MAC, self._mac)},
"name": name, manufacturer=MANUFACTURER,
"model": self.data["modelName"], model=self.data["modelName"],
"manufacturer": MANUFACTURER, name=name,
} )
@property @property
def data(self) -> dict[str, Any]: def data(self) -> dict[str, Any]: