mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 03:35:09 +02:00
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:
committed by
Paulus Schoutsen
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):
|
||||
|
Reference in New Issue
Block a user