1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-09 23:02:23 +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

@@ -397,6 +397,7 @@ std::string WebServer::fan_json(fan::FanState *obj) {
const auto traits = obj->get_traits();
if (traits.supports_speed()) {
root["speed_level"] = obj->speed;
// NOLINTNEXTLINE(clang-diagnostic-deprecated-declarations)
switch (fan::speed_level_to_enum(obj->speed, traits.supported_speed_count())) {
case fan::FAN_SPEED_LOW: // NOLINT(clang-diagnostic-deprecated-declarations)
root["speed"] = "low";