mirror of
https://github.com/esphome/esphome.git
synced 2024-12-27 07:51:43 +01:00
Merge branch 'dev' into optolink
This commit is contained in:
commit
b95a9225b7
365 changed files with 11662 additions and 0 deletions
|
@ -42,6 +42,7 @@ esphome/components/as5600/* @ammmze
|
|||
esphome/components/as5600/sensor/* @ammmze
|
||||
esphome/components/as7341/* @mrgnr
|
||||
esphome/components/async_tcp/* @OttoWinter
|
||||
esphome/components/at581x/* @X-Ryl669
|
||||
esphome/components/atc_mithermometer/* @ahpohl
|
||||
esphome/components/atm90e26/* @danieltwagner
|
||||
esphome/components/b_parasite/* @rbaron
|
||||
|
@ -172,6 +173,7 @@ esphome/components/inkplate6/* @jesserockz
|
|||
esphome/components/integration/* @OttoWinter
|
||||
esphome/components/internal_temperature/* @Mat931
|
||||
esphome/components/interval/* @esphome/core
|
||||
esphome/components/jsn_sr04t/* @Mafus1
|
||||
esphome/components/json/* @OttoWinter
|
||||
esphome/components/kamstrup_kmp/* @cfeenstra1024
|
||||
esphome/components/key_collector/* @ssieb
|
||||
|
|
224
esphome/components/at581x/__init__.py
Normal file
224
esphome/components/at581x/__init__.py
Normal file
|
@ -0,0 +1,224 @@
|
|||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome import automation, core
|
||||
from esphome.components import i2c
|
||||
from esphome.automation import maybe_simple_id
|
||||
from esphome.const import (
|
||||
CONF_ID,
|
||||
CONF_FREQUENCY,
|
||||
)
|
||||
|
||||
|
||||
CODEOWNERS = ["@X-Ryl669"]
|
||||
DEPENDENCIES = ["i2c"]
|
||||
MULTI_CONF = True
|
||||
|
||||
|
||||
at581x_ns = cg.esphome_ns.namespace("at581x")
|
||||
AT581XComponent = at581x_ns.class_("AT581XComponent", cg.Component, i2c.I2CDevice)
|
||||
|
||||
|
||||
CONF_AT581X_ID = "at581x_id"
|
||||
|
||||
|
||||
CONF_SENSING_DISTANCE = "sensing_distance"
|
||||
CONF_SENSITIVITY = "sensitivity"
|
||||
CONF_POWERON_SELFCHECK_TIME = "poweron_selfcheck_time"
|
||||
CONF_PROTECT_TIME = "protect_time"
|
||||
CONF_TRIGGER_BASE = "trigger_base"
|
||||
CONF_TRIGGER_KEEP = "trigger_keep"
|
||||
CONF_STAGE_GAIN = "stage_gain"
|
||||
CONF_POWER_CONSUMPTION = "power_consumption"
|
||||
CONF_HW_FRONTEND_RESET = "hw_frontend_reset"
|
||||
|
||||
RADAR_ALLOWED_FREQ = [
|
||||
5696e6,
|
||||
5715e6,
|
||||
5730e6,
|
||||
5748e6,
|
||||
5765e6,
|
||||
5784e6,
|
||||
5800e6,
|
||||
5819e6,
|
||||
5836e6,
|
||||
5851e6,
|
||||
5869e6,
|
||||
5888e6,
|
||||
]
|
||||
RADAR_ALLOWED_CUR_CONSUMPTION = [
|
||||
48e-6,
|
||||
56e-6,
|
||||
63e-6,
|
||||
70e-6,
|
||||
77e-6,
|
||||
91e-6,
|
||||
105e-6,
|
||||
115e-6,
|
||||
40e-6,
|
||||
44e-6,
|
||||
47e-6,
|
||||
51e-6,
|
||||
54e-6,
|
||||
61e-6,
|
||||
68e-6,
|
||||
78e-6,
|
||||
]
|
||||
|
||||
CONFIG_SCHEMA = cv.Schema(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(AT581XComponent),
|
||||
}
|
||||
)
|
||||
|
||||
CONFIG_SCHEMA = cv.All(
|
||||
CONFIG_SCHEMA.extend(i2c.i2c_device_schema(0x28)).extend(cv.COMPONENT_SCHEMA)
|
||||
)
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
await cg.register_component(var, config)
|
||||
await i2c.register_i2c_device(var, config)
|
||||
|
||||
|
||||
# Actions
|
||||
AT581XResetAction = at581x_ns.class_("AT581XResetAction", automation.Action)
|
||||
AT581XSettingsAction = at581x_ns.class_("AT581XSettingsAction", automation.Action)
|
||||
|
||||
|
||||
@automation.register_action(
|
||||
"at581x.reset",
|
||||
AT581XResetAction,
|
||||
maybe_simple_id(
|
||||
{
|
||||
cv.Required(CONF_ID): cv.use_id(AT581XComponent),
|
||||
}
|
||||
),
|
||||
)
|
||||
async def at581x_reset_to_code(config, action_id, template_arg, args):
|
||||
var = cg.new_Pvariable(action_id, template_arg)
|
||||
await cg.register_parented(var, config[CONF_ID])
|
||||
|
||||
return var
|
||||
|
||||
|
||||
RADAR_SETTINGS_SCHEMA = cv.Schema(
|
||||
{
|
||||
cv.Required(CONF_ID): cv.use_id(AT581XComponent),
|
||||
cv.Optional(CONF_HW_FRONTEND_RESET): cv.templatable(cv.boolean),
|
||||
cv.Optional(CONF_FREQUENCY, default="5800MHz"): cv.templatable(
|
||||
cv.All(cv.frequency, cv.one_of(*RADAR_ALLOWED_FREQ))
|
||||
),
|
||||
cv.Optional(CONF_SENSING_DISTANCE, default=823): cv.templatable(
|
||||
cv.int_range(min=0, max=1023)
|
||||
),
|
||||
cv.Optional(CONF_POWERON_SELFCHECK_TIME, default="2000ms"): cv.templatable(
|
||||
cv.All(
|
||||
cv.positive_time_period_milliseconds,
|
||||
cv.Range(max=core.TimePeriod(milliseconds=65535)),
|
||||
)
|
||||
),
|
||||
cv.Optional(CONF_POWER_CONSUMPTION, default="70uA"): cv.templatable(
|
||||
cv.All(cv.current, cv.one_of(*RADAR_ALLOWED_CUR_CONSUMPTION))
|
||||
),
|
||||
cv.Optional(CONF_PROTECT_TIME, default="1000ms"): cv.templatable(
|
||||
cv.All(
|
||||
cv.positive_time_period_milliseconds,
|
||||
cv.Range(
|
||||
min=core.TimePeriod(milliseconds=1),
|
||||
max=core.TimePeriod(milliseconds=65535),
|
||||
),
|
||||
)
|
||||
),
|
||||
cv.Optional(CONF_TRIGGER_BASE, default="500ms"): cv.templatable(
|
||||
cv.All(
|
||||
cv.positive_time_period_milliseconds,
|
||||
cv.Range(
|
||||
min=core.TimePeriod(milliseconds=1),
|
||||
max=core.TimePeriod(milliseconds=65535),
|
||||
),
|
||||
)
|
||||
),
|
||||
cv.Optional(CONF_TRIGGER_KEEP, default="1500ms"): cv.templatable(
|
||||
cv.All(
|
||||
cv.positive_time_period_milliseconds,
|
||||
cv.Range(
|
||||
min=core.TimePeriod(milliseconds=1),
|
||||
max=core.TimePeriod(milliseconds=65535),
|
||||
),
|
||||
)
|
||||
),
|
||||
cv.Optional(CONF_STAGE_GAIN, default=3): cv.templatable(
|
||||
cv.int_range(min=0, max=12)
|
||||
),
|
||||
}
|
||||
).add_extra(
|
||||
cv.has_at_least_one_key(
|
||||
CONF_HW_FRONTEND_RESET,
|
||||
CONF_FREQUENCY,
|
||||
CONF_SENSING_DISTANCE,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@automation.register_action(
|
||||
"at581x.settings",
|
||||
AT581XSettingsAction,
|
||||
RADAR_SETTINGS_SCHEMA,
|
||||
)
|
||||
async def at581x_settings_to_code(config, action_id, template_arg, args):
|
||||
var = cg.new_Pvariable(action_id, template_arg)
|
||||
await cg.register_parented(var, config[CONF_ID])
|
||||
|
||||
# Radar configuration
|
||||
if frontend_reset := config.get(CONF_HW_FRONTEND_RESET):
|
||||
template_ = await cg.templatable(frontend_reset, args, int)
|
||||
cg.add(var.set_hw_frontend_reset(template_))
|
||||
|
||||
if freq := config.get(CONF_FREQUENCY):
|
||||
template_ = await cg.templatable(freq, args, float)
|
||||
template_ = int(template_ / 1000000)
|
||||
cg.add(var.set_frequency(template_))
|
||||
|
||||
if sens_dist := config.get(CONF_SENSING_DISTANCE):
|
||||
template_ = await cg.templatable(sens_dist, args, int)
|
||||
cg.add(var.set_sensing_distance(template_))
|
||||
|
||||
if selfcheck := config.get(CONF_POWERON_SELFCHECK_TIME):
|
||||
template_ = await cg.templatable(selfcheck, args, float)
|
||||
if isinstance(template_, cv.TimePeriod):
|
||||
template_ = template_.total_milliseconds
|
||||
template_ = int(template_)
|
||||
cg.add(var.set_poweron_selfcheck_time(template_))
|
||||
|
||||
if protect := config.get(CONF_PROTECT_TIME):
|
||||
template_ = await cg.templatable(protect, args, float)
|
||||
if isinstance(template_, cv.TimePeriod):
|
||||
template_ = template_.total_milliseconds
|
||||
template_ = int(template_)
|
||||
cg.add(var.set_protect_time(template_))
|
||||
|
||||
if trig_base := config.get(CONF_TRIGGER_BASE):
|
||||
template_ = await cg.templatable(trig_base, args, float)
|
||||
if isinstance(template_, cv.TimePeriod):
|
||||
template_ = template_.total_milliseconds
|
||||
template_ = int(template_)
|
||||
cg.add(var.set_trigger_base(template_))
|
||||
|
||||
if trig_keep := config.get(CONF_TRIGGER_KEEP):
|
||||
template_ = await cg.templatable(trig_keep, args, float)
|
||||
if isinstance(template_, cv.TimePeriod):
|
||||
template_ = template_.total_milliseconds
|
||||
template_ = int(template_)
|
||||
cg.add(var.set_trigger_keep(template_))
|
||||
|
||||
if stage_gain := config.get(CONF_STAGE_GAIN):
|
||||
template_ = await cg.templatable(stage_gain, args, int)
|
||||
cg.add(var.set_stage_gain(template_))
|
||||
|
||||
if power := config.get(CONF_POWER_CONSUMPTION):
|
||||
template_ = await cg.templatable(power, args, float)
|
||||
template_ = int(template_ * 1000000)
|
||||
cg.add(var.set_power_consumption(template_))
|
||||
|
||||
return var
|
195
esphome/components/at581x/at581x.cpp
Normal file
195
esphome/components/at581x/at581x.cpp
Normal file
|
@ -0,0 +1,195 @@
|
|||
#include "at581x.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
/* Select gain for AT581X (3dB per step for level1, 6dB per step for level 2), high value = small gain. (p12) */
|
||||
const uint8_t GAIN_ADDR_TABLE[] = {0x5c, 0x63};
|
||||
const uint8_t GAIN5C_TABLE[] = {0x08, 0x18, 0x28, 0x38, 0x48, 0x58, 0x68, 0x78, 0x88, 0x98, 0xa8, 0xb8, 0xc8};
|
||||
const uint8_t GAIN63_TABLE[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06};
|
||||
const uint8_t GAIN61_VALUE = 0xCA; // 0xC0 | 0x02 (freq present) | 0x08 (gain present)
|
||||
|
||||
/*!< Power consumption configuration table (p12). */
|
||||
const uint8_t POWER_TABLE[] = {48, 56, 63, 70, 77, 91, 105, 115, 40, 44, 47, 51, 54, 61, 68, 78};
|
||||
const uint8_t POWER67_TABLE[] = {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7};
|
||||
const uint8_t POWER68_TABLE[] = {0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8,
|
||||
24, 24, 24, 24, 24, 24, 24, 24}; // See Page 12, shift by 3 bits
|
||||
|
||||
/*!< Frequency Configuration table (p14/15 of datasheet). */
|
||||
const uint8_t FREQ_ADDR = 0x61;
|
||||
const uint16_t FREQ_TABLE[] = {5696, 5715, 5730, 5748, 5765, 5784, 5800, 5819, 5836, 5851, 5869, 5888};
|
||||
const uint8_t FREQ5F_TABLE[] = {0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x40, 0x41, 0x42, 0x43};
|
||||
const uint8_t FREQ60_TABLE[] = {0x9d, 0x9d, 0x9d, 0x9d, 0x9d, 0x9d, 0x9d, 0x9d, 0x9e, 0x9e, 0x9e, 0x9e};
|
||||
|
||||
/*!< Value for RF and analog modules switch (p10). */
|
||||
const uint8_t RF_OFF_TABLE[] = {0x46, 0xaa, 0x50};
|
||||
const uint8_t RF_ON_TABLE[] = {0x45, 0x55, 0xA0};
|
||||
const uint8_t RF_REG_ADDR[] = {0x5d, 0x62, 0x51};
|
||||
|
||||
/*!< Registers of Lighting delay time. Unit: ms, min 2s (p8) */
|
||||
const uint8_t HIGH_LEVEL_DELAY_CONTROL_ADDR = 0x41; /*!< Time_flag_out_ctrl 0x01 */
|
||||
const uint8_t HIGH_LEVEL_DELAY_VALUE_ADDR = 0x42; /*!< Time_flag_out_1 Bit<7:0> */
|
||||
|
||||
const uint8_t RESET_ADDR = 0x00;
|
||||
|
||||
/*!< Sensing distance address */
|
||||
const uint8_t SIGNAL_DETECTION_THRESHOLD_ADDR_LO = 0x10;
|
||||
const uint8_t SIGNAL_DETECTION_THRESHOLD_ADDR_HI = 0x11;
|
||||
|
||||
/*!< Bit field value for power registers */
|
||||
const uint8_t POWER_THRESHOLD_ADDR_HI = 0x68;
|
||||
const uint8_t POWER_THRESHOLD_ADDR_LO = 0x67;
|
||||
const uint8_t PWR_WORK_TIME_EN = 8; // Reg 0x67
|
||||
const uint8_t PWR_BURST_TIME_EN = 32; // Reg 0x68
|
||||
const uint8_t PWR_THRESH_EN = 64; // Reg 0x68
|
||||
const uint8_t PWR_THRESH_VAL_EN = 128; // Reg 0x67
|
||||
|
||||
/*!< Times */
|
||||
const uint8_t TRIGGER_BASE_TIME_ADDR = 0x3D; // 4 bytes, so up to 0x40
|
||||
const uint8_t PROTECT_TIME_ADDR = 0x4E; // 2 bytes, up to 0x4F
|
||||
const uint8_t TRIGGER_KEEP_TIME_ADDR = 0x42; // 4 bytes, so up to 0x45
|
||||
const uint8_t TIME41_VALUE = 1;
|
||||
const uint8_t SELF_CHECK_TIME_ADDR = 0x38; // 2 bytes, up to 0x39
|
||||
|
||||
namespace esphome {
|
||||
namespace at581x {
|
||||
|
||||
static const char *const TAG = "at581x";
|
||||
|
||||
bool AT581XComponent::i2c_write_reg(uint8_t addr, uint8_t data) {
|
||||
return this->write_register(addr, &data, 1) == esphome::i2c::NO_ERROR;
|
||||
}
|
||||
bool AT581XComponent::i2c_write_reg(uint8_t addr, uint32_t data) {
|
||||
return this->i2c_write_reg(addr + 0, uint8_t(data & 0xFF)) &&
|
||||
this->i2c_write_reg(addr + 1, uint8_t((data >> 8) & 0xFF)) &&
|
||||
this->i2c_write_reg(addr + 2, uint8_t((data >> 16) & 0xFF)) &&
|
||||
this->i2c_write_reg(addr + 3, uint8_t((data >> 24) & 0xFF));
|
||||
}
|
||||
bool AT581XComponent::i2c_write_reg(uint8_t addr, uint16_t data) {
|
||||
return this->i2c_write_reg(addr, uint8_t(data & 0xFF)) && this->i2c_write_reg(addr + 1, uint8_t((data >> 8) & 0xFF));
|
||||
}
|
||||
|
||||
bool AT581XComponent::i2c_read_reg(uint8_t addr, uint8_t &data) {
|
||||
return this->read_register(addr, &data, 1) == esphome::i2c::NO_ERROR;
|
||||
}
|
||||
|
||||
void AT581XComponent::setup() { ESP_LOGCONFIG(TAG, "Setting up AT581X..."); }
|
||||
void AT581XComponent::dump_config() { LOG_I2C_DEVICE(this); }
|
||||
#define ARRAY_SIZE(X) (sizeof(X) / sizeof((X)[0]))
|
||||
bool AT581XComponent::i2c_write_config() {
|
||||
ESP_LOGCONFIG(TAG, "Writing new config for AT581X...");
|
||||
ESP_LOGCONFIG(TAG, "Frequency: %dMHz", this->freq_);
|
||||
ESP_LOGCONFIG(TAG, "Sensing distance: %d", this->delta_);
|
||||
ESP_LOGCONFIG(TAG, "Power: %dµA", this->power_);
|
||||
ESP_LOGCONFIG(TAG, "Gain: %d", this->gain_);
|
||||
ESP_LOGCONFIG(TAG, "Trigger base time: %dms", this->trigger_base_time_ms_);
|
||||
ESP_LOGCONFIG(TAG, "Trigger keep time: %dms", this->trigger_keep_time_ms_);
|
||||
ESP_LOGCONFIG(TAG, "Protect time: %dms", this->protect_time_ms_);
|
||||
ESP_LOGCONFIG(TAG, "Self check time: %dms", this->self_check_time_ms_);
|
||||
|
||||
// Set frequency point
|
||||
if (!this->i2c_write_reg(FREQ_ADDR, GAIN61_VALUE)) {
|
||||
ESP_LOGE(TAG, "Failed to write AT581X Freq mode");
|
||||
return false;
|
||||
}
|
||||
// Find the current frequency from the table to know what value to write
|
||||
for (size_t i = 0; i < ARRAY_SIZE(FREQ_TABLE) + 1; i++) {
|
||||
if (i == ARRAY_SIZE(FREQ_TABLE)) {
|
||||
ESP_LOGE(TAG, "Set frequency not found");
|
||||
return false;
|
||||
}
|
||||
if (FREQ_TABLE[i] == this->freq_) {
|
||||
if (!this->i2c_write_reg(0x5F, FREQ5F_TABLE[i]) || !this->i2c_write_reg(0x60, FREQ60_TABLE[i])) {
|
||||
ESP_LOGE(TAG, "Failed to write AT581X Freq value");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Set distance
|
||||
if (!this->i2c_write_reg(SIGNAL_DETECTION_THRESHOLD_ADDR_LO, (uint8_t) (this->delta_ & 0xFF)) ||
|
||||
!this->i2c_write_reg(SIGNAL_DETECTION_THRESHOLD_ADDR_HI, (uint8_t) (this->delta_ >> 8))) {
|
||||
ESP_LOGE(TAG, "Failed to write AT581X sensing distance low");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set power setting
|
||||
uint8_t pwr67 = PWR_THRESH_VAL_EN | PWR_WORK_TIME_EN, pwr68 = PWR_BURST_TIME_EN | PWR_THRESH_EN;
|
||||
for (size_t i = 0; i < ARRAY_SIZE(POWER_TABLE) + 1; i++) {
|
||||
if (i == ARRAY_SIZE(POWER_TABLE)) {
|
||||
ESP_LOGE(TAG, "Set power not found");
|
||||
return false;
|
||||
}
|
||||
if (POWER_TABLE[i] == this->power_) {
|
||||
pwr67 |= POWER67_TABLE[i];
|
||||
pwr68 |= POWER68_TABLE[i]; // See Page 12
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!this->i2c_write_reg(POWER_THRESHOLD_ADDR_LO, pwr67) || !this->i2c_write_reg(POWER_THRESHOLD_ADDR_HI, pwr68)) {
|
||||
ESP_LOGE(TAG, "Failed to write AT581X power registers");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set gain
|
||||
if (!this->i2c_write_reg(GAIN_ADDR_TABLE[0], GAIN5C_TABLE[this->gain_]) ||
|
||||
!this->i2c_write_reg(GAIN_ADDR_TABLE[1], GAIN63_TABLE[this->gain_ >> 1])) {
|
||||
ESP_LOGE(TAG, "Failed to write AT581X gain registers");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set times
|
||||
if (!this->i2c_write_reg(TRIGGER_BASE_TIME_ADDR, (uint32_t) this->trigger_base_time_ms_)) {
|
||||
ESP_LOGE(TAG, "Failed to write AT581X trigger base time registers");
|
||||
return false;
|
||||
}
|
||||
if (!this->i2c_write_reg(TRIGGER_KEEP_TIME_ADDR, (uint32_t) this->trigger_keep_time_ms_)) {
|
||||
ESP_LOGE(TAG, "Failed to write AT581X trigger keep time registers");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this->i2c_write_reg(PROTECT_TIME_ADDR, (uint16_t) this->protect_time_ms_)) {
|
||||
ESP_LOGE(TAG, "Failed to write AT581X protect time registers");
|
||||
return false;
|
||||
}
|
||||
if (!this->i2c_write_reg(SELF_CHECK_TIME_ADDR, (uint16_t) this->self_check_time_ms_)) {
|
||||
ESP_LOGE(TAG, "Failed to write AT581X self check time registers");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this->i2c_write_reg(0x41, TIME41_VALUE)) {
|
||||
ESP_LOGE(TAG, "Failed to enable AT581X time registers");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Don't know why it's required in other code, it's not in datasheet
|
||||
if (!this->i2c_write_reg(0x55, (uint8_t) 0x04)) {
|
||||
ESP_LOGE(TAG, "Failed to enable AT581X");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ok, config is written, let's reset the chip so it's using the new config
|
||||
return this->reset_hardware_frontend();
|
||||
}
|
||||
|
||||
// float AT581XComponent::get_setup_priority() const { return 0; }
|
||||
bool AT581XComponent::reset_hardware_frontend() {
|
||||
if (!this->i2c_write_reg(RESET_ADDR, (uint8_t) 0) || !this->i2c_write_reg(RESET_ADDR, (uint8_t) 1)) {
|
||||
ESP_LOGE(TAG, "Failed to reset AT581X hardware frontend");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void AT581XComponent::set_rf_mode(bool enable) {
|
||||
const uint8_t *p = enable ? &RF_ON_TABLE[0] : &RF_OFF_TABLE[0];
|
||||
for (size_t i = 0; i < ARRAY_SIZE(RF_REG_ADDR); i++) {
|
||||
if (!this->i2c_write_reg(RF_REG_ADDR[i], p[i])) {
|
||||
ESP_LOGE(TAG, "Failed to write AT581X RF mode");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace at581x
|
||||
} // namespace esphome
|
62
esphome/components/at581x/at581x.h
Normal file
62
esphome/components/at581x/at581x.h
Normal file
|
@ -0,0 +1,62 @@
|
|||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/core/defines.h"
|
||||
#ifdef USE_SWITCH
|
||||
#include "esphome/components/switch/switch.h"
|
||||
#endif
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace at581x {
|
||||
|
||||
class AT581XComponent : public Component, public i2c::I2CDevice {
|
||||
#ifdef USE_SWITCH
|
||||
protected:
|
||||
switch_::Switch *rf_power_switch_{nullptr};
|
||||
|
||||
public:
|
||||
void set_rf_power_switch(switch_::Switch *s) {
|
||||
this->rf_power_switch_ = s;
|
||||
s->turn_on();
|
||||
}
|
||||
#endif
|
||||
|
||||
void setup() override;
|
||||
void dump_config() override;
|
||||
// float get_setup_priority() const override;
|
||||
|
||||
void set_sensing_distance(int distance) { this->delta_ = 1023 - distance; }
|
||||
|
||||
void set_rf_mode(bool enabled);
|
||||
void set_frequency(int frequency) { this->freq_ = frequency; }
|
||||
void set_poweron_selfcheck_time(int value) { this->self_check_time_ms_ = value; }
|
||||
void set_protect_time(int value) { this->protect_time_ms_ = value; }
|
||||
void set_trigger_base(int value) { this->trigger_base_time_ms_ = value; }
|
||||
void set_trigger_keep(int value) { this->trigger_keep_time_ms_ = value; }
|
||||
void set_stage_gain(int value) { this->gain_ = value; }
|
||||
void set_power_consumption(int value) { this->power_ = value; }
|
||||
|
||||
bool i2c_write_config();
|
||||
bool reset_hardware_frontend();
|
||||
bool i2c_write_reg(uint8_t addr, uint8_t data);
|
||||
bool i2c_write_reg(uint8_t addr, uint32_t data);
|
||||
bool i2c_write_reg(uint8_t addr, uint16_t data);
|
||||
bool i2c_read_reg(uint8_t addr, uint8_t &data);
|
||||
|
||||
protected:
|
||||
int freq_;
|
||||
int self_check_time_ms_; /*!< Power-on self-test time, range: 0 ~ 65536 ms */
|
||||
int protect_time_ms_; /*!< Protection time, recommended 1000 ms */
|
||||
int trigger_base_time_ms_; /*!< Default: 500 ms */
|
||||
int trigger_keep_time_ms_; /*!< Total trig time = TRIGGER_BASE_TIME + DEF_TRIGGER_KEEP_TIME, minimum: 1 */
|
||||
int delta_; /*!< Delta value: 0 ~ 1023, the larger the value, the shorter the distance */
|
||||
int gain_; /*!< Default: 9dB */
|
||||
int power_; /*!< In µA */
|
||||
};
|
||||
|
||||
} // namespace at581x
|
||||
} // namespace esphome
|
71
esphome/components/at581x/automation.h
Normal file
71
esphome/components/at581x/automation.h
Normal file
|
@ -0,0 +1,71 @@
|
|||
#pragma once
|
||||
|
||||
#include "esphome/core/automation.h"
|
||||
#include "esphome/core/helpers.h"
|
||||
|
||||
#include "at581x.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace at581x {
|
||||
|
||||
template<typename... Ts> class AT581XResetAction : public Action<Ts...>, public Parented<AT581XComponent> {
|
||||
public:
|
||||
void play(Ts... x) { this->parent_->reset_hardware_frontend(); }
|
||||
};
|
||||
|
||||
template<typename... Ts> class AT581XSettingsAction : public Action<Ts...>, public Parented<AT581XComponent> {
|
||||
public:
|
||||
TEMPLATABLE_VALUE(int8_t, hw_frontend_reset)
|
||||
TEMPLATABLE_VALUE(int, frequency)
|
||||
TEMPLATABLE_VALUE(int, sensing_distance)
|
||||
TEMPLATABLE_VALUE(int, poweron_selfcheck_time)
|
||||
TEMPLATABLE_VALUE(int, power_consumption)
|
||||
TEMPLATABLE_VALUE(int, protect_time)
|
||||
TEMPLATABLE_VALUE(int, trigger_base)
|
||||
TEMPLATABLE_VALUE(int, trigger_keep)
|
||||
TEMPLATABLE_VALUE(int, stage_gain)
|
||||
|
||||
void play(Ts... x) {
|
||||
if (this->frequency_.has_value()) {
|
||||
int v = this->frequency_.value(x...);
|
||||
this->parent_->set_frequency(v);
|
||||
}
|
||||
if (this->sensing_distance_.has_value()) {
|
||||
int v = this->sensing_distance_.value(x...);
|
||||
this->parent_->set_sensing_distance(v);
|
||||
}
|
||||
if (this->poweron_selfcheck_time_.has_value()) {
|
||||
int v = this->poweron_selfcheck_time_.value(x...);
|
||||
this->parent_->set_poweron_selfcheck_time(v);
|
||||
}
|
||||
if (this->power_consumption_.has_value()) {
|
||||
int v = this->power_consumption_.value(x...);
|
||||
this->parent_->set_power_consumption(v);
|
||||
}
|
||||
if (this->protect_time_.has_value()) {
|
||||
int v = this->protect_time_.value(x...);
|
||||
this->parent_->set_protect_time(v);
|
||||
}
|
||||
if (this->trigger_base_.has_value()) {
|
||||
int v = this->trigger_base_.value(x...);
|
||||
this->parent_->set_trigger_base(v);
|
||||
}
|
||||
if (this->trigger_keep_.has_value()) {
|
||||
int v = this->trigger_keep_.value(x...);
|
||||
this->parent_->set_trigger_keep(v);
|
||||
}
|
||||
if (this->stage_gain_.has_value()) {
|
||||
int v = this->stage_gain_.value(x...);
|
||||
this->parent_->set_stage_gain(v);
|
||||
}
|
||||
|
||||
// This actually perform all the modification on the system
|
||||
this->parent_->i2c_write_config();
|
||||
|
||||
if (this->hw_frontend_reset_.has_value() && this->hw_frontend_reset_.value(x...) == true) {
|
||||
this->parent_->reset_hardware_frontend();
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace at581x
|
||||
} // namespace esphome
|
31
esphome/components/at581x/switch/__init__.py
Normal file
31
esphome/components/at581x/switch/__init__.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
import esphome.codegen as cg
|
||||
from esphome.components import switch
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import (
|
||||
DEVICE_CLASS_SWITCH,
|
||||
ICON_WIFI,
|
||||
)
|
||||
from .. import CONF_AT581X_ID, AT581XComponent, at581x_ns
|
||||
|
||||
DEPENDENCIES = ["at581x"]
|
||||
|
||||
RFSwitch = at581x_ns.class_("RFSwitch", switch.Switch)
|
||||
|
||||
CONFIG_SCHEMA = switch.switch_schema(
|
||||
RFSwitch,
|
||||
device_class=DEVICE_CLASS_SWITCH,
|
||||
icon=ICON_WIFI,
|
||||
).extend(
|
||||
cv.Schema(
|
||||
{
|
||||
cv.GenerateID(CONF_AT581X_ID): cv.use_id(AT581XComponent),
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
at581x_component = await cg.get_variable(config[CONF_AT581X_ID])
|
||||
s = await switch.new_switch(config)
|
||||
await cg.register_parented(s, config[CONF_AT581X_ID])
|
||||
cg.add(at581x_component.set_rf_power_switch(s))
|
12
esphome/components/at581x/switch/rf_switch.cpp
Normal file
12
esphome/components/at581x/switch/rf_switch.cpp
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include "rf_switch.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace at581x {
|
||||
|
||||
void RFSwitch::write_state(bool state) {
|
||||
this->publish_state(state);
|
||||
this->parent_->set_rf_mode(state);
|
||||
}
|
||||
|
||||
} // namespace at581x
|
||||
} // namespace esphome
|
15
esphome/components/at581x/switch/rf_switch.h
Normal file
15
esphome/components/at581x/switch/rf_switch.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
#include "esphome/components/switch/switch.h"
|
||||
#include "../at581x.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace at581x {
|
||||
|
||||
class RFSwitch : public switch_::Switch, public Parented<AT581XComponent> {
|
||||
protected:
|
||||
void write_state(bool state) override;
|
||||
};
|
||||
|
||||
} // namespace at581x
|
||||
} // namespace esphome
|
1
esphome/components/jsn_sr04t/__init__.py
Normal file
1
esphome/components/jsn_sr04t/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
CODEOWNERS = ["@Mafus1"]
|
58
esphome/components/jsn_sr04t/jsn_sr04t.cpp
Normal file
58
esphome/components/jsn_sr04t/jsn_sr04t.cpp
Normal file
|
@ -0,0 +1,58 @@
|
|||
#include "jsn_sr04t.h"
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
// Very basic support for JSN_SR04T V3.0 distance sensor in mode 2
|
||||
|
||||
namespace esphome {
|
||||
namespace jsn_sr04t {
|
||||
|
||||
static const char *const TAG = "jsn_sr04t.sensor";
|
||||
|
||||
void Jsnsr04tComponent::update() {
|
||||
this->write_byte(0x55);
|
||||
ESP_LOGV(TAG, "Request read out from sensor");
|
||||
}
|
||||
|
||||
void Jsnsr04tComponent::loop() {
|
||||
while (this->available() > 0) {
|
||||
uint8_t data;
|
||||
this->read_byte(&data);
|
||||
|
||||
ESP_LOGV(TAG, "Read byte from sensor: %x", data);
|
||||
|
||||
if (this->buffer_.empty() && data != 0xFF)
|
||||
continue;
|
||||
|
||||
this->buffer_.push_back(data);
|
||||
if (this->buffer_.size() == 4)
|
||||
this->check_buffer_();
|
||||
}
|
||||
}
|
||||
|
||||
void Jsnsr04tComponent::check_buffer_() {
|
||||
uint8_t checksum = this->buffer_[0] + this->buffer_[1] + this->buffer_[2];
|
||||
if (this->buffer_[3] == checksum) {
|
||||
uint16_t distance = encode_uint16(this->buffer_[1], this->buffer_[2]);
|
||||
if (distance > 250) {
|
||||
float meters = distance / 1000.0f;
|
||||
ESP_LOGV(TAG, "Distance from sensor: %" PRIu32 "mm, %.3fm", distance, meters);
|
||||
this->publish_state(meters);
|
||||
} else {
|
||||
ESP_LOGW(TAG, "Invalid data read from sensor: %s", format_hex_pretty(this->buffer_).c_str());
|
||||
}
|
||||
} else {
|
||||
ESP_LOGW(TAG, "checksum failed: %02x != %02x", checksum, this->buffer_[3]);
|
||||
}
|
||||
this->buffer_.clear();
|
||||
}
|
||||
|
||||
void Jsnsr04tComponent::dump_config() {
|
||||
LOG_SENSOR("", "JST_SR04T Sensor", this);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
}
|
||||
|
||||
} // namespace jsn_sr04t
|
||||
} // namespace esphome
|
28
esphome/components/jsn_sr04t/jsn_sr04t.h
Normal file
28
esphome/components/jsn_sr04t/jsn_sr04t.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/uart/uart.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace jsn_sr04t {
|
||||
|
||||
class Jsnsr04tComponent : public sensor::Sensor, public PollingComponent, public uart::UARTDevice {
|
||||
public:
|
||||
// Nothing really public.
|
||||
|
||||
// ========== INTERNAL METHODS ==========
|
||||
void update() override;
|
||||
void loop() override;
|
||||
void dump_config() override;
|
||||
|
||||
protected:
|
||||
void check_buffer_();
|
||||
|
||||
std::vector<uint8_t> buffer_;
|
||||
};
|
||||
|
||||
} // namespace jsn_sr04t
|
||||
} // namespace esphome
|
44
esphome/components/jsn_sr04t/sensor.py
Normal file
44
esphome/components/jsn_sr04t/sensor.py
Normal file
|
@ -0,0 +1,44 @@
|
|||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import sensor, uart
|
||||
from esphome.const import (
|
||||
STATE_CLASS_MEASUREMENT,
|
||||
UNIT_METER,
|
||||
ICON_ARROW_EXPAND_VERTICAL,
|
||||
)
|
||||
|
||||
CODEOWNERS = ["@Mafus1"]
|
||||
DEPENDENCIES = ["uart"]
|
||||
|
||||
jsn_sr04t_ns = cg.esphome_ns.namespace("jsn_sr04t")
|
||||
Jsnsr04tComponent = jsn_sr04t_ns.class_(
|
||||
"Jsnsr04tComponent", sensor.Sensor, cg.PollingComponent, uart.UARTDevice
|
||||
)
|
||||
|
||||
CONFIG_SCHEMA = (
|
||||
sensor.sensor_schema(
|
||||
Jsnsr04tComponent,
|
||||
unit_of_measurement=UNIT_METER,
|
||||
icon=ICON_ARROW_EXPAND_VERTICAL,
|
||||
accuracy_decimals=3,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
)
|
||||
.extend(cv.polling_component_schema("60s"))
|
||||
.extend(uart.UART_DEVICE_SCHEMA)
|
||||
)
|
||||
|
||||
FINAL_VALIDATE_SCHEMA = uart.final_validate_device_schema(
|
||||
"jsn_sr04t",
|
||||
baud_rate=9600,
|
||||
require_tx=True,
|
||||
require_rx=True,
|
||||
data_bits=8,
|
||||
parity=None,
|
||||
stop_bits=1,
|
||||
)
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
var = await sensor.new_sensor(config)
|
||||
await cg.register_component(var, config)
|
||||
await uart.register_uart_device(var, config)
|
|
@ -236,6 +236,7 @@ void SSD1306::set_invert(bool invert) {
|
|||
// Inverse display mode (0xA6, 0xA7)
|
||||
this->command(SSD1306_COMMAND_NORMAL_DISPLAY | this->invert_);
|
||||
}
|
||||
float SSD1306::get_contrast() { return this->contrast_; };
|
||||
void SSD1306::set_contrast(float contrast) {
|
||||
// validation
|
||||
this->contrast_ = clamp(contrast, 0.0F, 1.0F);
|
||||
|
@ -243,6 +244,7 @@ void SSD1306::set_contrast(float contrast) {
|
|||
this->command(SSD1306_COMMAND_SET_CONTRAST);
|
||||
this->command(int(SSD1306_MAX_CONTRAST * (this->contrast_)));
|
||||
}
|
||||
float SSD1306::get_brightness() { return this->brightness_; };
|
||||
void SSD1306::set_brightness(float brightness) {
|
||||
// validation
|
||||
if (!this->is_ssd1305_())
|
||||
|
|
|
@ -36,7 +36,9 @@ class SSD1306 : public display::DisplayBuffer {
|
|||
void set_reset_pin(GPIOPin *reset_pin) { this->reset_pin_ = reset_pin; }
|
||||
void set_external_vcc(bool external_vcc) { this->external_vcc_ = external_vcc; }
|
||||
void init_contrast(float contrast) { this->contrast_ = contrast; }
|
||||
float get_contrast();
|
||||
void set_contrast(float contrast);
|
||||
float get_brightness();
|
||||
void init_brightness(float brightness) { this->brightness_ = brightness; }
|
||||
void set_brightness(float brightness);
|
||||
void init_flip_x(bool flip_x) { this->flip_x_ = flip_x; }
|
||||
|
|
38
tests/components/at581x/test.esp32-c3-idf.yaml
Normal file
38
tests/components/at581x/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,38 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- at581x.settings:
|
||||
id: "Waveradar"
|
||||
hw_frontend_reset: false
|
||||
frequency: 5800MHz
|
||||
sensing_distance: 200
|
||||
poweron_selfcheck_time: 2s
|
||||
protect_time: 1s
|
||||
trigger_base: 500ms
|
||||
trigger_keep: 10s
|
||||
stage_gain: 3
|
||||
power_consumption: 70uA
|
||||
- at581x.reset:
|
||||
id: "Waveradar"
|
||||
|
||||
at581x:
|
||||
id: "Waveradar"
|
||||
i2c_id: i2c_bus
|
||||
|
||||
i2c:
|
||||
sda: 8
|
||||
scl: 9
|
||||
scan: true
|
||||
frequency: 100kHz
|
||||
setup_priority: -100
|
||||
id: i2c_bus
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO21
|
||||
name: "Radar motion"
|
||||
|
||||
switch:
|
||||
- platform: at581x
|
||||
at581x_id: "Waveradar"
|
||||
name: "Enable Radar"
|
38
tests/components/at581x/test.esp32-c3.yaml
Normal file
38
tests/components/at581x/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,38 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- at581x.settings:
|
||||
id: "Waveradar"
|
||||
hw_frontend_reset: false
|
||||
frequency: 5800MHz
|
||||
sensing_distance: 200
|
||||
poweron_selfcheck_time: 2s
|
||||
protect_time: 1s
|
||||
trigger_base: 500ms
|
||||
trigger_keep: 10s
|
||||
stage_gain: 3
|
||||
power_consumption: 70uA
|
||||
- at581x.reset:
|
||||
id: "Waveradar"
|
||||
|
||||
at581x:
|
||||
id: "Waveradar"
|
||||
i2c_id: i2c_bus
|
||||
|
||||
i2c:
|
||||
sda: 8
|
||||
scl: 9
|
||||
scan: true
|
||||
frequency: 100kHz
|
||||
setup_priority: -100
|
||||
id: i2c_bus
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO21
|
||||
name: "Radar motion"
|
||||
|
||||
switch:
|
||||
- platform: at581x
|
||||
at581x_id: "Waveradar"
|
||||
name: "Enable Radar"
|
38
tests/components/at581x/test.esp32-idf.yaml
Normal file
38
tests/components/at581x/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,38 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- at581x.settings:
|
||||
id: "Waveradar"
|
||||
hw_frontend_reset: false
|
||||
frequency: 5800MHz
|
||||
sensing_distance: 200
|
||||
poweron_selfcheck_time: 2s
|
||||
protect_time: 1s
|
||||
trigger_base: 500ms
|
||||
trigger_keep: 10s
|
||||
stage_gain: 3
|
||||
power_consumption: 70uA
|
||||
- at581x.reset:
|
||||
id: "Waveradar"
|
||||
|
||||
at581x:
|
||||
id: "Waveradar"
|
||||
i2c_id: i2c_bus
|
||||
|
||||
i2c:
|
||||
sda: 14
|
||||
scl: 15
|
||||
scan: true
|
||||
frequency: 100kHz
|
||||
setup_priority: -100
|
||||
id: i2c_bus
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO21
|
||||
name: "Radar motion"
|
||||
|
||||
switch:
|
||||
- platform: at581x
|
||||
at581x_id: "Waveradar"
|
||||
name: "Enable Radar"
|
38
tests/components/at581x/test.esp32.yaml
Normal file
38
tests/components/at581x/test.esp32.yaml
Normal file
|
@ -0,0 +1,38 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- at581x.settings:
|
||||
id: "Waveradar"
|
||||
hw_frontend_reset: false
|
||||
frequency: 5800MHz
|
||||
sensing_distance: 200
|
||||
poweron_selfcheck_time: 2s
|
||||
protect_time: 1s
|
||||
trigger_base: 500ms
|
||||
trigger_keep: 10s
|
||||
stage_gain: 3
|
||||
power_consumption: 70uA
|
||||
- at581x.reset:
|
||||
id: "Waveradar"
|
||||
|
||||
at581x:
|
||||
id: "Waveradar"
|
||||
i2c_id: i2c_bus
|
||||
|
||||
i2c:
|
||||
sda: 14
|
||||
scl: 15
|
||||
scan: true
|
||||
frequency: 100kHz
|
||||
setup_priority: -100
|
||||
id: i2c_bus
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO21
|
||||
name: "Radar motion"
|
||||
|
||||
switch:
|
||||
- platform: at581x
|
||||
at581x_id: "Waveradar"
|
||||
name: "Enable Radar"
|
38
tests/components/at581x/test.esp8266.yaml
Normal file
38
tests/components/at581x/test.esp8266.yaml
Normal file
|
@ -0,0 +1,38 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- at581x.settings:
|
||||
id: "Waveradar"
|
||||
hw_frontend_reset: false
|
||||
frequency: 5800MHz
|
||||
sensing_distance: 200
|
||||
poweron_selfcheck_time: 2s
|
||||
protect_time: 1s
|
||||
trigger_base: 500ms
|
||||
trigger_keep: 10s
|
||||
stage_gain: 3
|
||||
power_consumption: 70uA
|
||||
- at581x.reset:
|
||||
id: "Waveradar"
|
||||
|
||||
at581x:
|
||||
id: "Waveradar"
|
||||
i2c_id: i2c_bus
|
||||
|
||||
i2c:
|
||||
sda: 14
|
||||
scl: 15
|
||||
scan: true
|
||||
frequency: 100kHz
|
||||
setup_priority: -100
|
||||
id: i2c_bus
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO4
|
||||
name: "Radar motion"
|
||||
|
||||
switch:
|
||||
- platform: at581x
|
||||
at581x_id: "Waveradar"
|
||||
name: "Enable Radar"
|
38
tests/components/at581x/test.rp2040.yaml
Normal file
38
tests/components/at581x/test.rp2040.yaml
Normal file
|
@ -0,0 +1,38 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- at581x.settings:
|
||||
id: "Waveradar"
|
||||
hw_frontend_reset: false
|
||||
frequency: 5800MHz
|
||||
sensing_distance: 200
|
||||
poweron_selfcheck_time: 2s
|
||||
protect_time: 1s
|
||||
trigger_base: 500ms
|
||||
trigger_keep: 10s
|
||||
stage_gain: 3
|
||||
power_consumption: 70uA
|
||||
- at581x.reset:
|
||||
id: "Waveradar"
|
||||
|
||||
at581x:
|
||||
id: "Waveradar"
|
||||
i2c_id: i2c_bus
|
||||
|
||||
i2c:
|
||||
sda: 8
|
||||
scl: 9
|
||||
scan: true
|
||||
frequency: 100kHz
|
||||
setup_priority: -100
|
||||
id: i2c_bus
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO21
|
||||
name: "Radar motion"
|
||||
|
||||
switch:
|
||||
- platform: at581x
|
||||
at581x_id: "Waveradar"
|
||||
name: "Enable Radar"
|
3
tests/components/factory_reset/test.esp32-c3-idf.yaml
Normal file
3
tests/components/factory_reset/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
button:
|
||||
- platform: factory_reset
|
||||
name: Reset to Factory Default Settings
|
3
tests/components/factory_reset/test.esp32-c3.yaml
Normal file
3
tests/components/factory_reset/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
button:
|
||||
- platform: factory_reset
|
||||
name: Reset to Factory Default Settings
|
3
tests/components/factory_reset/test.esp32-idf.yaml
Normal file
3
tests/components/factory_reset/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
button:
|
||||
- platform: factory_reset
|
||||
name: Reset to Factory Default Settings
|
3
tests/components/factory_reset/test.esp32.yaml
Normal file
3
tests/components/factory_reset/test.esp32.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
button:
|
||||
- platform: factory_reset
|
||||
name: Reset to Factory Default Settings
|
3
tests/components/factory_reset/test.esp8266.yaml
Normal file
3
tests/components/factory_reset/test.esp8266.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
button:
|
||||
- platform: factory_reset
|
||||
name: Reset to Factory Default Settings
|
3
tests/components/factory_reset/test.rp2040.yaml
Normal file
3
tests/components/factory_reset/test.rp2040.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
button:
|
||||
- platform: factory_reset
|
||||
name: Reset to Factory Default Settings
|
71
tests/components/fastled_clockless/test.esp32.yaml
Normal file
71
tests/components/fastled_clockless/test.esp32.yaml
Normal file
|
@ -0,0 +1,71 @@
|
|||
light:
|
||||
- platform: fastled_clockless
|
||||
id: addr1
|
||||
chipset: WS2811
|
||||
pin: 13
|
||||
num_leds: 100
|
||||
rgb_order: BRG
|
||||
max_refresh_rate: 20ms
|
||||
color_correct: [75%, 100%, 50%]
|
||||
name: FastLED WS2811 Light
|
||||
effects:
|
||||
- addressable_color_wipe:
|
||||
- addressable_color_wipe:
|
||||
name: Color Wipe Effect With Custom Values
|
||||
colors:
|
||||
- red: 100%
|
||||
green: 100%
|
||||
blue: 100%
|
||||
num_leds: 1
|
||||
- red: 0%
|
||||
green: 0%
|
||||
blue: 0%
|
||||
num_leds: 1
|
||||
add_led_interval: 100ms
|
||||
reverse: false
|
||||
- addressable_scan:
|
||||
- addressable_scan:
|
||||
name: Scan Effect With Custom Values
|
||||
move_interval: 100ms
|
||||
- addressable_twinkle:
|
||||
- addressable_twinkle:
|
||||
name: Twinkle Effect With Custom Values
|
||||
twinkle_probability: 5%
|
||||
progress_interval: 4ms
|
||||
- addressable_random_twinkle:
|
||||
- addressable_random_twinkle:
|
||||
name: Random Twinkle Effect With Custom Values
|
||||
twinkle_probability: 5%
|
||||
progress_interval: 32ms
|
||||
- addressable_fireworks:
|
||||
- addressable_fireworks:
|
||||
name: Fireworks Effect With Custom Values
|
||||
update_interval: 32ms
|
||||
spark_probability: 10%
|
||||
use_random_color: false
|
||||
fade_out_rate: 120
|
||||
- addressable_flicker:
|
||||
- addressable_flicker:
|
||||
name: Flicker Effect With Custom Values
|
||||
update_interval: 16ms
|
||||
intensity: 5%
|
||||
- addressable_lambda:
|
||||
name: Test For Custom Lambda Effect
|
||||
lambda: |-
|
||||
if (initial_run) {
|
||||
it[0] = current_color;
|
||||
}
|
||||
- automation:
|
||||
name: Custom Effect
|
||||
sequence:
|
||||
- light.addressable_set:
|
||||
id: addr1
|
||||
red: 100%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
- delay: 100ms
|
||||
- light.addressable_set:
|
||||
id: addr1
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 0%
|
71
tests/components/fastled_spi/test.esp32.yaml
Normal file
71
tests/components/fastled_spi/test.esp32.yaml
Normal file
|
@ -0,0 +1,71 @@
|
|||
light:
|
||||
- platform: fastled_spi
|
||||
id: addr1
|
||||
chipset: WS2801
|
||||
clock_pin: 22
|
||||
data_pin: 23
|
||||
data_rate: 2MHz
|
||||
num_leds: 60
|
||||
rgb_order: BRG
|
||||
name: FastLED SPI Light
|
||||
effects:
|
||||
- addressable_color_wipe:
|
||||
- addressable_color_wipe:
|
||||
name: Color Wipe Effect With Custom Values
|
||||
colors:
|
||||
- red: 100%
|
||||
green: 100%
|
||||
blue: 100%
|
||||
num_leds: 1
|
||||
- red: 0%
|
||||
green: 0%
|
||||
blue: 0%
|
||||
num_leds: 1
|
||||
add_led_interval: 100ms
|
||||
reverse: false
|
||||
- addressable_scan:
|
||||
- addressable_scan:
|
||||
name: Scan Effect With Custom Values
|
||||
move_interval: 100ms
|
||||
- addressable_twinkle:
|
||||
- addressable_twinkle:
|
||||
name: Twinkle Effect With Custom Values
|
||||
twinkle_probability: 5%
|
||||
progress_interval: 4ms
|
||||
- addressable_random_twinkle:
|
||||
- addressable_random_twinkle:
|
||||
name: Random Twinkle Effect With Custom Values
|
||||
twinkle_probability: 5%
|
||||
progress_interval: 32ms
|
||||
- addressable_fireworks:
|
||||
- addressable_fireworks:
|
||||
name: Fireworks Effect With Custom Values
|
||||
update_interval: 32ms
|
||||
spark_probability: 10%
|
||||
use_random_color: false
|
||||
fade_out_rate: 120
|
||||
- addressable_flicker:
|
||||
- addressable_flicker:
|
||||
name: Flicker Effect With Custom Values
|
||||
update_interval: 16ms
|
||||
intensity: 5%
|
||||
- addressable_lambda:
|
||||
name: Test For Custom Lambda Effect
|
||||
lambda: |-
|
||||
if (initial_run) {
|
||||
it[0] = current_color;
|
||||
}
|
||||
- automation:
|
||||
name: Custom Effect
|
||||
sequence:
|
||||
- light.addressable_set:
|
||||
id: addr1
|
||||
red: 100%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
- delay: 100ms
|
||||
- light.addressable_set:
|
||||
id: addr1
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 0%
|
39
tests/components/feedback/test.esp32-c3-idf.yaml
Normal file
39
tests/components/feedback/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,39 @@
|
|||
binary_sensor:
|
||||
- platform: template
|
||||
id: open_endstop_sensor
|
||||
- platform: template
|
||||
id: open_sensor
|
||||
- platform: template
|
||||
id: open_obstacle_sensor
|
||||
- platform: template
|
||||
id: close_endstop_sensor
|
||||
- platform: template
|
||||
id: close_sensor
|
||||
- platform: template
|
||||
id: close_obstacle_sensor
|
||||
|
||||
cover:
|
||||
- platform: feedback
|
||||
name: Feedback Cover
|
||||
id: gate
|
||||
device_class: gate
|
||||
infer_endstop_from_movement: false
|
||||
has_built_in_endstop: false
|
||||
max_duration: 30s
|
||||
direction_change_wait_time: 300ms
|
||||
acceleration_wait_time: 150ms
|
||||
obstacle_rollback: 10%
|
||||
open_duration: 22.1s
|
||||
open_endstop: open_endstop_sensor
|
||||
open_sensor: open_sensor
|
||||
open_obstacle_sensor: open_obstacle_sensor
|
||||
close_duration: 22.4s
|
||||
close_endstop: close_endstop_sensor
|
||||
close_sensor: close_sensor
|
||||
close_obstacle_sensor: close_obstacle_sensor
|
||||
open_action:
|
||||
- logger.log: Open Action
|
||||
close_action:
|
||||
- logger.log: Close Action
|
||||
stop_action:
|
||||
- logger.log: Stop Action
|
39
tests/components/feedback/test.esp32-c3.yaml
Normal file
39
tests/components/feedback/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,39 @@
|
|||
binary_sensor:
|
||||
- platform: template
|
||||
id: open_endstop_sensor
|
||||
- platform: template
|
||||
id: open_sensor
|
||||
- platform: template
|
||||
id: open_obstacle_sensor
|
||||
- platform: template
|
||||
id: close_endstop_sensor
|
||||
- platform: template
|
||||
id: close_sensor
|
||||
- platform: template
|
||||
id: close_obstacle_sensor
|
||||
|
||||
cover:
|
||||
- platform: feedback
|
||||
name: Feedback Cover
|
||||
id: gate
|
||||
device_class: gate
|
||||
infer_endstop_from_movement: false
|
||||
has_built_in_endstop: false
|
||||
max_duration: 30s
|
||||
direction_change_wait_time: 300ms
|
||||
acceleration_wait_time: 150ms
|
||||
obstacle_rollback: 10%
|
||||
open_duration: 22.1s
|
||||
open_endstop: open_endstop_sensor
|
||||
open_sensor: open_sensor
|
||||
open_obstacle_sensor: open_obstacle_sensor
|
||||
close_duration: 22.4s
|
||||
close_endstop: close_endstop_sensor
|
||||
close_sensor: close_sensor
|
||||
close_obstacle_sensor: close_obstacle_sensor
|
||||
open_action:
|
||||
- logger.log: Open Action
|
||||
close_action:
|
||||
- logger.log: Close Action
|
||||
stop_action:
|
||||
- logger.log: Stop Action
|
39
tests/components/feedback/test.esp32-idf.yaml
Normal file
39
tests/components/feedback/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,39 @@
|
|||
binary_sensor:
|
||||
- platform: template
|
||||
id: open_endstop_sensor
|
||||
- platform: template
|
||||
id: open_sensor
|
||||
- platform: template
|
||||
id: open_obstacle_sensor
|
||||
- platform: template
|
||||
id: close_endstop_sensor
|
||||
- platform: template
|
||||
id: close_sensor
|
||||
- platform: template
|
||||
id: close_obstacle_sensor
|
||||
|
||||
cover:
|
||||
- platform: feedback
|
||||
name: Feedback Cover
|
||||
id: gate
|
||||
device_class: gate
|
||||
infer_endstop_from_movement: false
|
||||
has_built_in_endstop: false
|
||||
max_duration: 30s
|
||||
direction_change_wait_time: 300ms
|
||||
acceleration_wait_time: 150ms
|
||||
obstacle_rollback: 10%
|
||||
open_duration: 22.1s
|
||||
open_endstop: open_endstop_sensor
|
||||
open_sensor: open_sensor
|
||||
open_obstacle_sensor: open_obstacle_sensor
|
||||
close_duration: 22.4s
|
||||
close_endstop: close_endstop_sensor
|
||||
close_sensor: close_sensor
|
||||
close_obstacle_sensor: close_obstacle_sensor
|
||||
open_action:
|
||||
- logger.log: Open Action
|
||||
close_action:
|
||||
- logger.log: Close Action
|
||||
stop_action:
|
||||
- logger.log: Stop Action
|
39
tests/components/feedback/test.esp32.yaml
Normal file
39
tests/components/feedback/test.esp32.yaml
Normal file
|
@ -0,0 +1,39 @@
|
|||
binary_sensor:
|
||||
- platform: template
|
||||
id: open_endstop_sensor
|
||||
- platform: template
|
||||
id: open_sensor
|
||||
- platform: template
|
||||
id: open_obstacle_sensor
|
||||
- platform: template
|
||||
id: close_endstop_sensor
|
||||
- platform: template
|
||||
id: close_sensor
|
||||
- platform: template
|
||||
id: close_obstacle_sensor
|
||||
|
||||
cover:
|
||||
- platform: feedback
|
||||
name: Feedback Cover
|
||||
id: gate
|
||||
device_class: gate
|
||||
infer_endstop_from_movement: false
|
||||
has_built_in_endstop: false
|
||||
max_duration: 30s
|
||||
direction_change_wait_time: 300ms
|
||||
acceleration_wait_time: 150ms
|
||||
obstacle_rollback: 10%
|
||||
open_duration: 22.1s
|
||||
open_endstop: open_endstop_sensor
|
||||
open_sensor: open_sensor
|
||||
open_obstacle_sensor: open_obstacle_sensor
|
||||
close_duration: 22.4s
|
||||
close_endstop: close_endstop_sensor
|
||||
close_sensor: close_sensor
|
||||
close_obstacle_sensor: close_obstacle_sensor
|
||||
open_action:
|
||||
- logger.log: Open Action
|
||||
close_action:
|
||||
- logger.log: Close Action
|
||||
stop_action:
|
||||
- logger.log: Stop Action
|
39
tests/components/feedback/test.esp8266.yaml
Normal file
39
tests/components/feedback/test.esp8266.yaml
Normal file
|
@ -0,0 +1,39 @@
|
|||
binary_sensor:
|
||||
- platform: template
|
||||
id: open_endstop_sensor
|
||||
- platform: template
|
||||
id: open_sensor
|
||||
- platform: template
|
||||
id: open_obstacle_sensor
|
||||
- platform: template
|
||||
id: close_endstop_sensor
|
||||
- platform: template
|
||||
id: close_sensor
|
||||
- platform: template
|
||||
id: close_obstacle_sensor
|
||||
|
||||
cover:
|
||||
- platform: feedback
|
||||
name: Feedback Cover
|
||||
id: gate
|
||||
device_class: gate
|
||||
infer_endstop_from_movement: false
|
||||
has_built_in_endstop: false
|
||||
max_duration: 30s
|
||||
direction_change_wait_time: 300ms
|
||||
acceleration_wait_time: 150ms
|
||||
obstacle_rollback: 10%
|
||||
open_duration: 22.1s
|
||||
open_endstop: open_endstop_sensor
|
||||
open_sensor: open_sensor
|
||||
open_obstacle_sensor: open_obstacle_sensor
|
||||
close_duration: 22.4s
|
||||
close_endstop: close_endstop_sensor
|
||||
close_sensor: close_sensor
|
||||
close_obstacle_sensor: close_obstacle_sensor
|
||||
open_action:
|
||||
- logger.log: Open Action
|
||||
close_action:
|
||||
- logger.log: Close Action
|
||||
stop_action:
|
||||
- logger.log: Stop Action
|
39
tests/components/feedback/test.rp2040.yaml
Normal file
39
tests/components/feedback/test.rp2040.yaml
Normal file
|
@ -0,0 +1,39 @@
|
|||
binary_sensor:
|
||||
- platform: template
|
||||
id: open_endstop_sensor
|
||||
- platform: template
|
||||
id: open_sensor
|
||||
- platform: template
|
||||
id: open_obstacle_sensor
|
||||
- platform: template
|
||||
id: close_endstop_sensor
|
||||
- platform: template
|
||||
id: close_sensor
|
||||
- platform: template
|
||||
id: close_obstacle_sensor
|
||||
|
||||
cover:
|
||||
- platform: feedback
|
||||
name: Feedback Cover
|
||||
id: gate
|
||||
device_class: gate
|
||||
infer_endstop_from_movement: false
|
||||
has_built_in_endstop: false
|
||||
max_duration: 30s
|
||||
direction_change_wait_time: 300ms
|
||||
acceleration_wait_time: 150ms
|
||||
obstacle_rollback: 10%
|
||||
open_duration: 22.1s
|
||||
open_endstop: open_endstop_sensor
|
||||
open_sensor: open_sensor
|
||||
open_obstacle_sensor: open_obstacle_sensor
|
||||
close_duration: 22.4s
|
||||
close_endstop: close_endstop_sensor
|
||||
close_sensor: close_sensor
|
||||
close_obstacle_sensor: close_obstacle_sensor
|
||||
open_action:
|
||||
- logger.log: Open Action
|
||||
close_action:
|
||||
- logger.log: Close Action
|
||||
stop_action:
|
||||
- logger.log: Stop Action
|
56
tests/components/fingerprint_grow/test.esp32-c3-idf.yaml
Normal file
56
tests/components/fingerprint_grow/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,56 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- fingerprint_grow.enroll:
|
||||
finger_id: 2
|
||||
num_scans: 2
|
||||
- fingerprint_grow.cancel_enroll:
|
||||
- fingerprint_grow.delete:
|
||||
finger_id: 2
|
||||
- fingerprint_grow.delete_all:
|
||||
|
||||
uart:
|
||||
- id: uart_fingerprint_grow
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 57600
|
||||
|
||||
fingerprint_grow:
|
||||
sensing_pin: 6
|
||||
password: 0x12FE37DC
|
||||
new_password: 0xA65B9840
|
||||
on_finger_scan_start:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_start
|
||||
on_finger_scan_invalid:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_invalid
|
||||
on_finger_scan_matched:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_matched
|
||||
on_finger_scan_unmatched:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_unmatched
|
||||
on_finger_scan_misplaced:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_misplaced
|
||||
on_enrollment_scan:
|
||||
- logger.log: test_fingerprint_grow_enrollment_scan
|
||||
on_enrollment_done:
|
||||
- logger.log: test_fingerprint_grow_node_enrollment_done
|
||||
on_enrollment_failed:
|
||||
- logger.log: test_fingerprint_grow_enrollment_failed
|
||||
|
||||
binary_sensor:
|
||||
- platform: fingerprint_grow
|
||||
name: Fingerprint Enrolling
|
||||
|
||||
sensor:
|
||||
- platform: fingerprint_grow
|
||||
fingerprint_count:
|
||||
name: Fingerprint Count
|
||||
status:
|
||||
name: Fingerprint Status
|
||||
capacity:
|
||||
name: Fingerprint Capacity
|
||||
security_level:
|
||||
name: Fingerprint Security Level
|
||||
last_finger_id:
|
||||
name: Fingerprint Last Finger ID
|
||||
last_confidence:
|
||||
name: Fingerprint Last Confidence
|
56
tests/components/fingerprint_grow/test.esp32-c3.yaml
Normal file
56
tests/components/fingerprint_grow/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,56 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- fingerprint_grow.enroll:
|
||||
finger_id: 2
|
||||
num_scans: 2
|
||||
- fingerprint_grow.cancel_enroll:
|
||||
- fingerprint_grow.delete:
|
||||
finger_id: 2
|
||||
- fingerprint_grow.delete_all:
|
||||
|
||||
uart:
|
||||
- id: uart_fingerprint_grow
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 57600
|
||||
|
||||
fingerprint_grow:
|
||||
sensing_pin: 6
|
||||
password: 0x12FE37DC
|
||||
new_password: 0xA65B9840
|
||||
on_finger_scan_start:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_start
|
||||
on_finger_scan_invalid:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_invalid
|
||||
on_finger_scan_matched:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_matched
|
||||
on_finger_scan_unmatched:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_unmatched
|
||||
on_finger_scan_misplaced:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_misplaced
|
||||
on_enrollment_scan:
|
||||
- logger.log: test_fingerprint_grow_enrollment_scan
|
||||
on_enrollment_done:
|
||||
- logger.log: test_fingerprint_grow_node_enrollment_done
|
||||
on_enrollment_failed:
|
||||
- logger.log: test_fingerprint_grow_enrollment_failed
|
||||
|
||||
binary_sensor:
|
||||
- platform: fingerprint_grow
|
||||
name: Fingerprint Enrolling
|
||||
|
||||
sensor:
|
||||
- platform: fingerprint_grow
|
||||
fingerprint_count:
|
||||
name: Fingerprint Count
|
||||
status:
|
||||
name: Fingerprint Status
|
||||
capacity:
|
||||
name: Fingerprint Capacity
|
||||
security_level:
|
||||
name: Fingerprint Security Level
|
||||
last_finger_id:
|
||||
name: Fingerprint Last Finger ID
|
||||
last_confidence:
|
||||
name: Fingerprint Last Confidence
|
56
tests/components/fingerprint_grow/test.esp32-idf.yaml
Normal file
56
tests/components/fingerprint_grow/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,56 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- fingerprint_grow.enroll:
|
||||
finger_id: 2
|
||||
num_scans: 2
|
||||
- fingerprint_grow.cancel_enroll:
|
||||
- fingerprint_grow.delete:
|
||||
finger_id: 2
|
||||
- fingerprint_grow.delete_all:
|
||||
|
||||
uart:
|
||||
- id: uart_fingerprint_grow
|
||||
tx_pin: 17
|
||||
rx_pin: 16
|
||||
baud_rate: 57600
|
||||
|
||||
fingerprint_grow:
|
||||
sensing_pin: 18
|
||||
password: 0x12FE37DC
|
||||
new_password: 0xA65B9840
|
||||
on_finger_scan_start:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_start
|
||||
on_finger_scan_invalid:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_invalid
|
||||
on_finger_scan_matched:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_matched
|
||||
on_finger_scan_unmatched:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_unmatched
|
||||
on_finger_scan_misplaced:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_misplaced
|
||||
on_enrollment_scan:
|
||||
- logger.log: test_fingerprint_grow_enrollment_scan
|
||||
on_enrollment_done:
|
||||
- logger.log: test_fingerprint_grow_node_enrollment_done
|
||||
on_enrollment_failed:
|
||||
- logger.log: test_fingerprint_grow_enrollment_failed
|
||||
|
||||
binary_sensor:
|
||||
- platform: fingerprint_grow
|
||||
name: Fingerprint Enrolling
|
||||
|
||||
sensor:
|
||||
- platform: fingerprint_grow
|
||||
fingerprint_count:
|
||||
name: Fingerprint Count
|
||||
status:
|
||||
name: Fingerprint Status
|
||||
capacity:
|
||||
name: Fingerprint Capacity
|
||||
security_level:
|
||||
name: Fingerprint Security Level
|
||||
last_finger_id:
|
||||
name: Fingerprint Last Finger ID
|
||||
last_confidence:
|
||||
name: Fingerprint Last Confidence
|
56
tests/components/fingerprint_grow/test.esp32.yaml
Normal file
56
tests/components/fingerprint_grow/test.esp32.yaml
Normal file
|
@ -0,0 +1,56 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- fingerprint_grow.enroll:
|
||||
finger_id: 2
|
||||
num_scans: 2
|
||||
- fingerprint_grow.cancel_enroll:
|
||||
- fingerprint_grow.delete:
|
||||
finger_id: 2
|
||||
- fingerprint_grow.delete_all:
|
||||
|
||||
uart:
|
||||
- id: uart_fingerprint_grow
|
||||
tx_pin: 17
|
||||
rx_pin: 16
|
||||
baud_rate: 57600
|
||||
|
||||
fingerprint_grow:
|
||||
sensing_pin: 18
|
||||
password: 0x12FE37DC
|
||||
new_password: 0xA65B9840
|
||||
on_finger_scan_start:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_start
|
||||
on_finger_scan_invalid:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_invalid
|
||||
on_finger_scan_matched:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_matched
|
||||
on_finger_scan_unmatched:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_unmatched
|
||||
on_finger_scan_misplaced:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_misplaced
|
||||
on_enrollment_scan:
|
||||
- logger.log: test_fingerprint_grow_enrollment_scan
|
||||
on_enrollment_done:
|
||||
- logger.log: test_fingerprint_grow_node_enrollment_done
|
||||
on_enrollment_failed:
|
||||
- logger.log: test_fingerprint_grow_enrollment_failed
|
||||
|
||||
binary_sensor:
|
||||
- platform: fingerprint_grow
|
||||
name: Fingerprint Enrolling
|
||||
|
||||
sensor:
|
||||
- platform: fingerprint_grow
|
||||
fingerprint_count:
|
||||
name: Fingerprint Count
|
||||
status:
|
||||
name: Fingerprint Status
|
||||
capacity:
|
||||
name: Fingerprint Capacity
|
||||
security_level:
|
||||
name: Fingerprint Security Level
|
||||
last_finger_id:
|
||||
name: Fingerprint Last Finger ID
|
||||
last_confidence:
|
||||
name: Fingerprint Last Confidence
|
56
tests/components/fingerprint_grow/test.esp8266.yaml
Normal file
56
tests/components/fingerprint_grow/test.esp8266.yaml
Normal file
|
@ -0,0 +1,56 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- fingerprint_grow.enroll:
|
||||
finger_id: 2
|
||||
num_scans: 2
|
||||
- fingerprint_grow.cancel_enroll:
|
||||
- fingerprint_grow.delete:
|
||||
finger_id: 2
|
||||
- fingerprint_grow.delete_all:
|
||||
|
||||
uart:
|
||||
- id: uart_fingerprint_grow
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 57600
|
||||
|
||||
fingerprint_grow:
|
||||
sensing_pin: 16
|
||||
password: 0x12FE37DC
|
||||
new_password: 0xA65B9840
|
||||
on_finger_scan_start:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_start
|
||||
on_finger_scan_invalid:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_invalid
|
||||
on_finger_scan_matched:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_matched
|
||||
on_finger_scan_unmatched:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_unmatched
|
||||
on_finger_scan_misplaced:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_misplaced
|
||||
on_enrollment_scan:
|
||||
- logger.log: test_fingerprint_grow_enrollment_scan
|
||||
on_enrollment_done:
|
||||
- logger.log: test_fingerprint_grow_node_enrollment_done
|
||||
on_enrollment_failed:
|
||||
- logger.log: test_fingerprint_grow_enrollment_failed
|
||||
|
||||
binary_sensor:
|
||||
- platform: fingerprint_grow
|
||||
name: Fingerprint Enrolling
|
||||
|
||||
sensor:
|
||||
- platform: fingerprint_grow
|
||||
fingerprint_count:
|
||||
name: Fingerprint Count
|
||||
status:
|
||||
name: Fingerprint Status
|
||||
capacity:
|
||||
name: Fingerprint Capacity
|
||||
security_level:
|
||||
name: Fingerprint Security Level
|
||||
last_finger_id:
|
||||
name: Fingerprint Last Finger ID
|
||||
last_confidence:
|
||||
name: Fingerprint Last Confidence
|
56
tests/components/fingerprint_grow/test.rp2040.yaml
Normal file
56
tests/components/fingerprint_grow/test.rp2040.yaml
Normal file
|
@ -0,0 +1,56 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- fingerprint_grow.enroll:
|
||||
finger_id: 2
|
||||
num_scans: 2
|
||||
- fingerprint_grow.cancel_enroll:
|
||||
- fingerprint_grow.delete:
|
||||
finger_id: 2
|
||||
- fingerprint_grow.delete_all:
|
||||
|
||||
uart:
|
||||
- id: uart_fingerprint_grow
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 57600
|
||||
|
||||
fingerprint_grow:
|
||||
sensing_pin: 6
|
||||
password: 0x12FE37DC
|
||||
new_password: 0xA65B9840
|
||||
on_finger_scan_start:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_start
|
||||
on_finger_scan_invalid:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_invalid
|
||||
on_finger_scan_matched:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_matched
|
||||
on_finger_scan_unmatched:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_unmatched
|
||||
on_finger_scan_misplaced:
|
||||
- logger.log: test_fingerprint_grow_finger_scan_misplaced
|
||||
on_enrollment_scan:
|
||||
- logger.log: test_fingerprint_grow_enrollment_scan
|
||||
on_enrollment_done:
|
||||
- logger.log: test_fingerprint_grow_node_enrollment_done
|
||||
on_enrollment_failed:
|
||||
- logger.log: test_fingerprint_grow_enrollment_failed
|
||||
|
||||
binary_sensor:
|
||||
- platform: fingerprint_grow
|
||||
name: Fingerprint Enrolling
|
||||
|
||||
sensor:
|
||||
- platform: fingerprint_grow
|
||||
fingerprint_count:
|
||||
name: Fingerprint Count
|
||||
status:
|
||||
name: Fingerprint Status
|
||||
capacity:
|
||||
name: Fingerprint Capacity
|
||||
security_level:
|
||||
name: Fingerprint Security Level
|
||||
last_finger_id:
|
||||
name: Fingerprint Last Finger ID
|
||||
last_confidence:
|
||||
name: Fingerprint Last Confidence
|
19
tests/components/font/test.esp32-c3-idf.yaml
Normal file
19
tests/components/font/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
i2c:
|
||||
- id: i2c_font
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: roboto
|
||||
size: 20
|
19
tests/components/font/test.esp32-c3.yaml
Normal file
19
tests/components/font/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
i2c:
|
||||
- id: i2c_font
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: roboto
|
||||
size: 20
|
19
tests/components/font/test.esp32-idf.yaml
Normal file
19
tests/components/font/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
i2c:
|
||||
- id: i2c_font
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 13
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: roboto
|
||||
size: 20
|
19
tests/components/font/test.esp8266.yaml
Normal file
19
tests/components/font/test.esp8266.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
i2c:
|
||||
- id: i2c_font
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: roboto
|
||||
size: 20
|
19
tests/components/font/test.rp2040.yaml
Normal file
19
tests/components/font/test.rp2040.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
i2c:
|
||||
- id: i2c_font
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: roboto
|
||||
size: 20
|
10
tests/components/fs3000/test.esp32-c3-idf.yaml
Normal file
10
tests/components/fs3000/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
i2c:
|
||||
- id: i2c_fs3000
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: fs3000
|
||||
name: Air Velocity
|
||||
model: 1005
|
||||
update_interval: 60s
|
10
tests/components/fs3000/test.esp32-c3.yaml
Normal file
10
tests/components/fs3000/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
i2c:
|
||||
- id: i2c_fs3000
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: fs3000
|
||||
name: Air Velocity
|
||||
model: 1005
|
||||
update_interval: 60s
|
10
tests/components/fs3000/test.esp32-idf.yaml
Normal file
10
tests/components/fs3000/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
i2c:
|
||||
- id: i2c_fs3000
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
sensor:
|
||||
- platform: fs3000
|
||||
name: Air Velocity
|
||||
model: 1005
|
||||
update_interval: 60s
|
10
tests/components/fs3000/test.esp32.yaml
Normal file
10
tests/components/fs3000/test.esp32.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
i2c:
|
||||
- id: i2c_fs3000
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
sensor:
|
||||
- platform: fs3000
|
||||
name: Air Velocity
|
||||
model: 1005
|
||||
update_interval: 60s
|
10
tests/components/fs3000/test.esp8266.yaml
Normal file
10
tests/components/fs3000/test.esp8266.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
i2c:
|
||||
- id: i2c_fs3000
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: fs3000
|
||||
name: Air Velocity
|
||||
model: 1005
|
||||
update_interval: 60s
|
10
tests/components/fs3000/test.rp2040.yaml
Normal file
10
tests/components/fs3000/test.rp2040.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
i2c:
|
||||
- id: i2c_fs3000
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: fs3000
|
||||
name: Air Velocity
|
||||
model: 1005
|
||||
update_interval: 60s
|
21
tests/components/ft5x06/test.esp32-c3-idf.yaml
Normal file
21
tests/components/ft5x06/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
i2c:
|
||||
- id: i2c_ft5x06
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: ft5x06
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
21
tests/components/ft5x06/test.esp32-c3.yaml
Normal file
21
tests/components/ft5x06/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
i2c:
|
||||
- id: i2c_ft5x06
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: ft5x06
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
21
tests/components/ft5x06/test.esp32-idf.yaml
Normal file
21
tests/components/ft5x06/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
i2c:
|
||||
- id: i2c_ft5x06
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 18
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: ft5x06
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
21
tests/components/ft5x06/test.esp32.yaml
Normal file
21
tests/components/ft5x06/test.esp32.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
i2c:
|
||||
- id: i2c_ft5x06
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 18
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: ft5x06
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
21
tests/components/ft5x06/test.esp8266.yaml
Normal file
21
tests/components/ft5x06/test.esp8266.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
i2c:
|
||||
- id: i2c_ft5x06
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: ft5x06
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
21
tests/components/ft5x06/test.rp2040.yaml
Normal file
21
tests/components/ft5x06/test.rp2040.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
i2c:
|
||||
- id: i2c_ft5x06
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: ft5x06
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
21
tests/components/ft63x6/test.esp32-c3-idf.yaml
Normal file
21
tests/components/ft63x6/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
i2c:
|
||||
- id: i2c_ft63x6
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: ft63x6
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
21
tests/components/ft63x6/test.esp32-c3.yaml
Normal file
21
tests/components/ft63x6/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
i2c:
|
||||
- id: i2c_ft63x6
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: ft63x6
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
21
tests/components/ft63x6/test.esp32-idf.yaml
Normal file
21
tests/components/ft63x6/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
i2c:
|
||||
- id: i2c_ft63x6
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 18
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: ft63x6
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
21
tests/components/ft63x6/test.esp8266.yaml
Normal file
21
tests/components/ft63x6/test.esp8266.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
i2c:
|
||||
- id: i2c_ft63x6
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: ft63x6
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
21
tests/components/ft63x6/test.rp2040.yaml
Normal file
21
tests/components/ft63x6/test.rp2040.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
i2c:
|
||||
- id: i2c_ft63x6
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: ft63x6
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
7
tests/components/fujitsu_general/test.esp32-c3-idf.yaml
Normal file
7
tests/components/fujitsu_general/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
climate:
|
||||
- platform: fujitsu_general
|
||||
name: Fujitsu General Climate
|
7
tests/components/fujitsu_general/test.esp32-c3.yaml
Normal file
7
tests/components/fujitsu_general/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
climate:
|
||||
- platform: fujitsu_general
|
||||
name: Fujitsu General Climate
|
7
tests/components/fujitsu_general/test.esp32-idf.yaml
Normal file
7
tests/components/fujitsu_general/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
climate:
|
||||
- platform: fujitsu_general
|
||||
name: Fujitsu General Climate
|
7
tests/components/fujitsu_general/test.esp32.yaml
Normal file
7
tests/components/fujitsu_general/test.esp32.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
climate:
|
||||
- platform: fujitsu_general
|
||||
name: Fujitsu General Climate
|
7
tests/components/fujitsu_general/test.esp8266.yaml
Normal file
7
tests/components/fujitsu_general/test.esp8266.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
remote_transmitter:
|
||||
pin: 5
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
climate:
|
||||
- platform: fujitsu_general
|
||||
name: Fujitsu General Climate
|
25
tests/components/gcja5/test.esp32-c3-idf.yaml
Normal file
25
tests/components/gcja5/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
|
||||
sensor:
|
||||
- platform: gcja5
|
||||
pm_1_0:
|
||||
name: "Particulate Matter <1.0µm Concentration"
|
||||
pm_2_5:
|
||||
name: "Particulate Matter <2.5µm Concentration"
|
||||
pm_10_0:
|
||||
name: "Particulate Matter <10.0µm Concentration"
|
||||
pmc_0_5:
|
||||
name: "PMC 0.5"
|
||||
pmc_1_0:
|
||||
name: "PMC 1.0"
|
||||
pmc_2_5:
|
||||
name: "PMC 2.5"
|
||||
pmc_5_0:
|
||||
name: "PMC 5.0"
|
||||
pmc_10_0:
|
||||
name: "PMC 10.0"
|
25
tests/components/gcja5/test.esp32-c3.yaml
Normal file
25
tests/components/gcja5/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
|
||||
sensor:
|
||||
- platform: gcja5
|
||||
pm_1_0:
|
||||
name: "Particulate Matter <1.0µm Concentration"
|
||||
pm_2_5:
|
||||
name: "Particulate Matter <2.5µm Concentration"
|
||||
pm_10_0:
|
||||
name: "Particulate Matter <10.0µm Concentration"
|
||||
pmc_0_5:
|
||||
name: "PMC 0.5"
|
||||
pmc_1_0:
|
||||
name: "PMC 1.0"
|
||||
pmc_2_5:
|
||||
name: "PMC 2.5"
|
||||
pmc_5_0:
|
||||
name: "PMC 5.0"
|
||||
pmc_10_0:
|
||||
name: "PMC 10.0"
|
25
tests/components/gcja5/test.esp32-idf.yaml
Normal file
25
tests/components/gcja5/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: 17
|
||||
rx_pin: 16
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
|
||||
sensor:
|
||||
- platform: gcja5
|
||||
pm_1_0:
|
||||
name: "Particulate Matter <1.0µm Concentration"
|
||||
pm_2_5:
|
||||
name: "Particulate Matter <2.5µm Concentration"
|
||||
pm_10_0:
|
||||
name: "Particulate Matter <10.0µm Concentration"
|
||||
pmc_0_5:
|
||||
name: "PMC 0.5"
|
||||
pmc_1_0:
|
||||
name: "PMC 1.0"
|
||||
pmc_2_5:
|
||||
name: "PMC 2.5"
|
||||
pmc_5_0:
|
||||
name: "PMC 5.0"
|
||||
pmc_10_0:
|
||||
name: "PMC 10.0"
|
25
tests/components/gcja5/test.esp32.yaml
Normal file
25
tests/components/gcja5/test.esp32.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: 17
|
||||
rx_pin: 16
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
|
||||
sensor:
|
||||
- platform: gcja5
|
||||
pm_1_0:
|
||||
name: "Particulate Matter <1.0µm Concentration"
|
||||
pm_2_5:
|
||||
name: "Particulate Matter <2.5µm Concentration"
|
||||
pm_10_0:
|
||||
name: "Particulate Matter <10.0µm Concentration"
|
||||
pmc_0_5:
|
||||
name: "PMC 0.5"
|
||||
pmc_1_0:
|
||||
name: "PMC 1.0"
|
||||
pmc_2_5:
|
||||
name: "PMC 2.5"
|
||||
pmc_5_0:
|
||||
name: "PMC 5.0"
|
||||
pmc_10_0:
|
||||
name: "PMC 10.0"
|
25
tests/components/gcja5/test.esp8266.yaml
Normal file
25
tests/components/gcja5/test.esp8266.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
|
||||
sensor:
|
||||
- platform: gcja5
|
||||
pm_1_0:
|
||||
name: "Particulate Matter <1.0µm Concentration"
|
||||
pm_2_5:
|
||||
name: "Particulate Matter <2.5µm Concentration"
|
||||
pm_10_0:
|
||||
name: "Particulate Matter <10.0µm Concentration"
|
||||
pmc_0_5:
|
||||
name: "PMC 0.5"
|
||||
pmc_1_0:
|
||||
name: "PMC 1.0"
|
||||
pmc_2_5:
|
||||
name: "PMC 2.5"
|
||||
pmc_5_0:
|
||||
name: "PMC 5.0"
|
||||
pmc_10_0:
|
||||
name: "PMC 10.0"
|
25
tests/components/gcja5/test.rp2040.yaml
Normal file
25
tests/components/gcja5/test.rp2040.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
uart:
|
||||
- id: uart_gcja5
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
|
||||
sensor:
|
||||
- platform: gcja5
|
||||
pm_1_0:
|
||||
name: "Particulate Matter <1.0µm Concentration"
|
||||
pm_2_5:
|
||||
name: "Particulate Matter <2.5µm Concentration"
|
||||
pm_10_0:
|
||||
name: "Particulate Matter <10.0µm Concentration"
|
||||
pmc_0_5:
|
||||
name: "PMC 0.5"
|
||||
pmc_1_0:
|
||||
name: "PMC 1.0"
|
||||
pmc_2_5:
|
||||
name: "PMC 2.5"
|
||||
pmc_5_0:
|
||||
name: "PMC 5.0"
|
||||
pmc_10_0:
|
||||
name: "PMC 10.0"
|
28
tests/components/globals/test.esp32-c3-idf.yaml
Normal file
28
tests/components/globals/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,28 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- globals.set:
|
||||
id: glob_int
|
||||
value: "10"
|
||||
|
||||
globals:
|
||||
- id: glob_int
|
||||
type: int
|
||||
restore_value: true
|
||||
initial_value: "0"
|
||||
- id: glob_float
|
||||
type: float
|
||||
restore_value: true
|
||||
initial_value: "0.0f"
|
||||
- id: glob_bool
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: "true"
|
||||
- id: glob_string
|
||||
type: std::string
|
||||
restore_value: false
|
||||
# initial_value: ""
|
||||
- id: glob_bool_processed
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: "false"
|
28
tests/components/globals/test.esp32-c3.yaml
Normal file
28
tests/components/globals/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,28 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- globals.set:
|
||||
id: glob_int
|
||||
value: "10"
|
||||
|
||||
globals:
|
||||
- id: glob_int
|
||||
type: int
|
||||
restore_value: true
|
||||
initial_value: "0"
|
||||
- id: glob_float
|
||||
type: float
|
||||
restore_value: true
|
||||
initial_value: "0.0f"
|
||||
- id: glob_bool
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: "true"
|
||||
- id: glob_string
|
||||
type: std::string
|
||||
restore_value: false
|
||||
# initial_value: ""
|
||||
- id: glob_bool_processed
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: "false"
|
28
tests/components/globals/test.esp32-idf.yaml
Normal file
28
tests/components/globals/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,28 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- globals.set:
|
||||
id: glob_int
|
||||
value: "10"
|
||||
|
||||
globals:
|
||||
- id: glob_int
|
||||
type: int
|
||||
restore_value: true
|
||||
initial_value: "0"
|
||||
- id: glob_float
|
||||
type: float
|
||||
restore_value: true
|
||||
initial_value: "0.0f"
|
||||
- id: glob_bool
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: "true"
|
||||
- id: glob_string
|
||||
type: std::string
|
||||
restore_value: false
|
||||
# initial_value: ""
|
||||
- id: glob_bool_processed
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: "false"
|
28
tests/components/globals/test.esp32.yaml
Normal file
28
tests/components/globals/test.esp32.yaml
Normal file
|
@ -0,0 +1,28 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- globals.set:
|
||||
id: glob_int
|
||||
value: "10"
|
||||
|
||||
globals:
|
||||
- id: glob_int
|
||||
type: int
|
||||
restore_value: true
|
||||
initial_value: "0"
|
||||
- id: glob_float
|
||||
type: float
|
||||
restore_value: true
|
||||
initial_value: "0.0f"
|
||||
- id: glob_bool
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: "true"
|
||||
- id: glob_string
|
||||
type: std::string
|
||||
restore_value: false
|
||||
# initial_value: ""
|
||||
- id: glob_bool_processed
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: "false"
|
28
tests/components/globals/test.esp8266.yaml
Normal file
28
tests/components/globals/test.esp8266.yaml
Normal file
|
@ -0,0 +1,28 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- globals.set:
|
||||
id: glob_int
|
||||
value: "10"
|
||||
|
||||
globals:
|
||||
- id: glob_int
|
||||
type: int
|
||||
restore_value: true
|
||||
initial_value: "0"
|
||||
- id: glob_float
|
||||
type: float
|
||||
restore_value: true
|
||||
initial_value: "0.0f"
|
||||
- id: glob_bool
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: "true"
|
||||
- id: glob_string
|
||||
type: std::string
|
||||
restore_value: false
|
||||
# initial_value: ""
|
||||
- id: glob_bool_processed
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: "false"
|
28
tests/components/globals/test.rp2040.yaml
Normal file
28
tests/components/globals/test.rp2040.yaml
Normal file
|
@ -0,0 +1,28 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- globals.set:
|
||||
id: glob_int
|
||||
value: "10"
|
||||
|
||||
globals:
|
||||
- id: glob_int
|
||||
type: int
|
||||
restore_value: true
|
||||
initial_value: "0"
|
||||
- id: glob_float
|
||||
type: float
|
||||
restore_value: true
|
||||
initial_value: "0.0f"
|
||||
- id: glob_bool
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: "true"
|
||||
- id: glob_string
|
||||
type: std::string
|
||||
restore_value: false
|
||||
# initial_value: ""
|
||||
- id: glob_bool_processed
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: "false"
|
20
tests/components/gp8403/test.esp32-c3-idf.yaml
Normal file
20
tests/components/gp8403/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
gp8403:
|
||||
- id: gp8403_5v
|
||||
voltage: 5V
|
||||
- id: gp8403_10v
|
||||
voltage: 10V
|
||||
|
||||
output:
|
||||
- platform: gp8403
|
||||
id: gp8403_output_0
|
||||
gp8403_id: gp8403_5v
|
||||
channel: 0
|
||||
- platform: gp8403
|
||||
gp8403_id: gp8403_10v
|
||||
id: gp8403_output_1
|
||||
channel: 1
|
20
tests/components/gp8403/test.esp32-c3.yaml
Normal file
20
tests/components/gp8403/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
gp8403:
|
||||
- id: gp8403_5v
|
||||
voltage: 5V
|
||||
- id: gp8403_10v
|
||||
voltage: 10V
|
||||
|
||||
output:
|
||||
- platform: gp8403
|
||||
id: gp8403_output_0
|
||||
gp8403_id: gp8403_5v
|
||||
channel: 0
|
||||
- platform: gp8403
|
||||
gp8403_id: gp8403_10v
|
||||
id: gp8403_output_1
|
||||
channel: 1
|
20
tests/components/gp8403/test.esp32-idf.yaml
Normal file
20
tests/components/gp8403/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
gp8403:
|
||||
- id: gp8403_5v
|
||||
voltage: 5V
|
||||
- id: gp8403_10v
|
||||
voltage: 10V
|
||||
|
||||
output:
|
||||
- platform: gp8403
|
||||
id: gp8403_output_0
|
||||
gp8403_id: gp8403_5v
|
||||
channel: 0
|
||||
- platform: gp8403
|
||||
gp8403_id: gp8403_10v
|
||||
id: gp8403_output_1
|
||||
channel: 1
|
20
tests/components/gp8403/test.esp32.yaml
Normal file
20
tests/components/gp8403/test.esp32.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
gp8403:
|
||||
- id: gp8403_5v
|
||||
voltage: 5V
|
||||
- id: gp8403_10v
|
||||
voltage: 10V
|
||||
|
||||
output:
|
||||
- platform: gp8403
|
||||
id: gp8403_output_0
|
||||
gp8403_id: gp8403_5v
|
||||
channel: 0
|
||||
- platform: gp8403
|
||||
gp8403_id: gp8403_10v
|
||||
id: gp8403_output_1
|
||||
channel: 1
|
20
tests/components/gp8403/test.esp8266.yaml
Normal file
20
tests/components/gp8403/test.esp8266.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
gp8403:
|
||||
- id: gp8403_5v
|
||||
voltage: 5V
|
||||
- id: gp8403_10v
|
||||
voltage: 10V
|
||||
|
||||
output:
|
||||
- platform: gp8403
|
||||
id: gp8403_output_0
|
||||
gp8403_id: gp8403_5v
|
||||
channel: 0
|
||||
- platform: gp8403
|
||||
gp8403_id: gp8403_10v
|
||||
id: gp8403_output_1
|
||||
channel: 1
|
20
tests/components/gp8403/test.rp2040.yaml
Normal file
20
tests/components/gp8403/test.rp2040.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
i2c:
|
||||
- id: i2c_gp8403
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
gp8403:
|
||||
- id: gp8403_5v
|
||||
voltage: 5V
|
||||
- id: gp8403_10v
|
||||
voltage: 10V
|
||||
|
||||
output:
|
||||
- platform: gp8403
|
||||
id: gp8403_output_0
|
||||
gp8403_id: gp8403_5v
|
||||
channel: 0
|
||||
- platform: gp8403
|
||||
gp8403_id: gp8403_10v
|
||||
id: gp8403_output_1
|
||||
channel: 1
|
14
tests/components/gpio/test.esp32-c3-idf.yaml
Normal file
14
tests/components/gpio/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 2
|
||||
id: gpio_binary_sensor
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: 3
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 4
|
||||
id: gpio_switch
|
14
tests/components/gpio/test.esp32-c3.yaml
Normal file
14
tests/components/gpio/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 2
|
||||
id: gpio_binary_sensor
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: 3
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 4
|
||||
id: gpio_switch
|
14
tests/components/gpio/test.esp32-idf.yaml
Normal file
14
tests/components/gpio/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 12
|
||||
id: gpio_binary_sensor
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: 13
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 14
|
||||
id: gpio_switch
|
14
tests/components/gpio/test.esp32.yaml
Normal file
14
tests/components/gpio/test.esp32.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 12
|
||||
id: gpio_binary_sensor
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: 13
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 14
|
||||
id: gpio_switch
|
14
tests/components/gpio/test.esp8266.yaml
Normal file
14
tests/components/gpio/test.esp8266.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 12
|
||||
id: gpio_binary_sensor
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: 13
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 14
|
||||
id: gpio_switch
|
14
tests/components/gpio/test.rp2040.yaml
Normal file
14
tests/components/gpio/test.rp2040.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 2
|
||||
id: gpio_binary_sensor
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: 3
|
||||
id: gpio_output
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 4
|
||||
id: gpio_switch
|
14
tests/components/gps/test.esp32-c3.yaml
Normal file
14
tests/components/gps/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
uart:
|
||||
- id: uart_gps
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
|
||||
gps:
|
||||
|
||||
time:
|
||||
- platform: gps
|
||||
on_time_sync:
|
||||
then:
|
||||
logger.log: "It's time!"
|
14
tests/components/gps/test.esp32.yaml
Normal file
14
tests/components/gps/test.esp32.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
uart:
|
||||
- id: uart_gps
|
||||
tx_pin: 17
|
||||
rx_pin: 16
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
|
||||
gps:
|
||||
|
||||
time:
|
||||
- platform: gps
|
||||
on_time_sync:
|
||||
then:
|
||||
logger.log: "It's time!"
|
14
tests/components/gps/test.esp8266.yaml
Normal file
14
tests/components/gps/test.esp8266.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
uart:
|
||||
- id: uart_gps
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
|
||||
gps:
|
||||
|
||||
time:
|
||||
- platform: gps
|
||||
on_time_sync:
|
||||
then:
|
||||
logger.log: "It's time!"
|
14
tests/components/gps/test.rp2040.yaml
Normal file
14
tests/components/gps/test.rp2040.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
uart:
|
||||
- id: uart_gps
|
||||
tx_pin: 4
|
||||
rx_pin: 5
|
||||
baud_rate: 9600
|
||||
parity: EVEN
|
||||
|
||||
gps:
|
||||
|
||||
time:
|
||||
- platform: gps
|
||||
on_time_sync:
|
||||
then:
|
||||
logger.log: "It's time!"
|
25
tests/components/graph/test.esp32-c3-idf.yaml
Normal file
25
tests/components/graph/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
i2c:
|
||||
- id: i2c_graph
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
id: some_sensor
|
||||
|
||||
graph:
|
||||
- id: some_graph
|
||||
sensor: some_sensor
|
||||
duration: 1h
|
||||
width: 100
|
||||
height: 100
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
25
tests/components/graph/test.esp32-c3.yaml
Normal file
25
tests/components/graph/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
i2c:
|
||||
- id: i2c_graph
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
id: some_sensor
|
||||
|
||||
graph:
|
||||
- id: some_graph
|
||||
sensor: some_sensor
|
||||
duration: 1h
|
||||
width: 100
|
||||
height: 100
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 3
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
25
tests/components/graph/test.esp32-idf.yaml
Normal file
25
tests/components/graph/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
i2c:
|
||||
- id: i2c_graph
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
id: some_sensor
|
||||
|
||||
graph:
|
||||
- id: some_graph
|
||||
sensor: some_sensor
|
||||
duration: 1h
|
||||
width: 100
|
||||
height: 100
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 13
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
25
tests/components/graph/test.esp32.yaml
Normal file
25
tests/components/graph/test.esp32.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
i2c:
|
||||
- id: i2c_graph
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
id: some_sensor
|
||||
|
||||
graph:
|
||||
- id: some_graph
|
||||
sensor: some_sensor
|
||||
duration: 1h
|
||||
width: 100
|
||||
height: 100
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 13
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
25
tests/components/graph/test.esp8266.yaml
Normal file
25
tests/components/graph/test.esp8266.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
i2c:
|
||||
- id: i2c_graph
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
id: some_sensor
|
||||
|
||||
graph:
|
||||
- id: some_graph
|
||||
sensor: some_sensor
|
||||
duration: 1h
|
||||
width: 100
|
||||
height: 100
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: ssd1306_display
|
||||
model: SSD1306_128X64
|
||||
reset_pin: 13
|
||||
pages:
|
||||
- id: page1
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue