mirror of
https://github.com/esphome/esphome.git
synced 2025-08-09 11:57:46 +00:00
Merge branch 'api_reduce' into integration
This commit is contained in:
commit
efdef61477
@ -11,13 +11,12 @@ class APIConnection;
|
||||
|
||||
// Macro for generating ListEntitiesIterator handlers
|
||||
// Calls schedule_message_ with try_send_*_info
|
||||
// clang-format off
|
||||
// NOLINTNEXTLINE(bugprone-macro-parentheses)
|
||||
#define LIST_ENTITIES_HANDLER(entity_type, EntityClass, ResponseType) \
|
||||
bool ListEntitiesIterator::on_##entity_type(EntityClass *entity) { \
|
||||
return this->client_->schedule_message_(entity, &APIConnection::try_send_##entity_type##_info, \
|
||||
ResponseType::MESSAGE_TYPE); \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
class ListEntitiesIterator : public ComponentIterator {
|
||||
public:
|
||||
|
@ -12,12 +12,11 @@ class APIConnection;
|
||||
|
||||
// Macro for generating InitialStateIterator handlers
|
||||
// Calls send_*_state
|
||||
// clang-format off
|
||||
// NOLINTNEXTLINE(bugprone-macro-parentheses)
|
||||
#define INITIAL_STATE_HANDLER(entity_type, EntityClass) \
|
||||
bool InitialStateIterator::on_##entity_type(EntityClass *entity) { \
|
||||
return this->client_->send_##entity_type##_state(entity); \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
class InitialStateIterator : public ComponentIterator {
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user