diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index db6f440..ae883cb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,6 +2,7 @@ { "image": "ghcr.io/ludeeus/devcontainer/integration:stable", "name": "Teracom integration", + "context": "..", "appPort": [ "9128:8123" ], @@ -51,4 +52,4 @@ // "source=${localEnv:HOME}/teracom_config,target=${containerWorkspaceFolder}/config,type=bind" "source=${localEnv:HOME}/teracom_config,target=/config,type=bind" ] -} \ No newline at end of file +} diff --git a/custom_components/teracom/__init__.py b/custom_components/teracom/__init__.py index 33678f4..f6ec5d4 100644 --- a/custom_components/teracom/__init__.py +++ b/custom_components/teracom/__init__.py @@ -50,9 +50,12 @@ async def poll_update(event_time): # verify_ssl = DEFAULT_VERIFY_SSL headers = {} endpoint = f"http://{config.get('host')}/status.xml" + encoding = "" try: - rest = RestData(hass, method, endpoint, "", auth, headers, None, payload, False) + rest = RestData( + hass, method, endpoint, encoding, auth, headers, None, payload, False + ) await rest.async_update() except Exception as err: raise ConfigEntryNotReady from err diff --git a/custom_components/teracom/config_flow.py b/custom_components/teracom/config_flow.py index a6d6c62..e436225 100644 --- a/custom_components/teracom/config_flow.py +++ b/custom_components/teracom/config_flow.py @@ -34,9 +34,10 @@ async def authenticate(self, hass, username, password) -> bool: verify_ssl = False headers = {} endpoint = f"http://{self.host}/status.xml" + encoding = "" rest = RestData( - hass, method, endpoint, auth, headers, None, payload, verify_ssl + hass, method, endpoint, encoding, auth, headers, None, payload, verify_ssl ) await rest.async_update() diff --git a/custom_components/teracom/const.py b/custom_components/teracom/const.py index 6265d63..024c011 100644 --- a/custom_components/teracom/const.py +++ b/custom_components/teracom/const.py @@ -3,4 +3,4 @@ DOMAIN = "teracom" SIGNAL_UPDATE_TERACOM = "signal_update_teracom" SUPPORTED_MODELS = {"TCW122B-CM", "TCW181B-CM"} -VERSION = "0.1.8" +VERSION = "0.1.9" diff --git a/custom_components/teracom/helper.py b/custom_components/teracom/helper.py index 6e372d0..ac22464 100644 --- a/custom_components/teracom/helper.py +++ b/custom_components/teracom/helper.py @@ -68,7 +68,7 @@ async def set_relay(self, relay_no, to_state): endpoint = f"http://{self._host}/status.xml?r{relay_no}={to_state}" rest = RestData( - self._hass, method, endpoint, auth, headers, None, payload, verify_ssl + self._hass, method, endpoint, "", auth, headers, None, payload, verify_ssl ) await rest.async_update() @@ -87,7 +87,7 @@ async def get_data(self): endpoint = f"http://{self._host}/status.xml" rest = RestData( - self._hass, method, endpoint, auth, headers, None, payload, verify_ssl + self._hass, method, endpoint, "", auth, headers, None, payload, verify_ssl ) await rest.async_update() diff --git a/custom_components/teracom/manifest.json b/custom_components/teracom/manifest.json index d492ef0..0b27a37 100644 --- a/custom_components/teracom/manifest.json +++ b/custom_components/teracom/manifest.json @@ -1,17 +1,19 @@ { "domain": "teracom", "name": "Teracom TCW", + "after_dependencies": [ + "rest" + ], + "codeowners": [ + "@astrandb" + ], "config_flow": true, "documentation": "https://github.com/astrandb/teracom/README.md", + "homekit": {}, + "iot_class": "local_polling", "issue_tracker": "https://github.com/astrandb/teracom_hass/issues", "requirements": [], - "version": "0.1.8", "ssdp": [], - "zeroconf": [], - "homekit": {}, - "after_dependencies": ["rest"], - "codeowners": [ - "@astrandb" - ], - "iot_class": "local_polling" + "version": "0.1.9", + "zeroconf": [] } diff --git a/setup.cfg b/setup.cfg index e226a78..5ba6fe9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 0.1.8 +current_version = 0.1.9 [flake8] exclude = .venv,.git,.tox,docs,venv,bin,lib,deps,build doctests = True max-line-length = 88 -ignore = +ignore = E501, W503, E203,