mirror of
https://github.com/esphome/esphome.git
synced 2026-02-09 10:41:56 -07:00
Merge branch 'integration' into memory_api
This commit is contained in:
@@ -290,6 +290,7 @@ esphome/components/mcp23x17_base/* @jesserockz
|
||||
esphome/components/mcp23xxx_base/* @jesserockz
|
||||
esphome/components/mcp2515/* @danielschramm @mvturnho
|
||||
esphome/components/mcp3204/* @rsumner
|
||||
esphome/components/mcp3221/* @philippderdiedas
|
||||
esphome/components/mcp4461/* @p1ngb4ck
|
||||
esphome/components/mcp4728/* @berfenger
|
||||
esphome/components/mcp47a1/* @jesserockz
|
||||
|
||||
@@ -2147,7 +2147,7 @@ message ListEntitiesEventResponse {
|
||||
EntityCategory entity_category = 7;
|
||||
string device_class = 8;
|
||||
|
||||
repeated string event_types = 9;
|
||||
repeated string event_types = 9 [(container_pointer_no_template) = "FixedVector<const char *>"];
|
||||
uint32 device_id = 10 [(field_ifdef) = "USE_DEVICES"];
|
||||
}
|
||||
message EventResponse {
|
||||
|
||||
@@ -1310,8 +1310,7 @@ uint16_t APIConnection::try_send_event_info(EntityBase *entity, APIConnection *c
|
||||
auto *event = static_cast<event::Event *>(entity);
|
||||
ListEntitiesEventResponse msg;
|
||||
msg.set_device_class(event->get_device_class_ref());
|
||||
for (const auto &event_type : event->get_event_types())
|
||||
msg.event_types.push_back(event_type);
|
||||
msg.event_types = &event->get_event_types();
|
||||
return fill_and_encode_entity_info(event, msg, ListEntitiesEventResponse::MESSAGE_TYPE, conn, remaining_size,
|
||||
is_single);
|
||||
}
|
||||
|
||||
@@ -2877,8 +2877,8 @@ void ListEntitiesEventResponse::encode(ProtoWriteBuffer buffer) const {
|
||||
buffer.encode_bool(6, this->disabled_by_default);
|
||||
buffer.encode_uint32(7, static_cast<uint32_t>(this->entity_category));
|
||||
buffer.encode_string(8, this->device_class_ref_);
|
||||
for (auto &it : this->event_types) {
|
||||
buffer.encode_string(9, it, true);
|
||||
for (const char *it : *this->event_types) {
|
||||
buffer.encode_string(9, it, strlen(it), true);
|
||||
}
|
||||
#ifdef USE_DEVICES
|
||||
buffer.encode_uint32(10, this->device_id);
|
||||
@@ -2894,9 +2894,9 @@ void ListEntitiesEventResponse::calculate_size(ProtoSize &size) const {
|
||||
size.add_bool(1, this->disabled_by_default);
|
||||
size.add_uint32(1, static_cast<uint32_t>(this->entity_category));
|
||||
size.add_length(1, this->device_class_ref_.size());
|
||||
if (!this->event_types.empty()) {
|
||||
for (const auto &it : this->event_types) {
|
||||
size.add_length_force(1, it.size());
|
||||
if (!this->event_types->empty()) {
|
||||
for (const char *it : *this->event_types) {
|
||||
size.add_length_force(1, strlen(it));
|
||||
}
|
||||
}
|
||||
#ifdef USE_DEVICES
|
||||
|
||||
@@ -2788,7 +2788,7 @@ class ListEntitiesEventResponse final : public InfoResponseProtoMessage {
|
||||
#endif
|
||||
StringRef device_class_ref_{};
|
||||
void set_device_class(const StringRef &ref) { this->device_class_ref_ = ref; }
|
||||
std::vector<std::string> event_types{};
|
||||
const FixedVector<const char *> *event_types{};
|
||||
void encode(ProtoWriteBuffer buffer) const override;
|
||||
void calculate_size(ProtoSize &size) const override;
|
||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||
|
||||
@@ -2053,7 +2053,7 @@ void ListEntitiesEventResponse::dump_to(std::string &out) const {
|
||||
dump_field(out, "disabled_by_default", this->disabled_by_default);
|
||||
dump_field(out, "entity_category", static_cast<enums::EntityCategory>(this->entity_category));
|
||||
dump_field(out, "device_class", this->device_class_ref_);
|
||||
for (const auto &it : this->event_types) {
|
||||
for (const auto &it : *this->event_types) {
|
||||
dump_field(out, "event_types", it, 4);
|
||||
}
|
||||
#ifdef USE_DEVICES
|
||||
|
||||
@@ -9,6 +9,7 @@ BYTE_ORDER_BIG = "big_endian"
|
||||
CONF_COLOR_DEPTH = "color_depth"
|
||||
CONF_DRAW_ROUNDING = "draw_rounding"
|
||||
CONF_ENABLED = "enabled"
|
||||
CONF_IGNORE_NOT_FOUND = "ignore_not_found"
|
||||
CONF_ON_RECEIVE = "on_receive"
|
||||
CONF_ON_STATE_CHANGE = "on_state_change"
|
||||
CONF_REQUEST_HEADERS = "request_headers"
|
||||
|
||||
@@ -8,11 +8,11 @@ namespace event {
|
||||
static const char *const TAG = "event";
|
||||
|
||||
void Event::trigger(const std::string &event_type) {
|
||||
// Linear search - faster than std::set for small datasets (1-5 items typical)
|
||||
const std::string *found = nullptr;
|
||||
for (const auto &type : this->types_) {
|
||||
if (type == event_type) {
|
||||
found = &type;
|
||||
// Linear search with strcmp - faster than std::set for small datasets (1-5 items typical)
|
||||
const char *found = nullptr;
|
||||
for (const char *type : this->types_) {
|
||||
if (strcmp(type, event_type.c_str()) == 0) {
|
||||
found = type;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -20,11 +20,27 @@ void Event::trigger(const std::string &event_type) {
|
||||
ESP_LOGE(TAG, "'%s': invalid event type for trigger(): %s", this->get_name().c_str(), event_type.c_str());
|
||||
return;
|
||||
}
|
||||
last_event_type = found;
|
||||
ESP_LOGD(TAG, "'%s' Triggered event '%s'", this->get_name().c_str(), last_event_type->c_str());
|
||||
this->last_event_type_ = found;
|
||||
ESP_LOGD(TAG, "'%s' Triggered event '%s'", this->get_name().c_str(), this->last_event_type_);
|
||||
this->event_callback_.call(event_type);
|
||||
}
|
||||
|
||||
void Event::set_event_types(const FixedVector<const char *> &event_types) {
|
||||
this->types_.init(event_types.size());
|
||||
for (const char *type : event_types) {
|
||||
this->types_.push_back(type);
|
||||
}
|
||||
this->last_event_type_ = nullptr; // Reset when types change
|
||||
}
|
||||
|
||||
void Event::set_event_types(const std::vector<const char *> &event_types) {
|
||||
this->types_.init(event_types.size());
|
||||
for (const char *type : event_types) {
|
||||
this->types_.push_back(type);
|
||||
}
|
||||
this->last_event_type_ = nullptr; // Reset when types change
|
||||
}
|
||||
|
||||
void Event::add_on_event_callback(std::function<void(const std::string &event_type)> &&callback) {
|
||||
this->event_callback_.add(std::move(callback));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/entity_base.h"
|
||||
@@ -22,16 +24,39 @@ namespace event {
|
||||
|
||||
class Event : public EntityBase, public EntityBase_DeviceClass {
|
||||
public:
|
||||
const std::string *last_event_type;
|
||||
|
||||
void trigger(const std::string &event_type);
|
||||
void set_event_types(const std::initializer_list<std::string> &event_types) { this->types_ = event_types; }
|
||||
const FixedVector<std::string> &get_event_types() const { return this->types_; }
|
||||
|
||||
/// Set the event types supported by this event (from initializer list).
|
||||
void set_event_types(std::initializer_list<const char *> event_types) {
|
||||
this->types_ = event_types;
|
||||
this->last_event_type_ = nullptr; // Reset when types change
|
||||
}
|
||||
/// Set the event types supported by this event (from FixedVector).
|
||||
void set_event_types(const FixedVector<const char *> &event_types);
|
||||
/// Set the event types supported by this event (from vector).
|
||||
void set_event_types(const std::vector<const char *> &event_types);
|
||||
|
||||
// Deleted overloads to catch incorrect std::string usage at compile time with clear error messages
|
||||
void set_event_types(std::initializer_list<std::string> event_types) = delete;
|
||||
void set_event_types(const FixedVector<std::string> &event_types) = delete;
|
||||
void set_event_types(const std::vector<std::string> &event_types) = delete;
|
||||
|
||||
/// Return the event types supported by this event.
|
||||
const FixedVector<const char *> &get_event_types() const { return this->types_; }
|
||||
|
||||
/// Return the last triggered event type (pointer to string in types_), or nullptr if no event triggered yet.
|
||||
const char *get_last_event_type() const { return this->last_event_type_; }
|
||||
|
||||
void add_on_event_callback(std::function<void(const std::string &event_type)> &&callback);
|
||||
|
||||
protected:
|
||||
CallbackManager<void(const std::string &event_type)> event_callback_;
|
||||
FixedVector<std::string> types_;
|
||||
FixedVector<const char *> types_;
|
||||
|
||||
private:
|
||||
/// Last triggered event type - must point to entry in types_ to ensure valid lifetime.
|
||||
/// Set by trigger() after validation, reset to nullptr when types_ changes.
|
||||
const char *last_event_type_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace event
|
||||
|
||||
1
esphome/components/mcp3221/__init__.py
Normal file
1
esphome/components/mcp3221/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
CODEOWNERS = ["@philippderdiedas"]
|
||||
31
esphome/components/mcp3221/mcp3221_sensor.cpp
Normal file
31
esphome/components/mcp3221/mcp3221_sensor.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "mcp3221_sensor.h"
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace mcp3221 {
|
||||
|
||||
static const char *const TAG = "mcp3221";
|
||||
|
||||
float MCP3221Sensor::sample() {
|
||||
uint8_t data[2];
|
||||
if (this->read(data, 2) != i2c::ERROR_OK) {
|
||||
ESP_LOGW(TAG, "Read failed");
|
||||
this->status_set_warning();
|
||||
return NAN;
|
||||
}
|
||||
this->status_clear_warning();
|
||||
|
||||
uint16_t value = encode_uint16(data[0], data[1]);
|
||||
float voltage = value * this->reference_voltage_ / 4096.0f;
|
||||
|
||||
return voltage;
|
||||
}
|
||||
|
||||
void MCP3221Sensor::update() {
|
||||
float v = this->sample();
|
||||
this->publish_state(v);
|
||||
}
|
||||
|
||||
} // namespace mcp3221
|
||||
} // namespace esphome
|
||||
28
esphome/components/mcp3221/mcp3221_sensor.h
Normal file
28
esphome/components/mcp3221/mcp3221_sensor.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/automation.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
#include "esphome/components/voltage_sampler/voltage_sampler.h"
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace mcp3221 {
|
||||
|
||||
class MCP3221Sensor : public sensor::Sensor,
|
||||
public PollingComponent,
|
||||
public voltage_sampler::VoltageSampler,
|
||||
public i2c::I2CDevice {
|
||||
public:
|
||||
void set_reference_voltage(float reference_voltage) { this->reference_voltage_ = reference_voltage; }
|
||||
void update() override;
|
||||
float sample() override;
|
||||
|
||||
protected:
|
||||
float reference_voltage_;
|
||||
};
|
||||
|
||||
} // namespace mcp3221
|
||||
} // namespace esphome
|
||||
49
esphome/components/mcp3221/sensor.py
Normal file
49
esphome/components/mcp3221/sensor.py
Normal file
@@ -0,0 +1,49 @@
|
||||
import esphome.codegen as cg
|
||||
from esphome.components import i2c, sensor, voltage_sampler
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import (
|
||||
CONF_REFERENCE_VOLTAGE,
|
||||
DEVICE_CLASS_VOLTAGE,
|
||||
ICON_SCALE,
|
||||
STATE_CLASS_MEASUREMENT,
|
||||
UNIT_VOLT,
|
||||
)
|
||||
|
||||
AUTO_LOAD = ["voltage_sampler"]
|
||||
DEPENDENCIES = ["i2c"]
|
||||
|
||||
|
||||
mcp3221_ns = cg.esphome_ns.namespace("mcp3221")
|
||||
MCP3221Sensor = mcp3221_ns.class_(
|
||||
"MCP3221Sensor",
|
||||
sensor.Sensor,
|
||||
voltage_sampler.VoltageSampler,
|
||||
cg.PollingComponent,
|
||||
i2c.I2CDevice,
|
||||
)
|
||||
|
||||
|
||||
CONFIG_SCHEMA = (
|
||||
sensor.sensor_schema(
|
||||
MCP3221Sensor,
|
||||
icon=ICON_SCALE,
|
||||
accuracy_decimals=2,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
device_class=DEVICE_CLASS_VOLTAGE,
|
||||
unit_of_measurement=UNIT_VOLT,
|
||||
)
|
||||
.extend(
|
||||
{
|
||||
cv.Optional(CONF_REFERENCE_VOLTAGE, default="3.3V"): cv.voltage,
|
||||
}
|
||||
)
|
||||
.extend(cv.polling_component_schema("60s"))
|
||||
.extend(i2c.i2c_device_schema(0x48))
|
||||
)
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
var = await sensor.new_sensor(config)
|
||||
cg.add(var.set_reference_voltage(config[CONF_REFERENCE_VOLTAGE]))
|
||||
await cg.register_component(var, config)
|
||||
await i2c.register_i2c_device(var, config)
|
||||
@@ -38,8 +38,8 @@ void MQTTEventComponent::setup() {
|
||||
void MQTTEventComponent::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "MQTT Event '%s': ", this->event_->get_name().c_str());
|
||||
ESP_LOGCONFIG(TAG, "Event Types: ");
|
||||
for (const auto &event_type : this->event_->get_event_types()) {
|
||||
ESP_LOGCONFIG(TAG, "- %s", event_type.c_str());
|
||||
for (const char *event_type : this->event_->get_event_types()) {
|
||||
ESP_LOGCONFIG(TAG, "- %s", event_type);
|
||||
}
|
||||
LOG_MQTT_COMPONENT(true, true);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import logging
|
||||
import textwrap
|
||||
|
||||
import esphome.codegen as cg
|
||||
from esphome.components.const import CONF_IGNORE_NOT_FOUND
|
||||
from esphome.components.esp32 import (
|
||||
CONF_CPU_FREQUENCY,
|
||||
CONF_ENABLE_IDF_EXPERIMENTAL_FEATURES,
|
||||
@@ -123,6 +124,7 @@ def get_config_schema(config):
|
||||
cv.Optional(CONF_ENABLE_ECC, default=False): cv.boolean,
|
||||
cv.Optional(CONF_SPEED, default=speeds[0]): cv.one_of(*speeds, upper=True),
|
||||
cv.Optional(CONF_DISABLED, default=False): cv.boolean,
|
||||
cv.Optional(CONF_IGNORE_NOT_FOUND, default=True): cv.boolean,
|
||||
}
|
||||
)(config)
|
||||
|
||||
@@ -147,7 +149,9 @@ async def to_code(config):
|
||||
add_idf_sdkconfig_option("CONFIG_SPIRAM", True)
|
||||
add_idf_sdkconfig_option("CONFIG_SPIRAM_USE", True)
|
||||
add_idf_sdkconfig_option("CONFIG_SPIRAM_USE_CAPS_ALLOC", True)
|
||||
add_idf_sdkconfig_option("CONFIG_SPIRAM_IGNORE_NOTFOUND", True)
|
||||
add_idf_sdkconfig_option(
|
||||
"CONFIG_SPIRAM_IGNORE_NOTFOUND", config[CONF_IGNORE_NOT_FOUND]
|
||||
)
|
||||
|
||||
add_idf_sdkconfig_option(f"CONFIG_SPIRAM_MODE_{SDK_MODES[config[CONF_MODE]]}", True)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class Select : public EntityBase {
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
/// @deprecated Use current_option() instead. This member will be removed in ESPHome 2026.5.0.
|
||||
__attribute__((deprecated("Use current_option() instead of .state. Will be removed in 2026.5.0")))
|
||||
ESPDEPRECATED("Use current_option() instead of .state. Will be removed in 2026.5.0", "2025.11.0")
|
||||
std::string state{};
|
||||
|
||||
Select() = default;
|
||||
|
||||
@@ -1628,7 +1628,7 @@ void WebServer::handle_event_request(AsyncWebServerRequest *request, const UrlMa
|
||||
}
|
||||
|
||||
static std::string get_event_type(event::Event *event) {
|
||||
return (event && event->last_event_type) ? *event->last_event_type : "";
|
||||
return (event && event->get_last_event_type()) ? event->get_last_event_type() : "";
|
||||
}
|
||||
|
||||
std::string WebServer::event_state_json_generator(WebServer *web_server, void *source) {
|
||||
@@ -1649,7 +1649,7 @@ std::string WebServer::event_json(event::Event *obj, const std::string &event_ty
|
||||
}
|
||||
if (start_config == DETAIL_ALL) {
|
||||
JsonArray event_types = root["event_types"].to<JsonArray>();
|
||||
for (auto const &event_type : obj->get_event_types()) {
|
||||
for (const char *event_type : obj->get_event_types()) {
|
||||
event_types.add(event_type);
|
||||
}
|
||||
root["device_class"] = obj->get_device_class_ref();
|
||||
|
||||
@@ -61,9 +61,10 @@ class EntityBase {
|
||||
}
|
||||
|
||||
// Get/set this entity's icon
|
||||
[[deprecated("Use get_icon_ref() instead for better performance (avoids string copy). Will stop working in ESPHome "
|
||||
"2026.5.0")]] std::string
|
||||
get_icon() const;
|
||||
ESPDEPRECATED(
|
||||
"Use get_icon_ref() instead for better performance (avoids string copy). Will be removed in ESPHome 2026.5.0",
|
||||
"2025.11.0")
|
||||
std::string get_icon() const;
|
||||
void set_icon(const char *icon);
|
||||
StringRef get_icon_ref() const {
|
||||
static constexpr auto EMPTY_STRING = StringRef::from_lit("");
|
||||
@@ -160,9 +161,10 @@ class EntityBase {
|
||||
class EntityBase_DeviceClass { // NOLINT(readability-identifier-naming)
|
||||
public:
|
||||
/// Get the device class, using the manual override if set.
|
||||
[[deprecated("Use get_device_class_ref() instead for better performance (avoids string copy). Will stop working in "
|
||||
"ESPHome 2026.5.0")]] std::string
|
||||
get_device_class();
|
||||
ESPDEPRECATED("Use get_device_class_ref() instead for better performance (avoids string copy). Will be removed in "
|
||||
"ESPHome 2026.5.0",
|
||||
"2025.11.0")
|
||||
std::string get_device_class();
|
||||
/// Manually set the device class.
|
||||
void set_device_class(const char *device_class);
|
||||
/// Get the device class as StringRef
|
||||
@@ -178,9 +180,10 @@ class EntityBase_DeviceClass { // NOLINT(readability-identifier-naming)
|
||||
class EntityBase_UnitOfMeasurement { // NOLINT(readability-identifier-naming)
|
||||
public:
|
||||
/// Get the unit of measurement, using the manual override if set.
|
||||
[[deprecated("Use get_unit_of_measurement_ref() instead for better performance (avoids string copy). Will stop "
|
||||
"working in ESPHome 2026.5.0")]] std::string
|
||||
get_unit_of_measurement();
|
||||
ESPDEPRECATED("Use get_unit_of_measurement_ref() instead for better performance (avoids string copy). Will be "
|
||||
"removed in ESPHome 2026.5.0",
|
||||
"2025.11.0")
|
||||
std::string get_unit_of_measurement();
|
||||
/// Manually set the unit of measurement.
|
||||
void set_unit_of_measurement(const char *unit_of_measurement);
|
||||
/// Get the unit of measurement as StringRef
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml
|
||||
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,8 +0,0 @@
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml
|
||||
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
substitutions:
|
||||
step_pin: GPIO2
|
||||
dir_pin: GPIO3
|
||||
sleep_pin: GPIO5
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1 +0,0 @@
|
||||
<<: !include common.yaml
|
||||
@@ -1,7 +0,0 @@
|
||||
substitutions:
|
||||
cs_pin: GPIO2
|
||||
|
||||
packages:
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,9 +0,0 @@
|
||||
substitutions:
|
||||
irq0_pin: GPIO6
|
||||
irq1_pin: GPIO7
|
||||
reset_pin: GPIO9
|
||||
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,7 +0,0 @@
|
||||
substitutions:
|
||||
irq_pin: GPIO6
|
||||
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,7 +0,0 @@
|
||||
substitutions:
|
||||
irq_pin: GPIO9
|
||||
cs_pin: GPIO8
|
||||
packages:
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c_low_freq: !include ../../test_build_components/common/i2c_low_freq/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1 +0,0 @@
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1 +0,0 @@
|
||||
<<: !include common.yaml
|
||||
@@ -1,13 +0,0 @@
|
||||
packages:
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
animation: !include common.yaml
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: main_lcd
|
||||
spi_id: spi_bus
|
||||
model: ili9342
|
||||
cs_pin: 8
|
||||
dc_pin: 9
|
||||
reset_pin: 10
|
||||
invert_colors: false
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,5 +0,0 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
@@ -1,7 +0,0 @@
|
||||
substitutions:
|
||||
irq_pin: GPIO6
|
||||
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,7 +0,0 @@
|
||||
substitutions:
|
||||
irq_pin: GPIO9
|
||||
cs_pin: GPIO8
|
||||
packages:
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,7 +0,0 @@
|
||||
substitutions:
|
||||
dir_pin: GPIO6
|
||||
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
substitutions:
|
||||
cs_pin: GPIO8
|
||||
packages:
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
substitutions:
|
||||
cs_pin: GPIO8
|
||||
packages:
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1 +0,0 @@
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,2 +0,0 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
||||
@@ -1 +0,0 @@
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
uart_19200: !include ../../test_build_components/common/uart_19200/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,5 +0,0 @@
|
||||
substitutions:
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,5 +0,0 @@
|
||||
substitutions:
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,5 +0,0 @@
|
||||
substitutions:
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
substitutions:
|
||||
cs_pin: GPIO8
|
||||
packages:
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
substitutions:
|
||||
cs_pin: GPIO8
|
||||
packages:
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
substitutions:
|
||||
cs_pin: GPIO8
|
||||
packages:
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,5 +0,0 @@
|
||||
substitutions:
|
||||
clock_pin: GPIO5
|
||||
data_pin: GPIO4
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,5 +0,0 @@
|
||||
substitutions:
|
||||
clock_pin: GPIO5
|
||||
data_pin: GPIO4
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1 +0,0 @@
|
||||
<<: !include common.yaml
|
||||
@@ -1 +0,0 @@
|
||||
!include common.yaml
|
||||
@@ -1,7 +0,0 @@
|
||||
substitutions:
|
||||
reset_pin: GPIO6
|
||||
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1 +0,0 @@
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,8 +0,0 @@
|
||||
substitutions:
|
||||
pin_s0: GPIO2
|
||||
pin_s1: GPIO3
|
||||
pin_s2: GPIO4
|
||||
pin_s3: GPIO5
|
||||
pin: GPIO0
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,20 +0,0 @@
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: ili9xxx_display
|
||||
model: GC9A01A
|
||||
invert_colors: True
|
||||
cs_pin: 11
|
||||
dc_pin: 7
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: chsc6x
|
||||
display: ili9xxx_display
|
||||
interrupt_pin: 20
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
remote_transmitter: !include ../../test_build_components/common/remote_transmitter/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,5 +0,0 @@
|
||||
substitutions:
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1 +0,0 @@
|
||||
<<: !include common.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
substitutions:
|
||||
light_platform: ledc
|
||||
pin_o1: GPIO6
|
||||
pin_o2: GPIO7
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1 +0,0 @@
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
remote_transmitter: !include ../../test_build_components/common/remote_transmitter/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,5 +0,0 @@
|
||||
substitutions:
|
||||
pwm_platform: ledc
|
||||
pin: GPIO2
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
substitutions:
|
||||
cs_pin: GPIO8
|
||||
packages:
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,5 +0,0 @@
|
||||
substitutions:
|
||||
packages:
|
||||
uart_38400: !include ../../test_build_components/common/uart_38400/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,5 +0,0 @@
|
||||
substitutions:
|
||||
packages:
|
||||
uart_4800_even: !include ../../test_build_components/common/uart_4800_even/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,11 +0,0 @@
|
||||
substitutions:
|
||||
cs_pin: GPIO7
|
||||
dc_pin: GPIO9
|
||||
disp_reset_pin: GPIO18
|
||||
interrupt_pin: GPIO2
|
||||
reset_pin: GPIO3
|
||||
packages:
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,11 +0,0 @@
|
||||
substitutions:
|
||||
cs_pin: GPIO7
|
||||
dc_pin: GPIO9
|
||||
disp_reset_pin: GPIO18
|
||||
interrupt_pin: GPIO2
|
||||
reset_pin: GPIO3
|
||||
packages:
|
||||
spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml
|
||||
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -1,4 +0,0 @@
|
||||
substitutions:
|
||||
pin: GPIO0
|
||||
|
||||
<<: !include common.yaml
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user