Fix supported_features in MQTT fan (#28680)
* Added custom validator function for speed list * Replace CONF_SPEED_STATE_TOPIC with CONF_SPEED_COMMAND_TOPIC to determine SUPPORT_SET_SPEED * Revert "Added custom validator function for speed list" This reverts commit f000396fa642c64bde40513ea70d9915dbd71ead. * Replace CONF_OSCILLATION_STATE_TOPIC with CONF_OSCILLATION_COMMAND_TOPIC to determine SUPPORT_OSCILLATE
This commit is contained in:
1 parent
0b8a269b23
commit
297c360d04
1 file changed
+3
-2
@@ -232,10 +232,11 @@ class MqttFan(
|
||||
|
||||
self._supported_features = 0
|
||||
self._supported_features |= (
|
||||
self._topic[CONF_OSCILLATION_STATE_TOPIC] is not None and SUPPORT_OSCILLATE
|
||||
self._topic[CONF_OSCILLATION_COMMAND_TOPIC] is not None
|
||||
and SUPPORT_OSCILLATE
|
||||
)
|
||||
self._supported_features |= (
|
||||
self._topic[CONF_SPEED_STATE_TOPIC] is not None and SUPPORT_SET_SPEED
|
||||
self._topic[CONF_SPEED_COMMAND_TOPIC] is not None and SUPPORT_SET_SPEED
|
||||
)
|
||||
|
||||
async def _subscribe_topics(self):
|
||||
|
||||
Reference in new issue
Block a user