diff --git a/custom_components/localtuya/__init__.py b/custom_components/localtuya/__init__.py index 9701b4a..eae9853 100644 --- a/custom_components/localtuya/__init__.py +++ b/custom_components/localtuya/__init__.py @@ -70,7 +70,7 @@ async def async_setup(hass: HomeAssistant, config: dict): async def _handle_reload(service): """Handle reload service call.""" - _LOGGER.debug("Service %s.reload called: reloading integration", DOMAIN) + _LOGGER.info("Service %s.reload called: reloading integration", DOMAIN) current_entries = hass.config_entries.async_entries(DOMAIN) diff --git a/custom_components/localtuya/diagnostics.py b/custom_components/localtuya/diagnostics.py index 9ea0f6c..cce5670 100644 --- a/custom_components/localtuya/diagnostics.py +++ b/custom_components/localtuya/diagnostics.py @@ -43,7 +43,7 @@ async def async_get_device_diagnostics( """Return diagnostics for a device entry.""" data = {} dev_id = list(device.identifiers)[0][1].split("_")[-1] - data[DEVICE_CONFIG] = entry.data[CONF_DEVICES][dev_id] + data[DEVICE_CONFIG] = entry.data[CONF_DEVICES][dev_id].copy() local_key = data[DEVICE_CONFIG][CONF_LOCAL_KEY] data[DEVICE_CONFIG][CONF_LOCAL_KEY] = f"{local_key[0:3]}...{local_key[-3:]}" diff --git a/requirements_test.txt b/requirements_test.txt index a4e209a..ca811a0 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -6,4 +6,5 @@ pydocstyle==6.1.1 cryptography==3.3.2 pylint==2.8.2 pylint-strict-informational==0.1 -homeassistant==2021.7.1 +homeassistant==2022.5.1 +tox==3.25.0 diff --git a/tox.ini b/tox.ini index c7d9e69..033e723 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ whitelist_externals = true setenv = LANG=en_US.UTF-8 - PYTHONPATH = {toxinidir}/localtuya-homeassistant + PYTHONPATH = {toxinidir}/localtuya deps = -r{toxinidir}/requirements_test.txt commands =