1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-07 04:13:47 +01:00

Suppress excessive warnings about deprecated Fan interfaces (#2270)

This commit is contained in:
Oxan van Leeuwen
2021-09-13 09:39:18 +02:00
committed by GitHub
parent 3aa107142b
commit e18dfdd656
6 changed files with 20 additions and 4 deletions

View File

@@ -100,6 +100,7 @@ bool MQTTFanComponent::publish_state() {
auto traits = this->state_->get_traits();
if (traits.supports_speed()) {
const char *payload;
// NOLINTNEXTLINE(clang-diagnostic-deprecated-declarations)
switch (fan::speed_level_to_enum(this->state_->speed, traits.supported_speed_count())) {
case FAN_SPEED_LOW: { // NOLINT(clang-diagnostic-deprecated-declarations)
payload = "low";