mirror of
https://github.com/esphome/esphome.git
synced 2025-08-05 09:57:47 +00:00
Merge branch 'prepare_commands_for_device_id' into integration
This commit is contained in:
commit
22e67f9754
@ -45,14 +45,14 @@ static const int CAMERA_STOP_STREAM = 5000;
|
||||
// Helper macro for entity command handlers - gets entity by key, returns if not found, and creates call object
|
||||
#define ENTITY_COMMAND_MAKE_CALL(entity_type, entity_var, getter_name) \
|
||||
entity_type *entity_var = App.get_##getter_name##_by_key(msg.key); \
|
||||
if (entity_var == nullptr) \
|
||||
if ((entity_var) == nullptr) \
|
||||
return; \
|
||||
auto call = entity_var->make_call();
|
||||
auto call = (entity_var)->make_call();
|
||||
|
||||
// Helper macro for entity command handlers that don't use make_call() - gets entity by key and returns if not found
|
||||
#define ENTITY_COMMAND_GET(entity_type, entity_var, getter_name) \
|
||||
entity_type *entity_var = App.get_##getter_name##_by_key(msg.key); \
|
||||
if (entity_var == nullptr) \
|
||||
if ((entity_var) == nullptr) \
|
||||
return;
|
||||
|
||||
APIConnection::APIConnection(std::unique_ptr<socket::Socket> sock, APIServer *parent)
|
||||
|
Loading…
x
Reference in New Issue
Block a user