mirror of
https://github.com/esphome/esphome.git
synced 2025-07-29 22:56:37 +00:00
Merge branch 'integration' into memory_api
This commit is contained in:
commit
17dca4d761
@ -1830,9 +1830,7 @@ void APIConnection::process_state_subscriptions_() {
|
||||
resp.set_entity_id(StringRef(it.entity_id));
|
||||
|
||||
// Avoid string copy by directly using the optional's value if it exists
|
||||
if (it.attribute.has_value()) {
|
||||
resp.set_attribute(StringRef(it.attribute.value()));
|
||||
}
|
||||
resp.set_attribute(it.attribute.has_value() ? StringRef(it.attribute.value()) : StringRef(""));
|
||||
|
||||
resp.once = it.once;
|
||||
if (this->send_message(resp, SubscribeHomeAssistantStateResponse::MESSAGE_TYPE)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user