mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 15:16:33 +00:00
Fix ingress_url with not installed add-ons (#998)
Fix ingress_url with not installed add-ons
This commit is contained in:
parent
f10b433e1f
commit
c2d705a42a
6
API.md
6
API.md
@ -471,7 +471,7 @@ Get all available addons.
|
|||||||
"available": "bool",
|
"available": "bool",
|
||||||
"arch": ["armhf", "aarch64", "i386", "amd64"],
|
"arch": ["armhf", "aarch64", "i386", "amd64"],
|
||||||
"machine": "[raspberrypi2, tinker]",
|
"machine": "[raspberrypi2, tinker]",
|
||||||
"homeassistant": "min Home Assistant version",
|
"homeassistant": "null|min Home Assistant version",
|
||||||
"repository": "12345678|null",
|
"repository": "12345678|null",
|
||||||
"version": "null|VERSION_INSTALLED",
|
"version": "null|VERSION_INSTALLED",
|
||||||
"last_version": "LAST_VERSION",
|
"last_version": "LAST_VERSION",
|
||||||
@ -511,8 +511,8 @@ Get all available addons.
|
|||||||
"discovery": "['service']",
|
"discovery": "['service']",
|
||||||
"ip_address": "ip address",
|
"ip_address": "ip address",
|
||||||
"ingress": "bool",
|
"ingress": "bool",
|
||||||
"ingress_entry": "/api/hassio_ingress/slug",
|
"ingress_entry": "null|/api/hassio_ingress/slug",
|
||||||
"ingress_url": "/api/hassio_ingress/slug/entry.html"
|
"ingress_url": "null|/api/hassio_ingress/slug/entry.html"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -391,8 +391,7 @@ class Addon(CoreSysAttributes):
|
|||||||
@property
|
@property
|
||||||
def ingress_url(self):
|
def ingress_url(self):
|
||||||
"""Return URL to ingress url."""
|
"""Return URL to ingress url."""
|
||||||
# Use ingress
|
if not self.is_installed or not self.with_ingress:
|
||||||
if not self.with_ingress:
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
webui = f"/api/hassio_ingress/{self.ingress_token}/"
|
webui = f"/api/hassio_ingress/{self.ingress_token}/"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user