mirror of https://github.com/home-assistant/core
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 f000396fa6
.
* Replace CONF_OSCILLATION_STATE_TOPIC with CONF_OSCILLATION_COMMAND_TOPIC to determine SUPPORT_OSCILLATE
This commit is contained in:
parent
0b8a269b23
commit
297c360d04
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue