1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-17 15:26:01 +00:00

[select] Refactor to index-based operations for immediate and future RAM savings (#11623)

This commit is contained in:
J. Nick Koston
2025-11-04 16:33:01 -06:00
committed by GitHub
parent c7ae424613
commit 6f7e54c3f3
44 changed files with 268 additions and 204 deletions

View File

@@ -877,7 +877,7 @@ uint16_t APIConnection::try_send_select_state(EntityBase *entity, APIConnection
bool is_single) {
auto *select = static_cast<select::Select *>(entity);
SelectStateResponse resp;
resp.set_state(StringRef(select->state));
resp.set_state(StringRef(select->current_option()));
resp.missing_state = !select->has_state();
return fill_and_encode_entity_state(select, resp, SelectStateResponse::MESSAGE_TYPE, conn, remaining_size, is_single);
}