mirror of
https://github.com/esphome/esphome.git
synced 2025-11-20 08:46:01 +00:00
Merge branch 'integration' into memory_api
This commit is contained in:
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "select.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace select {
|
||||
namespace esphome::select {
|
||||
|
||||
class SelectStateTrigger : public Trigger<std::string, size_t> {
|
||||
public:
|
||||
@@ -63,5 +62,4 @@ template<typename... Ts> class SelectOperationAction : public Action<Ts...> {
|
||||
Select *select_;
|
||||
};
|
||||
|
||||
} // namespace select
|
||||
} // namespace esphome
|
||||
} // namespace esphome::select
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include <cstring>
|
||||
|
||||
namespace esphome {
|
||||
namespace select {
|
||||
namespace esphome::select {
|
||||
|
||||
static const char *const TAG = "select";
|
||||
|
||||
@@ -86,5 +85,4 @@ optional<std::string> Select::at(size_t index) const {
|
||||
|
||||
const char *Select::option_at(size_t index) const { return traits.get_options().at(index); }
|
||||
|
||||
} // namespace select
|
||||
} // namespace esphome
|
||||
} // namespace esphome::select
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
#include "select_call.h"
|
||||
#include "select_traits.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace select {
|
||||
namespace esphome::select {
|
||||
|
||||
#define LOG_SELECT(prefix, type, obj) \
|
||||
if ((obj) != nullptr) { \
|
||||
@@ -112,5 +111,4 @@ class Select : public EntityBase {
|
||||
CallbackManager<void(std::string, size_t)> state_callback_;
|
||||
};
|
||||
|
||||
} // namespace select
|
||||
} // namespace esphome
|
||||
} // namespace esphome::select
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "select.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace select {
|
||||
namespace esphome::select {
|
||||
|
||||
static const char *const TAG = "select";
|
||||
|
||||
@@ -125,5 +124,4 @@ void SelectCall::perform() {
|
||||
parent->control(idx);
|
||||
}
|
||||
|
||||
} // namespace select
|
||||
} // namespace esphome
|
||||
} // namespace esphome::select
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/core/helpers.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace select {
|
||||
namespace esphome::select {
|
||||
|
||||
class Select;
|
||||
|
||||
@@ -45,5 +44,4 @@ class SelectCall {
|
||||
bool cycle_;
|
||||
};
|
||||
|
||||
} // namespace select
|
||||
} // namespace esphome
|
||||
} // namespace esphome::select
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "select_traits.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace select {
|
||||
namespace esphome::select {
|
||||
|
||||
void SelectTraits::set_options(const std::initializer_list<const char *> &options) { this->options_ = options; }
|
||||
|
||||
@@ -14,5 +13,4 @@ void SelectTraits::set_options(const FixedVector<const char *> &options) {
|
||||
|
||||
const FixedVector<const char *> &SelectTraits::get_options() const { return this->options_; }
|
||||
|
||||
} // namespace select
|
||||
} // namespace esphome
|
||||
} // namespace esphome::select
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include <initializer_list>
|
||||
|
||||
namespace esphome {
|
||||
namespace select {
|
||||
namespace esphome::select {
|
||||
|
||||
class SelectTraits {
|
||||
public:
|
||||
@@ -16,5 +15,4 @@ class SelectTraits {
|
||||
FixedVector<const char *> options_;
|
||||
};
|
||||
|
||||
} // namespace select
|
||||
} // namespace esphome
|
||||
} // namespace esphome::select
|
||||
|
||||
Reference in New Issue
Block a user