diff --git a/esphome/components/fan/__init__.py b/esphome/components/fan/__init__.py index 50fdb1c2c9..7b0a79a0d3 100644 --- a/esphome/components/fan/__init__.py +++ b/esphome/components/fan/__init__.py @@ -34,6 +34,10 @@ FAN_SCHEMA = cv.MQTT_COMMAND_COMPONENT_SCHEMA.extend({ cv.publish_topic), cv.Optional(CONF_OSCILLATION_COMMAND_TOPIC): cv.All(cv.requires_component('mqtt'), cv.subscribe_topic), + cv.Optional(CONF_SPEED_STATE_TOPIC): cv.All(cv.requires_component('mqtt'), + cv.publish_topic), + cv.Optional(CONF_SPEED_COMMAND_TOPIC): cv.All(cv.requires_component('mqtt'), + cv.subscribe_topic), }) diff --git a/tests/test1.yaml b/tests/test1.yaml index b131b1a6ab..84af00e90a 100644 --- a/tests/test1.yaml +++ b/tests/test1.yaml @@ -1499,6 +1499,10 @@ fan: low: 0.45 medium: 0.75 high: 1.0 + oscillation_state_topic: oscillation/state/topic + oscillation_command_topic: oscillation/command/topic + speed_state_topic: speed/state/topic + speed_command_topic: speed/command/topic interval: - interval: 10s