static const

This commit is contained in:
klaudiusz223 2024-01-26 01:08:04 +01:00
parent 8559fdfd4c
commit f2067538c2
2 changed files with 3 additions and 1 deletions

View file

@ -7,6 +7,8 @@ namespace time_based_tilt {
static const char *const TAG = "time_based_tilt.cover"; static const char *const TAG = "time_based_tilt.cover";
const float TimeBasedTiltCover::TARGET_NONE = -1;
using namespace esphome::cover; using namespace esphome::cover;
void TimeBasedTiltCover::dump_config() { void TimeBasedTiltCover::dump_config() {

View file

@ -50,7 +50,7 @@ class TimeBasedTiltCover : public cover::Cover, public Component {
uint32_t inertia_open_time_; uint32_t inertia_open_time_;
uint32_t inertia_close_time_; uint32_t inertia_close_time_;
const float TARGET_NONE{-1}; const static float TARGET_NONE;
enum State : uint8_t { enum State : uint8_t {
STATE_IDLE, STATE_IDLE,
STATE_MOVING, STATE_MOVING,