1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-07 22:02:22 +01:00

[api] Add new flag to request state/attribute once from HA only (#7258)

This commit is contained in:
Jesse Hills
2024-08-13 17:12:06 +12:00
committed by GitHub
parent ab51bbd8f7
commit 2b25daa199
5 changed files with 31 additions and 0 deletions

View File

@@ -836,6 +836,7 @@ class SubscribeHomeAssistantStateResponse : public ProtoMessage {
public:
std::string entity_id{};
std::string attribute{};
bool once{false};
void encode(ProtoWriteBuffer buffer) const override;
#ifdef HAS_PROTO_MESSAGE_DUMP
void dump_to(std::string &out) const override;
@@ -843,6 +844,7 @@ class SubscribeHomeAssistantStateResponse : public ProtoMessage {
protected:
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
};
class HomeAssistantStateResponse : public ProtoMessage {
public: