Add configuration url to Pi hole (#57718)
This commit is contained in:
parent
e232bdc082
commit
148d2480ac
1 changed files with 11 additions and 5 deletions
|
@ -177,8 +177,14 @@ class PiHoleEntity(CoordinatorEntity):
|
|||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return the device information of the entity."""
|
||||
return {
|
||||
"identifiers": {(DOMAIN, self._server_unique_id)},
|
||||
"name": self._name,
|
||||
"manufacturer": "Pi-hole",
|
||||
}
|
||||
if self.api.tls:
|
||||
config_url = f"https://{self.api.host}/{self.api.location}"
|
||||
else:
|
||||
config_url = f"http://{self.api.host}/{self.api.location}"
|
||||
|
||||
return DeviceInfo(
|
||||
identifiers={(DOMAIN, self._server_unique_id)},
|
||||
name=self._name,
|
||||
manufacturer="Pi-hole",
|
||||
configuration_url=config_url,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue