Use DeviceInfo on esphome (#58396)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
4d7c55ff0e
commit
48c85fb839
1 changed files with 3 additions and 3 deletions
|
@ -755,9 +755,9 @@ class EsphomeEntity(Entity, Generic[_InfoT, _StateT]):
|
||||||
@property
|
@property
|
||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return device registry information for this entity."""
|
"""Return device registry information for this entity."""
|
||||||
return {
|
return DeviceInfo(
|
||||||
"connections": {(dr.CONNECTION_NETWORK_MAC, self._device_info.mac_address)}
|
connections={(dr.CONNECTION_NETWORK_MAC, self._device_info.mac_address)}
|
||||||
}
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue