Use DeviceInfo in switchbot (#58578)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
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

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]: