Remove the deprecated discovery_info endpoint (#64534)
This commit is contained in:
@@ -19,7 +19,6 @@ from homeassistant.const import (
|
||||
URL_API,
|
||||
URL_API_COMPONENTS,
|
||||
URL_API_CONFIG,
|
||||
URL_API_DISCOVERY_INFO,
|
||||
URL_API_ERROR_LOG,
|
||||
URL_API_EVENTS,
|
||||
URL_API_SERVICES,
|
||||
@@ -56,7 +55,6 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
hass.http.register_view(APIStatusView)
|
||||
hass.http.register_view(APIEventStream)
|
||||
hass.http.register_view(APIConfigView)
|
||||
hass.http.register_view(APIDiscoveryView)
|
||||
hass.http.register_view(APIStatesView)
|
||||
hass.http.register_view(APIEntityStateView)
|
||||
hass.http.register_view(APIEventListenersView)
|
||||
@@ -167,33 +165,6 @@ class APIConfigView(HomeAssistantView):
|
||||
return self.json(request.app["hass"].config.as_dict())
|
||||
|
||||
|
||||
class APIDiscoveryView(HomeAssistantView):
|
||||
"""
|
||||
View to provide Discovery information.
|
||||
|
||||
DEPRECATED: To be removed in 2022.1
|
||||
"""
|
||||
|
||||
requires_auth = False
|
||||
url = URL_API_DISCOVERY_INFO
|
||||
name = "api:discovery"
|
||||
|
||||
async def get(self, request):
|
||||
"""Get discovery information."""
|
||||
return self.json(
|
||||
{
|
||||
ATTR_UUID: "",
|
||||
ATTR_BASE_URL: "",
|
||||
ATTR_EXTERNAL_URL: "",
|
||||
ATTR_INTERNAL_URL: "",
|
||||
ATTR_LOCATION_NAME: "",
|
||||
ATTR_INSTALLATION_TYPE: "",
|
||||
ATTR_REQUIRES_API_PASSWORD: True,
|
||||
ATTR_VERSION: "",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class APIStatesView(HomeAssistantView):
|
||||
"""View to handle States requests."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user