diff --git a/esphome/components/time_based_tilt/time_based_tilt_cover.cpp b/esphome/components/time_based_tilt/time_based_tilt_cover.cpp index d0ad8a92d6..6a0fe7c6fa 100644 --- a/esphome/components/time_based_tilt/time_based_tilt_cover.cpp +++ b/esphome/components/time_based_tilt/time_based_tilt_cover.cpp @@ -7,6 +7,8 @@ namespace time_based_tilt { static const char *const TAG = "time_based_tilt.cover"; +const float TimeBasedTiltCover::TARGET_NONE = -1; + using namespace esphome::cover; void TimeBasedTiltCover::dump_config() { diff --git a/esphome/components/time_based_tilt/time_based_tilt_cover.h b/esphome/components/time_based_tilt/time_based_tilt_cover.h index 75b6dc2e9e..137f93be77 100644 --- a/esphome/components/time_based_tilt/time_based_tilt_cover.h +++ b/esphome/components/time_based_tilt/time_based_tilt_cover.h @@ -50,7 +50,7 @@ class TimeBasedTiltCover : public cover::Cover, public Component { uint32_t inertia_open_time_; uint32_t inertia_close_time_; - const float TARGET_NONE{-1}; + const static float TARGET_NONE; enum State : uint8_t { STATE_IDLE, STATE_MOVING,