Merge branch 'apply-entities-migrate' into apply-entities-ld6002b

This commit is contained in:
J. Nick Koston
2026-10-16 12:20:56 -10:00
4 changed files with 7 additions and 7 deletions
@@ -4,8 +4,8 @@
namespace esphome::button::testing {
static Button *last_entity = nullptr;
static int presses = 0;
static Button *last_entity = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
static int presses = 0; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
static void on_press(Button *entity) {
last_entity = entity;
@@ -6,8 +6,8 @@
namespace esphome::number::testing {
static Number *last_entity = nullptr;
static std::vector<float> values;
static Number *last_entity = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
static std::vector<float> values; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
static void on_control(Number *entity, float value) {
last_entity = entity;
@@ -9,7 +9,7 @@ namespace esphome::select::testing {
static constexpr const char *const APPLY_OPTIONS[] = {"low", "medium", "high"};
static std::vector<std::string> chosen;
static std::vector<std::string> chosen; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
static void on_control(Select *entity, size_t index) { chosen.emplace_back(entity->option_at(index)); }
@@ -6,8 +6,8 @@
namespace esphome::switch_::testing {
static Switch *last_entity = nullptr;
static std::vector<bool> writes;
static Switch *last_entity = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
static std::vector<bool> writes; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
static void on_write(Switch *entity, bool state) {
last_entity = entity;