diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..ef8a23c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,68 @@ +--- +name: Bug report +about: Create a report to help us improve localtuya +title: '' +labels: 'bug' +assignees: '' + +--- + +## The problem + + + +## Environment + +- Localtuya version: +- Last working localtuya version (if known and relevant): +- Home Assistant Core version: +- [] Are you using the Home Assistant Tuya Cloud component ? +- [] Are you using the Tuya App in parallel ? + +## Steps to reproduce + +1. +2. +3. + +## Configuration `configuration.yaml` or `config_flow` + +```yaml + +``` + +## DP dump + + +## Provide Home Assistant taceback/logs + +```txt + +``` +## Additional information + diff --git a/custom_components/localtuya/light.py b/custom_components/localtuya/light.py index d0d7c67..49fade8 100644 --- a/custom_components/localtuya/light.py +++ b/custom_components/localtuya/light.py @@ -273,7 +273,7 @@ class LocaltuyaLight(LocalTuyaEntity, LightEntity): def __find_scene_by_scene_data(self, data): return next( - (item for item in self._effect_list if self._scenes[item] == data), + (item for item in self._effect_list if self._scenes.get(item) == data), SCENE_CUSTOM, ) diff --git a/custom_components/localtuya/manifest.json b/custom_components/localtuya/manifest.json index 094b987..7f19f9f 100644 --- a/custom_components/localtuya/manifest.json +++ b/custom_components/localtuya/manifest.json @@ -9,5 +9,6 @@ ], "issue_tracker": "https://github.com/rospogrigio/localtuya/issues", "requirements": [], - "config_flow": true + "config_flow": true, + "iot_class": "local_push" } diff --git a/requirements_test.txt b/requirements_test.txt index aa65ae9..df62e77 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,9 +1,9 @@ -black==20.8b1 +black==21.4b0 codespell==2.0.0 -flake8==3.8.4 -mypy==0.812 -pydocstyle==5.1.1 +flake8==3.9.2 +mypy==0.901 +pydocstyle==6.1.1 cryptography==3.2 -pylint==2.7.2 +pylint==2.8.2 pylint-strict-informational==0.1 homeassistant==2021.1.4