RFC: Only use supported light properties (#15484)

* Only use supported light properties

* Fix tests
This commit is contained in:
Anders Melchiorsen 2018-07-18 12:18:22 +02:00 committed by Paulus Schoutsen
parent e62e2bb131
commit e427f9ee38
5 changed files with 43 additions and 34 deletions

View file

@ -205,7 +205,7 @@ class MqttLight(MqttAvailability, Light):
topic[CONF_COLOR_TEMP_COMMAND_TOPIC] is not None and
SUPPORT_COLOR_TEMP)
self._supported_features |= (
topic[CONF_EFFECT_STATE_TOPIC] is not None and
topic[CONF_EFFECT_COMMAND_TOPIC] is not None and
SUPPORT_EFFECT)
self._supported_features |= (
topic[CONF_WHITE_VALUE_COMMAND_TOPIC] is not None and