2018-02-16 22:07:38 +00:00
|
|
|
"""Http views to control the config manager."""
|
2021-06-01 20:34:31 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
2019-08-20 07:17:52 +00:00
|
|
|
import aiohttp.web_exceptions
|
2019-08-18 04:34:11 +00:00
|
|
|
import voluptuous as vol
|
|
|
|
|
2018-04-13 14:14:53 +00:00
|
|
|
from homeassistant import config_entries, data_entry_flow
|
2020-06-06 18:34:56 +00:00
|
|
|
from homeassistant.auth.permissions.const import CAT_CONFIG_ENTRIES, POLICY_EDIT
|
2019-08-18 04:34:11 +00:00
|
|
|
from homeassistant.components import websocket_api
|
2018-02-16 22:07:38 +00:00
|
|
|
from homeassistant.components.http import HomeAssistantView
|
2020-08-25 22:59:22 +00:00
|
|
|
from homeassistant.const import HTTP_FORBIDDEN, HTTP_NOT_FOUND
|
2021-06-01 20:34:31 +00:00
|
|
|
from homeassistant.core import HomeAssistant, callback
|
2018-12-13 14:30:20 +00:00
|
|
|
from homeassistant.exceptions import Unauthorized
|
2018-04-17 09:44:32 +00:00
|
|
|
from homeassistant.helpers.data_entry_flow import (
|
2019-07-31 19:25:30 +00:00
|
|
|
FlowManagerIndexView,
|
|
|
|
FlowManagerResourceView,
|
|
|
|
)
|
2019-07-08 23:19:37 +00:00
|
|
|
from homeassistant.loader import async_get_config_flows
|
2018-02-16 22:07:38 +00:00
|
|
|
|
|
|
|
|
2018-10-01 06:50:05 +00:00
|
|
|
async def async_setup(hass):
|
2018-02-16 22:07:38 +00:00
|
|
|
"""Enable the Home Assistant views."""
|
|
|
|
hass.http.register_view(ConfigManagerEntryIndexView)
|
|
|
|
hass.http.register_view(ConfigManagerEntryResourceView)
|
2020-08-25 22:59:22 +00:00
|
|
|
hass.http.register_view(ConfigManagerEntryResourceReloadView)
|
2019-07-31 19:25:30 +00:00
|
|
|
hass.http.register_view(ConfigManagerFlowIndexView(hass.config_entries.flow))
|
|
|
|
hass.http.register_view(ConfigManagerFlowResourceView(hass.config_entries.flow))
|
2018-02-16 22:07:38 +00:00
|
|
|
hass.http.register_view(ConfigManagerAvailableFlowView)
|
2019-08-18 04:34:11 +00:00
|
|
|
|
2020-01-03 10:52:01 +00:00
|
|
|
hass.http.register_view(OptionManagerFlowIndexView(hass.config_entries.options))
|
|
|
|
hass.http.register_view(OptionManagerFlowResourceView(hass.config_entries.options))
|
2019-08-18 04:34:11 +00:00
|
|
|
|
2021-02-21 03:21:39 +00:00
|
|
|
hass.components.websocket_api.async_register_command(config_entry_disable)
|
2020-04-14 00:38:39 +00:00
|
|
|
hass.components.websocket_api.async_register_command(config_entry_update)
|
2019-08-20 07:17:52 +00:00
|
|
|
hass.components.websocket_api.async_register_command(config_entries_progress)
|
2019-12-18 06:41:01 +00:00
|
|
|
hass.components.websocket_api.async_register_command(ignore_config_flow)
|
2019-08-18 04:34:11 +00:00
|
|
|
|
2018-02-16 22:07:38 +00:00
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
class ConfigManagerEntryIndexView(HomeAssistantView):
|
|
|
|
"""View to get available config entries."""
|
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
url = "/api/config/config_entries/entry"
|
|
|
|
name = "api:config:config_entries:entry"
|
2018-02-16 22:07:38 +00:00
|
|
|
|
2018-10-01 06:50:05 +00:00
|
|
|
async def get(self, request):
|
2019-02-22 16:59:43 +00:00
|
|
|
"""List available config entries."""
|
2019-07-31 19:25:30 +00:00
|
|
|
hass = request.app["hass"]
|
|
|
|
|
2020-04-14 00:38:39 +00:00
|
|
|
return self.json(
|
|
|
|
[entry_json(entry) for entry in hass.config_entries.async_entries()]
|
|
|
|
)
|
2018-02-16 22:07:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ConfigManagerEntryResourceView(HomeAssistantView):
|
|
|
|
"""View to interact with a config entry."""
|
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
url = "/api/config/config_entries/entry/{entry_id}"
|
|
|
|
name = "api:config:config_entries:entry:resource"
|
2018-02-16 22:07:38 +00:00
|
|
|
|
2018-10-01 06:50:05 +00:00
|
|
|
async def delete(self, request, entry_id):
|
2018-02-16 22:07:38 +00:00
|
|
|
"""Delete a config entry."""
|
2019-07-31 19:25:30 +00:00
|
|
|
if not request["hass_user"].is_admin:
|
|
|
|
raise Unauthorized(config_entry_id=entry_id, permission="remove")
|
2018-12-13 14:30:20 +00:00
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
hass = request.app["hass"]
|
2018-02-16 22:07:38 +00:00
|
|
|
|
|
|
|
try:
|
2018-10-01 06:50:05 +00:00
|
|
|
result = await hass.config_entries.async_remove(entry_id)
|
2018-02-16 22:07:38 +00:00
|
|
|
except config_entries.UnknownEntry:
|
2020-04-08 22:57:47 +00:00
|
|
|
return self.json_message("Invalid entry specified", HTTP_NOT_FOUND)
|
2018-02-16 22:07:38 +00:00
|
|
|
|
|
|
|
return self.json(result)
|
|
|
|
|
|
|
|
|
2020-08-25 22:59:22 +00:00
|
|
|
class ConfigManagerEntryResourceReloadView(HomeAssistantView):
|
|
|
|
"""View to reload a config entry."""
|
|
|
|
|
|
|
|
url = "/api/config/config_entries/entry/{entry_id}/reload"
|
|
|
|
name = "api:config:config_entries:entry:resource:reload"
|
|
|
|
|
|
|
|
async def post(self, request, entry_id):
|
|
|
|
"""Reload a config entry."""
|
|
|
|
if not request["hass_user"].is_admin:
|
|
|
|
raise Unauthorized(config_entry_id=entry_id, permission="remove")
|
|
|
|
|
|
|
|
hass = request.app["hass"]
|
|
|
|
|
|
|
|
try:
|
|
|
|
result = await hass.config_entries.async_reload(entry_id)
|
|
|
|
except config_entries.OperationNotAllowed:
|
|
|
|
return self.json_message("Entry cannot be reloaded", HTTP_FORBIDDEN)
|
|
|
|
except config_entries.UnknownEntry:
|
|
|
|
return self.json_message("Invalid entry specified", HTTP_NOT_FOUND)
|
|
|
|
|
|
|
|
return self.json({"require_restart": not result})
|
|
|
|
|
|
|
|
|
2021-04-01 14:20:53 +00:00
|
|
|
def _prepare_config_flow_result_json(result, prepare_result_json):
|
|
|
|
"""Convert result to JSON."""
|
|
|
|
if result["type"] != data_entry_flow.RESULT_TYPE_CREATE_ENTRY:
|
|
|
|
return prepare_result_json(result)
|
|
|
|
|
|
|
|
data = result.copy()
|
|
|
|
data["result"] = entry_json(result["result"])
|
|
|
|
data.pop("data")
|
|
|
|
return data
|
|
|
|
|
|
|
|
|
2018-04-17 09:44:32 +00:00
|
|
|
class ConfigManagerFlowIndexView(FlowManagerIndexView):
|
2018-02-16 22:07:38 +00:00
|
|
|
"""View to create config flows."""
|
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
url = "/api/config/config_entries/flow"
|
|
|
|
name = "api:config:config_entries:flow"
|
2018-02-16 22:07:38 +00:00
|
|
|
|
2018-10-01 06:50:05 +00:00
|
|
|
async def get(self, request):
|
2019-08-20 07:17:52 +00:00
|
|
|
"""Not implemented."""
|
|
|
|
raise aiohttp.web_exceptions.HTTPMethodNotAllowed("GET", ["POST"])
|
2018-02-16 22:07:38 +00:00
|
|
|
|
2018-12-13 14:30:20 +00:00
|
|
|
# pylint: disable=arguments-differ
|
|
|
|
async def post(self, request):
|
|
|
|
"""Handle a POST request."""
|
2019-07-31 19:25:30 +00:00
|
|
|
if not request["hass_user"].is_admin:
|
|
|
|
raise Unauthorized(perm_category=CAT_CONFIG_ENTRIES, permission="add")
|
2018-12-13 14:30:20 +00:00
|
|
|
|
|
|
|
# pylint: disable=no-value-for-parameter
|
|
|
|
return await super().post(request)
|
|
|
|
|
2019-03-15 14:41:34 +00:00
|
|
|
def _prepare_result_json(self, result):
|
|
|
|
"""Convert result to JSON."""
|
2021-04-01 14:20:53 +00:00
|
|
|
return _prepare_config_flow_result_json(result, super()._prepare_result_json)
|
2019-03-15 14:41:34 +00:00
|
|
|
|
2018-02-16 22:07:38 +00:00
|
|
|
|
2018-04-17 09:44:32 +00:00
|
|
|
class ConfigManagerFlowResourceView(FlowManagerResourceView):
|
2018-02-16 22:07:38 +00:00
|
|
|
"""View to interact with the flow manager."""
|
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
url = "/api/config/config_entries/flow/{flow_id}"
|
|
|
|
name = "api:config:config_entries:flow:resource"
|
2018-02-16 22:07:38 +00:00
|
|
|
|
2018-12-13 14:30:20 +00:00
|
|
|
async def get(self, request, flow_id):
|
|
|
|
"""Get the current state of a data_entry_flow."""
|
2019-07-31 19:25:30 +00:00
|
|
|
if not request["hass_user"].is_admin:
|
|
|
|
raise Unauthorized(perm_category=CAT_CONFIG_ENTRIES, permission="add")
|
2018-12-13 14:30:20 +00:00
|
|
|
|
|
|
|
return await super().get(request, flow_id)
|
|
|
|
|
|
|
|
# pylint: disable=arguments-differ
|
|
|
|
async def post(self, request, flow_id):
|
|
|
|
"""Handle a POST request."""
|
2019-07-31 19:25:30 +00:00
|
|
|
if not request["hass_user"].is_admin:
|
|
|
|
raise Unauthorized(perm_category=CAT_CONFIG_ENTRIES, permission="add")
|
2018-12-13 14:30:20 +00:00
|
|
|
|
|
|
|
# pylint: disable=no-value-for-parameter
|
|
|
|
return await super().post(request, flow_id)
|
|
|
|
|
2019-03-15 14:41:34 +00:00
|
|
|
def _prepare_result_json(self, result):
|
|
|
|
"""Convert result to JSON."""
|
2021-04-01 14:20:53 +00:00
|
|
|
return _prepare_config_flow_result_json(result, super()._prepare_result_json)
|
2019-03-15 14:41:34 +00:00
|
|
|
|
2018-02-16 22:07:38 +00:00
|
|
|
|
|
|
|
class ConfigManagerAvailableFlowView(HomeAssistantView):
|
|
|
|
"""View to query available flows."""
|
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
url = "/api/config/config_entries/flow_handlers"
|
|
|
|
name = "api:config:config_entries:flow_handlers"
|
2018-02-16 22:07:38 +00:00
|
|
|
|
2018-10-01 06:50:05 +00:00
|
|
|
async def get(self, request):
|
2018-02-16 22:07:38 +00:00
|
|
|
"""List available flow handlers."""
|
2019-07-31 19:25:30 +00:00
|
|
|
hass = request.app["hass"]
|
2019-07-08 23:19:37 +00:00
|
|
|
return self.json(await async_get_config_flows(hass))
|
2019-02-22 16:59:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
class OptionManagerFlowIndexView(FlowManagerIndexView):
|
|
|
|
"""View to create option flows."""
|
|
|
|
|
2019-08-15 21:11:55 +00:00
|
|
|
url = "/api/config/config_entries/options/flow"
|
|
|
|
name = "api:config:config_entries:option:flow"
|
2019-02-22 16:59:43 +00:00
|
|
|
|
|
|
|
# pylint: disable=arguments-differ
|
|
|
|
async def post(self, request):
|
|
|
|
"""Handle a POST request.
|
|
|
|
|
|
|
|
handler in request is entry_id.
|
|
|
|
"""
|
2019-07-31 19:25:30 +00:00
|
|
|
if not request["hass_user"].is_admin:
|
2020-06-06 18:34:56 +00:00
|
|
|
raise Unauthorized(perm_category=CAT_CONFIG_ENTRIES, permission=POLICY_EDIT)
|
2019-02-22 16:59:43 +00:00
|
|
|
|
|
|
|
# pylint: disable=no-value-for-parameter
|
|
|
|
return await super().post(request)
|
|
|
|
|
|
|
|
|
2019-03-15 14:41:34 +00:00
|
|
|
class OptionManagerFlowResourceView(FlowManagerResourceView):
|
2019-02-22 16:59:43 +00:00
|
|
|
"""View to interact with the option flow manager."""
|
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
url = "/api/config/config_entries/options/flow/{flow_id}"
|
|
|
|
name = "api:config:config_entries:options:flow:resource"
|
2019-02-22 16:59:43 +00:00
|
|
|
|
|
|
|
async def get(self, request, flow_id):
|
|
|
|
"""Get the current state of a data_entry_flow."""
|
2019-07-31 19:25:30 +00:00
|
|
|
if not request["hass_user"].is_admin:
|
2020-06-06 18:34:56 +00:00
|
|
|
raise Unauthorized(perm_category=CAT_CONFIG_ENTRIES, permission=POLICY_EDIT)
|
2019-02-22 16:59:43 +00:00
|
|
|
|
|
|
|
return await super().get(request, flow_id)
|
|
|
|
|
|
|
|
# pylint: disable=arguments-differ
|
|
|
|
async def post(self, request, flow_id):
|
|
|
|
"""Handle a POST request."""
|
2019-07-31 19:25:30 +00:00
|
|
|
if not request["hass_user"].is_admin:
|
2020-06-06 18:34:56 +00:00
|
|
|
raise Unauthorized(perm_category=CAT_CONFIG_ENTRIES, permission=POLICY_EDIT)
|
2019-02-22 16:59:43 +00:00
|
|
|
|
|
|
|
# pylint: disable=no-value-for-parameter
|
|
|
|
return await super().post(request, flow_id)
|
2019-08-18 04:34:11 +00:00
|
|
|
|
|
|
|
|
2019-08-20 07:17:52 +00:00
|
|
|
@websocket_api.require_admin
|
|
|
|
@websocket_api.websocket_command({"type": "config_entries/flow/progress"})
|
|
|
|
def config_entries_progress(hass, connection, msg):
|
|
|
|
"""List flows that are in progress but not started by a user.
|
|
|
|
|
|
|
|
Example of a non-user initiated flow is a discovered Hue hub that
|
|
|
|
requires user interaction to finish setup.
|
|
|
|
"""
|
|
|
|
connection.send_result(
|
|
|
|
msg["id"],
|
|
|
|
[
|
|
|
|
flw
|
|
|
|
for flw in hass.config_entries.flow.async_progress()
|
|
|
|
if flw["context"]["source"] != config_entries.SOURCE_USER
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2021-06-01 20:34:31 +00:00
|
|
|
def send_entry_not_found(
|
|
|
|
connection: websocket_api.ActiveConnection, msg_id: int
|
|
|
|
) -> None:
|
2021-02-21 03:21:39 +00:00
|
|
|
"""Send Config entry not found error."""
|
|
|
|
connection.send_error(
|
|
|
|
msg_id, websocket_api.const.ERR_NOT_FOUND, "Config entry not found"
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2021-06-01 20:34:31 +00:00
|
|
|
def get_entry(
|
|
|
|
hass: HomeAssistant,
|
|
|
|
connection: websocket_api.ActiveConnection,
|
|
|
|
entry_id: str,
|
|
|
|
msg_id: int,
|
|
|
|
) -> config_entries.ConfigEntry | None:
|
2021-02-21 03:21:39 +00:00
|
|
|
"""Get entry, send error message if it doesn't exist."""
|
|
|
|
entry = hass.config_entries.async_get_entry(entry_id)
|
|
|
|
if entry is None:
|
|
|
|
send_entry_not_found(connection, msg_id)
|
|
|
|
return entry
|
|
|
|
|
|
|
|
|
2019-08-18 04:34:11 +00:00
|
|
|
@websocket_api.require_admin
|
|
|
|
@websocket_api.async_response
|
|
|
|
@websocket_api.websocket_command(
|
|
|
|
{
|
2021-06-01 20:34:31 +00:00
|
|
|
"type": "config_entries/update",
|
2019-08-18 04:34:11 +00:00
|
|
|
"entry_id": str,
|
2021-06-01 20:34:31 +00:00
|
|
|
vol.Optional("title"): str,
|
|
|
|
vol.Optional("pref_disable_new_entities"): bool,
|
|
|
|
vol.Optional("pref_disable_polling"): bool,
|
2019-08-18 04:34:11 +00:00
|
|
|
}
|
|
|
|
)
|
2021-06-01 20:34:31 +00:00
|
|
|
async def config_entry_update(hass, connection, msg):
|
|
|
|
"""Update config entry."""
|
2019-08-18 04:34:11 +00:00
|
|
|
changes = dict(msg)
|
|
|
|
changes.pop("id")
|
|
|
|
changes.pop("type")
|
2021-02-21 03:21:39 +00:00
|
|
|
changes.pop("entry_id")
|
2019-08-18 04:34:11 +00:00
|
|
|
|
2021-02-21 03:21:39 +00:00
|
|
|
entry = get_entry(hass, connection, msg["entry_id"], msg["id"])
|
2019-08-19 23:45:17 +00:00
|
|
|
if entry is None:
|
|
|
|
return
|
2019-08-18 04:34:11 +00:00
|
|
|
|
2021-06-01 20:34:31 +00:00
|
|
|
old_disable_polling = entry.pref_disable_polling
|
2021-05-31 22:36:40 +00:00
|
|
|
|
2021-06-01 20:34:31 +00:00
|
|
|
hass.config_entries.async_update_entry(entry, **changes)
|
2021-05-31 22:36:40 +00:00
|
|
|
|
|
|
|
result = {
|
2021-06-01 20:34:31 +00:00
|
|
|
"config_entry": entry_json(entry),
|
2021-05-31 22:36:40 +00:00
|
|
|
"require_restart": False,
|
|
|
|
}
|
|
|
|
|
|
|
|
if (
|
2021-06-01 20:34:31 +00:00
|
|
|
old_disable_polling != entry.pref_disable_polling
|
2021-05-31 22:36:40 +00:00
|
|
|
and entry.state is config_entries.ConfigEntryState.LOADED
|
|
|
|
):
|
|
|
|
if not await hass.config_entries.async_reload(entry.entry_id):
|
|
|
|
result["require_restart"] = (
|
|
|
|
entry.state is config_entries.ConfigEntryState.FAILED_UNLOAD
|
|
|
|
)
|
|
|
|
|
|
|
|
connection.send_result(msg["id"], result)
|
2019-12-18 06:41:01 +00:00
|
|
|
|
|
|
|
|
2021-02-21 03:21:39 +00:00
|
|
|
@websocket_api.require_admin
|
|
|
|
@websocket_api.async_response
|
|
|
|
@websocket_api.websocket_command(
|
|
|
|
{
|
|
|
|
"type": "config_entries/disable",
|
|
|
|
"entry_id": str,
|
|
|
|
# We only allow setting disabled_by user via API.
|
2021-04-23 07:56:42 +00:00
|
|
|
"disabled_by": vol.Any(config_entries.DISABLED_USER, None),
|
2021-02-21 03:21:39 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
async def config_entry_disable(hass, connection, msg):
|
|
|
|
"""Disable config entry."""
|
|
|
|
disabled_by = msg["disabled_by"]
|
|
|
|
|
|
|
|
result = False
|
|
|
|
try:
|
|
|
|
result = await hass.config_entries.async_set_disabled_by(
|
|
|
|
msg["entry_id"], disabled_by
|
|
|
|
)
|
|
|
|
except config_entries.OperationNotAllowed:
|
|
|
|
# Failed to unload the config entry
|
|
|
|
pass
|
|
|
|
except config_entries.UnknownEntry:
|
|
|
|
send_entry_not_found(connection, msg["id"])
|
|
|
|
return
|
|
|
|
|
|
|
|
result = {"require_restart": not result}
|
|
|
|
|
|
|
|
connection.send_result(msg["id"], result)
|
|
|
|
|
|
|
|
|
2019-12-18 06:41:01 +00:00
|
|
|
@websocket_api.require_admin
|
|
|
|
@websocket_api.async_response
|
2021-01-12 08:26:20 +00:00
|
|
|
@websocket_api.websocket_command(
|
|
|
|
{"type": "config_entries/ignore_flow", "flow_id": str, "title": str}
|
|
|
|
)
|
2019-12-18 06:41:01 +00:00
|
|
|
async def ignore_config_flow(hass, connection, msg):
|
|
|
|
"""Ignore a config flow."""
|
|
|
|
flow = next(
|
|
|
|
(
|
|
|
|
flw
|
|
|
|
for flw in hass.config_entries.flow.async_progress()
|
|
|
|
if flw["flow_id"] == msg["flow_id"]
|
|
|
|
),
|
|
|
|
None,
|
|
|
|
)
|
|
|
|
|
|
|
|
if flow is None:
|
2021-02-21 03:21:39 +00:00
|
|
|
send_entry_not_found(connection, msg["id"])
|
2019-12-18 06:41:01 +00:00
|
|
|
return
|
|
|
|
|
|
|
|
if "unique_id" not in flow["context"]:
|
|
|
|
connection.send_error(
|
|
|
|
msg["id"], "no_unique_id", "Specified flow has no unique ID."
|
|
|
|
)
|
|
|
|
return
|
|
|
|
|
|
|
|
await hass.config_entries.flow.async_init(
|
|
|
|
flow["handler"],
|
|
|
|
context={"source": config_entries.SOURCE_IGNORE},
|
2021-01-12 08:26:20 +00:00
|
|
|
data={"unique_id": flow["context"]["unique_id"], "title": msg["title"]},
|
2019-12-18 06:41:01 +00:00
|
|
|
)
|
|
|
|
connection.send_result(msg["id"])
|
2020-04-14 00:38:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
@callback
|
|
|
|
def entry_json(entry: config_entries.ConfigEntry) -> dict:
|
|
|
|
"""Return JSON value of a config entry."""
|
|
|
|
handler = config_entries.HANDLERS.get(entry.domain)
|
|
|
|
supports_options = (
|
2021-02-21 03:21:39 +00:00
|
|
|
# Guard in case handler is no longer registered (custom component etc)
|
2020-04-14 00:38:39 +00:00
|
|
|
handler is not None
|
|
|
|
# pylint: disable=comparison-with-callable
|
|
|
|
and handler.async_get_options_flow
|
|
|
|
!= config_entries.ConfigFlow.async_get_options_flow
|
|
|
|
)
|
|
|
|
return {
|
|
|
|
"entry_id": entry.entry_id,
|
|
|
|
"domain": entry.domain,
|
|
|
|
"title": entry.title,
|
|
|
|
"source": entry.source,
|
2021-05-20 17:19:20 +00:00
|
|
|
"state": entry.state.value,
|
2020-04-14 00:38:39 +00:00
|
|
|
"supports_options": supports_options,
|
2020-08-25 22:59:22 +00:00
|
|
|
"supports_unload": entry.supports_unload,
|
2021-06-01 20:34:31 +00:00
|
|
|
"pref_disable_new_entities": entry.pref_disable_new_entities,
|
|
|
|
"pref_disable_polling": entry.pref_disable_polling,
|
2021-02-21 03:21:39 +00:00
|
|
|
"disabled_by": entry.disabled_by,
|
2021-04-23 07:23:43 +00:00
|
|
|
"reason": entry.reason,
|
2020-04-14 00:38:39 +00:00
|
|
|
}
|