Merge branch 'integration' into memory_api

This commit is contained in:
J. Nick Koston 2025-07-22 07:49:36 -10:00
commit f3030e35a8
No known key found for this signature in database
6 changed files with 52 additions and 14 deletions

View File

@ -47,15 +47,11 @@ template<typename... Ts> class HomeAssistantServiceCallAction : public Action<Ts
template<typename T> void set_service(T service) { this->service_ = service; }
template<typename T> void add_data(std::string key, T value) {
this->data_.push_back(TemplatableKeyValuePair<Ts...>(key, value));
}
template<typename T> void add_data(std::string key, T value) { this->data_.emplace_back(key, value); }
template<typename T> void add_data_template(std::string key, T value) {
this->data_template_.push_back(TemplatableKeyValuePair<Ts...>(key, value));
}
template<typename T> void add_variable(std::string key, T value) {
this->variables_.push_back(TemplatableKeyValuePair<Ts...>(key, value));
this->data_template_.emplace_back(key, value);
}
template<typename T> void add_variable(std::string key, T value) { this->variables_.emplace_back(key, value); }
void play(Ts... x) override {
HomeassistantServiceResponse resp;

View File

@ -1,7 +1,7 @@
import esphome.codegen as cg
from esphome.components import esp32, i2c
import esphome.config_validation as cv
from esphome.const import CONF_ID, CONF_SAMPLE_RATE, CONF_TEMPERATURE_OFFSET
from esphome.const import CONF_ID, CONF_SAMPLE_RATE, CONF_TEMPERATURE_OFFSET, Framework
CODEOWNERS = ["@trvrnrth"]
DEPENDENCIES = ["i2c"]
@ -56,7 +56,15 @@ CONFIG_SCHEMA = cv.All(
): cv.positive_time_period_minutes,
}
).extend(i2c.i2c_device_schema(0x76)),
cv.only_with_arduino,
cv.only_with_framework(
frameworks=Framework.ARDUINO,
suggestions={
Framework.ESP_IDF: (
"bme68x_bsec2_i2c",
"sensor/bme68x_bsec2",
)
},
),
cv.Any(
cv.only_on_esp8266,
cv.All(

View File

@ -2,7 +2,13 @@ from esphome import pins
import esphome.codegen as cg
from esphome.components import fastled_base
import esphome.config_validation as cv
from esphome.const import CONF_CHIPSET, CONF_NUM_LEDS, CONF_PIN, CONF_RGB_ORDER
from esphome.const import (
CONF_CHIPSET,
CONF_NUM_LEDS,
CONF_PIN,
CONF_RGB_ORDER,
Framework,
)
AUTO_LOAD = ["fastled_base"]
@ -48,13 +54,22 @@ CONFIG_SCHEMA = cv.All(
cv.Required(CONF_PIN): pins.internal_gpio_output_pin_number,
}
),
_validate,
cv.only_with_framework(
frameworks=Framework.ARDUINO,
suggestions={
Framework.ESP_IDF: (
"esp32_rmt_led_strip",
"light/esp32_rmt_led_strip",
)
},
),
cv.require_framework_version(
esp8266_arduino=cv.Version(2, 7, 4),
esp32_arduino=cv.Version(99, 0, 0),
max_version=True,
extra_message="Please see note on documentation for FastLED",
),
_validate,
)

View File

@ -9,6 +9,7 @@ from esphome.const import (
CONF_DATA_RATE,
CONF_NUM_LEDS,
CONF_RGB_ORDER,
Framework,
)
AUTO_LOAD = ["fastled_base"]
@ -33,6 +34,15 @@ CONFIG_SCHEMA = cv.All(
cv.Optional(CONF_DATA_RATE): cv.frequency,
}
),
cv.only_with_framework(
frameworks=Framework.ARDUINO,
suggestions={
Framework.ESP_IDF: (
"spi_led_strip",
"light/spi_led_strip",
)
},
),
cv.require_framework_version(
esp8266_arduino=cv.Version(2, 7, 4),
esp32_arduino=cv.Version(99, 0, 0),

View File

@ -15,6 +15,7 @@ from esphome.const import (
CONF_PIN,
CONF_TYPE,
CONF_VARIANT,
Framework,
)
from esphome.core import CORE
@ -162,7 +163,15 @@ def _validate_method(value):
CONFIG_SCHEMA = cv.All(
cv.only_with_arduino,
cv.only_with_framework(
frameworks=Framework.ARDUINO,
suggestions={
Framework.ESP_IDF: (
"esp32_rmt_led_strip",
"light/esp32_rmt_led_strip",
)
},
),
cv.require_framework_version(
esp8266_arduino=cv.Version(2, 4, 0),
esp32_arduino=cv.Version(0, 0, 0),

View File

@ -238,10 +238,10 @@ void VoiceAssistant::loop() {
api::VoiceAssistantRequest msg;
msg.start = true;
msg.conversation_id = this->conversation_id_;
msg.set_conversation_id(StringRef(this->conversation_id_));
msg.flags = flags;
msg.audio_settings = audio_settings;
msg.wake_word_phrase = this->wake_word_;
msg.set_wake_word_phrase(StringRef(this->wake_word_));
this->wake_word_ = "";
// Reset media player state tracking