Use DeviceInfo on esphome (#58396)

Co-authored-by: epenet <epenet@users.noreply.github.com>
pull/58374/head^2
epenet 2021-10-25 13:16:53 +02:00 committed by GitHub
parent 4d7c55ff0e
commit 48c85fb839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -755,9 +755,9 @@ class EsphomeEntity(Entity, Generic[_InfoT, _StateT]):
@property
def device_info(self) -> DeviceInfo:
"""Return device registry information for this entity."""
return {
"connections": {(dr.CONNECTION_NETWORK_MAC, self._device_info.mac_address)}
}
return DeviceInfo(
connections={(dr.CONNECTION_NETWORK_MAC, self._device_info.mac_address)}
)
@property
def name(self) -> str: