From 5ec09eab421c7f85c9ec5b78f53d583e36a1576f Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Fri, 7 May 2021 02:59:03 +0200 Subject: [PATCH] Move not loaded websocket constant to zwave_js (#50188) --- homeassistant/components/websocket_api/const.py | 1 - homeassistant/components/zwave_js/api.py | 2 +- tests/components/zwave_js/test_api.py | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/websocket_api/const.py b/homeassistant/components/websocket_api/const.py index 0681a422db1..7c3f18f856c 100644 --- a/homeassistant/components/websocket_api/const.py +++ b/homeassistant/components/websocket_api/const.py @@ -23,7 +23,6 @@ MAX_PENDING_MSG = 2048 ERR_ID_REUSE = "id_reuse" ERR_INVALID_FORMAT = "invalid_format" ERR_NOT_FOUND = "not_found" -ERR_NOT_LOADED = "not_loaded" ERR_NOT_SUPPORTED = "not_supported" ERR_HOME_ASSISTANT_ERROR = "home_assistant_error" ERR_UNKNOWN_COMMAND = "unknown_command" diff --git a/homeassistant/components/zwave_js/api.py b/homeassistant/components/zwave_js/api.py index 7eba39d1b7c..81600ec6c16 100644 --- a/homeassistant/components/zwave_js/api.py +++ b/homeassistant/components/zwave_js/api.py @@ -22,7 +22,6 @@ from homeassistant.components.http.view import HomeAssistantView from homeassistant.components.websocket_api.connection import ActiveConnection from homeassistant.components.websocket_api.const import ( ERR_NOT_FOUND, - ERR_NOT_LOADED, ERR_NOT_SUPPORTED, ERR_UNKNOWN_ERROR, ) @@ -45,6 +44,7 @@ from .helpers import async_enable_statistics, update_data_collection_preference # general API constants ID = "id" ENTRY_ID = "entry_id" +ERR_NOT_LOADED = "not_loaded" NODE_ID = "node_id" COMMAND_CLASS_ID = "command_class_id" TYPE = "type" diff --git a/tests/components/zwave_js/test_api.py b/tests/components/zwave_js/test_api.py index e471b1dd1a7..57961ee89e4 100644 --- a/tests/components/zwave_js/test_api.py +++ b/tests/components/zwave_js/test_api.py @@ -6,12 +6,13 @@ from zwave_js_server.const import LogLevel from zwave_js_server.event import Event from zwave_js_server.exceptions import InvalidNewValue, NotFoundError, SetValueFailed -from homeassistant.components.websocket_api.const import ERR_NOT_FOUND, ERR_NOT_LOADED +from homeassistant.components.websocket_api.const import ERR_NOT_FOUND from homeassistant.components.zwave_js.api import ( COMMAND_CLASS_ID, CONFIG, ENABLED, ENTRY_ID, + ERR_NOT_LOADED, FILENAME, FORCE_CONSOLE, ID,