From f5146ad4eb8dbab104dd5365157e35c6ae720f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20St=C3=A5hl?= Date: Mon, 5 Oct 2020 20:06:20 +0200 Subject: [PATCH] Add brightness and color_temp to example --- custom_components/localtuya/__init__.py | 2 ++ custom_components/localtuya/common.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/custom_components/localtuya/__init__.py b/custom_components/localtuya/__init__.py index 306b468..17ea4bb 100644 --- a/custom_components/localtuya/__init__.py +++ b/custom_components/localtuya/__init__.py @@ -33,6 +33,8 @@ localtuya: - platform: light friendly_name: Device Light id: 4 + brightness: 20 + color_temp: 21 - platform: sensor friendly_name: Plug Voltage diff --git a/custom_components/localtuya/common.py b/custom_components/localtuya/common.py index de205b2..8e85fae 100644 --- a/custom_components/localtuya/common.py +++ b/custom_components/localtuya/common.py @@ -261,7 +261,7 @@ class LocalTuyaEntity(Entity): return value def dps_conf(self, conf_item): - """Return value of datapoint for user speified config item. + """Return value of datapoint for user specified config item. This method looks up which DP a certain config item uses based on user configuration and returns its value.