mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Changes for respecting mqtt fan config. If fan speed and oscillation is not configured they wouldn't be displayed in UI.
This commit is contained in:
@@ -186,7 +186,7 @@ class MqttFan(FanEntity):
|
|||||||
yield from mqtt.async_subscribe(
|
yield from mqtt.async_subscribe(
|
||||||
self.hass, self._topic[CONF_SPEED_STATE_TOPIC], speed_received,
|
self.hass, self._topic[CONF_SPEED_STATE_TOPIC], speed_received,
|
||||||
self._qos)
|
self._qos)
|
||||||
self._speed = SPEED_OFF
|
self._speed = SPEED_OFF
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def oscillation_received(topic, payload, qos):
|
def oscillation_received(topic, payload, qos):
|
||||||
@@ -202,7 +202,7 @@ class MqttFan(FanEntity):
|
|||||||
yield from mqtt.async_subscribe(
|
yield from mqtt.async_subscribe(
|
||||||
self.hass, self._topic[CONF_OSCILLATION_STATE_TOPIC],
|
self.hass, self._topic[CONF_OSCILLATION_STATE_TOPIC],
|
||||||
oscillation_received, self._qos)
|
oscillation_received, self._qos)
|
||||||
self._oscillation = False
|
self._oscillation = False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def should_poll(self):
|
def should_poll(self):
|
||||||
|
Reference in New Issue
Block a user