From 278feb95acced344befd31fbed12e1853290dac0 Mon Sep 17 00:00:00 2001 From: Lukas Date: Mon, 9 Jan 2023 23:27:42 +0100 Subject: [PATCH] Notice that shows remote node has no configuration options instead of throwing a 500 error (#210) --- custom_components/remote_homeassistant/config_flow.py | 2 +- custom_components/remote_homeassistant/translations/en.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/remote_homeassistant/config_flow.py b/custom_components/remote_homeassistant/config_flow.py index 124c405..5dd3eb0 100644 --- a/custom_components/remote_homeassistant/config_flow.py +++ b/custom_components/remote_homeassistant/config_flow.py @@ -208,7 +208,7 @@ def __init__(self, config_entry): async def async_step_init(self, user_input=None): """Manage basic options.""" if self.config_entry.unique_id == REMOTE_ID: - return + return self.async_abort(reason="not_supported") if user_input is not None: self.options = user_input.copy() diff --git a/custom_components/remote_homeassistant/translations/en.json b/custom_components/remote_homeassistant/translations/en.json index b955812..d36b9cf 100644 --- a/custom_components/remote_homeassistant/translations/en.json +++ b/custom_components/remote_homeassistant/translations/en.json @@ -78,6 +78,9 @@ "add_new_event": "Add new event" } } + }, + "abort": { + "not_supported": "No configuration options supported for a remote node" } } }