Fix cover state (#2468)

This commit is contained in:
definitio 2021-10-10 11:31:15 +03:00 committed by GitHub
parent e514a1fcd4
commit c092d92d45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,6 +70,7 @@ void MQTTCoverComponent::send_discovery(JsonObject &root, mqtt::SendDiscoveryCon
root["optimistic"] = true;
}
if (traits.get_supports_position()) {
config.state_topic = false;
root["position_topic"] = this->get_position_state_topic();
root["set_position_topic"] = this->get_position_command_topic();
}