Add local API support to elmax (#94392)
* Add support for local (lan) panel integration * Fix merge conflicts * Remove executable flag from non-executable files * Fix tests * Update homeassistant/components/elmax/__init__.py Shorten comment Co-authored-by: Erik Montnemery <erik@montnemery.com> * Fix typehint * Rename DummyPanel into DirectPanel * Update homeassistant/components/elmax/__init__.py Rewording Co-authored-by: Erik Montnemery <erik@montnemery.com> * Update homeassistant/components/elmax/__init__.py Rewording Co-authored-by: Erik Montnemery <erik@montnemery.com> * Refactor option step into menu step * Change requirement statement * Refactor dictionary key entries to use existing constants * Align step names to new constants * Align step names to new constants amd align tests * Align step names to new constants amd align tests * Align step names to new constants * Simplify logic to handle entire entry instead of a portion of the state * Simplify working mode checks * Add data_description dictionary to better explain SSL and FOLLOW_MDSN options * Add support for local (lan) panel integration * Fix merge conflicts * Remove executable flag from non-executable files * Fix tests * Update homeassistant/components/elmax/__init__.py Shorten comment Co-authored-by: Erik Montnemery <erik@montnemery.com> * Fix typehint * Rename DummyPanel into DirectPanel * Update homeassistant/components/elmax/__init__.py Rewording Co-authored-by: Erik Montnemery <erik@montnemery.com> * Update homeassistant/components/elmax/__init__.py Rewording Co-authored-by: Erik Montnemery <erik@montnemery.com> * Refactor option step into menu step * Change requirement statement * Refactor dictionary key entries to use existing constants * Align step names to new constants * Align step names to new constants amd align tests * Align step names to new constants amd align tests * Align step names to new constants * Simplify logic to handle entire entry instead of a portion of the state * Simplify working mode checks * Add data_description dictionary to better explain SSL and FOLLOW_MDSN options * Add newline at end of file * Remove CONF_ELMAX_MODE_DIRECT_FOLLOW_MDNS option * Fix Ruff pre-check --------- Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
parent
4c67670566
commit
86039de3cd
20 changed files with 1242 additions and 106 deletions
|
@ -5,9 +5,21 @@ DOMAIN = "elmax"
|
|||
CONF_ELMAX_USERNAME = "username"
|
||||
CONF_ELMAX_PASSWORD = "password"
|
||||
CONF_ELMAX_PANEL_ID = "panel_id"
|
||||
CONF_ELMAX_PANEL_LOCAL_ID = "panel_local_id"
|
||||
CONF_ELMAX_PANEL_REMOTE_ID = "panel_remote_id"
|
||||
CONF_ELMAX_PANEL_PIN = "panel_pin"
|
||||
CONF_ELMAX_PANEL_NAME = "panel_name"
|
||||
|
||||
CONF_ELMAX_MODE = "mode"
|
||||
CONF_ELMAX_MODE_CLOUD = "cloud"
|
||||
CONF_ELMAX_MODE_DIRECT = "direct"
|
||||
CONF_ELMAX_MODE_DIRECT_HOST = "panel_api_host"
|
||||
CONF_ELMAX_MODE_DIRECT_PORT = "panel_api_port"
|
||||
CONF_ELMAX_MODE_DIRECT_SSL = "use_ssl"
|
||||
CONF_ELMAX_MODE_DIRECT_SSL_CERT = "ssl_cert"
|
||||
|
||||
ELMAX_LOCAL_API_PATH = "api/v2"
|
||||
|
||||
CONF_CONFIG_ENTRY_ID = "config_entry_id"
|
||||
CONF_ENDPOINT_ID = "endpoint_id"
|
||||
|
||||
|
@ -18,5 +30,8 @@ ELMAX_PLATFORMS = [
|
|||
Platform.COVER,
|
||||
]
|
||||
|
||||
ELMAX_MODE_DIRECT_DEFAULT_HTTPS_PORT = 443
|
||||
ELMAX_MODE_DIRECT_DEFAULT_HTTP_PORT = 80
|
||||
POLLING_SECONDS = 30
|
||||
DEFAULT_TIMEOUT = 10.0
|
||||
MIN_APIV2_SUPPORTED_VERSION = "4.9.13"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue