Fix error that happens when in custom scene (#291)

* FIx  error that happens when in custom scene

* Remove unnecessary None

* Remove unnecessary None

Co-authored-by: Pierre Ståhl <pierre.staahl@gmail.com>
This commit is contained in:
ultratoto14
2021-03-31 19:32:10 +02:00
committed by GitHub
parent 93b6ad663d
commit 8cf1a95bab

View File

@@ -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,
)