diff --git a/esphome/components/pulse_counter_ulp/pulse_counter_ulp_sensor.cpp b/esphome/components/pulse_counter_ulp/pulse_counter_ulp_sensor.cpp index d8ac39e92c..760c85d3ed 100644 --- a/esphome/components/pulse_counter_ulp/pulse_counter_ulp_sensor.cpp +++ b/esphome/components/pulse_counter_ulp/pulse_counter_ulp_sensor.cpp @@ -14,11 +14,11 @@ static const char *const TAG = "pulse_counter_ulp"; namespace { const char *to_string(CountMode count_mode) { switch (count_mode) { - case CountMode::disable: + case CountMode::DISABLE: return "disable"; - case CountMode::increment: + case CountMode::INCREMENT: return "increment"; - case CountMode::decrement: + case CountMode::DECREMENT: return "decrement"; } return "UNKNOWN MODE"; diff --git a/esphome/components/pulse_counter_ulp/pulse_counter_ulp_sensor.h b/esphome/components/pulse_counter_ulp/pulse_counter_ulp_sensor.h index bf736aaadf..a606910bb2 100644 --- a/esphome/components/pulse_counter_ulp/pulse_counter_ulp_sensor.h +++ b/esphome/components/pulse_counter_ulp/pulse_counter_ulp_sensor.h @@ -11,7 +11,7 @@ namespace esphome { namespace pulse_counter_ulp { -enum class CountMode { disable = 0, increment = 1, decrement = -1 }; +enum class CountMode { DISABLE = 0, INCREMENT = 1, DECREMENT = -1 }; using clock = std::chrono::steady_clock; using microseconds = std::chrono::duration; diff --git a/esphome/components/pulse_counter_ulp/sensor.py b/esphome/components/pulse_counter_ulp/sensor.py index 805abf332a..d9d393cc64 100644 --- a/esphome/components/pulse_counter_ulp/sensor.py +++ b/esphome/components/pulse_counter_ulp/sensor.py @@ -19,9 +19,9 @@ from esphome.const import ( pulse_counter_ulp_ns = cg.esphome_ns.namespace("pulse_counter_ulp") CountMode = pulse_counter_ulp_ns.enum("CountMode", is_class=True) COUNT_MODES = { - "DISABLE": CountMode.disable, - "INCREMENT": CountMode.increment, - "DECREMENT": CountMode.decrement, + "DISABLE": CountMode.DISABLE, + "INCREMENT": CountMode.INCREMENT, + "DECREMENT": CountMode.DECREMENT, } COUNT_MODE_SCHEMA = cv.enum(COUNT_MODES, upper=True)