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

Add voice assistant methods for configuration (#7459)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Michael Hansen
2024-09-17 18:38:39 -05:00
committed by GitHub
parent cb86749545
commit 5a3e1d5792
8 changed files with 119 additions and 33 deletions

View File

@@ -1851,7 +1851,7 @@ class VoiceAssistantAnnounceFinished : public ProtoMessage {
};
class VoiceAssistantWakeWord : public ProtoMessage {
public:
uint32_t id{0};
std::string id{};
std::string wake_word{};
std::vector<std::string> trained_languages{};
void encode(ProtoWriteBuffer buffer) const override;
@@ -1861,7 +1861,6 @@ class VoiceAssistantWakeWord : public ProtoMessage {
protected:
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
};
class VoiceAssistantConfigurationRequest : public ProtoMessage {
public:
@@ -1875,7 +1874,7 @@ class VoiceAssistantConfigurationRequest : public ProtoMessage {
class VoiceAssistantConfigurationResponse : public ProtoMessage {
public:
std::vector<VoiceAssistantWakeWord> available_wake_words{};
std::vector<uint32_t> active_wake_words{};
std::vector<std::string> active_wake_words{};
uint32_t max_active_wake_words{0};
void encode(ProtoWriteBuffer buffer) const override;
#ifdef HAS_PROTO_MESSAGE_DUMP
@@ -1888,14 +1887,14 @@ class VoiceAssistantConfigurationResponse : public ProtoMessage {
};
class VoiceAssistantSetConfiguration : public ProtoMessage {
public:
std::vector<uint32_t> active_wake_words{};
std::vector<std::string> active_wake_words{};
void encode(ProtoWriteBuffer buffer) const override;
#ifdef HAS_PROTO_MESSAGE_DUMP
void dump_to(std::string &out) const override;
#endif
protected:
bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
};
class ListEntitiesAlarmControlPanelResponse : public ProtoMessage {
public: