mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 00:48:19 +01:00
publish fan speed count for discovery (#3537)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
parent
ec1fae6883
commit
c3da42516b
1 changed files with 1 additions and 0 deletions
|
@ -114,6 +114,7 @@ void MQTTFanComponent::send_discovery(JsonObject root, mqtt::SendDiscoveryConfig
|
||||||
if (this->state_->get_traits().supports_speed()) {
|
if (this->state_->get_traits().supports_speed()) {
|
||||||
root[MQTT_PERCENTAGE_COMMAND_TOPIC] = this->get_speed_level_command_topic();
|
root[MQTT_PERCENTAGE_COMMAND_TOPIC] = this->get_speed_level_command_topic();
|
||||||
root[MQTT_PERCENTAGE_STATE_TOPIC] = this->get_speed_level_state_topic();
|
root[MQTT_PERCENTAGE_STATE_TOPIC] = this->get_speed_level_state_topic();
|
||||||
|
root[MQTT_SPEED_RANGE_MAX] = this->state_->get_traits().supported_speed_count();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool MQTTFanComponent::publish_state() {
|
bool MQTTFanComponent::publish_state() {
|
||||||
|
|
Loading…
Reference in a new issue