mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Add configuration url to Pi hole (#57718)
This commit is contained in:
parent
e232bdc082
commit
148d2480ac
@ -177,8 +177,14 @@ class PiHoleEntity(CoordinatorEntity):
|
|||||||
@property
|
@property
|
||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return the device information of the entity."""
|
"""Return the device information of the entity."""
|
||||||
return {
|
if self.api.tls:
|
||||||
"identifiers": {(DOMAIN, self._server_unique_id)},
|
config_url = f"https://{self.api.host}/{self.api.location}"
|
||||||
"name": self._name,
|
else:
|
||||||
"manufacturer": "Pi-hole",
|
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…
x
Reference in New Issue
Block a user