Use DeviceInfo Class F-G (#58255)

This commit is contained in:
Robert Hillis 2021-10-23 06:01:21 -04:00 committed by GitHub
parent 12c067970a
commit 63646a19cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 207 additions and 214 deletions

View file

@ -353,10 +353,10 @@ class FritzDeviceBase(Entity):
"""Return the device information."""
return DeviceInfo(
connections={(CONNECTION_NETWORK_MAC, self._mac)},
identifiers={(DOMAIN, self._mac)},
default_name=self.name,
default_manufacturer="AVM",
default_model="FRITZ!Box Tracked device",
default_name=self.name,
identifiers={(DOMAIN, self._mac)},
via_device=(
DOMAIN,
self._router.unique_id,
@ -479,13 +479,12 @@ class FritzBoxBaseEntity:
@property
def device_info(self) -> DeviceInfo:
"""Return the device information."""
return DeviceInfo(
configuration_url=f"http://{self._fritzbox_tools.host}",
connections={(CONNECTION_NETWORK_MAC, self.mac_address)},
identifiers={(DOMAIN, self._fritzbox_tools.unique_id)},
name=self._device_name,
manufacturer="AVM",
model=self._fritzbox_tools.model,
name=self._device_name,
sw_version=self._fritzbox_tools.current_firmware,
configuration_url=f"http://{self._fritzbox_tools.host}",
)