mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 09:44:12 +01:00
Merge branch 'esphome:dev' into custom_ble_server_111
This commit is contained in:
commit
894ef462c5
104 changed files with 383 additions and 10995 deletions
4
.github/actions/build-image/action.yaml
vendored
4
.github/actions/build-image/action.yaml
vendored
|
@ -46,7 +46,7 @@ runs:
|
|||
|
||||
- name: Build and push to ghcr by digest
|
||||
id: build-ghcr
|
||||
uses: docker/build-push-action@v6.0.1
|
||||
uses: docker/build-push-action@v6.2.0
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile
|
||||
|
@ -69,7 +69,7 @@ runs:
|
|||
|
||||
- name: Build and push to dockerhub by digest
|
||||
id: build-dockerhub
|
||||
uses: docker/build-push-action@v6.0.1
|
||||
uses: docker/build-push-action@v6.2.0
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile
|
||||
|
|
67
.github/workflows/ci.yml
vendored
67
.github/workflows/ci.yml
vendored
|
@ -248,72 +248,6 @@ jobs:
|
|||
run: script/ci-suggest-changes
|
||||
if: always()
|
||||
|
||||
compile-tests-list:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@v4.1.7
|
||||
- name: Find all YAML test files
|
||||
id: set-matrix
|
||||
run: echo "matrix=$(ls tests/test*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
|
||||
|
||||
validate-tests:
|
||||
name: Validate YAML test ${{ matrix.file }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- common
|
||||
- compile-tests-list
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
file: ${{ fromJson(needs.compile-tests-list.outputs.matrix) }}
|
||||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@v4.1.7
|
||||
- name: Restore Python
|
||||
uses: ./.github/actions/restore-python
|
||||
with:
|
||||
python-version: ${{ env.DEFAULT_PYTHON }}
|
||||
cache-key: ${{ needs.common.outputs.cache-key }}
|
||||
- name: Run esphome config ${{ matrix.file }}
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
esphome config ${{ matrix.file }}
|
||||
|
||||
compile-tests:
|
||||
name: Run YAML test ${{ matrix.file }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- common
|
||||
- black
|
||||
- ci-custom
|
||||
- clang-format
|
||||
- flake8
|
||||
- pylint
|
||||
- pytest
|
||||
- pyupgrade
|
||||
- compile-tests-list
|
||||
- validate-tests
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 2
|
||||
matrix:
|
||||
file: ${{ fromJson(needs.compile-tests-list.outputs.matrix) }}
|
||||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@v4.1.7
|
||||
- name: Restore Python
|
||||
uses: ./.github/actions/restore-python
|
||||
with:
|
||||
python-version: ${{ env.DEFAULT_PYTHON }}
|
||||
cache-key: ${{ needs.common.outputs.cache-key }}
|
||||
- name: Run esphome compile ${{ matrix.file }}
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
esphome compile ${{ matrix.file }}
|
||||
|
||||
clang-tidy:
|
||||
name: ${{ matrix.name }}
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -550,7 +484,6 @@ jobs:
|
|||
- pylint
|
||||
- pytest
|
||||
- pyupgrade
|
||||
- compile-tests
|
||||
- clang-tidy
|
||||
- list-components
|
||||
- test-build-components
|
||||
|
|
|
@ -60,6 +60,7 @@ from esphome.cpp_types import ( # noqa
|
|||
std_ns,
|
||||
std_shared_ptr,
|
||||
std_string,
|
||||
std_string_ref,
|
||||
std_vector,
|
||||
uint8,
|
||||
uint16,
|
||||
|
|
|
@ -145,24 +145,21 @@ bool DallasTemperatureSensor::check_scratch_pad_() {
|
|||
float DallasTemperatureSensor::get_temp_c_() {
|
||||
int16_t temp = (this->scratch_pad_[1] << 8) | this->scratch_pad_[0];
|
||||
if ((this->address_ & 0xff) == DALLAS_MODEL_DS18S20) {
|
||||
if (this->scratch_pad_[7] != 0x10)
|
||||
ESP_LOGE(TAG, "unexpected COUNT_PER_C value: %u", this->scratch_pad_[7]);
|
||||
temp = ((temp & 0xfff7) << 3) + (0x10 - this->scratch_pad_[6]) - 4;
|
||||
} else {
|
||||
switch (this->resolution_) {
|
||||
case 9:
|
||||
temp &= 0xfff8;
|
||||
break;
|
||||
case 10:
|
||||
temp &= 0xfffc;
|
||||
break;
|
||||
case 11:
|
||||
temp &= 0xfffe;
|
||||
break;
|
||||
case 12:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return (temp >> 1) + (this->scratch_pad_[7] - this->scratch_pad_[6]) / float(this->scratch_pad_[7]) - 0.25;
|
||||
}
|
||||
switch (this->resolution_) {
|
||||
case 9:
|
||||
temp &= 0xfff8;
|
||||
break;
|
||||
case 10:
|
||||
temp &= 0xfffc;
|
||||
break;
|
||||
case 11:
|
||||
temp &= 0xfffe;
|
||||
break;
|
||||
case 12:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return temp / 16.0f;
|
||||
|
|
|
@ -12,7 +12,7 @@ std::string DebugComponent::get_reset_reason_() { return lt_get_reboot_reason_na
|
|||
uint32_t DebugComponent::get_free_heap_() { return lt_heap_get_free(); }
|
||||
|
||||
void DebugComponent::get_device_info_(std::string &device_info) {
|
||||
str::string reset_reason = get_reset_reason_();
|
||||
std::string reset_reason = get_reset_reason_();
|
||||
ESP_LOGD(TAG, "LibreTiny Version: %s", lt_get_version());
|
||||
ESP_LOGD(TAG, "Chip: %s (%04x) @ %u MHz", lt_cpu_get_model_name(), lt_cpu_get_model(), lt_cpu_get_freq_mhz());
|
||||
ESP_LOGD(TAG, "Chip ID: 0x%06X", lt_cpu_get_mac_id());
|
||||
|
|
|
@ -37,14 +37,18 @@ void DS1307Component::read_time() {
|
|||
ESP_LOGW(TAG, "RTC halted, not syncing to system clock.");
|
||||
return;
|
||||
}
|
||||
ESPTime rtc_time{.second = uint8_t(ds1307_.reg.second + 10 * ds1307_.reg.second_10),
|
||||
.minute = uint8_t(ds1307_.reg.minute + 10u * ds1307_.reg.minute_10),
|
||||
.hour = uint8_t(ds1307_.reg.hour + 10u * ds1307_.reg.hour_10),
|
||||
.day_of_week = uint8_t(ds1307_.reg.weekday),
|
||||
.day_of_month = uint8_t(ds1307_.reg.day + 10u * ds1307_.reg.day_10),
|
||||
.day_of_year = 1, // ignored by recalc_timestamp_utc(false)
|
||||
.month = uint8_t(ds1307_.reg.month + 10u * ds1307_.reg.month_10),
|
||||
.year = uint16_t(ds1307_.reg.year + 10u * ds1307_.reg.year_10 + 2000)};
|
||||
ESPTime rtc_time{
|
||||
.second = uint8_t(ds1307_.reg.second + 10 * ds1307_.reg.second_10),
|
||||
.minute = uint8_t(ds1307_.reg.minute + 10u * ds1307_.reg.minute_10),
|
||||
.hour = uint8_t(ds1307_.reg.hour + 10u * ds1307_.reg.hour_10),
|
||||
.day_of_week = uint8_t(ds1307_.reg.weekday),
|
||||
.day_of_month = uint8_t(ds1307_.reg.day + 10u * ds1307_.reg.day_10),
|
||||
.day_of_year = 1, // ignored by recalc_timestamp_utc(false)
|
||||
.month = uint8_t(ds1307_.reg.month + 10u * ds1307_.reg.month_10),
|
||||
.year = uint16_t(ds1307_.reg.year + 10u * ds1307_.reg.year_10 + 2000),
|
||||
.is_dst = false, // not used
|
||||
.timestamp = 0 // overwritten by recalc_timestamp_utc(false)
|
||||
};
|
||||
rtc_time.recalc_timestamp_utc(false);
|
||||
if (!rtc_time.is_valid()) {
|
||||
ESP_LOGE(TAG, "Invalid RTC time, not syncing to system clock.");
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
import logging
|
||||
|
||||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
import esphome.final_validate as fv
|
||||
from esphome.components.ota import BASE_OTA_SCHEMA, ota_to_code, OTAComponent
|
||||
from esphome.config_helpers import merge_config
|
||||
from esphome.const import (
|
||||
CONF_ESPHOME,
|
||||
CONF_ID,
|
||||
CONF_NUM_ATTEMPTS,
|
||||
CONF_OTA,
|
||||
CONF_PASSWORD,
|
||||
CONF_PLATFORM,
|
||||
CONF_PORT,
|
||||
CONF_REBOOT_TIMEOUT,
|
||||
CONF_SAFE_MODE,
|
||||
|
@ -12,6 +19,8 @@ from esphome.const import (
|
|||
)
|
||||
from esphome.core import coroutine_with_priority
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
CODEOWNERS = ["@esphome/core"]
|
||||
AUTO_LOAD = ["md5", "socket"]
|
||||
|
@ -21,6 +30,65 @@ esphome = cg.esphome_ns.namespace("esphome")
|
|||
ESPHomeOTAComponent = esphome.class_("ESPHomeOTAComponent", OTAComponent)
|
||||
|
||||
|
||||
def ota_esphome_final_validate(config):
|
||||
full_conf = fv.full_config.get()
|
||||
full_ota_conf = full_conf[CONF_OTA]
|
||||
new_ota_conf = []
|
||||
merged_ota_esphome_configs_by_port = {}
|
||||
ports_with_merged_configs = []
|
||||
for ota_conf in full_ota_conf:
|
||||
if ota_conf.get(CONF_PLATFORM) == CONF_ESPHOME:
|
||||
if (
|
||||
conf_port := ota_conf.get(CONF_PORT)
|
||||
) not in merged_ota_esphome_configs_by_port:
|
||||
merged_ota_esphome_configs_by_port[conf_port] = ota_conf
|
||||
else:
|
||||
if merged_ota_esphome_configs_by_port[conf_port][
|
||||
CONF_VERSION
|
||||
] != ota_conf.get(CONF_VERSION):
|
||||
raise cv.Invalid(
|
||||
f"Found multiple configurations but {CONF_VERSION} is inconsistent"
|
||||
)
|
||||
if (
|
||||
merged_ota_esphome_configs_by_port[conf_port][CONF_ID].is_manual
|
||||
and ota_conf.get(CONF_ID).is_manual
|
||||
):
|
||||
raise cv.Invalid(
|
||||
f"Found multiple configurations but {CONF_ID} is inconsistent"
|
||||
)
|
||||
if (
|
||||
CONF_PASSWORD in merged_ota_esphome_configs_by_port[conf_port]
|
||||
and CONF_PASSWORD in ota_conf
|
||||
and merged_ota_esphome_configs_by_port[conf_port][CONF_PASSWORD]
|
||||
!= ota_conf.get(CONF_PASSWORD)
|
||||
):
|
||||
raise cv.Invalid(
|
||||
f"Found multiple configurations but {CONF_PASSWORD} is inconsistent"
|
||||
)
|
||||
|
||||
ports_with_merged_configs.append(conf_port)
|
||||
merged_ota_esphome_configs_by_port[conf_port] = merge_config(
|
||||
merged_ota_esphome_configs_by_port[conf_port], ota_conf
|
||||
)
|
||||
else:
|
||||
new_ota_conf.append(ota_conf)
|
||||
|
||||
for port_conf in merged_ota_esphome_configs_by_port.values():
|
||||
new_ota_conf.append(port_conf)
|
||||
|
||||
full_conf[CONF_OTA] = new_ota_conf
|
||||
fv.full_config.set(full_conf)
|
||||
|
||||
if len(ports_with_merged_configs) > 0:
|
||||
_LOGGER.warning(
|
||||
"Found and merged multiple configurations for %s %s %s port(s) %s",
|
||||
CONF_OTA,
|
||||
CONF_PLATFORM,
|
||||
CONF_ESPHOME,
|
||||
ports_with_merged_configs,
|
||||
)
|
||||
|
||||
|
||||
CONFIG_SCHEMA = (
|
||||
cv.Schema(
|
||||
{
|
||||
|
@ -50,6 +118,8 @@ CONFIG_SCHEMA = (
|
|||
.extend(cv.COMPONENT_SCHEMA)
|
||||
)
|
||||
|
||||
FINAL_VALIDATE_SCHEMA = ota_esphome_final_validate
|
||||
|
||||
|
||||
@coroutine_with_priority(52.0)
|
||||
async def to_code(config):
|
||||
|
|
|
@ -17,7 +17,6 @@ from esphome.helpers import (
|
|||
cpp_string_escape,
|
||||
)
|
||||
from esphome.const import (
|
||||
__version__,
|
||||
CONF_FAMILY,
|
||||
CONF_FILE,
|
||||
CONF_GLYPHS,
|
||||
|
@ -185,31 +184,6 @@ def get_font_path(value, type) -> Path:
|
|||
return None
|
||||
|
||||
|
||||
def download_content(url: str, path: Path) -> None:
|
||||
if not external_files.has_remote_file_changed(url, path):
|
||||
_LOGGER.debug("Remote file has not changed %s", url)
|
||||
return
|
||||
|
||||
_LOGGER.debug(
|
||||
"Remote file has changed, downloading from %s to %s",
|
||||
url,
|
||||
path,
|
||||
)
|
||||
|
||||
try:
|
||||
req = requests.get(
|
||||
url,
|
||||
timeout=external_files.NETWORK_TIMEOUT,
|
||||
headers={"User-agent": f"ESPHome/{__version__} (https://esphome.io)"},
|
||||
)
|
||||
req.raise_for_status()
|
||||
except requests.exceptions.RequestException as e:
|
||||
raise cv.Invalid(f"Could not download from {url}: {e}")
|
||||
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_bytes(req.content)
|
||||
|
||||
|
||||
def download_gfont(value):
|
||||
name = (
|
||||
f"{value[CONF_FAMILY]}:ital,wght@{int(value[CONF_ITALIC])},{value[CONF_WEIGHT]}"
|
||||
|
@ -236,7 +210,7 @@ def download_gfont(value):
|
|||
ttf_url = match.group(1)
|
||||
_LOGGER.debug("download_gfont: ttf_url=%s", ttf_url)
|
||||
|
||||
download_content(ttf_url, path)
|
||||
external_files.download_content(ttf_url, path)
|
||||
return value
|
||||
|
||||
|
||||
|
@ -244,7 +218,7 @@ def download_web_font(value):
|
|||
url = value[CONF_URL]
|
||||
path = get_font_path(value, TYPE_WEB)
|
||||
|
||||
download_content(url, path)
|
||||
external_files.download_content(url, path)
|
||||
_LOGGER.debug("download_web_font: path=%s", path)
|
||||
return value
|
||||
|
||||
|
|
|
@ -9,6 +9,10 @@ static const char *const TAG = "gpio.one_wire";
|
|||
|
||||
void GPIOOneWireBus::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up 1-wire bus...");
|
||||
this->t_pin_->setup();
|
||||
// clear bus with 480µs high, otherwise initial reset in search might fail
|
||||
this->t_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
|
||||
delayMicroseconds(480);
|
||||
this->search();
|
||||
}
|
||||
|
||||
|
@ -90,13 +94,15 @@ bool HOT IRAM_ATTR GPIOOneWireBus::read_bit_() {
|
|||
|
||||
// measure from start value directly, to get best accurate timing no matter
|
||||
// how long pin_mode/delayMicroseconds took
|
||||
delayMicroseconds(12 - (micros() - start));
|
||||
uint32_t now = micros();
|
||||
if (now - start < 12)
|
||||
delayMicroseconds(12 - (now - start));
|
||||
|
||||
// sample bus to read bit from peer
|
||||
bool r = pin_.digital_read();
|
||||
|
||||
// read slot is at least 60µs; get as close to 60µs to spend less time with interrupts locked
|
||||
uint32_t now = micros();
|
||||
now = micros();
|
||||
if (now - start < 60)
|
||||
delayMicroseconds(60 - (now - start));
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ SENSOR_TYPES = {
|
|||
|
||||
CONFIG_SCHEMA = cv.Schema(
|
||||
{
|
||||
cv.Required(CONF_HAIER_ID): cv.use_id(HonClimate),
|
||||
cv.GenerateID(CONF_HAIER_ID): cv.use_id(HonClimate),
|
||||
}
|
||||
).extend({cv.Optional(type): schema for type, schema in SENSOR_TYPES.items()})
|
||||
|
||||
|
@ -64,8 +64,8 @@ CONFIG_SCHEMA = cv.Schema(
|
|||
async def to_code(config):
|
||||
paren = await cg.get_variable(config[CONF_HAIER_ID])
|
||||
|
||||
for type, _ in SENSOR_TYPES.items():
|
||||
if conf := config.get(type):
|
||||
for type_ in SENSOR_TYPES:
|
||||
if conf := config.get(type_):
|
||||
sens = await binary_sensor.new_binary_sensor(conf)
|
||||
binary_sensor_type = getattr(BinarySensorTypeEnum, type.upper())
|
||||
binary_sensor_type = getattr(BinarySensorTypeEnum, type_.upper())
|
||||
cg.add(paren.set_sub_binary_sensor(binary_sensor_type, sens))
|
||||
|
|
|
@ -21,7 +21,7 @@ ICON_SPRAY_BOTTLE = "mdi:spray-bottle"
|
|||
|
||||
CONFIG_SCHEMA = cv.Schema(
|
||||
{
|
||||
cv.Required(CONF_HAIER_ID): cv.use_id(HonClimate),
|
||||
cv.GenerateID(CONF_HAIER_ID): cv.use_id(HonClimate),
|
||||
cv.Optional(CONF_SELF_CLEANING): button.button_schema(
|
||||
SelfCleaningButton,
|
||||
icon=ICON_SPRAY_BOTTLE,
|
||||
|
|
|
@ -183,7 +183,6 @@ BASE_CONFIG_SCHEMA = (
|
|||
cv.Optional(
|
||||
CONF_SUPPORTED_SWING_MODES,
|
||||
default=[
|
||||
"OFF",
|
||||
"VERTICAL",
|
||||
"HORIZONTAL",
|
||||
"BOTH",
|
||||
|
@ -211,7 +210,7 @@ CONFIG_SCHEMA = cv.All(
|
|||
): cv.boolean,
|
||||
cv.Optional(
|
||||
CONF_SUPPORTED_PRESETS,
|
||||
default=list(["BOOST", "COMFORT"]), # No AWAY by default
|
||||
default=["BOOST", "COMFORT"], # No AWAY by default
|
||||
): cv.ensure_list(
|
||||
cv.enum(SUPPORTED_CLIMATE_PRESETS_SMARTAIR2_OPTIONS, upper=True)
|
||||
),
|
||||
|
@ -231,7 +230,7 @@ CONFIG_SCHEMA = cv.All(
|
|||
): cv.int_range(min=PROTOCOL_CONTROL_PACKET_SIZE, max=50),
|
||||
cv.Optional(
|
||||
CONF_SUPPORTED_PRESETS,
|
||||
default=list(["BOOST", "ECO", "SLEEP"]), # No AWAY by default
|
||||
default=["BOOST", "ECO", "SLEEP"], # No AWAY by default
|
||||
): cv.ensure_list(
|
||||
cv.enum(SUPPORTED_CLIMATE_PRESETS_HON_OPTIONS, upper=True)
|
||||
),
|
||||
|
@ -427,11 +426,7 @@ def _final_validate(config):
|
|||
"No logger component found, logging for Haier protocol is disabled"
|
||||
)
|
||||
cg.add_build_flag("-DHAIER_LOG_LEVEL=0")
|
||||
if (
|
||||
(CONF_WIFI_SIGNAL in config)
|
||||
and (config[CONF_WIFI_SIGNAL])
|
||||
and CONF_WIFI not in full_config
|
||||
):
|
||||
if config.get(CONF_WIFI_SIGNAL) and CONF_WIFI not in full_config:
|
||||
raise cv.Invalid(
|
||||
f"No WiFi configured, if you want to use haier climate without WiFi add {CONF_WIFI_SIGNAL}: false to climate configuration"
|
||||
)
|
||||
|
|
|
@ -137,16 +137,16 @@ SENSOR_TYPES = {
|
|||
|
||||
CONFIG_SCHEMA = cv.Schema(
|
||||
{
|
||||
cv.Required(CONF_HAIER_ID): cv.use_id(HonClimate),
|
||||
cv.GenerateID(CONF_HAIER_ID): cv.use_id(HonClimate),
|
||||
}
|
||||
).extend({cv.Optional(type): schema for type, schema in SENSOR_TYPES.items()})
|
||||
).extend({cv.Optional(type_): schema for type_, schema in SENSOR_TYPES.items()})
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
paren = await cg.get_variable(config[CONF_HAIER_ID])
|
||||
|
||||
for type, _ in SENSOR_TYPES.items():
|
||||
if conf := config.get(type):
|
||||
for type_ in SENSOR_TYPES:
|
||||
if conf := config.get(type_):
|
||||
sens = await sensor.new_sensor(conf)
|
||||
sensor_type = getattr(SensorTypeEnum, type.upper())
|
||||
sensor_type = getattr(SensorTypeEnum, type_.upper())
|
||||
cg.add(paren.set_sub_sensor(sensor_type, sens))
|
||||
|
|
|
@ -39,7 +39,7 @@ TEXT_SENSOR_TYPES = {
|
|||
|
||||
CONFIG_SCHEMA = cv.Schema(
|
||||
{
|
||||
cv.Required(CONF_HAIER_ID): cv.use_id(HonClimate),
|
||||
cv.GenerateID(CONF_HAIER_ID): cv.use_id(HonClimate),
|
||||
}
|
||||
).extend({cv.Optional(type): schema for type, schema in TEXT_SENSOR_TYPES.items()})
|
||||
|
||||
|
@ -47,8 +47,8 @@ CONFIG_SCHEMA = cv.Schema(
|
|||
async def to_code(config):
|
||||
paren = await cg.get_variable(config[CONF_HAIER_ID])
|
||||
|
||||
for type, _ in TEXT_SENSOR_TYPES.items():
|
||||
if conf := config.get(type):
|
||||
for type_ in TEXT_SENSOR_TYPES:
|
||||
if conf := config.get(type_):
|
||||
sens = await text_sensor.new_text_sensor(conf)
|
||||
text_sensor_type = getattr(TextSensorTypeEnum, type.upper())
|
||||
text_sensor_type = getattr(TextSensorTypeEnum, type_.upper())
|
||||
cg.add(paren.set_sub_text_sensor(text_sensor_type, sens))
|
||||
|
|
|
@ -34,6 +34,7 @@ PROTOCOLS = {
|
|||
"greeyan": Protocol.PROTOCOL_GREEYAN,
|
||||
"greeyac": Protocol.PROTOCOL_GREEYAC,
|
||||
"greeyt": Protocol.PROTOCOL_GREEYT,
|
||||
"greeyap": Protocol.PROTOCOL_GREEYAP,
|
||||
"hisense_aud": Protocol.PROTOCOL_HISENSE_AUD,
|
||||
"hitachi": Protocol.PROTOCOL_HITACHI,
|
||||
"hyundai": Protocol.PROTOCOL_HYUNDAI,
|
||||
|
@ -61,6 +62,11 @@ PROTOCOLS = {
|
|||
"toshiba_daiseikai": Protocol.PROTOCOL_TOSHIBA_DAISEIKAI,
|
||||
"toshiba": Protocol.PROTOCOL_TOSHIBA,
|
||||
"zhlt01": Protocol.PROTOCOL_ZHLT01,
|
||||
"nibe": Protocol.PROTOCOL_NIBE,
|
||||
"carrier_qlima_1": Protocol.PROTOCOL_QLIMA_1,
|
||||
"carrier_qlima_2": Protocol.PROTOCOL_QLIMA_2,
|
||||
"samsung_aqv12msan": Protocol.PROTOCOL_SAMSUNG_AQV12MSAN,
|
||||
"zhjg01": Protocol.PROTOCOL_ZHJG01,
|
||||
}
|
||||
|
||||
CONF_HORIZONTAL_DEFAULT = "horizontal_default"
|
||||
|
@ -116,7 +122,7 @@ def to_code(config):
|
|||
cg.add(var.set_max_temperature(config[CONF_MAX_TEMPERATURE]))
|
||||
cg.add(var.set_min_temperature(config[CONF_MIN_TEMPERATURE]))
|
||||
|
||||
cg.add_library("tonia/HeatpumpIR", "1.0.23")
|
||||
cg.add_library("tonia/HeatpumpIR", "1.0.26")
|
||||
|
||||
if CORE.is_esp8266 or CORE.is_esp32:
|
||||
cg.add_library("crankyoldgit/IRremoteESP8266", "2.8.4")
|
||||
cg.add_library("crankyoldgit/IRremoteESP8266", "2.8.6")
|
||||
|
|
|
@ -28,6 +28,7 @@ const std::map<Protocol, std::function<HeatpumpIR *()>> PROTOCOL_CONSTRUCTOR_MAP
|
|||
{PROTOCOL_GREEYAN, []() { return new GreeYANHeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_GREEYAC, []() { return new GreeYACHeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_GREEYT, []() { return new GreeYTHeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_GREEYAP, []() { return new GreeYAPHeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_HISENSE_AUD, []() { return new HisenseHeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_HITACHI, []() { return new HitachiHeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_HYUNDAI, []() { return new HyundaiHeatpumpIR(); }}, // NOLINT
|
||||
|
@ -55,6 +56,11 @@ const std::map<Protocol, std::function<HeatpumpIR *()>> PROTOCOL_CONSTRUCTOR_MAP
|
|||
{PROTOCOL_TOSHIBA_DAISEIKAI, []() { return new ToshibaDaiseikaiHeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_TOSHIBA, []() { return new ToshibaHeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_ZHLT01, []() { return new ZHLT01HeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_NIBE, []() { return new NibeHeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_QLIMA_1, []() { return new Qlima1HeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_QLIMA_2, []() { return new Qlima2HeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_SAMSUNG_AQV12MSAN, []() { return new SamsungAQV12MSANHeatpumpIR(); }}, // NOLINT
|
||||
{PROTOCOL_ZHJG01, []() { return new ZHJG01HeatpumpIR(); }}, // NOLINT
|
||||
};
|
||||
|
||||
void HeatpumpIRClimate::setup() {
|
||||
|
|
|
@ -28,6 +28,7 @@ enum Protocol {
|
|||
PROTOCOL_GREEYAN,
|
||||
PROTOCOL_GREEYAC,
|
||||
PROTOCOL_GREEYT,
|
||||
PROTOCOL_GREEYAP,
|
||||
PROTOCOL_HISENSE_AUD,
|
||||
PROTOCOL_HITACHI,
|
||||
PROTOCOL_HYUNDAI,
|
||||
|
@ -55,6 +56,11 @@ enum Protocol {
|
|||
PROTOCOL_TOSHIBA_DAISEIKAI,
|
||||
PROTOCOL_TOSHIBA,
|
||||
PROTOCOL_ZHLT01,
|
||||
PROTOCOL_NIBE,
|
||||
PROTOCOL_QLIMA_1,
|
||||
PROTOCOL_QLIMA_2,
|
||||
PROTOCOL_SAMSUNG_AQV12MSAN,
|
||||
PROTOCOL_ZHJG01,
|
||||
};
|
||||
|
||||
// Simple enum to represent horizontal directios
|
||||
|
|
|
@ -257,7 +257,7 @@ async def http_request_action_to_code(config, action_id, template_arg, args):
|
|||
trigger,
|
||||
[
|
||||
(cg.std_shared_ptr.template(HttpContainer), "response"),
|
||||
(cg.std_string, "body"),
|
||||
(cg.std_string_ref, "body"),
|
||||
],
|
||||
conf,
|
||||
)
|
||||
|
|
|
@ -43,10 +43,10 @@ class HttpContainer : public Parented<HttpRequestComponent> {
|
|||
bool secure_{false};
|
||||
};
|
||||
|
||||
class HttpRequestResponseTrigger : public Trigger<std::shared_ptr<HttpContainer>, std::string> {
|
||||
class HttpRequestResponseTrigger : public Trigger<std::shared_ptr<HttpContainer>, std::string &> {
|
||||
public:
|
||||
void process(std::shared_ptr<HttpContainer> container, std::string response_body) {
|
||||
this->trigger(std::move(container), std::move(response_body));
|
||||
void process(std::shared_ptr<HttpContainer> container, std::string &response_body) {
|
||||
this->trigger(std::move(container), response_body);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -149,11 +149,21 @@ template<typename... Ts> class HttpRequestSendAction : public Action<Ts...> {
|
|||
}
|
||||
response_body.reserve(read_index);
|
||||
response_body.assign((char *) buf, read_index);
|
||||
allocator.deallocate(buf, max_length);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto *trigger : this->response_triggers_) {
|
||||
trigger->process(container, response_body);
|
||||
if (this->response_triggers_.size() == 1) {
|
||||
// if there is only one trigger, no need to copy the response body
|
||||
this->response_triggers_[0]->process(container, response_body);
|
||||
} else {
|
||||
for (auto *trigger : this->response_triggers_) {
|
||||
// with multiple triggers, pass a copy of the response body to each
|
||||
// one so that modifications made in one trigger are not visible to
|
||||
// the others
|
||||
auto response_body_copy = std::string(response_body);
|
||||
trigger->process(container, response_body_copy);
|
||||
}
|
||||
}
|
||||
container->end();
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ std::shared_ptr<HttpContainer> HttpRequestIDF::start(std::string url, std::strin
|
|||
int write_left = body_len;
|
||||
int write_index = 0;
|
||||
const char *buf = body.c_str();
|
||||
while (body_len > 0) {
|
||||
while (write_left > 0) {
|
||||
int written = esp_http_client_write(client, buf + write_index, write_left);
|
||||
if (written < 0) {
|
||||
err = ESP_FAIL;
|
||||
|
|
|
@ -46,7 +46,7 @@ void WatchdogManager::set_timeout_(uint32_t timeout_ms) {
|
|||
};
|
||||
esp_task_wdt_reconfigure(&wdt_config);
|
||||
#else
|
||||
esp_task_wdt_init(timeout_ms, true);
|
||||
esp_task_wdt_init(timeout_ms / 1000, true);
|
||||
#endif // ESP_IDF_VERSION_MAJOR
|
||||
#endif // USE_ESP32
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ import hashlib
|
|||
import io
|
||||
from pathlib import Path
|
||||
import re
|
||||
import requests
|
||||
from magic import Magic
|
||||
|
||||
from esphome import core
|
||||
|
@ -15,7 +14,6 @@ from esphome import external_files
|
|||
import esphome.config_validation as cv
|
||||
import esphome.codegen as cg
|
||||
from esphome.const import (
|
||||
__version__,
|
||||
CONF_DITHER,
|
||||
CONF_FILE,
|
||||
CONF_ICON,
|
||||
|
@ -75,31 +73,6 @@ def compute_local_image_path(value: dict) -> Path:
|
|||
return base_dir / key
|
||||
|
||||
|
||||
def download_content(url: str, path: Path) -> None:
|
||||
if not external_files.has_remote_file_changed(url, path):
|
||||
_LOGGER.debug("Remote file has not changed %s", url)
|
||||
return
|
||||
|
||||
_LOGGER.debug(
|
||||
"Remote file has changed, downloading from %s to %s",
|
||||
url,
|
||||
path,
|
||||
)
|
||||
|
||||
try:
|
||||
req = requests.get(
|
||||
url,
|
||||
timeout=IMAGE_DOWNLOAD_TIMEOUT,
|
||||
headers={"User-agent": f"ESPHome/{__version__} (https://esphome.io)"},
|
||||
)
|
||||
req.raise_for_status()
|
||||
except requests.exceptions.RequestException as e:
|
||||
raise cv.Invalid(f"Could not download from {url}: {e}")
|
||||
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_bytes(req.content)
|
||||
|
||||
|
||||
def download_mdi(value):
|
||||
validate_cairosvg_installed(value)
|
||||
|
||||
|
@ -108,7 +81,7 @@ def download_mdi(value):
|
|||
|
||||
url = f"https://raw.githubusercontent.com/Templarian/MaterialDesign/master/svg/{mdi_id}.svg"
|
||||
|
||||
download_content(url, path)
|
||||
external_files.download_content(url, path, IMAGE_DOWNLOAD_TIMEOUT)
|
||||
|
||||
return value
|
||||
|
||||
|
@ -117,7 +90,7 @@ def download_image(value):
|
|||
url = value[CONF_URL]
|
||||
path = compute_local_image_path(value)
|
||||
|
||||
download_content(url, path)
|
||||
external_files.download_content(url, path, IMAGE_DOWNLOAD_TIMEOUT)
|
||||
|
||||
return value
|
||||
|
||||
|
|
|
@ -115,12 +115,15 @@ void LEDCOutput::write_state(float state) {
|
|||
const uint32_t max_duty = (uint32_t(1) << this->bit_depth_) - 1;
|
||||
const float duty_rounded = roundf(state * max_duty);
|
||||
auto duty = static_cast<uint32_t>(duty_rounded);
|
||||
|
||||
#ifdef USE_ARDUINO
|
||||
ESP_LOGV(TAG, "Setting duty: %u on channel %u", duty, this->channel_);
|
||||
ledcWrite(this->channel_, duty);
|
||||
#endif
|
||||
#ifdef USE_ESP_IDF
|
||||
// ensure that 100% on is not 99.975% on
|
||||
if ((duty == max_duty) && (max_duty != 1)) {
|
||||
duty = max_duty + 1;
|
||||
}
|
||||
auto speed_mode = get_speed_mode(channel_);
|
||||
auto chan_num = static_cast<ledc_channel_t>(channel_ % 8);
|
||||
int hpoint = ledc_angle_to_htop(this->phase_angle_, this->bit_depth_);
|
||||
|
|
|
@ -74,6 +74,9 @@ def mdns_service(
|
|||
|
||||
@coroutine_with_priority(55.0)
|
||||
async def to_code(config):
|
||||
if config[CONF_DISABLED] is True:
|
||||
return
|
||||
|
||||
if CORE.using_arduino:
|
||||
if CORE.is_esp32:
|
||||
cg.add_library("ESPmDNS", None)
|
||||
|
@ -92,9 +95,6 @@ async def to_code(config):
|
|||
path="components/mdns",
|
||||
)
|
||||
|
||||
if config[CONF_DISABLED]:
|
||||
return
|
||||
|
||||
cg.add_define("USE_MDNS")
|
||||
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "mdns_component.h"
|
||||
#include "esphome/core/defines.h"
|
||||
#ifdef USE_MDNS
|
||||
#include "mdns_component.h"
|
||||
#include "esphome/core/version.h"
|
||||
#include "esphome/core/application.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
@ -125,3 +126,4 @@ void MDNSComponent::dump_config() {
|
|||
|
||||
} // namespace mdns
|
||||
} // namespace esphome
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "esphome/core/defines.h"
|
||||
#ifdef USE_MDNS
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "esphome/core/component.h"
|
||||
|
@ -46,3 +47,4 @@ class MDNSComponent : public Component {
|
|||
|
||||
} // namespace mdns
|
||||
} // namespace esphome
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#ifdef USE_ESP32
|
||||
#include "esphome/core/defines.h"
|
||||
#if defined(USE_ESP32) && defined(USE_MDNS)
|
||||
|
||||
#include <mdns.h>
|
||||
#include <cstring>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#if defined(USE_ESP8266) && defined(USE_ARDUINO)
|
||||
#include "esphome/core/defines.h"
|
||||
#if defined(USE_ESP8266) && defined(USE_ARDUINO) && defined(USE_MDNS)
|
||||
|
||||
#include <ESP8266mDNS.h>
|
||||
#include "esphome/components/network/ip_address.h"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#ifdef USE_HOST
|
||||
#include "esphome/core/defines.h"
|
||||
#if defined(USE_HOST) && defined(USE_MDNS)
|
||||
|
||||
#include "esphome/components/network/ip_address.h"
|
||||
#include "esphome/components/network/util.h"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#ifdef USE_LIBRETINY
|
||||
#include "esphome/core/defines.h"
|
||||
#if defined(USE_LIBRETINY) && defined(USE_MDNS)
|
||||
|
||||
#include "esphome/components/network/ip_address.h"
|
||||
#include "esphome/components/network/util.h"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#ifdef USE_RP2040
|
||||
#include "esphome/core/defines.h"
|
||||
#if defined(USE_RP2040) && defined(USE_MDNS)
|
||||
|
||||
#include "esphome/components/network/ip_address.h"
|
||||
#include "esphome/components/network/util.h"
|
||||
|
|
|
@ -293,4 +293,4 @@ async def to_code(config):
|
|||
if CONF_HUMIDITY_SETPOINT in config:
|
||||
sens = await sensor.new_sensor(config[CONF_HUMIDITY_SETPOINT])
|
||||
cg.add(var.set_humidity_setpoint_sensor(sens))
|
||||
cg.add_library("dudanov/MideaUART", "1.1.8")
|
||||
cg.add_library("dudanov/MideaUART", "1.1.9")
|
||||
|
|
|
@ -116,7 +116,8 @@ void ModbusController::on_modbus_read_registers(uint8_t function_code, uint16_t
|
|||
ESP_LOGD(TAG, "Matched register. Address: 0x%02X. Value type: %zu. Register count: %u. Value: %0.1f.",
|
||||
server_register->address, static_cast<uint8_t>(server_register->value_type),
|
||||
server_register->register_count, value);
|
||||
number_to_payload(sixteen_bit_response, value, server_register->value_type);
|
||||
std::vector<uint16_t> payload = float_to_payload(value, server_register->value_type);
|
||||
sixteen_bit_response.insert(sixteen_bit_response.end(), payload.cbegin(), payload.cend());
|
||||
current_address += server_register->register_count;
|
||||
found = true;
|
||||
break;
|
||||
|
|
|
@ -37,6 +37,7 @@ RAW_ENCODING = {
|
|||
"NONE": RawEncoding.NONE,
|
||||
"HEXBYTES": RawEncoding.HEXBYTES,
|
||||
"COMMA": RawEncoding.COMMA,
|
||||
"ANSI": RawEncoding.ANSI,
|
||||
}
|
||||
|
||||
CONFIG_SCHEMA = cv.All(
|
||||
|
@ -49,7 +50,7 @@ CONFIG_SCHEMA = cv.All(
|
|||
cv.Optional(CONF_REGISTER_TYPE): cv.enum(MODBUS_REGISTER_TYPE),
|
||||
cv.Optional(CONF_REGISTER_COUNT, default=0): cv.positive_int,
|
||||
cv.Optional(CONF_RESPONSE_SIZE, default=2): cv.positive_int,
|
||||
cv.Optional(CONF_RAW_ENCODE, default="NONE"): cv.enum(RAW_ENCODING),
|
||||
cv.Optional(CONF_RAW_ENCODE, default="ANSI"): cv.enum(RAW_ENCODING),
|
||||
}
|
||||
),
|
||||
validate_modbus_register,
|
||||
|
|
|
@ -15,7 +15,7 @@ void ModbusTextSensor::parse_and_publish(const std::vector<uint8_t> &data) {
|
|||
std::ostringstream output;
|
||||
uint8_t items_left = this->response_bytes;
|
||||
uint8_t index = this->offset;
|
||||
char buffer[4];
|
||||
char buffer[5];
|
||||
while ((items_left > 0) && index < data.size()) {
|
||||
uint8_t b = data[index];
|
||||
switch (this->encode_) {
|
||||
|
@ -27,8 +27,11 @@ void ModbusTextSensor::parse_and_publish(const std::vector<uint8_t> &data) {
|
|||
sprintf(buffer, index != this->offset ? ",%d" : "%d", b);
|
||||
output << buffer;
|
||||
break;
|
||||
case RawEncoding::ANSI:
|
||||
if (b < 0x20)
|
||||
break;
|
||||
// FALLTHROUGH
|
||||
// Anything else no encoding
|
||||
case RawEncoding::NONE:
|
||||
default:
|
||||
output << (char) b;
|
||||
break;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
namespace esphome {
|
||||
namespace modbus_controller {
|
||||
|
||||
enum class RawEncoding { NONE = 0, HEXBYTES = 1, COMMA = 2 };
|
||||
enum class RawEncoding { NONE = 0, HEXBYTES = 1, COMMA = 2, ANSI = 3 };
|
||||
|
||||
class ModbusTextSensor : public Component, public text_sensor::TextSensor, public SensorItem {
|
||||
public:
|
||||
|
|
|
@ -26,6 +26,7 @@ from esphome.const import (
|
|||
DEVICE_CLASS_BATTERY,
|
||||
DEVICE_CLASS_CARBON_DIOXIDE,
|
||||
DEVICE_CLASS_CARBON_MONOXIDE,
|
||||
DEVICE_CLASS_CONDUCTIVITY,
|
||||
DEVICE_CLASS_CURRENT,
|
||||
DEVICE_CLASS_DATA_RATE,
|
||||
DEVICE_CLASS_DATA_SIZE,
|
||||
|
@ -82,6 +83,7 @@ DEVICE_CLASSES = [
|
|||
DEVICE_CLASS_BATTERY,
|
||||
DEVICE_CLASS_CARBON_DIOXIDE,
|
||||
DEVICE_CLASS_CARBON_MONOXIDE,
|
||||
DEVICE_CLASS_CONDUCTIVITY,
|
||||
DEVICE_CLASS_CURRENT,
|
||||
DEVICE_CLASS_DATA_RATE,
|
||||
DEVICE_CLASS_DATA_SIZE,
|
||||
|
|
|
@ -25,6 +25,9 @@ void QspiAmoLed::setup() {
|
|||
}
|
||||
|
||||
void QspiAmoLed::update() {
|
||||
if (!this->setup_complete_) {
|
||||
return;
|
||||
}
|
||||
this->do_update_();
|
||||
// Start addresses and widths/heights must be divisible by 2 (CASET/RASET restriction in datasheet)
|
||||
if (this->x_low_ % 2 == 1) {
|
||||
|
|
|
@ -65,13 +65,10 @@ class QspiAmoLed : public display::DisplayBuffer,
|
|||
|
||||
void set_reset_pin(GPIOPin *reset_pin) { this->reset_pin_ = reset_pin; }
|
||||
void set_enable_pin(GPIOPin *enable_pin) { this->enable_pin_ = enable_pin; }
|
||||
void set_width(uint16_t width) { this->width_ = width; }
|
||||
void set_dimensions(uint16_t width, uint16_t height) {
|
||||
this->width_ = width;
|
||||
this->height_ = height;
|
||||
}
|
||||
int get_width() override { return this->width_; }
|
||||
int get_height() override { return this->height_; }
|
||||
void set_invert_colors(bool invert_colors) {
|
||||
this->invert_colors_ = invert_colors;
|
||||
this->reset_params_();
|
||||
|
|
|
@ -8,10 +8,10 @@ static const char *const TAG = "remote.dooya";
|
|||
|
||||
static const uint32_t HEADER_HIGH_US = 5000;
|
||||
static const uint32_t HEADER_LOW_US = 1500;
|
||||
static const uint32_t BIT_ZERO_HIGH_US = 750;
|
||||
static const uint32_t BIT_ZERO_LOW_US = 350;
|
||||
static const uint32_t BIT_ONE_HIGH_US = 350;
|
||||
static const uint32_t BIT_ONE_LOW_US = 750;
|
||||
static const uint32_t BIT_ZERO_HIGH_US = 350;
|
||||
static const uint32_t BIT_ZERO_LOW_US = 750;
|
||||
static const uint32_t BIT_ONE_HIGH_US = 750;
|
||||
static const uint32_t BIT_ONE_LOW_US = 350;
|
||||
|
||||
void DooyaProtocol::encode(RemoteTransmitData *dst, const DooyaData &data) {
|
||||
dst->set_carrier_frequency(0);
|
||||
|
|
|
@ -56,21 +56,20 @@ CONFIG_SCHEMA = cv.All(
|
|||
|
||||
@coroutine_with_priority(50.0)
|
||||
async def to_code(config):
|
||||
if config[CONF_DISABLED]:
|
||||
return
|
||||
if not config[CONF_DISABLED]:
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
await cg.register_component(var, config)
|
||||
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
await cg.register_component(var, config)
|
||||
for conf in config.get(CONF_ON_SAFE_MODE, []):
|
||||
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
||||
await automation.build_automation(trigger, [], conf)
|
||||
|
||||
for conf in config.get(CONF_ON_SAFE_MODE, []):
|
||||
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
||||
await automation.build_automation(trigger, [], conf)
|
||||
condition = var.should_enter_safe_mode(
|
||||
config[CONF_NUM_ATTEMPTS],
|
||||
config[CONF_REBOOT_TIMEOUT],
|
||||
config[CONF_BOOT_IS_GOOD_AFTER],
|
||||
)
|
||||
cg.add(RawExpression(f"if ({condition}) return"))
|
||||
|
||||
condition = var.should_enter_safe_mode(
|
||||
config[CONF_NUM_ATTEMPTS],
|
||||
config[CONF_REBOOT_TIMEOUT],
|
||||
config[CONF_BOOT_IS_GOOD_AFTER],
|
||||
)
|
||||
cg.add(RawExpression(f"if ({condition}) return"))
|
||||
CORE.data[CONF_SAFE_MODE] = {}
|
||||
CORE.data[CONF_SAFE_MODE][KEY_PAST_SAFE_MODE] = True
|
||||
|
|
|
@ -88,7 +88,7 @@ def validate_parameter_name(value):
|
|||
raise cv.Invalid(f"Script's parameter name cannot be {CONF_ID}")
|
||||
|
||||
|
||||
ALLOWED_PARAM_TYPE_CHARSET = set("abcdefghijklmnopqrstuvwxyz0123456789_:*&[]")
|
||||
ALLOWED_PARAM_TYPE_CHARSET = set("abcdefghijklmnopqrstuvwxyz0123456789_:*&[]<>")
|
||||
|
||||
|
||||
def validate_parameter_type(value):
|
||||
|
|
|
@ -43,6 +43,7 @@ from esphome.const import (
|
|||
DEVICE_CLASS_BATTERY,
|
||||
DEVICE_CLASS_CARBON_DIOXIDE,
|
||||
DEVICE_CLASS_CARBON_MONOXIDE,
|
||||
DEVICE_CLASS_CONDUCTIVITY,
|
||||
DEVICE_CLASS_CURRENT,
|
||||
DEVICE_CLASS_DATA_RATE,
|
||||
DEVICE_CLASS_DATA_SIZE,
|
||||
|
@ -103,6 +104,7 @@ DEVICE_CLASSES = [
|
|||
DEVICE_CLASS_BATTERY,
|
||||
DEVICE_CLASS_CARBON_DIOXIDE,
|
||||
DEVICE_CLASS_CARBON_MONOXIDE,
|
||||
DEVICE_CLASS_CONDUCTIVITY,
|
||||
DEVICE_CLASS_CURRENT,
|
||||
DEVICE_CLASS_DATA_RATE,
|
||||
DEVICE_CLASS_DATA_SIZE,
|
||||
|
|
|
@ -223,13 +223,19 @@ void Tuya::handle_command_(uint8_t command, uint8_t version, const uint8_t *buff
|
|||
break;
|
||||
case TuyaCommandType::DATAPOINT_DELIVER:
|
||||
break;
|
||||
case TuyaCommandType::DATAPOINT_REPORT:
|
||||
case TuyaCommandType::DATAPOINT_REPORT_ASYNC:
|
||||
case TuyaCommandType::DATAPOINT_REPORT_SYNC:
|
||||
if (this->init_state_ == TuyaInitState::INIT_DATAPOINT) {
|
||||
this->init_state_ = TuyaInitState::INIT_DONE;
|
||||
this->set_timeout("datapoint_dump", 1000, [this] { this->dump_config(); });
|
||||
this->initialized_callback_.call();
|
||||
}
|
||||
this->handle_datapoints_(buffer, len);
|
||||
|
||||
if (command_type == TuyaCommandType::DATAPOINT_REPORT_SYNC) {
|
||||
this->send_command_(
|
||||
TuyaCommand{.cmd = TuyaCommandType::DATAPOINT_REPORT_ACK, .payload = std::vector<uint8_t>{0x01}});
|
||||
}
|
||||
break;
|
||||
case TuyaCommandType::DATAPOINT_QUERY:
|
||||
break;
|
||||
|
@ -423,7 +429,7 @@ void Tuya::send_raw_command_(TuyaCommand command) {
|
|||
break;
|
||||
case TuyaCommandType::DATAPOINT_DELIVER:
|
||||
case TuyaCommandType::DATAPOINT_QUERY:
|
||||
this->expected_response_ = TuyaCommandType::DATAPOINT_REPORT;
|
||||
this->expected_response_ = TuyaCommandType::DATAPOINT_REPORT_ASYNC;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -53,10 +53,12 @@ enum class TuyaCommandType : uint8_t {
|
|||
WIFI_RESET = 0x04,
|
||||
WIFI_SELECT = 0x05,
|
||||
DATAPOINT_DELIVER = 0x06,
|
||||
DATAPOINT_REPORT = 0x07,
|
||||
DATAPOINT_REPORT_ASYNC = 0x07,
|
||||
DATAPOINT_QUERY = 0x08,
|
||||
WIFI_TEST = 0x0E,
|
||||
LOCAL_TIME_QUERY = 0x1C,
|
||||
DATAPOINT_REPORT_SYNC = 0x22,
|
||||
DATAPOINT_REPORT_ACK = 0x23,
|
||||
WIFI_RSSI = 0x24,
|
||||
VACUUM_MAP_UPLOAD = 0x28,
|
||||
GET_NETWORK_STATUS = 0x2B,
|
||||
|
|
|
@ -4,11 +4,13 @@ import esphome.config_validation as cv
|
|||
import esphome.codegen as cg
|
||||
from esphome.const import (
|
||||
CONF_DEVICE_CLASS,
|
||||
CONF_ENTITY_CATEGORY,
|
||||
CONF_ID,
|
||||
CONF_MQTT_ID,
|
||||
CONF_WEB_SERVER_ID,
|
||||
DEVICE_CLASS_EMPTY,
|
||||
DEVICE_CLASS_FIRMWARE,
|
||||
ENTITY_CATEGORY_CONFIG,
|
||||
)
|
||||
from esphome.core import CORE, coroutine_with_priority
|
||||
from esphome.cpp_helpers import setup_entity
|
||||
|
@ -41,6 +43,9 @@ UPDATE_SCHEMA = (
|
|||
cv.Optional(CONF_ON_UPDATE_AVAILABLE): automation.validate_automation(
|
||||
single=True
|
||||
),
|
||||
cv.Optional(
|
||||
CONF_ENTITY_CATEGORY, default=ENTITY_CATEGORY_CONFIG
|
||||
): cv.entity_category,
|
||||
}
|
||||
)
|
||||
)
|
||||
|
@ -64,7 +69,7 @@ async def setup_update_core_(var, config):
|
|||
await mqtt.register_mqtt_component(mqtt_, config)
|
||||
|
||||
if web_server_id_config := config.get(CONF_WEB_SERVER_ID):
|
||||
web_server_ = cg.get_variable(web_server_id_config)
|
||||
web_server_ = await cg.get_variable(web_server_id_config)
|
||||
web_server.add_entity_to_sorting_list(web_server_, var, config)
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,35 @@
|
|||
#include "update_entity.h"
|
||||
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace update {
|
||||
|
||||
static const char *const TAG = "update";
|
||||
|
||||
void UpdateEntity::publish_state() {
|
||||
ESP_LOGD(TAG, "'%s' - Publishing:", this->name_.c_str());
|
||||
ESP_LOGD(TAG, " Current Version: %s", this->update_info_.current_version.c_str());
|
||||
|
||||
if (!this->update_info_.md5.empty()) {
|
||||
ESP_LOGD(TAG, " Latest Version: %s", this->update_info_.latest_version.c_str());
|
||||
}
|
||||
if (!this->update_info_.firmware_url.empty()) {
|
||||
ESP_LOGD(TAG, " Firmware URL: %s", this->update_info_.firmware_url.c_str());
|
||||
}
|
||||
|
||||
ESP_LOGD(TAG, " Title: %s", this->update_info_.title.c_str());
|
||||
if (!this->update_info_.summary.empty()) {
|
||||
ESP_LOGD(TAG, " Summary: %s", this->update_info_.summary.c_str());
|
||||
}
|
||||
if (!this->update_info_.release_url.empty()) {
|
||||
ESP_LOGD(TAG, " Release URL: %s", this->update_info_.release_url.c_str());
|
||||
}
|
||||
|
||||
if (this->update_info_.has_progress) {
|
||||
ESP_LOGD(TAG, " Progress: %.0f%%", this->update_info_.progress);
|
||||
}
|
||||
|
||||
this->has_state_ = true;
|
||||
this->state_callback_.call();
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ async def to_code(config):
|
|||
# the '+1' modifier is relative to the device's own address that will
|
||||
# be automatically added to the provided list.
|
||||
cg.add_build_flag(f"-DCONFIG_WIREGUARD_MAX_SRC_IPS={len(allowed_ips) + 1}")
|
||||
cg.add_library("droscy/esp_wireguard", "0.4.1")
|
||||
cg.add_library("droscy/esp_wireguard", "0.4.2")
|
||||
|
||||
await cg.register_component(var, config)
|
||||
|
||||
|
|
|
@ -58,17 +58,21 @@ def merge_config(full_old, full_new):
|
|||
ids = {
|
||||
v_id: i
|
||||
for i, v in enumerate(res)
|
||||
if (v_id := v.get(CONF_ID)) and isinstance(v_id, str)
|
||||
if isinstance(v, dict)
|
||||
and (v_id := v.get(CONF_ID))
|
||||
and isinstance(v_id, str)
|
||||
}
|
||||
extend_ids = {
|
||||
v_id.value: i
|
||||
for i, v in enumerate(res)
|
||||
if (v_id := v.get(CONF_ID)) and isinstance(v_id, Extend)
|
||||
if isinstance(v, dict)
|
||||
and (v_id := v.get(CONF_ID))
|
||||
and isinstance(v_id, Extend)
|
||||
}
|
||||
|
||||
ids_to_delete = []
|
||||
for v in new:
|
||||
if new_id := v.get(CONF_ID):
|
||||
if isinstance(v, dict) and (new_id := v.get(CONF_ID)):
|
||||
if isinstance(new_id, Extend):
|
||||
new_id = new_id.value
|
||||
if new_id in ids:
|
||||
|
|
|
@ -1070,6 +1070,7 @@ DEVICE_CLASS_BUTTON = "button"
|
|||
DEVICE_CLASS_CARBON_DIOXIDE = "carbon_dioxide"
|
||||
DEVICE_CLASS_CARBON_MONOXIDE = "carbon_monoxide"
|
||||
DEVICE_CLASS_COLD = "cold"
|
||||
DEVICE_CLASS_CONDUCTIVITY = "conductivity"
|
||||
DEVICE_CLASS_CONNECTIVITY = "connectivity"
|
||||
DEVICE_CLASS_CURRENT = "current"
|
||||
DEVICE_CLASS_CURTAIN = "curtain"
|
||||
|
|
|
@ -10,6 +10,7 @@ int_ = global_ns.namespace("int")
|
|||
std_ns = global_ns.namespace("std")
|
||||
std_shared_ptr = std_ns.class_("shared_ptr")
|
||||
std_string = std_ns.class_("string")
|
||||
std_string_ref = std_ns.namespace("string &")
|
||||
std_vector = std_ns.class_("vector")
|
||||
uint8 = global_ns.namespace("uint8_t")
|
||||
uint16 = global_ns.namespace("uint16_t")
|
||||
|
|
|
@ -7,6 +7,7 @@ from datetime import datetime
|
|||
import requests
|
||||
import esphome.config_validation as cv
|
||||
from esphome.core import CORE, TimePeriodSeconds
|
||||
from esphome.const import __version__
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
CODEOWNERS = ["@landonr"]
|
||||
|
@ -75,3 +76,28 @@ def compute_local_file_dir(domain: str) -> Path:
|
|||
base_directory.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
return base_directory
|
||||
|
||||
|
||||
def download_content(url: str, path: Path, timeout=NETWORK_TIMEOUT) -> None:
|
||||
if not has_remote_file_changed(url, path):
|
||||
_LOGGER.debug("Remote file has not changed %s", url)
|
||||
return
|
||||
|
||||
_LOGGER.debug(
|
||||
"Remote file has changed, downloading from %s to %s",
|
||||
url,
|
||||
path,
|
||||
)
|
||||
|
||||
try:
|
||||
req = requests.get(
|
||||
url,
|
||||
timeout=timeout,
|
||||
headers={"User-agent": f"ESPHome/{__version__} (https://esphome.io)"},
|
||||
)
|
||||
req.raise_for_status()
|
||||
except requests.exceptions.RequestException as e:
|
||||
raise cv.Invalid(f"Could not download from {url}: {e}")
|
||||
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_bytes(req.content)
|
||||
|
|
|
@ -64,8 +64,8 @@ lib_deps =
|
|||
freekode/TM1651@1.0.1 ; tm1651
|
||||
glmnet/Dsmr@0.7 ; dsmr
|
||||
rweather/Crypto@0.4.0 ; dsmr
|
||||
dudanov/MideaUART@1.1.8 ; midea
|
||||
tonia/HeatpumpIR@1.0.23 ; heatpumpir
|
||||
dudanov/MideaUART@1.1.9 ; midea
|
||||
tonia/HeatpumpIR@1.0.26 ; heatpumpir
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-DUSE_ARDUINO
|
||||
|
@ -93,8 +93,8 @@ lib_deps =
|
|||
ESP8266HTTPClient ; http_request (Arduino built-in)
|
||||
ESP8266mDNS ; mdns (Arduino built-in)
|
||||
DNSServer ; captive_portal (Arduino built-in)
|
||||
crankyoldgit/IRremoteESP8266@~2.8.4 ; heatpumpir
|
||||
droscy/esp_wireguard@0.4.1 ; wireguard
|
||||
crankyoldgit/IRremoteESP8266@2.8.6 ; heatpumpir
|
||||
droscy/esp_wireguard@0.4.2 ; wireguard
|
||||
build_flags =
|
||||
${common:arduino.build_flags}
|
||||
-Wno-nonnull-compare
|
||||
|
@ -123,8 +123,8 @@ lib_deps =
|
|||
ESPmDNS ; mdns (Arduino built-in)
|
||||
DNSServer ; captive_portal (Arduino built-in)
|
||||
esphome/ESP32-audioI2S@2.0.7 ; i2s_audio
|
||||
crankyoldgit/IRremoteESP8266@~2.8.4 ; heatpumpir
|
||||
droscy/esp_wireguard@0.4.1 ; wireguard
|
||||
crankyoldgit/IRremoteESP8266@2.8.6 ; heatpumpir
|
||||
droscy/esp_wireguard@0.4.2 ; wireguard
|
||||
build_flags =
|
||||
${common:arduino.build_flags}
|
||||
-DUSE_ESP32
|
||||
|
@ -142,7 +142,7 @@ platform_packages =
|
|||
framework = espidf
|
||||
lib_deps =
|
||||
${common:idf.lib_deps}
|
||||
droscy/esp_wireguard@0.4.1 ; wireguard
|
||||
droscy/esp_wireguard@0.4.2 ; wireguard
|
||||
build_flags =
|
||||
${common:idf.build_flags}
|
||||
-Wno-nonnull-compare
|
||||
|
@ -174,7 +174,7 @@ extends = common:arduino
|
|||
platform = libretiny
|
||||
framework = arduino
|
||||
lib_deps =
|
||||
droscy/esp_wireguard@0.4.1 ; wireguard
|
||||
droscy/esp_wireguard@0.4.2 ; wireguard
|
||||
build_flags =
|
||||
${common:arduino.build_flags}
|
||||
-DUSE_LIBRETINY
|
||||
|
|
|
@ -12,7 +12,7 @@ pyserial==3.5
|
|||
platformio==6.1.15 # When updating platformio, also update Dockerfile
|
||||
esptool==4.7.0
|
||||
click==8.1.7
|
||||
esphome-dashboard==20240613.0
|
||||
esphome-dashboard==20240620.0
|
||||
aioesphomeapi==24.3.0
|
||||
zeroconf==0.132.2
|
||||
python-magic==0.4.27
|
||||
|
|
25
script/extract_automations.py
Executable file
25
script/extract_automations.py
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
|
||||
from helpers import git_ls_files
|
||||
|
||||
from esphome.automation import ACTION_REGISTRY, CONDITION_REGISTRY
|
||||
from esphome.pins import PIN_SCHEMA_REGISTRY
|
||||
|
||||
list_components = __import__("list-components")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
files = git_ls_files()
|
||||
files = filter(list_components.filter_component_files, files)
|
||||
|
||||
components = list_components.get_components(files, True)
|
||||
|
||||
dump = {
|
||||
"actions": sorted(list(ACTION_REGISTRY.keys())),
|
||||
"conditions": sorted(list(CONDITION_REGISTRY.keys())),
|
||||
"pin_providers": sorted(list(PIN_SCHEMA_REGISTRY.keys())),
|
||||
}
|
||||
|
||||
print(json.dumps(dump, indent=2))
|
|
@ -50,6 +50,7 @@ def create_components_graph():
|
|||
{KEY_TARGET_FRAMEWORK: "arduino", KEY_TARGET_PLATFORM: None},
|
||||
{KEY_TARGET_FRAMEWORK: "esp-idf", KEY_TARGET_PLATFORM: None},
|
||||
{KEY_TARGET_FRAMEWORK: None, KEY_TARGET_PLATFORM: PLATFORM_ESP32},
|
||||
{KEY_TARGET_FRAMEWORK: None, KEY_TARGET_PLATFORM: PLATFORM_ESP8266},
|
||||
]
|
||||
CORE.data[KEY_CORE] = TARGET_CONFIGURATIONS[0]
|
||||
|
||||
|
@ -119,6 +120,23 @@ def find_children_of_component(components_graph, component_name, depth=0):
|
|||
return list(set(children))
|
||||
|
||||
|
||||
def get_components(files: list[str], get_dependencies: bool = False):
|
||||
components = extract_component_names_array_from_files_array(files)
|
||||
|
||||
if get_dependencies:
|
||||
components_graph = create_components_graph()
|
||||
|
||||
all_components = components.copy()
|
||||
for c in components:
|
||||
all_components.extend(find_children_of_component(components_graph, c))
|
||||
# Remove duplicate values
|
||||
all_changed_components = list(set(all_components))
|
||||
|
||||
return sorted(all_changed_components)
|
||||
|
||||
return sorted(components)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
|
@ -142,24 +160,8 @@ def main():
|
|||
changed = changed_files()
|
||||
files = [f for f in files if f in changed]
|
||||
|
||||
components = extract_component_names_array_from_files_array(files)
|
||||
|
||||
if args.changed:
|
||||
components_graph = create_components_graph()
|
||||
|
||||
all_changed_components = components.copy()
|
||||
for c in components:
|
||||
all_changed_components.extend(
|
||||
find_children_of_component(components_graph, c)
|
||||
)
|
||||
# Remove duplicate values
|
||||
all_changed_components = list(set(all_changed_components))
|
||||
|
||||
for c in sorted(all_changed_components):
|
||||
print(c)
|
||||
else:
|
||||
for c in sorted(components):
|
||||
print(c)
|
||||
for c in get_components(files, args.changed):
|
||||
print(c)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -54,7 +54,6 @@ climate:
|
|||
|
||||
sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
outdoor_temperature:
|
||||
name: Haier outdoor temperature
|
||||
humidity:
|
||||
|
@ -80,7 +79,6 @@ sensor:
|
|||
|
||||
binary_sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
compressor_status:
|
||||
name: Haier Outdoor Compressor Status
|
||||
defrost_status:
|
||||
|
@ -96,7 +94,6 @@ binary_sensor:
|
|||
|
||||
button:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
self_cleaning:
|
||||
name: Haier start self cleaning
|
||||
steri_cleaning:
|
||||
|
@ -104,7 +101,6 @@ button:
|
|||
|
||||
text_sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
appliance_name:
|
||||
name: Haier appliance name
|
||||
cleaning_status:
|
||||
|
|
|
@ -54,7 +54,6 @@ climate:
|
|||
|
||||
sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
outdoor_temperature:
|
||||
name: Haier outdoor temperature
|
||||
humidity:
|
||||
|
@ -80,7 +79,6 @@ sensor:
|
|||
|
||||
binary_sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
compressor_status:
|
||||
name: Haier Outdoor Compressor Status
|
||||
defrost_status:
|
||||
|
@ -96,7 +94,6 @@ binary_sensor:
|
|||
|
||||
button:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
self_cleaning:
|
||||
name: Haier start self cleaning
|
||||
steri_cleaning:
|
||||
|
@ -104,7 +101,6 @@ button:
|
|||
|
||||
text_sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
appliance_name:
|
||||
name: Haier appliance name
|
||||
cleaning_status:
|
||||
|
|
|
@ -54,7 +54,6 @@ climate:
|
|||
|
||||
sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
outdoor_temperature:
|
||||
name: Haier outdoor temperature
|
||||
humidity:
|
||||
|
@ -80,7 +79,6 @@ sensor:
|
|||
|
||||
binary_sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
compressor_status:
|
||||
name: Haier Outdoor Compressor Status
|
||||
defrost_status:
|
||||
|
@ -96,7 +94,6 @@ binary_sensor:
|
|||
|
||||
button:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
self_cleaning:
|
||||
name: Haier start self cleaning
|
||||
steri_cleaning:
|
||||
|
@ -104,7 +101,6 @@ button:
|
|||
|
||||
text_sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
appliance_name:
|
||||
name: Haier appliance name
|
||||
cleaning_status:
|
||||
|
|
|
@ -54,7 +54,6 @@ climate:
|
|||
|
||||
sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
outdoor_temperature:
|
||||
name: Haier outdoor temperature
|
||||
humidity:
|
||||
|
@ -80,7 +79,6 @@ sensor:
|
|||
|
||||
binary_sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
compressor_status:
|
||||
name: Haier Outdoor Compressor Status
|
||||
defrost_status:
|
||||
|
@ -96,7 +94,6 @@ binary_sensor:
|
|||
|
||||
button:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
self_cleaning:
|
||||
name: Haier start self cleaning
|
||||
steri_cleaning:
|
||||
|
@ -104,7 +101,6 @@ button:
|
|||
|
||||
text_sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
appliance_name:
|
||||
name: Haier appliance name
|
||||
cleaning_status:
|
||||
|
|
|
@ -54,7 +54,6 @@ climate:
|
|||
|
||||
sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
outdoor_temperature:
|
||||
name: Haier outdoor temperature
|
||||
humidity:
|
||||
|
@ -80,7 +79,6 @@ sensor:
|
|||
|
||||
binary_sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
compressor_status:
|
||||
name: Haier Outdoor Compressor Status
|
||||
defrost_status:
|
||||
|
@ -96,7 +94,6 @@ binary_sensor:
|
|||
|
||||
button:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
self_cleaning:
|
||||
name: Haier start self cleaning
|
||||
steri_cleaning:
|
||||
|
@ -104,7 +101,6 @@ button:
|
|||
|
||||
text_sensor:
|
||||
- platform: haier
|
||||
haier_id: haier_ac
|
||||
appliance_name:
|
||||
name: Haier appliance name
|
||||
cleaning_status:
|
||||
|
|
6
tests/components/mdns/test-disabled.esp32-idf.yaml
Normal file
6
tests/components/mdns/test-disabled.esp32-idf.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
mdns:
|
||||
disabled: true
|
1
tests/components/mdns/test-enabled.esp32-ard.yaml
Normal file
1
tests/components/mdns/test-enabled.esp32-ard.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
<<: !include common-enabled.yaml
|
1
tests/components/mdns/test-enabled.esp32-c3-ard.yaml
Normal file
1
tests/components/mdns/test-enabled.esp32-c3-ard.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
<<: !include common-enabled.yaml
|
1
tests/components/mdns/test-enabled.esp32-c3-idf.yaml
Normal file
1
tests/components/mdns/test-enabled.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
<<: !include common-enabled.yaml
|
1
tests/components/mdns/test-enabled.esp32-idf.yaml
Normal file
1
tests/components/mdns/test-enabled.esp32-idf.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
<<: !include common-enabled.yaml
|
1
tests/components/mdns/test-enabled.esp8266-ard.yaml
Normal file
1
tests/components/mdns/test-enabled.esp8266-ard.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
<<: !include common-enabled.yaml
|
1
tests/components/mdns/test-enabled.rp2040-ard.yaml
Normal file
1
tests/components/mdns/test-enabled.rp2040-ard.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
<<: !include common-enabled.yaml
|
|
@ -1 +0,0 @@
|
|||
<<: !include common.yaml
|
|
@ -1 +0,0 @@
|
|||
<<: !include common.yaml
|
|
@ -1 +0,0 @@
|
|||
<<: !include common.yaml
|
|
@ -1 +0,0 @@
|
|||
<<: !include common.yaml
|
|
@ -1 +0,0 @@
|
|||
<<: !include common.yaml
|
6
tests/components/safe_mode/test-disabled.esp32-idf.yaml
Normal file
6
tests/components/safe_mode/test-disabled.esp32-idf.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
safe_mode:
|
||||
disabled: true
|
1
tests/components/safe_mode/test-enabled.esp32-ard.yaml
Normal file
1
tests/components/safe_mode/test-enabled.esp32-ard.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
<<: !include common-enabled.yaml
|
|
@ -0,0 +1 @@
|
|||
<<: !include common-enabled.yaml
|
|
@ -0,0 +1 @@
|
|||
<<: !include common-enabled.yaml
|
1
tests/components/safe_mode/test-enabled.esp32-idf.yaml
Normal file
1
tests/components/safe_mode/test-enabled.esp32-idf.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
<<: !include common-enabled.yaml
|
1
tests/components/safe_mode/test-enabled.esp8266-ard.yaml
Normal file
1
tests/components/safe_mode/test-enabled.esp8266-ard.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
<<: !include common-enabled.yaml
|
1
tests/components/safe_mode/test-enabled.rp2040-ard.yaml
Normal file
1
tests/components/safe_mode/test-enabled.rp2040-ard.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
<<: !include common-enabled.yaml
|
|
@ -1 +0,0 @@
|
|||
<<: !include common.yaml
|
|
@ -1 +0,0 @@
|
|||
<<: !include common.yaml
|
|
@ -1 +0,0 @@
|
|||
<<: !include common.yaml
|
|
@ -1 +0,0 @@
|
|||
<<: !include common.yaml
|
|
@ -1 +0,0 @@
|
|||
<<: !include common.yaml
|
|
@ -1 +0,0 @@
|
|||
<<: !include common.yaml
|
|
@ -1,232 +0,0 @@
|
|||
---
|
||||
substitutions:
|
||||
devicename: test1_1
|
||||
sensorname: my
|
||||
textname: template
|
||||
roomname: fastled_room
|
||||
|
||||
esphome:
|
||||
name: test1-1
|
||||
name_add_mac_suffix: true
|
||||
platform: ESP32
|
||||
board: nodemcu-32s
|
||||
platformio_options:
|
||||
board_build.partitions: huge_app.csv
|
||||
on_loop:
|
||||
then:
|
||||
- light.addressable_set:
|
||||
id: addr1
|
||||
range_from: 0
|
||||
range_to: 100
|
||||
red: 100%
|
||||
green: !lambda "return 255;"
|
||||
blue: 0%
|
||||
white: 100%
|
||||
|
||||
wled:
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: "MySSID"
|
||||
password: "password1"
|
||||
|
||||
uart:
|
||||
- id: adalight_uart
|
||||
tx_pin: GPIO25
|
||||
rx_pin: GPIO26
|
||||
baud_rate: 115200
|
||||
rx_buffer_size: 1024
|
||||
|
||||
adalight:
|
||||
|
||||
network:
|
||||
|
||||
e131:
|
||||
|
||||
power_supply:
|
||||
- id: atx_power_supply
|
||||
enable_time: 20ms
|
||||
keep_on_time: 10s
|
||||
enable_on_boot: true
|
||||
pin:
|
||||
number: 13
|
||||
inverted: true
|
||||
|
||||
i2c:
|
||||
sda: 21
|
||||
scl:
|
||||
number: 22
|
||||
allow_other_uses: true
|
||||
scan: true
|
||||
frequency: 100kHz
|
||||
setup_priority: -100
|
||||
id: i2c_bus
|
||||
|
||||
pca9685:
|
||||
frequency: 500
|
||||
address: 0x0
|
||||
i2c_id: i2c_bus
|
||||
|
||||
output:
|
||||
- platform: pca9685
|
||||
id: pca_0
|
||||
channel: 0
|
||||
- platform: pca9685
|
||||
id: pca_1
|
||||
channel: 1
|
||||
- platform: pca9685
|
||||
id: pca_2
|
||||
channel: 2
|
||||
|
||||
light:
|
||||
- platform: rgb
|
||||
name: Living Room Lights
|
||||
id: ${roomname}_lights
|
||||
red: pca_0
|
||||
green: pca_1
|
||||
blue: pca_2
|
||||
- platform: fastled_clockless
|
||||
id: addr1
|
||||
chipset: WS2811
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
num_leds: 60
|
||||
rgb_order: BRG
|
||||
max_refresh_rate: 20ms
|
||||
power_supply: atx_power_supply
|
||||
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;
|
||||
}
|
||||
|
||||
- wled:
|
||||
port: 11111
|
||||
|
||||
- adalight:
|
||||
uart_id: adalight_uart
|
||||
|
||||
- e131:
|
||||
universe: 1
|
||||
|
||||
- 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%
|
||||
|
||||
- platform: fastled_spi
|
||||
id: addr2
|
||||
chipset: WS2801
|
||||
data_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
clock_pin:
|
||||
number: GPIO22
|
||||
allow_other_uses: true
|
||||
data_rate: 2MHz
|
||||
num_leds: 60
|
||||
rgb_order: BRG
|
||||
name: FastLED SPI Light
|
||||
- platform: neopixelbus
|
||||
id: addr3
|
||||
name: Neopixelbus Light
|
||||
gamma_correct: 2.8
|
||||
color_correct: [0.0, 0.0, 0.0, 0.0]
|
||||
default_transition_length: 10s
|
||||
power_supply: atx_power_supply
|
||||
effects:
|
||||
- addressable_flicker:
|
||||
name: Flicker Effect With Custom Values
|
||||
update_interval: 16ms
|
||||
intensity: 5%
|
||||
type: GRBW
|
||||
variant: SK6812
|
||||
method: ESP32_I2S_0
|
||||
num_leds: 60
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
- platform: partition
|
||||
name: Partition Light
|
||||
segments:
|
||||
- id: addr1
|
||||
from: 0
|
||||
to: 0
|
||||
- id: addr2
|
||||
from: 1
|
||||
to: 10
|
||||
- id: addr2
|
||||
from: 20
|
||||
to: 25
|
||||
- single_light_id: ${roomname}_lights
|
||||
|
||||
canbus:
|
||||
- platform: esp32_can
|
||||
id: esp32_internal_can
|
||||
rx_pin: GPIO04
|
||||
tx_pin: GPIO05
|
||||
can_id: 4
|
||||
bit_rate: 50kbps
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: Canbus Actions
|
||||
on_press:
|
||||
- canbus.send: "abc"
|
||||
- canbus.send: [0, 1, 2]
|
||||
- canbus.send: !lambda return {0, 1, 2};
|
4427
tests/test1.yaml
4427
tests/test1.yaml
File diff suppressed because it is too large
Load diff
|
@ -1,809 +0,0 @@
|
|||
---
|
||||
# copy of test5.yaml configured to build on IDF 5
|
||||
esphome:
|
||||
name: test11-5
|
||||
build_path: build/test11.5
|
||||
project:
|
||||
name: esphome.test11_5_project
|
||||
version: "1.0.0"
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.0.2
|
||||
platform_version: 6.3.2
|
||||
advanced:
|
||||
ignore_efuse_mac_crc: true
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: "MySSID"
|
||||
password: "password1"
|
||||
manual_ip:
|
||||
static_ip: 192.168.1.23
|
||||
gateway: 192.168.1.1
|
||||
subnet: 255.255.255.0
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
logger:
|
||||
|
||||
debug:
|
||||
|
||||
psram:
|
||||
|
||||
uart:
|
||||
- id: uart_1
|
||||
tx_pin: 1
|
||||
rx_pin: 3
|
||||
baud_rate: 9600
|
||||
- id: uart_2
|
||||
tx_pin:
|
||||
allow_other_uses: true
|
||||
number: 17
|
||||
rx_pin:
|
||||
allow_other_uses: true
|
||||
number: 16
|
||||
baud_rate: 19200
|
||||
|
||||
i2c:
|
||||
sda:
|
||||
number: 21
|
||||
allow_other_uses: true
|
||||
frequency: 100khz
|
||||
|
||||
spi:
|
||||
- id: spi_1
|
||||
clk_pin:
|
||||
allow_other_uses: true
|
||||
number: 12
|
||||
mosi_pin:
|
||||
allow_other_uses: true
|
||||
number: 13
|
||||
miso_pin:
|
||||
allow_other_uses: true
|
||||
number: 14
|
||||
- id: spi_2
|
||||
clk_pin:
|
||||
allow_other_uses: true
|
||||
number: 32
|
||||
mosi_pin: 33
|
||||
|
||||
modbus:
|
||||
uart_id: uart_1
|
||||
flow_control_pin:
|
||||
allow_other_uses: true
|
||||
number: 5
|
||||
id: mod_bus1
|
||||
|
||||
modbus_controller:
|
||||
- id: modbus_controller_test
|
||||
address: 0x2
|
||||
modbus_id: mod_bus1
|
||||
|
||||
mqtt:
|
||||
broker: test.mosquitto.org
|
||||
port: 1883
|
||||
discovery: true
|
||||
discovery_prefix: homeassistant
|
||||
idf_send_async: false
|
||||
on_message:
|
||||
topic: testing/sensor/testing_sensor/state
|
||||
qos: 0
|
||||
then:
|
||||
# yamllint disable rule:line-length
|
||||
- lambda: |-
|
||||
ESP_LOGD("Mqtt Test", "testing/sensor/testing_sensor/state=[%s]", x.c_str());
|
||||
# yamllint enable rule:line-length
|
||||
|
||||
vbus:
|
||||
- uart_id: uart_2
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO0
|
||||
id: io0_button
|
||||
icon: mdi:gesture-tap-button
|
||||
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_controller_test
|
||||
id: modbus_binsensortest
|
||||
register_type: read
|
||||
address: 0x3200
|
||||
bitmask: 0x80 # (bit 8)
|
||||
lambda: "return x;"
|
||||
|
||||
- platform: tm1638
|
||||
id: Button0
|
||||
key: 0
|
||||
filters:
|
||||
- delayed_on: 10ms
|
||||
on_press:
|
||||
then:
|
||||
- switch.turn_on: Led0
|
||||
on_release:
|
||||
then:
|
||||
- switch.turn_off: Led0
|
||||
- if:
|
||||
condition: ble.enabled
|
||||
then:
|
||||
- ble.disable:
|
||||
else:
|
||||
- ble.enable:
|
||||
|
||||
- platform: tm1638
|
||||
id: Button1
|
||||
key: 1
|
||||
on_press:
|
||||
then:
|
||||
- switch.turn_on: Led1
|
||||
on_release:
|
||||
then:
|
||||
- switch.turn_off: Led1
|
||||
|
||||
- platform: tm1638
|
||||
id: Button2
|
||||
key: 2
|
||||
on_press:
|
||||
then:
|
||||
- switch.turn_on: Led2
|
||||
on_release:
|
||||
then:
|
||||
- switch.turn_off: Led2
|
||||
|
||||
- platform: tm1638
|
||||
id: Button3
|
||||
key: 3
|
||||
on_press:
|
||||
then:
|
||||
- switch.turn_on: Led3
|
||||
on_release:
|
||||
then:
|
||||
- switch.turn_off: Led3
|
||||
|
||||
- platform: tm1638
|
||||
id: Button4
|
||||
key: 4
|
||||
on_press:
|
||||
then:
|
||||
- output.turn_on: Led4
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: Led4
|
||||
|
||||
- platform: tm1638
|
||||
id: Button5
|
||||
key: 5
|
||||
on_press:
|
||||
then:
|
||||
- output.turn_on: Led5
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: Led5
|
||||
|
||||
- platform: tm1638
|
||||
id: Button6
|
||||
key: 6
|
||||
on_press:
|
||||
then:
|
||||
- output.turn_on: Led6
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: Led6
|
||||
|
||||
- platform: tm1638
|
||||
id: Button7
|
||||
key: 7
|
||||
on_press:
|
||||
then:
|
||||
- output.turn_on: Led7
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: Led7
|
||||
|
||||
- platform: gpio
|
||||
id: sn74hc165_pin_0
|
||||
pin:
|
||||
sn74hc165: sn74hc165_hub
|
||||
number: 0
|
||||
|
||||
- platform: ezo_pmp
|
||||
pump_state:
|
||||
name: "Pump State"
|
||||
is_paused:
|
||||
name: "Is Paused"
|
||||
|
||||
- platform: matrix_keypad
|
||||
keypad_id: keypad
|
||||
id: key4
|
||||
row: 1
|
||||
col: 1
|
||||
- platform: matrix_keypad
|
||||
id: key1
|
||||
key: 1
|
||||
|
||||
- platform: vbus
|
||||
model: deltasol_bs_plus
|
||||
relay2:
|
||||
name: Relay 2 On
|
||||
sensor1_error:
|
||||
name: Sensor 1 Error
|
||||
|
||||
- platform: vbus
|
||||
model: custom
|
||||
command: 0x100
|
||||
source: 0x1234
|
||||
dest: 0x10
|
||||
binary_sensors:
|
||||
- id: vcustom_b
|
||||
name: VBus Custom Binary Sensor
|
||||
lambda: return x[0] & 1;
|
||||
|
||||
tlc5947:
|
||||
data_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO12
|
||||
clock_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO14
|
||||
lat_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO15
|
||||
|
||||
gp8403:
|
||||
- id: gp8403_5v
|
||||
voltage: 5V
|
||||
- id: gp8403_10v
|
||||
voltage: 10V
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO2
|
||||
id: built_in_led
|
||||
|
||||
- platform: tlc5947
|
||||
id: output_red
|
||||
channel: 0
|
||||
max_power: 0.8
|
||||
|
||||
- platform: mcp47a1
|
||||
id: output_mcp47a1
|
||||
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_controller_test
|
||||
id: modbus_output_test
|
||||
lambda: |-
|
||||
return x * 1.0 ;
|
||||
address: 0x9001
|
||||
value_type: U_WORD
|
||||
|
||||
- platform: tm1638
|
||||
id: Led4
|
||||
led: 4
|
||||
|
||||
- platform: tm1638
|
||||
id: Led5
|
||||
led: 5
|
||||
|
||||
- platform: tm1638
|
||||
id: Led6
|
||||
led: 6
|
||||
|
||||
- platform: tm1638
|
||||
id: Led7
|
||||
led: 7
|
||||
|
||||
- platform: gp8403
|
||||
id: gp8403_output_0
|
||||
gp8403_id: gp8403_5v
|
||||
channel: 0
|
||||
- platform: gp8403
|
||||
gp8403_id: gp8403_10v
|
||||
id: gp8403_output_1
|
||||
channel: 1
|
||||
|
||||
demo:
|
||||
|
||||
esp32_ble:
|
||||
enable_on_boot: false
|
||||
|
||||
esp32_ble_server:
|
||||
manufacturer: ESPHome
|
||||
model: Test11
|
||||
|
||||
esp32_improv:
|
||||
authorizer: io0_button
|
||||
authorized_duration: 1min
|
||||
status_indicator: built_in_led
|
||||
|
||||
ezo_pmp:
|
||||
id: hcl_pump
|
||||
update_interval: 1s
|
||||
|
||||
number:
|
||||
- platform: template
|
||||
name: My template number
|
||||
id: template_number_id
|
||||
optimistic: true
|
||||
max_value: 100
|
||||
min_value: 0
|
||||
step: 5
|
||||
unit_of_measurement: "%"
|
||||
mode: slider
|
||||
device_class: humidity
|
||||
on_value:
|
||||
- logger.log:
|
||||
format: Number changed to %f
|
||||
args: [x]
|
||||
set_action:
|
||||
- logger.log:
|
||||
format: Template Number set to %f
|
||||
args: [x]
|
||||
- number.set:
|
||||
id: template_number_id
|
||||
value: 50
|
||||
- number.to_min: template_number_id
|
||||
- number.to_min:
|
||||
id: template_number_id
|
||||
- number.to_max: template_number_id
|
||||
- number.to_max:
|
||||
id: template_number_id
|
||||
- number.increment: template_number_id
|
||||
- number.increment:
|
||||
id: template_number_id
|
||||
cycle: false
|
||||
- number.decrement: template_number_id
|
||||
- number.decrement:
|
||||
id: template_number_id
|
||||
cycle: false
|
||||
- number.operation:
|
||||
id: template_number_id
|
||||
operation: Increment
|
||||
cycle: false
|
||||
- number.operation:
|
||||
id: template_number_id
|
||||
operation: !lambda "return NUMBER_OP_INCREMENT;"
|
||||
cycle: !lambda "return false;"
|
||||
|
||||
- id: modbus_numbertest
|
||||
platform: modbus_controller
|
||||
modbus_controller_id: modbus_controller_test
|
||||
name: ModbusNumber
|
||||
address: 0x9002
|
||||
value_type: U_WORD
|
||||
lambda: "return x * 1.0;"
|
||||
write_lambda: |-
|
||||
return x * 1.0 ;
|
||||
multiply: 1.0
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
name: My template select
|
||||
id: template_select_id
|
||||
optimistic: true
|
||||
initial_option: two
|
||||
restore_value: true
|
||||
on_value:
|
||||
- logger.log:
|
||||
format: Select changed to %s (index %d)"
|
||||
args: ["x.c_str()", "i"]
|
||||
set_action:
|
||||
- logger.log:
|
||||
format: Template Select set to %s
|
||||
args: ["x.c_str()"]
|
||||
- select.set:
|
||||
id: template_select_id
|
||||
option: two
|
||||
- select.first: template_select_id
|
||||
- select.last:
|
||||
id: template_select_id
|
||||
- select.previous: template_select_id
|
||||
- select.next:
|
||||
id: template_select_id
|
||||
cycle: false
|
||||
- select.operation:
|
||||
id: template_select_id
|
||||
operation: Previous
|
||||
cycle: false
|
||||
- select.operation:
|
||||
id: template_select_id
|
||||
operation: !lambda "return SELECT_OP_PREVIOUS;"
|
||||
cycle: !lambda "return true;"
|
||||
- select.set_index:
|
||||
id: template_select_id
|
||||
index: 1
|
||||
- select.set_index:
|
||||
id: template_select_id
|
||||
index: !lambda "return 1 + 1;"
|
||||
options:
|
||||
- one
|
||||
- two
|
||||
- three
|
||||
|
||||
- platform: modbus_controller
|
||||
name: Modbus Select Register 1000
|
||||
address: 1000
|
||||
value_type: U_WORD
|
||||
optionsmap:
|
||||
"Zero": 0
|
||||
"One": 1
|
||||
"Two": 2
|
||||
"Three": 3
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: adc_sensor_p32
|
||||
name: ADC pin 32
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: 32
|
||||
attenuation: 11db
|
||||
update_interval: 1s
|
||||
- platform: internal_temperature
|
||||
name: Internal Temperature
|
||||
- platform: selec_meter
|
||||
total_active_energy:
|
||||
name: SelecEM2M Total Active Energy
|
||||
import_active_energy:
|
||||
name: SelecEM2M Import Active Energy
|
||||
export_active_energy:
|
||||
name: SelecEM2M Export Active Energy
|
||||
total_reactive_energy:
|
||||
name: SelecEM2M Total Reactive Energy
|
||||
import_reactive_energy:
|
||||
name: SelecEM2M Import Reactive Energy
|
||||
export_reactive_energy:
|
||||
name: SelecEM2M Export Reactive Energy
|
||||
apparent_energy:
|
||||
name: SelecEM2M Apparent Energy
|
||||
active_power:
|
||||
name: SelecEM2M Active Power
|
||||
reactive_power:
|
||||
name: SelecEM2M Reactive Power
|
||||
apparent_power:
|
||||
name: SelecEM2M Apparent Power
|
||||
voltage:
|
||||
name: SelecEM2M Voltage
|
||||
current:
|
||||
name: SelecEM2M Current
|
||||
power_factor:
|
||||
name: SelecEM2M Power Factor
|
||||
frequency:
|
||||
name: SelecEM2M Frequency
|
||||
maximum_demand_active_power:
|
||||
name: SelecEM2M Maximum Demand Active Power
|
||||
disabled_by_default: true
|
||||
maximum_demand_reactive_power:
|
||||
name: SelecEM2M Maximum Demand Reactive Power
|
||||
disabled_by_default: true
|
||||
maximum_demand_apparent_power:
|
||||
name: SelecEM2M Maximum Demand Apparent Power
|
||||
disabled_by_default: true
|
||||
|
||||
- id: modbus_sensortest
|
||||
platform: modbus_controller
|
||||
modbus_controller_id: modbus_controller_test
|
||||
address: 0x331A
|
||||
register_type: read
|
||||
value_type: U_WORD
|
||||
|
||||
- platform: t6615
|
||||
uart_id: uart_2
|
||||
co2:
|
||||
name: CO2 Sensor
|
||||
|
||||
- platform: sen5x
|
||||
id: sen54
|
||||
temperature:
|
||||
name: Temperature
|
||||
accuracy_decimals: 1
|
||||
humidity:
|
||||
name: Humidity
|
||||
accuracy_decimals: 0
|
||||
pm_1_0:
|
||||
name: PM <1µm Weight concentration
|
||||
id: pm_1_0
|
||||
accuracy_decimals: 1
|
||||
pm_2_5:
|
||||
name: PM <2.5µm Weight concentration
|
||||
id: pm_2_5
|
||||
accuracy_decimals: 1
|
||||
pm_4_0:
|
||||
name: PM <4µm Weight concentration
|
||||
id: pm_4_0
|
||||
accuracy_decimals: 1
|
||||
pm_10_0:
|
||||
name: PM <10µm Weight concentration
|
||||
id: pm_10_0
|
||||
accuracy_decimals: 1
|
||||
nox:
|
||||
name: NOx
|
||||
voc:
|
||||
name: VOC
|
||||
algorithm_tuning:
|
||||
index_offset: 100
|
||||
learning_time_offset_hours: 12
|
||||
learning_time_gain_hours: 12
|
||||
gating_max_duration_minutes: 180
|
||||
std_initial: 50
|
||||
gain_factor: 230
|
||||
temperature_compensation:
|
||||
offset: 0
|
||||
normalized_offset_slope: 0
|
||||
time_constant: 0
|
||||
auto_cleaning_interval: 604800s
|
||||
acceleration_mode: low
|
||||
store_baseline: true
|
||||
address: 0x69
|
||||
- platform: mcp9600
|
||||
thermocouple_type: K
|
||||
hot_junction:
|
||||
name: Thermocouple Temperature
|
||||
cold_junction:
|
||||
name: Ambient Temperature
|
||||
|
||||
- platform: ezo_pmp
|
||||
current_volume_dosed:
|
||||
name: Current Volume Dosed
|
||||
total_volume_dosed:
|
||||
name: Total Volume Dosed
|
||||
absolute_total_volume_dosed:
|
||||
name: Absolute Total Volume Dosed
|
||||
pump_voltage:
|
||||
name: Pump Voltage
|
||||
last_volume_requested:
|
||||
name: Last Volume Requested
|
||||
max_flow_rate:
|
||||
name: Max Flow Rate
|
||||
|
||||
- platform: vbus
|
||||
model: deltasol c
|
||||
temperature_3:
|
||||
name: Temperature 3
|
||||
operating_hours_1:
|
||||
name: Operating Hours 1
|
||||
heat_quantity:
|
||||
name: Heat Quantity
|
||||
time:
|
||||
name: System Time
|
||||
|
||||
- platform: debug
|
||||
free:
|
||||
name: "Heap Free"
|
||||
block:
|
||||
name: "Heap Max Block"
|
||||
loop_time:
|
||||
name: "Loop Time"
|
||||
psram:
|
||||
name: "PSRAM Free"
|
||||
|
||||
- platform: vbus
|
||||
model: custom
|
||||
command: 0x100
|
||||
source: 0x1234
|
||||
dest: 0x10
|
||||
sensors:
|
||||
- id: vcustom
|
||||
name: VBus Custom Sensor
|
||||
lambda: return x[0] / 10.0;
|
||||
|
||||
- platform: kuntze
|
||||
ph:
|
||||
name: Kuntze pH
|
||||
temperature:
|
||||
name: Kuntze temperature
|
||||
|
||||
- platform: ade7953_i2c
|
||||
irq_pin:
|
||||
allow_other_uses: true
|
||||
number: 16
|
||||
voltage:
|
||||
name: ADE7953 Voltage
|
||||
current_a:
|
||||
name: ADE7953 Current A
|
||||
current_b:
|
||||
name: ADE7953 Current B
|
||||
power_factor_a:
|
||||
name: "ADE7953 Power Factor A"
|
||||
power_factor_b:
|
||||
name: "ADE7953 Power Factor B"
|
||||
apparent_power_a:
|
||||
name: "ADE7953 Apparent Power A"
|
||||
apparent_power_b:
|
||||
name: "ADE7953 Apparent Power B"
|
||||
active_power_a:
|
||||
name: ADE7953 Active Power A
|
||||
active_power_b:
|
||||
name: ADE7953 Active Power B
|
||||
reactive_power_a:
|
||||
name: "ADE7953 Reactive Power A"
|
||||
reactive_power_b:
|
||||
name: "ADE7953 Reactive Power B"
|
||||
update_interval: 1s
|
||||
|
||||
- platform: ade7953_spi
|
||||
spi_id: spi_1
|
||||
cs_pin: 04
|
||||
irq_pin:
|
||||
allow_other_uses: true
|
||||
number: 16
|
||||
voltage:
|
||||
name: ADE7953 Voltage
|
||||
current_a:
|
||||
name: ADE7953 Current A
|
||||
current_b:
|
||||
name: ADE7953 Current B
|
||||
power_factor_a:
|
||||
name: "ADE7953 Power Factor A"
|
||||
power_factor_b:
|
||||
name: "ADE7953 Power Factor B"
|
||||
apparent_power_a:
|
||||
name: "ADE7953 Apparent Power A"
|
||||
apparent_power_b:
|
||||
name: "ADE7953 Apparent Power B"
|
||||
active_power_a:
|
||||
name: ADE7953 Active Power A
|
||||
active_power_b:
|
||||
name: ADE7953 Active Power B
|
||||
reactive_power_a:
|
||||
name: "ADE7953 Reactive Power A"
|
||||
reactive_power_b:
|
||||
name: "ADE7953 Reactive Power B"
|
||||
update_interval: 1s
|
||||
|
||||
script:
|
||||
- id: automation_test
|
||||
then:
|
||||
- repeat:
|
||||
count: 5
|
||||
then:
|
||||
- logger.log: looping!
|
||||
|
||||
- id: zero_repeat_test
|
||||
then:
|
||||
- repeat:
|
||||
count: !lambda "return 0;"
|
||||
then:
|
||||
- logger.log: shouldn't see mee!
|
||||
|
||||
switch:
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_controller_test
|
||||
id: modbus_switch_test
|
||||
register_type: coil
|
||||
address: 2
|
||||
bitmask: 1
|
||||
|
||||
- platform: tm1638
|
||||
id: Led0
|
||||
led: 0
|
||||
name: TM1638Led0
|
||||
|
||||
- platform: tm1638
|
||||
id: Led1
|
||||
led: 1
|
||||
name: TM1638Led1
|
||||
|
||||
- platform: tm1638
|
||||
id: Led2
|
||||
led: 2
|
||||
name: TM1638Led2
|
||||
|
||||
- platform: tm1638
|
||||
id: Led3
|
||||
led: 3
|
||||
name: TM1638Led3
|
||||
|
||||
display:
|
||||
- platform: tm1638
|
||||
id: primarydisplay
|
||||
stb_pin:
|
||||
allow_other_uses: true
|
||||
number: 5 # TM1638 STB
|
||||
clk_pin: 18 # TM1638 CLK
|
||||
dio_pin: 23 # TM1638 DIO
|
||||
update_interval: 5s
|
||||
intensity: 5
|
||||
lambda: |-
|
||||
it.print("81818181");
|
||||
|
||||
time:
|
||||
- platform: pcf85063
|
||||
- platform: pcf8563
|
||||
|
||||
text_sensor:
|
||||
- platform: ezo_pmp
|
||||
dosing_mode:
|
||||
name: Dosing Mode
|
||||
calibration_status:
|
||||
name: Calibration Status
|
||||
on_value:
|
||||
- ezo_pmp.dose_volume:
|
||||
id: hcl_pump
|
||||
volume: 10
|
||||
- ezo_pmp.dose_volume_over_time:
|
||||
id: hcl_pump
|
||||
volume: 10
|
||||
duration: 2
|
||||
- ezo_pmp.dose_with_constant_flow_rate:
|
||||
id: hcl_pump
|
||||
volume_per_minute: 10
|
||||
duration: 2
|
||||
- ezo_pmp.set_calibration_volume:
|
||||
id: hcl_pump
|
||||
volume: 10
|
||||
- ezo_pmp.find: hcl_pump
|
||||
- ezo_pmp.dose_continuously: hcl_pump
|
||||
- ezo_pmp.clear_total_volume_dosed: hcl_pump
|
||||
- ezo_pmp.clear_calibration: hcl_pump
|
||||
- ezo_pmp.pause_dosing: hcl_pump
|
||||
- ezo_pmp.stop_dosing: hcl_pump
|
||||
- ezo_pmp.arbitrary_command:
|
||||
id: hcl_pump
|
||||
command: D,?
|
||||
|
||||
sn74hc165:
|
||||
id: sn74hc165_hub
|
||||
data_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO12
|
||||
clock_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO14
|
||||
load_pin:
|
||||
number: GPIO27
|
||||
clock_inhibit_pin:
|
||||
number: GPIO26
|
||||
sr_count: 4
|
||||
|
||||
matrix_keypad:
|
||||
id: keypad
|
||||
rows:
|
||||
- pin:
|
||||
allow_other_uses: true
|
||||
number: 21
|
||||
- pin: 19
|
||||
columns:
|
||||
- pin:
|
||||
allow_other_uses: true
|
||||
number: 17
|
||||
- pin:
|
||||
allow_other_uses: true
|
||||
number: 16
|
||||
keys: "1234"
|
||||
|
||||
key_collector:
|
||||
- id: reader
|
||||
source_id: keypad
|
||||
min_length: 4
|
||||
max_length: 4
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
id: led_strip
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: 13
|
||||
num_leds: 60
|
||||
rmt_channel: 6
|
||||
rgb_order: GRB
|
||||
chipset: ws2812
|
||||
- platform: esp32_rmt_led_strip
|
||||
id: led_strip2
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: 15
|
||||
num_leds: 60
|
||||
rmt_channel: 2
|
||||
rgb_order: RGB
|
||||
bit0_high: 100us
|
||||
bit0_low: 100us
|
||||
bit1_high: 100us
|
||||
bit1_low: 100us
|
879
tests/test2.yaml
879
tests/test2.yaml
|
@ -1,879 +0,0 @@
|
|||
---
|
||||
esphome:
|
||||
name: $devicename
|
||||
build_path: build/test2
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
flash_size: 8MB
|
||||
|
||||
globals:
|
||||
- id: my_global_string
|
||||
type: std::string
|
||||
restore_value: true
|
||||
max_restore_data_length: 70
|
||||
initial_value: '"DefaultValue"'
|
||||
|
||||
substitutions:
|
||||
devicename: test2
|
||||
|
||||
ethernet:
|
||||
type: LAN8720
|
||||
mdc_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
mdio_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO25
|
||||
clk_mode: GPIO0_IN
|
||||
phy_addr: 0
|
||||
power_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO25
|
||||
manual_ip:
|
||||
static_ip: 192.168.178.56
|
||||
gateway: 192.168.178.1
|
||||
subnet: 255.255.255.0
|
||||
domain: .local
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
|
||||
mdns:
|
||||
disabled: true
|
||||
|
||||
api:
|
||||
|
||||
i2c:
|
||||
sda:
|
||||
allow_other_uses: true
|
||||
number: 21
|
||||
scl:
|
||||
allow_other_uses: true
|
||||
number: 22
|
||||
scan: false
|
||||
|
||||
spi:
|
||||
clk_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO21
|
||||
mosi_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO22
|
||||
miso_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
|
||||
uart:
|
||||
tx_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO22
|
||||
rx_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
baud_rate: 115200
|
||||
# Specifically added for testing debug with no after: definition.
|
||||
debug:
|
||||
dummy_receiver: false
|
||||
direction: rx
|
||||
sequence:
|
||||
- lambda: UARTDebug::log_hex(direction, bytes, ':');
|
||||
|
||||
safe_mode:
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
port: 3286
|
||||
|
||||
logger:
|
||||
level: DEBUG
|
||||
|
||||
debug:
|
||||
|
||||
deep_sleep:
|
||||
run_duration:
|
||||
default: 20s
|
||||
gpio_wakeup_reason: 10s
|
||||
touch_wakeup_reason: 15s
|
||||
sleep_duration: 50s
|
||||
wakeup_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO2
|
||||
wakeup_pin_mode: INVERT_WAKEUP
|
||||
|
||||
as3935_i2c:
|
||||
irq_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO12
|
||||
|
||||
mcp3008:
|
||||
- id: mcp3008_hub
|
||||
cs_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO12
|
||||
|
||||
output:
|
||||
- platform: ac_dimmer
|
||||
id: dimmer1
|
||||
gate_pin: GPIO5
|
||||
zero_cross_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO12
|
||||
|
||||
sensor:
|
||||
- platform: homeassistant
|
||||
entity_id: sensor.hello_world
|
||||
id: ha_hello_world
|
||||
- platform: homeassistant
|
||||
entity_id: climate.living_room
|
||||
attribute: temperature
|
||||
id: ha_hello_world_temperature
|
||||
- platform: ble_rssi
|
||||
mac_address: AC:37:43:77:5F:4C
|
||||
name: BLE Google Home Mini RSSI value
|
||||
- platform: ble_rssi
|
||||
service_uuid: 11aa
|
||||
name: BLE Test Service 16
|
||||
- platform: ble_rssi
|
||||
service_uuid: "11223344"
|
||||
name: BLE Test Service 32
|
||||
- platform: ble_rssi
|
||||
service_uuid: 11223344-5566-7788-99aa-bbccddeeff00
|
||||
name: BLE Test Service 128
|
||||
- platform: ble_rssi
|
||||
service_uuid: 11223344-5566-7788-99aa-bbccddeeff00
|
||||
name: BLE Test iBeacon UUID
|
||||
- platform: b_parasite
|
||||
mac_address: F0:CA:F0:CA:01:01
|
||||
humidity:
|
||||
name: b-parasite Air Humidity
|
||||
temperature:
|
||||
name: b-parasite Air Temperature
|
||||
moisture:
|
||||
name: b-parasite Soil Moisture
|
||||
battery_voltage:
|
||||
name: b-parasite Battery Voltage
|
||||
illuminance:
|
||||
name: b-parasite Illuminance
|
||||
- platform: senseair
|
||||
id: senseair0
|
||||
co2:
|
||||
name: SenseAir CO2 Value
|
||||
on_value:
|
||||
then:
|
||||
- senseair.background_calibration: senseair0
|
||||
- senseair.background_calibration_result: senseair0
|
||||
- senseair.abc_get_period: senseair0
|
||||
- senseair.abc_enable: senseair0
|
||||
- senseair.abc_disable: senseair0
|
||||
update_interval: 15s
|
||||
- platform: ruuvitag
|
||||
mac_address: FF:56:D3:2F:7D:E8
|
||||
humidity:
|
||||
name: RuuviTag Humidity
|
||||
temperature:
|
||||
name: RuuviTag Temperature
|
||||
pressure:
|
||||
name: RuuviTag Pressure
|
||||
acceleration_x:
|
||||
name: RuuviTag Acceleration X
|
||||
acceleration_y:
|
||||
name: RuuviTag Acceleration Y
|
||||
acceleration_z:
|
||||
name: RuuviTag Acceleration Z
|
||||
battery_voltage:
|
||||
name: RuuviTag Battery Voltage
|
||||
tx_power:
|
||||
name: RuuviTag TX Power
|
||||
movement_counter:
|
||||
name: RuuviTag Movement Counter
|
||||
measurement_sequence_number:
|
||||
name: RuuviTag Measurement Sequence Number
|
||||
- platform: as3935
|
||||
lightning_energy:
|
||||
name: Lightning Energy
|
||||
distance:
|
||||
name: Distance Storm
|
||||
- platform: xiaomi_hhccjcy01
|
||||
mac_address: 94:2B:FF:5C:91:61
|
||||
temperature:
|
||||
name: Xiaomi HHCCJCY01 Temperature
|
||||
moisture:
|
||||
name: Xiaomi HHCCJCY01 Moisture
|
||||
illuminance:
|
||||
name: Xiaomi HHCCJCY01 Illuminance
|
||||
conductivity:
|
||||
name: Xiaomi HHCCJCY01 Soil Conductivity
|
||||
battery_level:
|
||||
name: Xiaomi HHCCJCY01 Battery Level
|
||||
- platform: xiaomi_hhccjcy10
|
||||
mac_address: DD:25:6D:E4:FF:8F
|
||||
temperature:
|
||||
name: "Xiaomi HHCCJCY10 Temperature"
|
||||
moisture:
|
||||
name: "Xiaomi HHCCJCY10 Moisture"
|
||||
illuminance:
|
||||
name: "Xiaomi HHCCJCY10 Illuminance"
|
||||
conductivity:
|
||||
name: "Xiaomi HHCCJCY10 Soil Conductivity"
|
||||
battery_level:
|
||||
name: "Xiaomi HHCCJCY10 Battery Level"
|
||||
- platform: xiaomi_lywsdcgq
|
||||
mac_address: 7A:80:8E:19:36:BA
|
||||
temperature:
|
||||
name: Xiaomi LYWSDCGQ Temperature
|
||||
humidity:
|
||||
name: Xiaomi LYWSDCGQ Humidity
|
||||
battery_level:
|
||||
name: Xiaomi LYWSDCGQ Battery Level
|
||||
- platform: xiaomi_lywsd02
|
||||
mac_address: 3F:5B:7D:82:58:4E
|
||||
temperature:
|
||||
name: Xiaomi LYWSD02 Temperature
|
||||
humidity:
|
||||
name: Xiaomi LYWSD02 Humidity
|
||||
battery_level:
|
||||
name: Xiaomi LYWSD02 Battery Level
|
||||
- platform: xiaomi_cgg1
|
||||
mac_address: 7A:80:8E:19:36:BA
|
||||
temperature:
|
||||
name: Xiaomi CGG1 Temperature
|
||||
humidity:
|
||||
name: Xiaomi CGG1 Humidity
|
||||
battery_level:
|
||||
name: Xiaomi CGG1 Battery Level
|
||||
- platform: xiaomi_gcls002
|
||||
mac_address: 94:2B:FF:5C:91:61
|
||||
temperature:
|
||||
name: GCLS02 Temperature
|
||||
moisture:
|
||||
name: GCLS02 Moisture
|
||||
conductivity:
|
||||
name: GCLS02 Soil Conductivity
|
||||
illuminance:
|
||||
name: GCLS02 Illuminance
|
||||
- platform: xiaomi_hhccpot002
|
||||
mac_address: 94:2B:FF:5C:91:61
|
||||
moisture:
|
||||
name: HHCCPOT002 Moisture
|
||||
conductivity:
|
||||
name: HHCCPOT002 Soil Conductivity
|
||||
- platform: xiaomi_lywsd03mmc
|
||||
mac_address: A4:C1:38:4E:16:78
|
||||
bindkey: e9efaa6873f9f9c87a5e75a5f814801c
|
||||
temperature:
|
||||
name: Xiaomi LYWSD03MMC Temperature
|
||||
humidity:
|
||||
name: Xiaomi LYWSD03MMC Humidity
|
||||
battery_level:
|
||||
name: Xiaomi LYWSD03MMC Battery Level
|
||||
- platform: xiaomi_cgd1
|
||||
mac_address: A4:C1:38:D1:61:7D
|
||||
bindkey: c99d2313182473b38001086febf781bd
|
||||
temperature:
|
||||
name: Xiaomi CGD1 Temperature
|
||||
humidity:
|
||||
name: Xiaomi CGD1 Humidity
|
||||
battery_level:
|
||||
name: Xiaomi CGD1 Battery Level
|
||||
- platform: xiaomi_jqjcy01ym
|
||||
mac_address: 7A:80:8E:19:36:BA
|
||||
temperature:
|
||||
name: JQJCY01YM Temperature
|
||||
humidity:
|
||||
name: JQJCY01YM Humidity
|
||||
formaldehyde:
|
||||
name: JQJCY01YM Formaldehyde
|
||||
battery_level:
|
||||
name: JQJCY01YM Battery Level
|
||||
- platform: xiaomi_mhoc303
|
||||
mac_address: E7:50:59:32:A0:1C
|
||||
temperature:
|
||||
name: MHO-C303 Temperature
|
||||
humidity:
|
||||
name: MHO-C303 Humidity
|
||||
battery_level:
|
||||
name: MHO-C303 Battery Level
|
||||
- platform: atc_mithermometer
|
||||
mac_address: A4:C1:38:4E:16:78
|
||||
temperature:
|
||||
name: ATC Temperature
|
||||
humidity:
|
||||
name: ATC Humidity
|
||||
battery_level:
|
||||
name: ATC Battery-Level
|
||||
battery_voltage:
|
||||
name: ATC Battery-Voltage
|
||||
- platform: pvvx_mithermometer
|
||||
mac_address: A4:C1:38:4E:16:78
|
||||
temperature:
|
||||
name: PVVX Temperature
|
||||
humidity:
|
||||
name: PVVX Humidity
|
||||
battery_level:
|
||||
name: PVVX Battery-Level
|
||||
battery_voltage:
|
||||
name: PVVX Battery-Voltage
|
||||
- platform: inkbird_ibsth1_mini
|
||||
mac_address: 38:81:D7:0A:9C:11
|
||||
temperature:
|
||||
name: Inkbird IBS-TH1 Temperature
|
||||
humidity:
|
||||
name: Inkbird IBS-TH1 Humidity
|
||||
battery_level:
|
||||
name: Inkbird IBS-TH1 Battery Level
|
||||
- platform: xiaomi_rtcgq02lm
|
||||
id: motion_rtcgq02lm
|
||||
battery_level:
|
||||
name: Mi Motion Sensor 2 Battery level
|
||||
- platform: ltr390
|
||||
uv:
|
||||
name: LTR390 UV
|
||||
uv_index:
|
||||
name: LTR390 UVI
|
||||
light:
|
||||
name: LTR390 Light
|
||||
ambient_light:
|
||||
name: LTR390 ALS
|
||||
gain: X3
|
||||
resolution: 18
|
||||
window_correction_factor: 1.0
|
||||
address: 0x53
|
||||
update_interval: 60s
|
||||
- platform: sgp4x
|
||||
voc:
|
||||
name: VOC Index
|
||||
id: sgp40_voc_index
|
||||
algorithm_tuning:
|
||||
index_offset: 100
|
||||
learning_time_offset_hours: 12
|
||||
learning_time_gain_hours: 12
|
||||
gating_max_duration_minutes: 180
|
||||
std_initial: 50
|
||||
gain_factor: 230
|
||||
nox:
|
||||
name: NOx
|
||||
algorithm_tuning:
|
||||
index_offset: 100
|
||||
learning_time_offset_hours: 12
|
||||
learning_time_gain_hours: 12
|
||||
gating_max_duration_minutes: 180
|
||||
std_initial: 50
|
||||
gain_factor: 230
|
||||
update_interval: 5s
|
||||
- platform: mcp3008
|
||||
update_interval: 5s
|
||||
mcp3008_id: mcp3008_hub
|
||||
id: freezer_temp_source
|
||||
reference_voltage: 3.19
|
||||
number: 0
|
||||
- id: airthingswp
|
||||
platform: airthings_wave_plus
|
||||
ble_client_id: airthings01
|
||||
update_interval: 5min
|
||||
battery_update_interval: 12h
|
||||
temperature:
|
||||
name: Wave Plus Temperature
|
||||
radon:
|
||||
name: Wave Plus Radon
|
||||
radon_long_term:
|
||||
name: Wave Plus Radon Long Term
|
||||
pressure:
|
||||
name: Wave Plus Pressure
|
||||
humidity:
|
||||
name: Wave Plus Humidity
|
||||
co2:
|
||||
name: Wave Plus CO2
|
||||
tvoc:
|
||||
name: Wave Plus VOC
|
||||
battery_voltage:
|
||||
name: Wave Plus Battery Voltage
|
||||
- id: airthingswm
|
||||
platform: airthings_wave_mini
|
||||
ble_client_id: airthingsmini01
|
||||
update_interval: 5min
|
||||
battery_update_interval: 12h
|
||||
temperature:
|
||||
name: Wave Mini Temperature
|
||||
humidity:
|
||||
name: Wave Mini Humidity
|
||||
pressure:
|
||||
name: Wave Mini Pressure
|
||||
tvoc:
|
||||
name: Wave Mini VOC
|
||||
battery_voltage:
|
||||
name: Wave Mini Battery Voltage
|
||||
- platform: ina260
|
||||
address: 0x40
|
||||
current:
|
||||
name: INA260 Current
|
||||
power:
|
||||
name: INA260 Power
|
||||
bus_voltage:
|
||||
name: INA260 Voltage
|
||||
update_interval: 60s
|
||||
- platform: radon_eye_rd200
|
||||
ble_client_id: radon_eye_ble_id
|
||||
update_interval: 10min
|
||||
radon:
|
||||
name: RD200 Radon
|
||||
radon_long_term:
|
||||
name: RD200 Radon Long Term
|
||||
- platform: mopeka_pro_check
|
||||
mac_address: D3:75:F2:DC:16:91
|
||||
tank_type: CUSTOM
|
||||
custom_distance_full: 40cm
|
||||
custom_distance_empty: 10mm
|
||||
temperature:
|
||||
name: Propane test temp
|
||||
level:
|
||||
name: Propane test level
|
||||
distance:
|
||||
name: Propane test distance
|
||||
battery_level:
|
||||
name: Propane test battery level
|
||||
- platform: ufire_ec
|
||||
id: ufire_ec_board
|
||||
ec:
|
||||
name: Ufire EC
|
||||
temperature_sensor: ha_hello_world_temperature
|
||||
temperature_compensation: 20.0
|
||||
temperature_coefficient: 0.019
|
||||
- platform: ufire_ise
|
||||
id: ufire_ise_board
|
||||
temperature_sensor: ha_hello_world_temperature
|
||||
ph:
|
||||
name: Ufire pH
|
||||
- platform: mics_4514
|
||||
update_interval: 60s
|
||||
nitrogen_dioxide:
|
||||
name: MICS-4514 NO2
|
||||
carbon_monoxide:
|
||||
name: MICS-4514 CO
|
||||
methane:
|
||||
name: MICS-4514 CH4
|
||||
hydrogen:
|
||||
name: MICS-4514 H2
|
||||
ethanol:
|
||||
name: MICS-4514 C2H5OH
|
||||
ammonia:
|
||||
name: MICS-4514 NH3
|
||||
- platform: mopeka_std_check
|
||||
mac_address: D3:75:F2:DC:16:91
|
||||
tank_type: CUSTOM
|
||||
custom_distance_full: 40cm
|
||||
custom_distance_empty: 10mm
|
||||
temperature:
|
||||
name: Propane test temp
|
||||
level:
|
||||
name: Propane test level
|
||||
distance:
|
||||
name: Propane test distance
|
||||
battery_level:
|
||||
name: Propane test battery level
|
||||
- platform: duty_time
|
||||
id: duty_time1
|
||||
name: Test Duty Time
|
||||
restore: true
|
||||
last_time:
|
||||
name: Test Last Duty Time Sensor
|
||||
sensor: ha_hello_world_binary
|
||||
- platform: duty_time
|
||||
id: duty_time2
|
||||
name: Test Duty Time 2
|
||||
restore: false
|
||||
lambda: "return true;"
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
on_time:
|
||||
- at: "16:00:00"
|
||||
then:
|
||||
- logger.log: It's 16:00
|
||||
- if:
|
||||
condition:
|
||||
- sensor.duty_time.is_running: duty_time2
|
||||
then:
|
||||
- sensor.duty_time.start: duty_time1
|
||||
- if:
|
||||
condition:
|
||||
- sensor.duty_time.is_not_running: duty_time1
|
||||
then:
|
||||
- sensor.duty_time.stop: duty_time2
|
||||
- sensor.duty_time.reset: duty_time1
|
||||
|
||||
esp32_touch:
|
||||
setup_mode: true
|
||||
|
||||
binary_sensor:
|
||||
- platform: homeassistant
|
||||
entity_id: binary_sensor.hello_world
|
||||
id: ha_hello_world_binary
|
||||
- platform: homeassistant
|
||||
entity_id: binary_sensor.hello
|
||||
attribute: world
|
||||
id: ha_hello_world_binary_attribute
|
||||
- platform: ble_presence
|
||||
mac_address: AC:37:43:77:5F:4C
|
||||
name: ESP32 BLE Tracker Google Home Mini
|
||||
timeout: 30s
|
||||
- platform: ble_presence
|
||||
service_uuid: 11aa
|
||||
name: BLE Test Service 16 Presence
|
||||
- platform: ble_presence
|
||||
service_uuid: "11223344"
|
||||
name: BLE Test Service 32 Presence
|
||||
- platform: ble_presence
|
||||
service_uuid: 11223344-5566-7788-99aa-bbccddeeff00
|
||||
name: BLE Test Service 128 Presence
|
||||
- platform: ble_presence
|
||||
ibeacon_uuid: 11223344-5566-7788-99aa-bbccddeeff00
|
||||
ibeacon_major: 100
|
||||
ibeacon_minor: 1
|
||||
name: BLE Test iBeacon Presence
|
||||
- platform: esp32_touch
|
||||
name: ESP32 Touch Pad GPIO27
|
||||
pin: GPIO27
|
||||
threshold: 1000
|
||||
- platform: as3935
|
||||
name: Storm Alert
|
||||
- platform: xiaomi_mue4094rt
|
||||
name: MUE4094RT Motion
|
||||
mac_address: 7A:80:8E:19:36:BA
|
||||
timeout: 5s
|
||||
- platform: xiaomi_mjyd02yla
|
||||
name: MJYD02YL-A Motion
|
||||
mac_address: 50:EC:50:CD:32:02
|
||||
bindkey: 48403ebe2d385db8d0c187f81e62cb64
|
||||
idle_time:
|
||||
name: MJYD02YL-A Idle Time
|
||||
light:
|
||||
name: MJYD02YL-A Light Status
|
||||
battery_level:
|
||||
name: MJYD02YL-A Battery Level
|
||||
- platform: xiaomi_wx08zm
|
||||
name: WX08ZM Activation State
|
||||
mac_address: 74:a3:4a:b5:07:34
|
||||
tablet:
|
||||
name: WX08ZM Tablet Resource
|
||||
battery_level:
|
||||
name: WX08ZM Battery Level
|
||||
- platform: xiaomi_cgpr1
|
||||
name: CGPR1 Motion
|
||||
mac_address: "12:34:56:12:34:56"
|
||||
bindkey: 48403ebe2d385db8d0c187f81e62cb64
|
||||
battery_level:
|
||||
name: CGPR1 battery Level
|
||||
idle_time:
|
||||
name: CGPR1 Idle Time
|
||||
illuminance:
|
||||
name: CGPR1 Illuminance
|
||||
- platform: xiaomi_rtcgq02lm
|
||||
id: motion_rtcgq02lm
|
||||
motion:
|
||||
name: Mi Motion Sensor 2
|
||||
light:
|
||||
name: Mi Motion Sensor 2 Light
|
||||
button:
|
||||
name: Mi Motion Sensor 2 Button
|
||||
- platform: gpio
|
||||
id: gpio_set_retry_test
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO9
|
||||
on_press:
|
||||
then:
|
||||
- lambda: |-
|
||||
App.scheduler.set_retry(id(gpio_set_retry_test), "set_retry_test", 100, 3, [](const uint8_t remaining) {
|
||||
return remaining ? RetryResult::RETRY : RetryResult::DONE; // just to reference both symbols
|
||||
}, 5.0f);
|
||||
|
||||
esp32_ble_tracker:
|
||||
on_ble_advertise:
|
||||
- mac_address:
|
||||
- AA:BB:CC:DD:EE:FF
|
||||
- FF:EE:DD:CC:BB:AA
|
||||
then:
|
||||
# yamllint disable rule:line-length
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("main", "The device address (%s) exists in list", x.address_str().c_str());
|
||||
# yamllint enable rule:line-length
|
||||
- mac_address: AC:37:43:77:5F:4C
|
||||
then:
|
||||
# yamllint disable rule:line-length
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("main", "The device address is %s", x.address_str().c_str());
|
||||
# yamllint enable rule:line-length
|
||||
- then:
|
||||
# yamllint disable rule:line-length
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("main", "The device address is %s", x.address_str().c_str());
|
||||
# yamllint enable rule:line-length
|
||||
on_ble_service_data_advertise:
|
||||
- service_uuid: ABCD
|
||||
then:
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("main", "Length of service data is %i", x.size());
|
||||
on_ble_manufacturer_data_advertise:
|
||||
- manufacturer_id: ABCD
|
||||
then:
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("main", "Length of manufacturer data is %i", x.size());
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: airthings01
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: airthingsmini01
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: radon_eye_ble_id
|
||||
|
||||
airthings_ble:
|
||||
|
||||
radon_eye_ble:
|
||||
|
||||
ruuvi_ble:
|
||||
|
||||
xiaomi_ble:
|
||||
|
||||
mopeka_ble:
|
||||
|
||||
bluetooth_proxy:
|
||||
active: true
|
||||
|
||||
xiaomi_rtcgq02lm:
|
||||
- id: motion_rtcgq02lm
|
||||
mac_address: 01:02:03:04:05:06
|
||||
bindkey: "48403ebe2d385db8d0c187f81e62cb64"
|
||||
|
||||
status_led:
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO2
|
||||
|
||||
text_sensor:
|
||||
- platform: version
|
||||
name: ESPHome Version
|
||||
icon: mdi:icon
|
||||
id: version_sensor
|
||||
on_value:
|
||||
- if:
|
||||
condition:
|
||||
- api.connected:
|
||||
then:
|
||||
# yamllint disable rule:line-length
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("main", "The state is %s=%s", x.c_str(), id(version_sensor).state.c_str());
|
||||
# yamllint enable rule:line-length
|
||||
- script.execute: my_script
|
||||
- script.execute:
|
||||
id: my_script_with_params
|
||||
prefix: Running my_script_with_params
|
||||
param2: 100
|
||||
param3: true
|
||||
- script.execute:
|
||||
id: my_script_with_params
|
||||
prefix: Running my_script_with_params using lambda parameters
|
||||
param2: !lambda return 200;
|
||||
param3: !lambda return true;
|
||||
- homeassistant.service:
|
||||
service: notify.html5
|
||||
data:
|
||||
title: New Humidity
|
||||
data_template:
|
||||
message: The humidity is {{ my_variable }}%.
|
||||
variables:
|
||||
my_variable: |-
|
||||
return id(version_sensor).state;
|
||||
my_variable_str: |-
|
||||
return "Hello World";
|
||||
- homeassistant.service:
|
||||
service: light.turn_on
|
||||
data:
|
||||
entity_id: light.my_light
|
||||
- homeassistant.tag_scanned:
|
||||
tag: 1234-abcd
|
||||
- homeassistant.tag_scanned: 1234-abcd
|
||||
- deep_sleep.enter:
|
||||
sleep_duration: 30min
|
||||
- deep_sleep.enter:
|
||||
sleep_duration: !lambda "return 30 * 60 * 1000;"
|
||||
- platform: template
|
||||
name: Template Text Sensor
|
||||
lambda: |-
|
||||
return {"Hello World"};
|
||||
filters:
|
||||
- to_upper:
|
||||
- to_lower:
|
||||
- append: xyz
|
||||
- prepend: abcd
|
||||
- substitute:
|
||||
- Hello -> Goodbye
|
||||
- map:
|
||||
- red -> green
|
||||
- lambda: 'return {"1234"};'
|
||||
- platform: homeassistant
|
||||
entity_id: sensor.hello_world2
|
||||
id: ha_hello_world2
|
||||
- platform: homeassistant
|
||||
entity_id: sensor.hello_world3
|
||||
id: ha_hello_world3
|
||||
attribute: some_attribute
|
||||
- platform: ble_scanner
|
||||
name: Scanner
|
||||
|
||||
script:
|
||||
- id: my_script
|
||||
mode: single
|
||||
then:
|
||||
- lambda: 'ESP_LOGD("main", "Hello World!");'
|
||||
- id: my_script_queued
|
||||
mode: queued
|
||||
max_runs: 2
|
||||
then:
|
||||
- lambda: 'ESP_LOGD("main", "Hello World!");'
|
||||
- id: my_script_parallel
|
||||
mode: parallel
|
||||
max_runs: 2
|
||||
then:
|
||||
- lambda: 'ESP_LOGD("main", "Hello World!");'
|
||||
- id: my_script_restart
|
||||
mode: restart
|
||||
then:
|
||||
- lambda: 'ESP_LOGD("main", "Hello World!");'
|
||||
- id: my_script_with_params
|
||||
parameters:
|
||||
prefix: string
|
||||
param2: int
|
||||
param3: bool
|
||||
then:
|
||||
- lambda: 'ESP_LOGD("main", (prefix + " Hello World!" + to_string(param2) + " " + to_string(param3)).c_str());'
|
||||
|
||||
stepper:
|
||||
- platform: uln2003
|
||||
id: my_stepper
|
||||
pin_a:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
pin_b: GPIO27
|
||||
pin_c:
|
||||
allow_other_uses: true
|
||||
number: GPIO25
|
||||
pin_d: GPIO26
|
||||
sleep_when_done: false
|
||||
step_mode: HALF_STEP
|
||||
max_speed: 250 steps/s
|
||||
|
||||
# Optional:
|
||||
acceleration: inf
|
||||
deceleration: inf
|
||||
|
||||
interval:
|
||||
interval: 5s
|
||||
startup_delay: 10s
|
||||
then:
|
||||
- logger.log: Interval Run
|
||||
|
||||
display:
|
||||
- platform: st7789v
|
||||
model: LILYGO_T-EMBED_170X320
|
||||
spi_mode: mode0
|
||||
height: 320
|
||||
width: 170
|
||||
offset_height: 35
|
||||
offset_width: 0
|
||||
dc_pin: GPIO13
|
||||
reset_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO9
|
||||
|
||||
image:
|
||||
- id: binary_image
|
||||
file: pnglogo.png
|
||||
type: BINARY
|
||||
dither: FloydSteinberg
|
||||
- id: transparent_transparent_image
|
||||
file: pnglogo.png
|
||||
type: TRANSPARENT_BINARY
|
||||
- id: rgba_image
|
||||
file: pnglogo.png
|
||||
type: RGBA
|
||||
resize: 50x50
|
||||
- id: rgb24_image
|
||||
file: pnglogo.png
|
||||
type: RGB24
|
||||
use_transparency: true
|
||||
- id: rgb565_image
|
||||
file: pnglogo.png
|
||||
type: RGB565
|
||||
use_transparency: false
|
||||
- id: web_svg_image
|
||||
file: https://raw.githubusercontent.com/esphome/esphome-docs/a62d7ab193c1a464ed791670170c7d518189109b/images/logo.svg
|
||||
resize: 256x48
|
||||
type: TRANSPARENT_BINARY
|
||||
- id: web_tiff_image
|
||||
file: https://upload.wikimedia.org/wikipedia/commons/b/b6/SIPI_Jelly_Beans_4.1.07.tiff
|
||||
type: RGB24
|
||||
resize: 48x48
|
||||
- id: web_redirect_image
|
||||
file: https://avatars.githubusercontent.com/u/3060199?s=48&v=4
|
||||
type: RGB24
|
||||
resize: 48x48
|
||||
|
||||
- id: mdi_alert
|
||||
file: mdi:alert-circle-outline
|
||||
resize: 50x50
|
||||
- id: another_alert_icon
|
||||
file: mdi:alert-outline
|
||||
type: BINARY
|
||||
|
||||
graph:
|
||||
- id: my_graph
|
||||
sensor: ha_hello_world_temperature
|
||||
duration: 1h
|
||||
width: 100
|
||||
height: 100
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
reset_pin: 14
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
name: Test BLE Write Action
|
||||
turn_on_action:
|
||||
- ble_client.ble_write:
|
||||
id: airthings01
|
||||
service_uuid: F61E3BE9-2826-A81B-970A-4D4DECFABBAE
|
||||
characteristic_uuid: 6490FAFE-0734-732C-8705-91B653A081FC
|
||||
value: [0x01, 0xab, 0xff]
|
||||
- ble_client.ble_write:
|
||||
id: airthings01
|
||||
service_uuid: F61E3BE9-2826-A81B-970A-4D4DECFABBAE
|
||||
characteristic_uuid: 6490FAFE-0734-732C-8705-91B653A081FC
|
||||
value: !lambda |-
|
||||
return {0x13, 0x37};
|
||||
|
||||
esp32_ble_server:
|
||||
id: ble
|
||||
manufacturer_data: [0x72, 0x4, 0x00, 0x23]
|
||||
|
||||
text:
|
||||
- platform: template
|
||||
name: My Text
|
||||
id: my_text
|
||||
min_length: 0
|
||||
max_length: 20
|
||||
mode: text
|
||||
pattern: "[a-z]+"
|
||||
optimistic: true
|
||||
restore_value: true
|
||||
initial_value: "Hello World"
|
||||
- platform: copy
|
||||
name: My Text Copy
|
||||
id: my_text_copy
|
||||
source_id: my_text
|
||||
mode: password
|
|
@ -1,734 +0,0 @@
|
|||
---
|
||||
esphome:
|
||||
name: $device_name
|
||||
comment: $device_comment
|
||||
build_path: build/test3.1
|
||||
includes:
|
||||
- custom.h
|
||||
|
||||
esp8266:
|
||||
board: d1_mini
|
||||
|
||||
substitutions:
|
||||
device_name: test3-1
|
||||
device_comment: test3-1 device
|
||||
min_sub: "0.03"
|
||||
max_sub: "12.0%"
|
||||
|
||||
api:
|
||||
|
||||
wifi:
|
||||
ssid: "MySSID"
|
||||
password: "password1"
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
version: 2
|
||||
|
||||
i2c:
|
||||
sda:
|
||||
allow_other_uses: true
|
||||
number: 4
|
||||
scl:
|
||||
allow_other_uses: true
|
||||
number: 5
|
||||
scan: false
|
||||
|
||||
spi:
|
||||
clk_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO12
|
||||
mosi_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO13
|
||||
miso_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO14
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
version: 2
|
||||
|
||||
logger:
|
||||
|
||||
debug:
|
||||
|
||||
sensor:
|
||||
- platform: apds9960
|
||||
type: proximity
|
||||
name: APDS9960 Proximity
|
||||
- platform: vl53l0x
|
||||
name: VL53L0x Distance
|
||||
address: 0x29
|
||||
update_interval: 60s
|
||||
enable_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO13
|
||||
timeout: 200us
|
||||
- platform: apds9960
|
||||
type: clear
|
||||
name: APDS9960 Clear
|
||||
- platform: apds9960
|
||||
type: red
|
||||
name: APDS9960 Red
|
||||
- platform: apds9960
|
||||
type: green
|
||||
name: APDS9960 Green
|
||||
- platform: apds9960
|
||||
type: blue
|
||||
name: APDS9960 Blue
|
||||
|
||||
- platform: aht10
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
- platform: am2320
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
- platform: adc
|
||||
pin: VCC
|
||||
id: my_sensor
|
||||
filters:
|
||||
- offset: 5.0
|
||||
- multiply: 2.0
|
||||
- filter_out: NAN
|
||||
- sliding_window_moving_average:
|
||||
- exponential_moving_average:
|
||||
- quantile:
|
||||
window_size: 5
|
||||
send_every: 5
|
||||
send_first_at: 3
|
||||
quantile: .8
|
||||
- lambda: "return 0;"
|
||||
- delta: 100
|
||||
- throttle: 100ms
|
||||
- debounce: 500s
|
||||
- timeout: 10min
|
||||
- timeout:
|
||||
timeout: 10min
|
||||
value: 0
|
||||
- calibrate_linear:
|
||||
method: exact
|
||||
datapoints:
|
||||
- -1 -> 3
|
||||
- 0.0 -> 1.0
|
||||
- 1.0 -> 2.0
|
||||
- 2.0 -> 3.0
|
||||
- calibrate_polynomial:
|
||||
degree: 3
|
||||
datapoints:
|
||||
- 0 -> 0
|
||||
- 100 -> 200
|
||||
- 400 -> 500
|
||||
- -50 -> -1000
|
||||
- -100 -> -10000
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_0
|
||||
number: 0
|
||||
sensor: my_sensor
|
||||
- platform: resistance
|
||||
sensor: my_sensor
|
||||
configuration: DOWNSTREAM
|
||||
resistor: 10kΩ
|
||||
reference_voltage: 3.3V
|
||||
name: Resistance
|
||||
id: resist
|
||||
- platform: ntc
|
||||
sensor: resist
|
||||
name: NTC Sensor
|
||||
calibration:
|
||||
b_constant: 3950
|
||||
reference_resistance: 10k
|
||||
reference_temperature: 25°C
|
||||
- platform: ntc
|
||||
sensor: resist
|
||||
name: NTC Sensor2
|
||||
calibration:
|
||||
- 10.0kOhm -> 25°C
|
||||
- 27.219kOhm -> 0°C
|
||||
- 14.674kOhm -> 15°C
|
||||
- platform: ct_clamp
|
||||
sensor: my_sensor
|
||||
name: CT Clamp
|
||||
sample_duration: 500ms
|
||||
update_interval: 5s
|
||||
|
||||
- platform: tcs34725
|
||||
red_channel:
|
||||
name: Red Channel
|
||||
green_channel:
|
||||
name: Green Channel
|
||||
blue_channel:
|
||||
name: Blue Channel
|
||||
clear_channel:
|
||||
name: Clear Channel
|
||||
illuminance:
|
||||
name: Illuminance
|
||||
color_temperature:
|
||||
name: Color Temperature
|
||||
integration_time: 614ms
|
||||
gain: 60x
|
||||
- platform: custom
|
||||
lambda: |-
|
||||
auto s = new CustomSensor();
|
||||
App.register_component(s);
|
||||
return {s};
|
||||
sensors:
|
||||
- id: custom_sensor
|
||||
name: Custom Sensor
|
||||
|
||||
- platform: ade7953_i2c
|
||||
irq_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO16
|
||||
voltage:
|
||||
name: ADE7953 Voltage
|
||||
id: ade7953_voltage
|
||||
current_a:
|
||||
name: ADE7953 Current A
|
||||
id: ade7953_current_a
|
||||
current_b:
|
||||
name: ADE7953 Current B
|
||||
id: ade7953_current_b
|
||||
power_factor_a:
|
||||
name: "ADE7953 Power Factor A"
|
||||
power_factor_b:
|
||||
name: "ADE7953 Power Factor B"
|
||||
apparent_power_a:
|
||||
name: "ADE7953 Apparent Power A"
|
||||
apparent_power_b:
|
||||
name: "ADE7953 Apparent Power B"
|
||||
active_power_a:
|
||||
name: ADE7953 Active Power A
|
||||
active_power_b:
|
||||
name: ADE7953 Active Power B
|
||||
reactive_power_a:
|
||||
name: "ADE7953 Reactive Power A"
|
||||
reactive_power_b:
|
||||
name: "ADE7953 Reactive Power B"
|
||||
update_interval: 1s
|
||||
|
||||
- platform: ade7953_spi
|
||||
cs_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO04
|
||||
irq_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO16
|
||||
voltage:
|
||||
name: ADE7953 Voltage
|
||||
current_a:
|
||||
name: ADE7953 Current A
|
||||
current_b:
|
||||
name: ADE7953 Current B
|
||||
power_factor_a:
|
||||
name: "ADE7953 Power Factor A"
|
||||
power_factor_b:
|
||||
name: "ADE7953 Power Factor B"
|
||||
apparent_power_a:
|
||||
name: "ADE7953 Apparent Power A"
|
||||
apparent_power_b:
|
||||
name: "ADE7953 Apparent Power B"
|
||||
active_power_a:
|
||||
name: ADE7953 Active Power A
|
||||
active_power_b:
|
||||
name: ADE7953 Active Power B
|
||||
reactive_power_a:
|
||||
name: "ADE7953 Reactive Power A"
|
||||
reactive_power_b:
|
||||
name: "ADE7953 Reactive Power B"
|
||||
update_interval: 1s
|
||||
|
||||
- platform: tmp102
|
||||
name: TMP102 Temperature
|
||||
- platform: hm3301
|
||||
pm_1_0:
|
||||
name: PM1.0
|
||||
pm_2_5:
|
||||
name: PM2.5
|
||||
pm_10_0:
|
||||
name: PM10.0
|
||||
aqi:
|
||||
name: AQI
|
||||
calculation_type: AQI
|
||||
- platform: ezo
|
||||
id: ph_ezo
|
||||
address: 99
|
||||
unit_of_measurement: pH
|
||||
- platform: tof10120
|
||||
name: Distance sensor
|
||||
update_interval: 5s
|
||||
|
||||
- platform: mlx90393
|
||||
oversampling: 1
|
||||
filter: 0
|
||||
gain: 3X
|
||||
x_axis:
|
||||
name: mlxxaxis
|
||||
y_axis:
|
||||
name: mlxyaxis
|
||||
z_axis:
|
||||
name: mlxzaxis
|
||||
resolution: 17BIT
|
||||
temperature:
|
||||
name: mlxtemp
|
||||
oversampling: 2
|
||||
|
||||
- platform: adc128s102
|
||||
id: adc128s102_channel_0
|
||||
channel: 0
|
||||
|
||||
- platform: ade7880
|
||||
irq0_pin:
|
||||
number: GPIO13
|
||||
allow_other_uses: true
|
||||
irq1_pin:
|
||||
number: GPIO5
|
||||
allow_other_uses: true
|
||||
reset_pin:
|
||||
number: GPIO16
|
||||
allow_other_uses: true
|
||||
frequency: 60Hz
|
||||
phase_a:
|
||||
name: Channel A
|
||||
voltage: Voltage
|
||||
current: Current
|
||||
active_power: Active Power
|
||||
power_factor: Power Factor
|
||||
forward_active_energy: Forward Active Energy
|
||||
reverse_active_energy: Reverse Active Energy
|
||||
calibration:
|
||||
current_gain: 3116628
|
||||
voltage_gain: -757178
|
||||
power_gain: -1344457
|
||||
phase_angle: 188
|
||||
phase_b:
|
||||
name: Channel B
|
||||
voltage: Voltage
|
||||
current: Current
|
||||
active_power: Active Power
|
||||
power_factor: Power Factor
|
||||
forward_active_energy: Forward Active Energy
|
||||
reverse_active_energy: Reverse Active Energy
|
||||
calibration:
|
||||
current_gain: 3133655
|
||||
voltage_gain: -755235
|
||||
power_gain: -1345638
|
||||
phase_angle: 188
|
||||
phase_c:
|
||||
name: Channel C
|
||||
voltage: Voltage
|
||||
current: Current
|
||||
active_power: Active Power
|
||||
power_factor: Power Factor
|
||||
forward_active_energy: Forward Active Energy
|
||||
reverse_active_energy: Reverse Active Energy
|
||||
calibration:
|
||||
current_gain: 3111158
|
||||
voltage_gain: -743813
|
||||
power_gain: -1351437
|
||||
phase_angle: 180
|
||||
neutral:
|
||||
name: Neutral
|
||||
current: Current
|
||||
calibration:
|
||||
current_gain: 3189
|
||||
|
||||
apds9960:
|
||||
address: 0x20
|
||||
update_interval: 60s
|
||||
|
||||
binary_sensor:
|
||||
- platform: apds9960
|
||||
direction: up
|
||||
name: APDS9960 Up
|
||||
device_class: motion
|
||||
filters:
|
||||
- invert
|
||||
- delayed_on: 20ms
|
||||
- delayed_off: 20ms
|
||||
- lambda: "return false;"
|
||||
on_state:
|
||||
- logger.log: New state
|
||||
id: my_binary_sensor
|
||||
- platform: apds9960
|
||||
direction: down
|
||||
name: APDS9960 Down
|
||||
- platform: apds9960
|
||||
direction: left
|
||||
name: APDS9960 Left
|
||||
- platform: apds9960
|
||||
direction: right
|
||||
name: APDS9960 Right
|
||||
|
||||
- platform: ttp229_lsf
|
||||
channel: 1
|
||||
name: TTP229 LSF Test
|
||||
- platform: ttp229_bsf
|
||||
channel: 1
|
||||
name: TTP229 BSF Test
|
||||
- platform: custom
|
||||
lambda: |-
|
||||
auto s = new CustomBinarySensor();
|
||||
App.register_component(s);
|
||||
return {s};
|
||||
binary_sensors:
|
||||
- id: custom_binary_sensor
|
||||
name: Custom Binary Sensor
|
||||
|
||||
- platform: template
|
||||
id: cover_toggle
|
||||
on_press:
|
||||
then:
|
||||
- cover.toggle: time_based_cover
|
||||
- cover.toggle: endstop_cover
|
||||
- cover.toggle: current_based_cover
|
||||
|
||||
globals:
|
||||
- id: my_global_string
|
||||
type: std::string
|
||||
initial_value: '""'
|
||||
|
||||
text_sensor:
|
||||
- platform: custom
|
||||
lambda: |-
|
||||
auto s = new CustomTextSensor();
|
||||
App.register_component(s);
|
||||
return {s};
|
||||
text_sensors:
|
||||
- id: custom_text_sensor
|
||||
name: Custom Text Sensor
|
||||
|
||||
sm2135:
|
||||
data_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO12
|
||||
clock_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO14
|
||||
rgb_current: 20mA
|
||||
cw_current: 60mA
|
||||
|
||||
grove_tb6612fng:
|
||||
id: test_motor
|
||||
address: 0x14
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: gpio_switch1
|
||||
pin:
|
||||
mcp23xxx: mcp23017_hub
|
||||
number: 0
|
||||
mode: OUTPUT
|
||||
interlock: &interlock [gpio_switch1, gpio_switch2, gpio_switch3]
|
||||
- platform: gpio
|
||||
id: gpio_switch2
|
||||
pin:
|
||||
mcp23xxx: mcp23008_hub
|
||||
number: 0
|
||||
mode: OUTPUT
|
||||
interlock: *interlock
|
||||
- platform: gpio
|
||||
id: gpio_switch3
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO1
|
||||
interlock: *interlock
|
||||
- platform: custom
|
||||
lambda: |-
|
||||
auto s = new CustomSwitch();
|
||||
return {s};
|
||||
switches:
|
||||
- id: custom_switch
|
||||
name: Custom Switch
|
||||
- platform: template
|
||||
name: open_vent
|
||||
id: open_vent
|
||||
optimistic: true
|
||||
on_turn_on:
|
||||
then:
|
||||
- grove_tb6612fng.run:
|
||||
channel: 1
|
||||
speed: 255
|
||||
direction: BACKWARD
|
||||
id: test_motor
|
||||
|
||||
custom_component:
|
||||
lambda: |-
|
||||
auto s = new CustomComponent();
|
||||
s->set_update_interval(15000);
|
||||
return {s};
|
||||
|
||||
stepper:
|
||||
- platform: uln2003
|
||||
id: my_stepper
|
||||
pin_a:
|
||||
allow_other_uses: true
|
||||
number: GPIO12
|
||||
pin_b:
|
||||
allow_other_uses: true
|
||||
number: GPIO13
|
||||
pin_c:
|
||||
allow_other_uses: true
|
||||
number: GPIO14
|
||||
pin_d:
|
||||
allow_other_uses: true
|
||||
number: GPIO15
|
||||
sleep_when_done: false
|
||||
step_mode: HALF_STEP
|
||||
max_speed: 250 steps/s
|
||||
acceleration: inf
|
||||
deceleration: inf
|
||||
- platform: a4988
|
||||
id: my_stepper2
|
||||
step_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO1
|
||||
dir_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO2
|
||||
max_speed: 0.1 steps/s
|
||||
acceleration: 10 steps/s^2
|
||||
deceleration: 10 steps/s^2
|
||||
|
||||
interval:
|
||||
interval: 5s
|
||||
then:
|
||||
- logger.log: Interval Run
|
||||
- stepper.set_target:
|
||||
id: my_stepper2
|
||||
target: 500
|
||||
- stepper.set_target:
|
||||
id: my_stepper
|
||||
target: !lambda "return 0;"
|
||||
- stepper.report_position:
|
||||
id: my_stepper2
|
||||
position: 0
|
||||
- stepper.report_position:
|
||||
id: my_stepper
|
||||
position: !lambda "return 50/100.0;"
|
||||
|
||||
cover:
|
||||
- platform: endstop
|
||||
name: Endstop Cover
|
||||
id: endstop_cover
|
||||
stop_action:
|
||||
- switch.turn_on: gpio_switch1
|
||||
open_endstop: my_binary_sensor
|
||||
open_action:
|
||||
- switch.turn_on: gpio_switch1
|
||||
open_duration: 5min
|
||||
close_endstop: my_binary_sensor
|
||||
close_action:
|
||||
- switch.turn_on: gpio_switch2
|
||||
- output.set_level:
|
||||
id: out
|
||||
level: 50%
|
||||
- output.esp8266_pwm.set_frequency:
|
||||
id: out
|
||||
frequency: 500.0Hz
|
||||
- output.esp8266_pwm.set_frequency:
|
||||
id: out
|
||||
frequency: !lambda "return 500.0;"
|
||||
- servo.write:
|
||||
id: my_servo
|
||||
level: -100%
|
||||
- servo.write:
|
||||
id: my_servo
|
||||
level: !lambda "return -1.0;"
|
||||
- delay: 2s
|
||||
- servo.detach: my_servo
|
||||
close_duration: 4.5min
|
||||
max_duration: 10min
|
||||
- platform: time_based
|
||||
name: Time Based Cover
|
||||
id: time_based_cover
|
||||
stop_action:
|
||||
- switch.turn_on: gpio_switch1
|
||||
open_action:
|
||||
- switch.turn_on: gpio_switch1
|
||||
open_duration: 5min
|
||||
close_action:
|
||||
- switch.turn_on: gpio_switch2
|
||||
close_duration: 4.5min
|
||||
- platform: current_based
|
||||
name: Current Based Cover
|
||||
id: current_based_cover
|
||||
open_sensor: ade7953_current_a
|
||||
open_moving_current_threshold: 0.5
|
||||
open_obstacle_current_threshold: 0.8
|
||||
open_duration: 12s
|
||||
open_action:
|
||||
- switch.turn_on: gpio_switch1
|
||||
close_sensor: ade7953_current_b
|
||||
close_moving_current_threshold: 0.5
|
||||
close_obstacle_current_threshold: 0.8
|
||||
close_duration: 10s
|
||||
close_action:
|
||||
- switch.turn_on: gpio_switch2
|
||||
stop_action:
|
||||
- switch.turn_off: gpio_switch1
|
||||
- switch.turn_off: gpio_switch2
|
||||
obstacle_rollback: 30%
|
||||
start_sensing_delay: 0.8s
|
||||
malfunction_detection: true
|
||||
malfunction_action:
|
||||
then:
|
||||
- logger.log: Malfunction Detected
|
||||
- platform: template
|
||||
name: Template Cover with Tilt
|
||||
tilt_lambda: "return 0.5;"
|
||||
tilt_action:
|
||||
- output.set_level:
|
||||
id: out
|
||||
level: !lambda "return tilt;"
|
||||
position_action:
|
||||
- output.set_level:
|
||||
id: out
|
||||
level: !lambda "return pos;"
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: out
|
||||
pin:
|
||||
number: D3
|
||||
frequency: 50Hz
|
||||
- platform: esp8266_pwm
|
||||
id: out2
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: D4
|
||||
- platform: custom
|
||||
type: binary
|
||||
lambda: |-
|
||||
auto s = new CustomBinaryOutput();
|
||||
App.register_component(s);
|
||||
return {s};
|
||||
outputs:
|
||||
- id: custom_binary
|
||||
- platform: sigma_delta_output
|
||||
id: sddac
|
||||
update_interval: 60s
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: D4
|
||||
turn_on_action:
|
||||
then:
|
||||
- logger.log: "Turned on"
|
||||
turn_off_action:
|
||||
then:
|
||||
- logger.log: "Turned off"
|
||||
state_change_action:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "Changed state: %d"
|
||||
args: ["state"]
|
||||
- platform: custom
|
||||
type: float
|
||||
lambda: |-
|
||||
auto s = new CustomFloatOutput();
|
||||
App.register_component(s);
|
||||
return {s};
|
||||
outputs:
|
||||
- id: custom_float
|
||||
- platform: slow_pwm
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO5
|
||||
id: my_slow_pwm
|
||||
period: 15s
|
||||
restart_cycle_on_state_change: false
|
||||
- platform: sm2135
|
||||
id: sm2135_0
|
||||
channel: 0
|
||||
- platform: sm2135
|
||||
id: sm2135_1
|
||||
channel: 1
|
||||
- platform: sm2135
|
||||
id: sm2135_2
|
||||
channel: 2
|
||||
- platform: sm2135
|
||||
id: sm2135_3
|
||||
channel: 3
|
||||
- platform: sm2135
|
||||
id: sm2135_4
|
||||
channel: 4
|
||||
|
||||
mcp23017:
|
||||
id: mcp23017_hub
|
||||
|
||||
mcp23008:
|
||||
id: mcp23008_hub
|
||||
|
||||
light:
|
||||
- platform: hbridge
|
||||
name: Icicle Lights
|
||||
pin_a: out
|
||||
pin_b: out2
|
||||
|
||||
servo:
|
||||
id: my_servo
|
||||
output: out
|
||||
restore: true
|
||||
min_level: $min_sub
|
||||
max_level: $max_sub
|
||||
|
||||
ttp229_lsf:
|
||||
|
||||
ttp229_bsf:
|
||||
sdo_pin:
|
||||
allow_other_uses: true
|
||||
number: D2
|
||||
scl_pin:
|
||||
allow_other_uses: true
|
||||
number: D1
|
||||
|
||||
display:
|
||||
- platform: max7219digit
|
||||
cs_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO15
|
||||
num_chips: 4
|
||||
rotate_chip: 0
|
||||
intensity: 10
|
||||
scroll_mode: STOP
|
||||
id: my_matrix
|
||||
lambda: |-
|
||||
it.printdigit("hello");
|
||||
|
||||
button:
|
||||
- platform: output
|
||||
id: output_button
|
||||
output: out
|
||||
duration: 100ms
|
||||
- platform: wake_on_lan
|
||||
target_mac_address: 12:34:56:78:90:ab
|
||||
name: wol_test_1
|
||||
id: wol_1
|
||||
- platform: factory_reset
|
||||
name: Restart Button (Factory Default Settings)
|
||||
|
||||
cd74hc4067:
|
||||
pin_s0:
|
||||
allow_other_uses: true
|
||||
number: GPIO12
|
||||
pin_s1:
|
||||
allow_other_uses: true
|
||||
number: GPIO13
|
||||
pin_s2:
|
||||
allow_other_uses: true
|
||||
number: GPIO14
|
||||
pin_s3:
|
||||
allow_other_uses: true
|
||||
number: GPIO15
|
||||
|
||||
adc128s102:
|
||||
cs_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO12
|
1432
tests/test3.yaml
1432
tests/test3.yaml
File diff suppressed because it is too large
Load diff
998
tests/test4.yaml
998
tests/test4.yaml
|
@ -1,998 +0,0 @@
|
|||
---
|
||||
esphome:
|
||||
name: $devicename
|
||||
platform: ESP32
|
||||
board: nodemcu-32s
|
||||
build_path: build/test4
|
||||
|
||||
substitutions:
|
||||
devicename: test-4
|
||||
|
||||
ethernet:
|
||||
type: LAN8720
|
||||
mdc_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
mdio_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO25
|
||||
clk_mode: GPIO0_IN
|
||||
phy_addr: 0
|
||||
power_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO25
|
||||
manual_ip:
|
||||
static_ip: 192.168.178.56
|
||||
gateway: 192.168.178.1
|
||||
subnet: 255.255.255.0
|
||||
domain: .local
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
|
||||
mqtt:
|
||||
broker: test.mosquitto.org
|
||||
port: 1883
|
||||
discovery: true
|
||||
discovery_prefix: homeassistant
|
||||
topic_prefix:
|
||||
|
||||
api:
|
||||
|
||||
i2c:
|
||||
sda:
|
||||
allow_other_uses: true
|
||||
number: 21
|
||||
scl:
|
||||
allow_other_uses: true
|
||||
number: 22
|
||||
scan: false
|
||||
|
||||
spi:
|
||||
- id: spi_id_1
|
||||
clk_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO21
|
||||
mosi_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO22
|
||||
miso_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
interface: hardware
|
||||
- id: spi_id_2
|
||||
clk_pin:
|
||||
number: GPIO32
|
||||
mosi_pin:
|
||||
number: GPIO33
|
||||
interface: hardware
|
||||
|
||||
uart:
|
||||
- id: uart115200
|
||||
tx_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO22
|
||||
rx_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
baud_rate: 115200
|
||||
- id: uart9600
|
||||
tx_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO25
|
||||
rx_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO26
|
||||
baud_rate: 9600
|
||||
- id: uart_a02yyuw
|
||||
tx_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO22
|
||||
rx_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
baud_rate: 9600
|
||||
- id: uart_he60r
|
||||
tx_pin:
|
||||
number: GPIO18
|
||||
allow_other_uses: true
|
||||
rx_pin:
|
||||
number: GPIO36
|
||||
allow_other_uses: true
|
||||
baud_rate: 1200
|
||||
parity: EVEN
|
||||
|
||||
safe_mode:
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
port: 3286
|
||||
|
||||
logger:
|
||||
level: DEBUG
|
||||
|
||||
debug:
|
||||
|
||||
web_server:
|
||||
ota: false
|
||||
auth:
|
||||
username: admin
|
||||
password: admin
|
||||
include_internal: true
|
||||
|
||||
time:
|
||||
- platform: sntp
|
||||
id: sntp_time
|
||||
|
||||
tuya:
|
||||
time_id: sntp_time
|
||||
uart_id: uart115200
|
||||
status_pin:
|
||||
number: GPIO5
|
||||
inverted: true
|
||||
allow_other_uses: true
|
||||
|
||||
select:
|
||||
- platform: tuya
|
||||
id: tuya_select
|
||||
enum_datapoint: 42
|
||||
options:
|
||||
0: Internal
|
||||
1: Floor
|
||||
2: Both
|
||||
|
||||
pipsolar:
|
||||
id: inverter0
|
||||
uart_id: uart115200
|
||||
|
||||
pylontech:
|
||||
- id: pylontech0
|
||||
uart_id: uart115200
|
||||
- id: pylontech1
|
||||
uart_id: uart115200
|
||||
|
||||
sx1509:
|
||||
- id: sx1509_hub
|
||||
address: 0x3E
|
||||
|
||||
mcp3204:
|
||||
spi_id: spi_id_1
|
||||
cs_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
|
||||
dac7678:
|
||||
address: 0x4A
|
||||
id: dac7678_hub1
|
||||
internal_reference: true
|
||||
|
||||
sensor:
|
||||
- platform: pylontech
|
||||
pylontech_id: pylontech0
|
||||
battery: 1
|
||||
voltage:
|
||||
id: pyl01_voltage
|
||||
current:
|
||||
id: pyl01_current
|
||||
coulomb:
|
||||
id: pyl01_soc
|
||||
mos_temperature:
|
||||
id: pyl01_mos_temperature
|
||||
- platform: pylontech
|
||||
pylontech_id: pylontech1
|
||||
battery: 1
|
||||
voltage:
|
||||
id: pyl13_voltage
|
||||
temperature_low:
|
||||
id: pyl13_temperature_low
|
||||
temperature_high:
|
||||
id: pyl13_temperature_high
|
||||
voltage_low:
|
||||
id: pyl13_voltage_low
|
||||
voltage_high:
|
||||
id: pyl13_voltage_high
|
||||
- platform: homeassistant
|
||||
entity_id: sensor.hello_world
|
||||
id: ha_hello_world
|
||||
- platform: tuya
|
||||
id: tuya_sensor
|
||||
sensor_datapoint: 1
|
||||
- platform: pipsolar
|
||||
pipsolar_id: inverter0
|
||||
grid_rating_voltage:
|
||||
id: inverter0_grid_rating_voltage
|
||||
name: inverter0_grid_rating_voltage
|
||||
grid_rating_current:
|
||||
id: inverter0_grid_rating_current
|
||||
name: inverter0_grid_rating_current
|
||||
ac_output_rating_voltage:
|
||||
id: inverter0_ac_output_rating_voltage
|
||||
name: inverter0_ac_output_rating_voltage
|
||||
ac_output_rating_frequency:
|
||||
id: inverter0_ac_output_rating_frequency
|
||||
name: inverter0_ac_output_rating_frequency
|
||||
ac_output_rating_current:
|
||||
id: inverter0_ac_output_rating_current
|
||||
name: inverter0_ac_output_rating_current
|
||||
ac_output_rating_apparent_power:
|
||||
id: inverter0_ac_output_rating_apparent_power
|
||||
name: inverter0_ac_output_rating_apparent_power
|
||||
ac_output_rating_active_power:
|
||||
id: inverter0_ac_output_rating_active_power
|
||||
name: inverter0_ac_output_rating_active_power
|
||||
battery_rating_voltage:
|
||||
id: inverter0_battery_rating_voltage
|
||||
name: inverter0_battery_rating_voltage
|
||||
battery_recharge_voltage:
|
||||
id: inverter0_battery_recharge_voltage
|
||||
name: inverter0_battery_recharge_voltage
|
||||
battery_under_voltage:
|
||||
id: inverter0_battery_under_voltage
|
||||
name: inverter0_battery_under_voltage
|
||||
battery_bulk_voltage:
|
||||
id: inverter0_battery_bulk_voltage
|
||||
name: inverter0_battery_bulk_voltage
|
||||
battery_float_voltage:
|
||||
id: inverter0_battery_float_voltage
|
||||
name: inverter0_battery_float_voltage
|
||||
battery_type:
|
||||
id: inverter0_battery_type
|
||||
name: inverter0_battery_type
|
||||
current_max_ac_charging_current:
|
||||
id: inverter0_current_max_ac_charging_current
|
||||
name: inverter0_current_max_ac_charging_current
|
||||
current_max_charging_current:
|
||||
id: inverter0_current_max_charging_current
|
||||
name: inverter0_current_max_charging_current
|
||||
input_voltage_range:
|
||||
id: inverter0_input_voltage_range
|
||||
name: inverter0_input_voltage_range
|
||||
output_source_priority:
|
||||
id: inverter0_output_source_priority
|
||||
name: inverter0_output_source_priority
|
||||
charger_source_priority:
|
||||
id: inverter0_charger_source_priority
|
||||
name: inverter0_charger_source_priority
|
||||
parallel_max_num:
|
||||
id: inverter0_parallel_max_num
|
||||
name: inverter0_parallel_max_num
|
||||
machine_type:
|
||||
id: inverter0_machine_type
|
||||
name: inverter0_machine_type
|
||||
topology:
|
||||
id: inverter0_topology
|
||||
name: inverter0_topology
|
||||
output_mode:
|
||||
id: inverter0_output_mode
|
||||
name: inverter0_output_mode
|
||||
battery_redischarge_voltage:
|
||||
id: inverter0_battery_redischarge_voltage
|
||||
name: inverter0_battery_redischarge_voltage
|
||||
pv_ok_condition_for_parallel:
|
||||
id: inverter0_pv_ok_condition_for_parallel
|
||||
name: inverter0_pv_ok_condition_for_parallel
|
||||
pv_power_balance:
|
||||
id: inverter0_pv_power_balance
|
||||
name: inverter0_pv_power_balance
|
||||
grid_voltage:
|
||||
id: inverter0_grid_voltage
|
||||
name: inverter0_grid_voltage
|
||||
grid_frequency:
|
||||
id: inverter0_grid_frequency
|
||||
name: inverter0_grid_frequency
|
||||
ac_output_voltage:
|
||||
id: inverter0_ac_output_voltage
|
||||
name: inverter0_ac_output_voltage
|
||||
ac_output_frequency:
|
||||
id: inverter0_ac_output_frequency
|
||||
name: inverter0_ac_output_frequency
|
||||
ac_output_apparent_power:
|
||||
id: inverter0_ac_output_apparent_power
|
||||
name: inverter0_ac_output_apparent_power
|
||||
ac_output_active_power:
|
||||
id: inverter0_ac_output_active_power
|
||||
name: inverter0_ac_output_active_power
|
||||
output_load_percent:
|
||||
id: inverter0_output_load_percent
|
||||
name: inverter0_output_load_percent
|
||||
bus_voltage:
|
||||
id: inverter0_bus_voltage
|
||||
name: inverter0_bus_voltage
|
||||
battery_voltage:
|
||||
id: inverter0_battery_voltage
|
||||
name: inverter0_battery_voltage
|
||||
battery_charging_current:
|
||||
id: inverter0_battery_charging_current
|
||||
name: inverter0_battery_charging_current
|
||||
battery_capacity_percent:
|
||||
id: inverter0_battery_capacity_percent
|
||||
name: inverter0_battery_capacity_percent
|
||||
inverter_heat_sink_temperature:
|
||||
id: inverter0_inverter_heat_sink_temperature
|
||||
name: inverter0_inverter_heat_sink_temperature
|
||||
pv_input_current_for_battery:
|
||||
id: inverter0_pv_input_current_for_battery
|
||||
name: inverter0_pv_input_current_for_battery
|
||||
pv_input_voltage:
|
||||
id: inverter0_pv_input_voltage
|
||||
name: inverter0_pv_input_voltage
|
||||
battery_voltage_scc:
|
||||
id: inverter0_battery_voltage_scc
|
||||
name: inverter0_battery_voltage_scc
|
||||
battery_discharge_current:
|
||||
id: inverter0_battery_discharge_current
|
||||
name: inverter0_battery_discharge_current
|
||||
battery_voltage_offset_for_fans_on:
|
||||
id: inverter0_battery_voltage_offset_for_fans_on
|
||||
name: inverter0_battery_voltage_offset_for_fans_on
|
||||
eeprom_version:
|
||||
id: inverter0_eeprom_version
|
||||
name: inverter0_eeprom_version
|
||||
pv_charging_power:
|
||||
id: inverter0_pv_charging_power
|
||||
name: inverter0_pv_charging_power
|
||||
- platform: hrxl_maxsonar_wr
|
||||
name: Rainwater Tank Level
|
||||
uart_id: uart115200
|
||||
filters:
|
||||
- sliding_window_moving_average:
|
||||
window_size: 12
|
||||
send_every: 12
|
||||
- or:
|
||||
- throttle: 20min
|
||||
- delta: 0.02
|
||||
- platform: mcp3204
|
||||
name: MCP3204 Pin 1
|
||||
number: 1
|
||||
id: mcp_sensor
|
||||
- platform: copy
|
||||
source_id: mcp_sensor
|
||||
name: MCP binary sensor copy
|
||||
- platform: ufire_ec
|
||||
id: ufire_ec_board
|
||||
temperature:
|
||||
name: Ufire Temperature
|
||||
ec:
|
||||
name: Ufire EC
|
||||
temperature_compensation: 20.0
|
||||
temperature_coefficient: 0.019
|
||||
- platform: ufire_ise
|
||||
id: ufire_ise_board
|
||||
temperature:
|
||||
name: Ufire Temperature
|
||||
ph:
|
||||
name: Ufire pH
|
||||
- platform: a01nyub
|
||||
id: a01nyub_sensor
|
||||
name: "a01nyub Distance"
|
||||
uart_id: uart9600
|
||||
state_topic: "esphome/sensor/a01nyub_sensor/state"
|
||||
- platform: a02yyuw
|
||||
id: a02yyuw_sensor
|
||||
name: "a02yyuw Distance"
|
||||
uart_id: uart_a02yyuw
|
||||
state_topic: "esphome/sensor/a02yyuw_sensor/state"
|
||||
|
||||
#
|
||||
# platform sensor.apds9960 requires component apds9960
|
||||
#
|
||||
# - platform: apds9960
|
||||
# type: proximity
|
||||
# name: APDS9960 Proximity
|
||||
# - platform: apds9960
|
||||
# type: clear
|
||||
# name: APDS9960 Clear
|
||||
# - platform: apds9960
|
||||
# type: red
|
||||
# name: APDS9960 Red
|
||||
# - platform: apds9960
|
||||
# type: green
|
||||
# name: APDS9960 Green
|
||||
# - platform: apds9960
|
||||
# type: blue
|
||||
# name: APDS9960 Blue
|
||||
|
||||
binary_sensor:
|
||||
- platform: tuya
|
||||
id: tuya_binary_sensor
|
||||
sensor_datapoint: 1
|
||||
- platform: pipsolar
|
||||
pipsolar_id: inverter0
|
||||
add_sbu_priority_version:
|
||||
id: inverter0_add_sbu_priority_version
|
||||
name: inverter0_add_sbu_priority_version
|
||||
configuration_status:
|
||||
id: inverter0_configuration_status
|
||||
name: inverter0_configuration_status
|
||||
scc_firmware_version:
|
||||
id: inverter0_scc_firmware_version
|
||||
name: inverter0_scc_firmware_version
|
||||
load_status:
|
||||
id: inverter0_load_status
|
||||
name: inverter0_load_status
|
||||
battery_voltage_to_steady_while_charging:
|
||||
id: inverter0_battery_voltage_to_steady_while_charging
|
||||
name: inverter0_battery_voltage_to_steady_while_charging
|
||||
charging_status:
|
||||
id: inverter0_charging_status
|
||||
name: inverter0_charging_status
|
||||
scc_charging_status:
|
||||
id: inverter0_scc_charging_status
|
||||
name: inverter0_scc_charging_status
|
||||
ac_charging_status:
|
||||
id: inverter0_ac_charging_status
|
||||
name: inverter0_ac_charging_status
|
||||
charging_to_floating_mode:
|
||||
id: inverter0_charging_to_floating_mode
|
||||
name: inverter0_charging_to_floating_mode
|
||||
switch_on:
|
||||
id: inverter0_switch_on
|
||||
name: inverter0_switch_on
|
||||
dustproof_installed:
|
||||
id: inverter0_dustproof_installed
|
||||
name: inverter0_dustproof_installed
|
||||
silence_buzzer_open_buzzer:
|
||||
id: inverter0_silence_buzzer_open_buzzer
|
||||
name: inverter0_silence_buzzer_open_buzzer
|
||||
overload_bypass_function:
|
||||
id: inverter0_overload_bypass_function
|
||||
name: inverter0_overload_bypass_function
|
||||
lcd_escape_to_default:
|
||||
id: inverter0_lcd_escape_to_default
|
||||
name: inverter0_lcd_escape_to_default
|
||||
overload_restart_function:
|
||||
id: inverter0_overload_restart_function
|
||||
name: inverter0_overload_restart_function
|
||||
over_temperature_restart_function:
|
||||
id: inverter0_over_temperature_restart_function
|
||||
name: inverter0_over_temperature_restart_function
|
||||
backlight_on:
|
||||
id: inverter0_backlight_on
|
||||
name: inverter0_backlight_on
|
||||
- platform: template
|
||||
id: ar1
|
||||
lambda: "return {};"
|
||||
filters:
|
||||
- autorepeat:
|
||||
- delay: 2s
|
||||
time_off: 100ms
|
||||
time_on: 900ms
|
||||
- delay: 4s
|
||||
time_off: 100ms
|
||||
time_on: 400ms
|
||||
on_state:
|
||||
then:
|
||||
- lambda: 'ESP_LOGI("ar1:", "%d", x);'
|
||||
- platform: touchscreen
|
||||
touchscreen_id: xpt_touchscreen
|
||||
id: touch_key0
|
||||
x_min: 80
|
||||
x_max: 160
|
||||
y_min: 106
|
||||
y_max: 212
|
||||
on_press:
|
||||
- logger.log: Touched
|
||||
|
||||
- platform: gpio
|
||||
name: GPIO SX1509 test
|
||||
pin:
|
||||
sx1509: sx1509_hub
|
||||
number: 3
|
||||
|
||||
- platform: touchscreen
|
||||
touchscreen_id: lilygo_touchscreen
|
||||
id: touch_key1
|
||||
x_min: 0
|
||||
x_max: 100
|
||||
y_min: 0
|
||||
y_max: 100
|
||||
on_press:
|
||||
- logger.log: Touched
|
||||
- platform: gt911
|
||||
id: touch_key_911
|
||||
index: 0
|
||||
|
||||
- platform: gpio
|
||||
name: MaxIn Pin 4
|
||||
pin:
|
||||
max6956: max6956_1
|
||||
number: 4
|
||||
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: false
|
||||
|
||||
- platform: gpio
|
||||
name: XL9535 Pin 0
|
||||
pin:
|
||||
xl9535: xl9535_hub
|
||||
number: 0
|
||||
mode:
|
||||
input: true
|
||||
inverted: false
|
||||
|
||||
- platform: gpio
|
||||
name: XL9535 Pin 17
|
||||
pin:
|
||||
xl9535: xl9535_hub
|
||||
number: 17
|
||||
mode:
|
||||
input: true
|
||||
inverted: false
|
||||
|
||||
climate:
|
||||
- platform: tuya
|
||||
id: tuya_climate
|
||||
switch_datapoint: 1
|
||||
target_temperature_datapoint: 3
|
||||
current_temperature_multiplier: 0.5
|
||||
target_temperature_multiplier: 0.5
|
||||
reports_fahrenheit: true
|
||||
|
||||
switch:
|
||||
- platform: tuya
|
||||
id: tuya_switch
|
||||
switch_datapoint: 1
|
||||
- platform: pipsolar
|
||||
pipsolar_id: inverter0
|
||||
output_source_priority_utility:
|
||||
name: inverter0_output_source_priority_utility
|
||||
output_source_priority_solar:
|
||||
name: inverter0_output_source_priority_solar
|
||||
output_source_priority_battery:
|
||||
name: inverter0_output_source_priority_battery
|
||||
input_voltage_range:
|
||||
name: inverter0_input_voltage_range
|
||||
pv_ok_condition_for_parallel:
|
||||
name: inverter0_pv_ok_condition_for_parallel
|
||||
pv_power_balance:
|
||||
name: inverter0_pv_power_balance
|
||||
- platform: copy
|
||||
source_id: tuya_switch
|
||||
name: Tuya Switch Copy
|
||||
|
||||
light:
|
||||
- platform: fastled_clockless
|
||||
id: led_matrix_32x8
|
||||
name: led_matrix_32x8
|
||||
chipset: WS2812B
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO15
|
||||
num_leds: 256
|
||||
rgb_order: GRB
|
||||
default_transition_length: 0s
|
||||
color_correct: [50%, 50%, 50%]
|
||||
- platform: tuya
|
||||
id: tuya_light
|
||||
switch_datapoint: 1
|
||||
dimmer_datapoint: 2
|
||||
min_value_datapoint: 3
|
||||
color_temperature_datapoint: 4
|
||||
min_value: 1
|
||||
max_value: 100
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
gamma_correct: 1
|
||||
|
||||
cover:
|
||||
- platform: tuya
|
||||
id: tuya_cover
|
||||
position_datapoint: 2
|
||||
- platform: copy
|
||||
source_id: tuya_cover
|
||||
name: Tuya Cover copy
|
||||
- platform: he60r
|
||||
uart_id: uart_he60r
|
||||
id: garage_door
|
||||
name: Garage Door
|
||||
open_duration: 14s
|
||||
close_duration: 14s
|
||||
|
||||
display:
|
||||
- platform: addressable_light
|
||||
id: led_matrix_32x8_display
|
||||
addressable_light_id: led_matrix_32x8
|
||||
width: 32
|
||||
height: 8
|
||||
pixel_mapper: |-
|
||||
if (x % 2 == 0) {
|
||||
return (x * 8) + y;
|
||||
}
|
||||
return (x * 8) + (7 - y);
|
||||
lambda: |-
|
||||
Color red = Color(0xFF0000);
|
||||
Color green = Color(0x00FF00);
|
||||
Color blue = Color(0x0000FF);
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height(), red);
|
||||
it.rectangle(1, 1, it.get_width()-2, it.get_height()-2, green);
|
||||
it.rectangle(2, 2, it.get_width()-4, it.get_height()-4, blue);
|
||||
it.rectangle(3, 3, it.get_width()-6, it.get_height()-6, red);
|
||||
auto touch = id(ft63_touchscreen)->get_touch();
|
||||
if (touch) { ESP_LOGD("touch", "%d/%d", touch.value().x, touch.value().y); }
|
||||
rotation: 0°
|
||||
update_interval: 16ms
|
||||
|
||||
- platform: inkplate6
|
||||
id: inkplate_display
|
||||
greyscale: false
|
||||
partial_updating: false
|
||||
update_interval: 60s
|
||||
display_data_1_pin:
|
||||
number: GPIO5
|
||||
allow_other_uses: true
|
||||
display_data_2_pin:
|
||||
number: GPIO18
|
||||
allow_other_uses: true
|
||||
display_data_3_pin:
|
||||
number: GPIO19
|
||||
allow_other_uses: true
|
||||
display_data_5_pin:
|
||||
number: GPIO25
|
||||
allow_other_uses: true
|
||||
display_data_4_pin:
|
||||
number: GPIO23
|
||||
allow_other_uses: true
|
||||
display_data_6_pin:
|
||||
number: GPIO26
|
||||
allow_other_uses: true
|
||||
display_data_7_pin:
|
||||
number: GPIO27
|
||||
allow_other_uses: true
|
||||
ckv_pin:
|
||||
number: GPIO1
|
||||
allow_other_uses: true
|
||||
sph_pin:
|
||||
number: GPIO1
|
||||
allow_other_uses: true
|
||||
gmod_pin:
|
||||
number: GPIO1
|
||||
allow_other_uses: true
|
||||
gpio0_enable_pin:
|
||||
number: GPIO1
|
||||
allow_other_uses: true
|
||||
oe_pin:
|
||||
number: GPIO1
|
||||
allow_other_uses: true
|
||||
spv_pin:
|
||||
number: GPIO1
|
||||
allow_other_uses: true
|
||||
powerup_pin:
|
||||
number: GPIO1
|
||||
allow_other_uses: true
|
||||
wakeup_pin:
|
||||
number: GPIO1
|
||||
allow_other_uses: true
|
||||
vcom_pin:
|
||||
number: GPIO1
|
||||
allow_other_uses: true
|
||||
|
||||
number:
|
||||
- platform: tuya
|
||||
id: tuya_number
|
||||
number_datapoint: 102
|
||||
min_value: 0
|
||||
max_value: 17
|
||||
step: 1
|
||||
- platform: copy
|
||||
source_id: tuya_number
|
||||
name: Tuya Number Copy
|
||||
|
||||
text_sensor:
|
||||
- platform: pylontech
|
||||
pylontech_id: pylontech0
|
||||
battery: 1
|
||||
base_state:
|
||||
id: pyl0_base_state
|
||||
voltage_state:
|
||||
id: pyl0_voltage_state
|
||||
current_state:
|
||||
id: pyl0_current_state
|
||||
temperature_state:
|
||||
id: pyl0_temperature_state
|
||||
- platform: pipsolar
|
||||
pipsolar_id: inverter0
|
||||
device_mode:
|
||||
id: inverter0_device_mode
|
||||
name: inverter0_device_mode
|
||||
last_qpigs:
|
||||
id: inverter0_last_qpigs
|
||||
name: inverter0_last_qpigs
|
||||
last_qpiri:
|
||||
id: inverter0_last_qpiri
|
||||
name: inverter0_last_qpiri
|
||||
last_qmod:
|
||||
id: inverter0_last_qmod
|
||||
name: inverter0_last_qmod
|
||||
last_qflag:
|
||||
id: inverter0_last_qflag
|
||||
name: inverter0_last_qflag
|
||||
- platform: copy
|
||||
source_id: inverter0_device_mode
|
||||
name: Inverter Text Sensor Copy
|
||||
- platform: ethernet_info
|
||||
ip_address:
|
||||
name: IP Address
|
||||
|
||||
output:
|
||||
- platform: pipsolar
|
||||
pipsolar_id: inverter0
|
||||
battery_recharge_voltage:
|
||||
id: inverter0_battery_recharge_voltage_out
|
||||
- platform: dac7678
|
||||
dac7678_id: dac7678_hub1
|
||||
channel: 0
|
||||
id: dac7678_1_ch0
|
||||
- platform: dac7678
|
||||
dac7678_id: dac7678_hub1
|
||||
channel: 1
|
||||
id: dac7678_1_ch1
|
||||
- platform: dac7678
|
||||
dac7678_id: dac7678_hub1
|
||||
channel: 2
|
||||
id: dac7678_1_ch2
|
||||
- platform: dac7678
|
||||
dac7678_id: dac7678_hub1
|
||||
channel: 3
|
||||
id: dac7678_1_ch3
|
||||
- platform: dac7678
|
||||
dac7678_id: dac7678_hub1
|
||||
channel: 4
|
||||
id: dac7678_1_ch4
|
||||
- platform: dac7678
|
||||
dac7678_id: dac7678_hub1
|
||||
channel: 5
|
||||
id: dac7678_1_ch5
|
||||
- platform: dac7678
|
||||
dac7678_id: dac7678_hub1
|
||||
channel: 6
|
||||
id: dac7678_1_ch6
|
||||
- platform: dac7678
|
||||
dac7678_id: dac7678_hub1
|
||||
channel: 7
|
||||
id: dac7678_1_ch7
|
||||
esp32_camera:
|
||||
name: ESP-32 Camera
|
||||
data_pins:
|
||||
- number: GPIO17
|
||||
allow_other_uses: true
|
||||
- number: GPIO35
|
||||
allow_other_uses: true
|
||||
- number: GPIO34
|
||||
- number: GPIO5
|
||||
allow_other_uses: true
|
||||
- number: GPIO39
|
||||
allow_other_uses: true
|
||||
- number: GPIO18
|
||||
allow_other_uses: true
|
||||
- number: GPIO36
|
||||
allow_other_uses: true
|
||||
- number: GPIO19
|
||||
allow_other_uses: true
|
||||
vsync_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO22
|
||||
href_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO26
|
||||
pixel_clock_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO21
|
||||
external_clock:
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO27
|
||||
frequency: 20MHz
|
||||
i2c_pins:
|
||||
sda:
|
||||
allow_other_uses: true
|
||||
number: GPIO25
|
||||
scl:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
reset_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO15
|
||||
power_down_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO1
|
||||
resolution: 640x480
|
||||
jpeg_quality: 10
|
||||
on_image:
|
||||
then:
|
||||
- lambda: |-
|
||||
ESP_LOGD("main", "image len=%d, data=%c", image.length, image.data[0]);
|
||||
|
||||
esp32_camera_web_server:
|
||||
- port: 8080
|
||||
mode: stream
|
||||
- port: 8081
|
||||
mode: snapshot
|
||||
|
||||
external_components:
|
||||
- source: github://esphome/esphome@dev
|
||||
refresh: 1d
|
||||
components: [bh1750]
|
||||
- source: ../esphome/components
|
||||
components: [sntp]
|
||||
|
||||
button:
|
||||
- platform: restart
|
||||
name: Restart Button
|
||||
- platform: safe_mode
|
||||
name: Safe Mode Button
|
||||
- platform: shutdown
|
||||
name: Shutdown Button
|
||||
id: shutdown_btn
|
||||
- platform: copy
|
||||
source_id: shutdown_btn
|
||||
name: Shutdown Button Copy
|
||||
|
||||
touchscreen:
|
||||
- platform: ektf2232
|
||||
interrupt_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO36
|
||||
rts_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO5
|
||||
display: inkplate_display
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
||||
|
||||
- platform: xpt2046
|
||||
id: xpt_touchscreen
|
||||
spi_id: spi_id_2
|
||||
cs_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO17
|
||||
interrupt_pin:
|
||||
number: GPIO16
|
||||
display: inkplate_display
|
||||
update_interval: 50ms
|
||||
threshold: 400
|
||||
calibration:
|
||||
x_min: 3860
|
||||
x_max: 280
|
||||
y_min: 340
|
||||
y_max: 3860
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
||||
|
||||
- platform: lilygo_t5_47
|
||||
id: lilygo_touchscreen
|
||||
interrupt_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO36
|
||||
display: inkplate_display
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
||||
- platform: gt911
|
||||
interrupt_pin:
|
||||
number: GPIO3
|
||||
display: inkplate_display
|
||||
|
||||
- platform: ft63x6
|
||||
id: ft63_touchscreen
|
||||
interrupt_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO39
|
||||
reset_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO5
|
||||
display: inkplate_display
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO26
|
||||
i2s_bclk_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO27
|
||||
i2s_mclk_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO25
|
||||
|
||||
media_player:
|
||||
- platform: i2s_audio
|
||||
name: None
|
||||
dac_type: external
|
||||
i2s_dout_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO25
|
||||
mute_pin:
|
||||
number: GPIO14
|
||||
on_state:
|
||||
- media_player.play:
|
||||
- media_player.play_media: http://localhost/media.mp3
|
||||
- media_player.play_media: !lambda 'return "http://localhost/media.mp3";'
|
||||
on_idle:
|
||||
- media_player.pause:
|
||||
on_play:
|
||||
- media_player.stop:
|
||||
on_pause:
|
||||
- media_player.toggle:
|
||||
- wait_until:
|
||||
media_player.is_idle:
|
||||
- wait_until:
|
||||
media_player.is_playing:
|
||||
- media_player.volume_up:
|
||||
- media_player.volume_down:
|
||||
- media_player.volume_set: 50%
|
||||
|
||||
prometheus:
|
||||
include_internal: true
|
||||
relabel:
|
||||
ha_hello_world:
|
||||
id: hellow_world
|
||||
name: Hello World
|
||||
|
||||
microphone:
|
||||
- platform: i2s_audio
|
||||
id: mic_id_adc
|
||||
adc_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO35
|
||||
adc_type: internal
|
||||
|
||||
- platform: i2s_audio
|
||||
id: mic_id_external
|
||||
i2s_din_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO23
|
||||
adc_type: external
|
||||
pdm: false
|
||||
|
||||
speaker:
|
||||
- platform: i2s_audio
|
||||
id: speaker_id
|
||||
dac_type: external
|
||||
i2s_dout_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO25
|
||||
mode: mono
|
||||
|
||||
voice_assistant:
|
||||
microphone: mic_id_external
|
||||
speaker: speaker_id
|
||||
on_listening:
|
||||
- logger.log: "Voice assistant microphone listening"
|
||||
on_start:
|
||||
- logger.log: "Voice assistant started"
|
||||
on_stt_end:
|
||||
- logger.log:
|
||||
format: "Voice assistant STT ended with result %s"
|
||||
args: [x.c_str()]
|
||||
on_tts_start:
|
||||
- logger.log:
|
||||
format: "Voice assistant TTS started with text %s"
|
||||
args: [x.c_str()]
|
||||
on_tts_end:
|
||||
- logger.log:
|
||||
format: "Voice assistant TTS ended with url %s"
|
||||
args: [x.c_str()]
|
||||
on_end:
|
||||
- logger.log: "Voice assistant ended"
|
||||
on_error:
|
||||
- logger.log:
|
||||
format: "Voice assistant error - code %s, message: %s"
|
||||
args: [code.c_str(), message.c_str()]
|
||||
|
||||
max6956:
|
||||
- id: max6956_1
|
||||
address: 0x40
|
||||
|
||||
xl9535:
|
||||
- id: xl9535_hub
|
||||
address: 0x20
|
747
tests/test5.yaml
747
tests/test5.yaml
|
@ -1,747 +0,0 @@
|
|||
---
|
||||
esphome:
|
||||
name: test5
|
||||
build_path: build/test5
|
||||
project:
|
||||
name: esphome.test5_project
|
||||
version: "1.0.0"
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
framework:
|
||||
type: esp-idf
|
||||
advanced:
|
||||
ignore_efuse_mac_crc: true
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: "MySSID"
|
||||
password: "password1"
|
||||
manual_ip:
|
||||
static_ip: 192.168.1.23
|
||||
gateway: 192.168.1.1
|
||||
subnet: 255.255.255.0
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
logger:
|
||||
|
||||
debug:
|
||||
|
||||
psram:
|
||||
|
||||
uart:
|
||||
- id: uart_1
|
||||
tx_pin: 1
|
||||
rx_pin: 3
|
||||
baud_rate: 9600
|
||||
- id: uart_2
|
||||
tx_pin:
|
||||
allow_other_uses: true
|
||||
number: 17
|
||||
inverted: true
|
||||
rx_pin:
|
||||
allow_other_uses: true
|
||||
number: 16
|
||||
baud_rate: 19200
|
||||
|
||||
i2c:
|
||||
sda:
|
||||
allow_other_uses: true
|
||||
number: 21
|
||||
scl:
|
||||
number: 22
|
||||
frequency: 100khz
|
||||
|
||||
modbus:
|
||||
uart_id: uart_1
|
||||
flow_control_pin:
|
||||
allow_other_uses: true
|
||||
number: 5
|
||||
id: mod_bus1
|
||||
|
||||
modbus_controller:
|
||||
- id: modbus_controller_test
|
||||
address: 0x2
|
||||
modbus_id: mod_bus1
|
||||
|
||||
mqtt:
|
||||
broker: test.mosquitto.org
|
||||
port: 1883
|
||||
discovery: true
|
||||
discovery_prefix: homeassistant
|
||||
idf_send_async: false
|
||||
log_topic:
|
||||
on_message:
|
||||
topic: testing/sensor/testing_sensor/state
|
||||
qos: 0
|
||||
then:
|
||||
# yamllint disable rule:line-length
|
||||
- lambda: |-
|
||||
ESP_LOGD("Mqtt Test", "testing/sensor/testing_sensor/state=[%s]", x.c_str());
|
||||
# yamllint enable rule:line-length
|
||||
|
||||
vbus:
|
||||
- uart_id: uart_2
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO0
|
||||
id: io0_button
|
||||
icon: mdi:gesture-tap-button
|
||||
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_controller_test
|
||||
id: modbus_binsensortest
|
||||
register_type: read
|
||||
address: 0x3200
|
||||
bitmask: 0x80 # (bit 8)
|
||||
lambda: "return x;"
|
||||
|
||||
- platform: tm1638
|
||||
id: Button0
|
||||
key: 0
|
||||
filters:
|
||||
- delayed_on: 10ms
|
||||
on_press:
|
||||
then:
|
||||
- switch.turn_on: Led0
|
||||
on_release:
|
||||
then:
|
||||
- switch.turn_off: Led0
|
||||
|
||||
- platform: tm1638
|
||||
id: Button1
|
||||
key: 1
|
||||
on_press:
|
||||
then:
|
||||
- switch.turn_on: Led1
|
||||
on_release:
|
||||
then:
|
||||
- switch.turn_off: Led1
|
||||
|
||||
- platform: tm1638
|
||||
id: Button2
|
||||
key: 2
|
||||
on_press:
|
||||
then:
|
||||
- switch.turn_on: Led2
|
||||
on_release:
|
||||
then:
|
||||
- switch.turn_off: Led2
|
||||
|
||||
- platform: tm1638
|
||||
id: Button3
|
||||
key: 3
|
||||
on_press:
|
||||
then:
|
||||
- switch.turn_on: Led3
|
||||
on_release:
|
||||
then:
|
||||
- switch.turn_off: Led3
|
||||
|
||||
- platform: tm1638
|
||||
id: Button4
|
||||
key: 4
|
||||
on_press:
|
||||
then:
|
||||
- output.turn_on: Led4
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: Led4
|
||||
|
||||
- platform: tm1638
|
||||
id: Button5
|
||||
key: 5
|
||||
on_press:
|
||||
then:
|
||||
- output.turn_on: Led5
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: Led5
|
||||
|
||||
- platform: tm1638
|
||||
id: Button6
|
||||
key: 6
|
||||
on_press:
|
||||
then:
|
||||
- output.turn_on: Led6
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: Led6
|
||||
|
||||
- platform: tm1638
|
||||
id: Button7
|
||||
key: 7
|
||||
on_press:
|
||||
then:
|
||||
- output.turn_on: Led7
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: Led7
|
||||
|
||||
- platform: gpio
|
||||
id: sn74hc165_pin_0
|
||||
pin:
|
||||
sn74hc165: sn74hc165_hub
|
||||
number: 0
|
||||
|
||||
- platform: ezo_pmp
|
||||
pump_state:
|
||||
name: "Pump State"
|
||||
is_paused:
|
||||
name: "Is Paused"
|
||||
|
||||
- platform: matrix_keypad
|
||||
keypad_id: keypad
|
||||
id: key4
|
||||
row: 1
|
||||
col: 1
|
||||
- platform: matrix_keypad
|
||||
id: key1
|
||||
key: 1
|
||||
|
||||
- platform: vbus
|
||||
model: deltasol_bs_plus
|
||||
relay2:
|
||||
name: Relay 2 On
|
||||
sensor1_error:
|
||||
name: Sensor 1 Error
|
||||
|
||||
- platform: vbus
|
||||
model: custom
|
||||
command: 0x100
|
||||
source: 0x1234
|
||||
dest: 0x10
|
||||
binary_sensors:
|
||||
- id: vcustom_b
|
||||
name: VBus Custom Binary Sensor
|
||||
lambda: return x[0] & 1;
|
||||
|
||||
tlc5947:
|
||||
data_pin:
|
||||
number: GPIO12
|
||||
allow_other_uses: true
|
||||
clock_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO14
|
||||
lat_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO15
|
||||
|
||||
gp8403:
|
||||
- id: gp8403_5v
|
||||
voltage: 5V
|
||||
- id: gp8403_10v
|
||||
voltage: 10V
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO2
|
||||
id: built_in_led
|
||||
|
||||
- platform: tlc5947
|
||||
id: output_red
|
||||
channel: 0
|
||||
max_power: 0.8
|
||||
|
||||
- platform: mcp47a1
|
||||
id: output_mcp47a1
|
||||
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_controller_test
|
||||
id: modbus_output_test
|
||||
lambda: |-
|
||||
return x * 1.0 ;
|
||||
address: 0x9001
|
||||
value_type: U_WORD
|
||||
|
||||
- platform: tm1638
|
||||
id: Led4
|
||||
led: 4
|
||||
|
||||
- platform: tm1638
|
||||
id: Led5
|
||||
led: 5
|
||||
|
||||
- platform: tm1638
|
||||
id: Led6
|
||||
led: 6
|
||||
|
||||
- platform: tm1638
|
||||
id: Led7
|
||||
led: 7
|
||||
|
||||
- platform: gp8403
|
||||
id: gp8403_output_0
|
||||
gp8403_id: gp8403_5v
|
||||
channel: 0
|
||||
- platform: gp8403
|
||||
gp8403_id: gp8403_10v
|
||||
id: gp8403_output_1
|
||||
channel: 1
|
||||
|
||||
demo:
|
||||
|
||||
esp32_ble:
|
||||
|
||||
esp32_ble_server:
|
||||
manufacturer: ESPHome
|
||||
model: Test5
|
||||
|
||||
esp32_improv:
|
||||
authorizer: io0_button
|
||||
authorized_duration: 1min
|
||||
status_indicator: built_in_led
|
||||
|
||||
ezo_pmp:
|
||||
id: hcl_pump
|
||||
update_interval: 1s
|
||||
|
||||
number:
|
||||
- platform: template
|
||||
name: My template number
|
||||
id: template_number_id
|
||||
optimistic: true
|
||||
max_value: 100
|
||||
min_value: 0
|
||||
step: 5
|
||||
unit_of_measurement: "%"
|
||||
mode: slider
|
||||
device_class: humidity
|
||||
on_value:
|
||||
- logger.log:
|
||||
format: Number changed to %f
|
||||
args: [x]
|
||||
set_action:
|
||||
- logger.log:
|
||||
format: Template Number set to %f
|
||||
args: [x]
|
||||
- number.set:
|
||||
id: template_number_id
|
||||
value: 50
|
||||
- number.to_min: template_number_id
|
||||
- number.to_min:
|
||||
id: template_number_id
|
||||
- number.to_max: template_number_id
|
||||
- number.to_max:
|
||||
id: template_number_id
|
||||
- number.increment: template_number_id
|
||||
- number.increment:
|
||||
id: template_number_id
|
||||
cycle: false
|
||||
- number.decrement: template_number_id
|
||||
- number.decrement:
|
||||
id: template_number_id
|
||||
cycle: false
|
||||
- number.operation:
|
||||
id: template_number_id
|
||||
operation: Increment
|
||||
cycle: false
|
||||
- number.operation:
|
||||
id: template_number_id
|
||||
operation: !lambda "return NUMBER_OP_INCREMENT;"
|
||||
cycle: !lambda "return false;"
|
||||
|
||||
- id: modbus_numbertest
|
||||
platform: modbus_controller
|
||||
modbus_controller_id: modbus_controller_test
|
||||
name: ModbusNumber
|
||||
address: 0x9002
|
||||
value_type: U_WORD
|
||||
lambda: "return x * 1.0;"
|
||||
write_lambda: |-
|
||||
return x * 1.0 ;
|
||||
multiply: 1.0
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
name: My template select
|
||||
id: template_select_id
|
||||
optimistic: true
|
||||
initial_option: two
|
||||
restore_value: true
|
||||
on_value:
|
||||
- logger.log:
|
||||
format: Select changed to %s (index %d)"
|
||||
args: ["x.c_str()", "i"]
|
||||
set_action:
|
||||
- logger.log:
|
||||
format: Template Select set to %s
|
||||
args: ["x.c_str()"]
|
||||
- select.set:
|
||||
id: template_select_id
|
||||
option: two
|
||||
- select.first: template_select_id
|
||||
- select.last:
|
||||
id: template_select_id
|
||||
- select.previous: template_select_id
|
||||
- select.next:
|
||||
id: template_select_id
|
||||
cycle: false
|
||||
- select.operation:
|
||||
id: template_select_id
|
||||
operation: Previous
|
||||
cycle: false
|
||||
- select.operation:
|
||||
id: template_select_id
|
||||
operation: !lambda "return SELECT_OP_PREVIOUS;"
|
||||
cycle: !lambda "return true;"
|
||||
- select.set_index:
|
||||
id: template_select_id
|
||||
index: 1
|
||||
- select.set_index:
|
||||
id: template_select_id
|
||||
index: !lambda "return 1 + 1;"
|
||||
options:
|
||||
- one
|
||||
- two
|
||||
- three
|
||||
|
||||
- platform: modbus_controller
|
||||
name: Modbus Select Register 1000
|
||||
address: 1000
|
||||
value_type: U_WORD
|
||||
optionsmap:
|
||||
"Zero": 0
|
||||
"One": 1
|
||||
"Two": 2
|
||||
"Three": 3
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: adc_sensor_p32
|
||||
name: ADC pin 32
|
||||
pin: 32
|
||||
attenuation: 11db
|
||||
update_interval: 1s
|
||||
- platform: internal_temperature
|
||||
name: Internal Temperature
|
||||
state_topic:
|
||||
- platform: selec_meter
|
||||
total_active_energy:
|
||||
name: SelecEM2M Total Active Energy
|
||||
import_active_energy:
|
||||
name: SelecEM2M Import Active Energy
|
||||
export_active_energy:
|
||||
name: SelecEM2M Export Active Energy
|
||||
total_reactive_energy:
|
||||
name: SelecEM2M Total Reactive Energy
|
||||
import_reactive_energy:
|
||||
name: SelecEM2M Import Reactive Energy
|
||||
export_reactive_energy:
|
||||
name: SelecEM2M Export Reactive Energy
|
||||
apparent_energy:
|
||||
name: SelecEM2M Apparent Energy
|
||||
active_power:
|
||||
name: SelecEM2M Active Power
|
||||
reactive_power:
|
||||
name: SelecEM2M Reactive Power
|
||||
apparent_power:
|
||||
name: SelecEM2M Apparent Power
|
||||
voltage:
|
||||
name: SelecEM2M Voltage
|
||||
current:
|
||||
name: SelecEM2M Current
|
||||
power_factor:
|
||||
name: SelecEM2M Power Factor
|
||||
frequency:
|
||||
name: SelecEM2M Frequency
|
||||
maximum_demand_active_power:
|
||||
name: SelecEM2M Maximum Demand Active Power
|
||||
disabled_by_default: true
|
||||
maximum_demand_reactive_power:
|
||||
name: SelecEM2M Maximum Demand Reactive Power
|
||||
disabled_by_default: true
|
||||
maximum_demand_apparent_power:
|
||||
name: SelecEM2M Maximum Demand Apparent Power
|
||||
disabled_by_default: true
|
||||
|
||||
- id: modbus_sensortest
|
||||
platform: modbus_controller
|
||||
modbus_controller_id: modbus_controller_test
|
||||
address: 0x331A
|
||||
register_type: read
|
||||
value_type: U_WORD
|
||||
|
||||
- platform: t6615
|
||||
uart_id: uart_2
|
||||
co2:
|
||||
name: CO2 Sensor
|
||||
|
||||
- platform: ms8607
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
pressure:
|
||||
name: Pressure
|
||||
- platform: ms8607
|
||||
id: ms8607_more_config
|
||||
temperature:
|
||||
name: Indoor Temperature
|
||||
accuracy_decimals: 1
|
||||
pressure:
|
||||
name: Indoor Pressure
|
||||
internal: true
|
||||
humidity:
|
||||
name: Indoor Humidity
|
||||
address: 0x41
|
||||
i2c_id:
|
||||
i2c_id:
|
||||
address: 0x77
|
||||
update_interval: 10min
|
||||
|
||||
- platform: sen5x
|
||||
id: sen54
|
||||
temperature:
|
||||
name: Temperature
|
||||
accuracy_decimals: 1
|
||||
humidity:
|
||||
name: Humidity
|
||||
accuracy_decimals: 0
|
||||
pm_1_0:
|
||||
name: PM <1µm Weight concentration
|
||||
id: pm_1_0
|
||||
accuracy_decimals: 1
|
||||
pm_2_5:
|
||||
name: PM <2.5µm Weight concentration
|
||||
id: pm_2_5
|
||||
accuracy_decimals: 1
|
||||
pm_4_0:
|
||||
name: PM <4µm Weight concentration
|
||||
id: pm_4_0
|
||||
accuracy_decimals: 1
|
||||
pm_10_0:
|
||||
name: PM <10µm Weight concentration
|
||||
id: pm_10_0
|
||||
accuracy_decimals: 1
|
||||
nox:
|
||||
name: NOx
|
||||
voc:
|
||||
name: VOC
|
||||
algorithm_tuning:
|
||||
index_offset: 100
|
||||
learning_time_offset_hours: 12
|
||||
learning_time_gain_hours: 12
|
||||
gating_max_duration_minutes: 180
|
||||
std_initial: 50
|
||||
gain_factor: 230
|
||||
temperature_compensation:
|
||||
offset: 0
|
||||
normalized_offset_slope: 0
|
||||
time_constant: 0
|
||||
auto_cleaning_interval: 604800s
|
||||
acceleration_mode: low
|
||||
store_baseline: true
|
||||
address: 0x69
|
||||
- platform: mcp9600
|
||||
thermocouple_type: K
|
||||
hot_junction:
|
||||
name: Thermocouple Temperature
|
||||
cold_junction:
|
||||
name: Ambient Temperature
|
||||
|
||||
- platform: ezo_pmp
|
||||
current_volume_dosed:
|
||||
name: Current Volume Dosed
|
||||
total_volume_dosed:
|
||||
name: Total Volume Dosed
|
||||
absolute_total_volume_dosed:
|
||||
name: Absolute Total Volume Dosed
|
||||
pump_voltage:
|
||||
name: Pump Voltage
|
||||
last_volume_requested:
|
||||
name: Last Volume Requested
|
||||
max_flow_rate:
|
||||
name: Max Flow Rate
|
||||
|
||||
- platform: vbus
|
||||
model: deltasol c
|
||||
temperature_3:
|
||||
name: Temperature 3
|
||||
operating_hours_1:
|
||||
name: Operating Hours 1
|
||||
heat_quantity:
|
||||
name: Heat Quantity
|
||||
time:
|
||||
name: System Time
|
||||
|
||||
- platform: debug
|
||||
free:
|
||||
name: "Heap Free"
|
||||
block:
|
||||
name: "Heap Max Block"
|
||||
loop_time:
|
||||
name: "Loop Time"
|
||||
psram:
|
||||
name: "PSRAM Free"
|
||||
|
||||
- platform: vbus
|
||||
model: custom
|
||||
command: 0x100
|
||||
source: 0x1234
|
||||
dest: 0x10
|
||||
sensors:
|
||||
- id: vcustom
|
||||
name: VBus Custom Sensor
|
||||
lambda: return x[0] / 10.0;
|
||||
|
||||
- platform: kuntze
|
||||
ph:
|
||||
name: Kuntze pH
|
||||
temperature:
|
||||
name: Kuntze temperature
|
||||
|
||||
script:
|
||||
- id: automation_test
|
||||
then:
|
||||
- repeat:
|
||||
count: 5
|
||||
then:
|
||||
- logger.log: looping!
|
||||
|
||||
- id: zero_repeat_test
|
||||
then:
|
||||
- repeat:
|
||||
count: !lambda "return 0;"
|
||||
then:
|
||||
- logger.log: shouldn't see mee!
|
||||
|
||||
switch:
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_controller_test
|
||||
id: modbus_switch_test
|
||||
register_type: coil
|
||||
address: 2
|
||||
bitmask: 1
|
||||
|
||||
- platform: tm1638
|
||||
id: Led0
|
||||
led: 0
|
||||
name: TM1638Led0
|
||||
|
||||
- platform: tm1638
|
||||
id: Led1
|
||||
led: 1
|
||||
name: TM1638Led1
|
||||
|
||||
- platform: tm1638
|
||||
id: Led2
|
||||
led: 2
|
||||
name: TM1638Led2
|
||||
|
||||
- platform: tm1638
|
||||
id: Led3
|
||||
led: 3
|
||||
name: TM1638Led3
|
||||
|
||||
display:
|
||||
- platform: tm1638
|
||||
id: primarydisplay
|
||||
stb_pin:
|
||||
allow_other_uses: true
|
||||
number: 5 # TM1638 STB
|
||||
clk_pin: 18 # TM1638 CLK
|
||||
dio_pin: 23 # TM1638 DIO
|
||||
update_interval: 5s
|
||||
intensity: 5
|
||||
lambda: |-
|
||||
it.print("81818181");
|
||||
|
||||
time:
|
||||
- platform: pcf85063
|
||||
- platform: pcf8563
|
||||
|
||||
text_sensor:
|
||||
- platform: ezo_pmp
|
||||
dosing_mode:
|
||||
name: Dosing Mode
|
||||
calibration_status:
|
||||
name: Calibration Status
|
||||
on_value:
|
||||
- ezo_pmp.dose_volume:
|
||||
id: hcl_pump
|
||||
volume: 10
|
||||
- ezo_pmp.dose_volume_over_time:
|
||||
id: hcl_pump
|
||||
volume: 10
|
||||
duration: 2
|
||||
- ezo_pmp.dose_with_constant_flow_rate:
|
||||
id: hcl_pump
|
||||
volume_per_minute: 10
|
||||
duration: 2
|
||||
- ezo_pmp.set_calibration_volume:
|
||||
id: hcl_pump
|
||||
volume: 10
|
||||
- ezo_pmp.find: hcl_pump
|
||||
- ezo_pmp.dose_continuously: hcl_pump
|
||||
- ezo_pmp.clear_total_volume_dosed: hcl_pump
|
||||
- ezo_pmp.clear_calibration: hcl_pump
|
||||
- ezo_pmp.pause_dosing: hcl_pump
|
||||
- ezo_pmp.stop_dosing: hcl_pump
|
||||
- ezo_pmp.arbitrary_command:
|
||||
id: hcl_pump
|
||||
command: D,?
|
||||
|
||||
sn74hc165:
|
||||
id: sn74hc165_hub
|
||||
data_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO12
|
||||
clock_pin:
|
||||
allow_other_uses: true
|
||||
number: GPIO14
|
||||
load_pin: GPIO27
|
||||
clock_inhibit_pin: GPIO26
|
||||
sr_count: 4
|
||||
|
||||
matrix_keypad:
|
||||
id: keypad
|
||||
rows:
|
||||
- pin:
|
||||
allow_other_uses: true
|
||||
number: 21
|
||||
- pin: 19
|
||||
columns:
|
||||
- pin:
|
||||
allow_other_uses: true
|
||||
number: 17
|
||||
- pin:
|
||||
allow_other_uses: true
|
||||
number: 16
|
||||
keys: "1234"
|
||||
has_pulldowns: true
|
||||
|
||||
key_collector:
|
||||
- id: reader
|
||||
source_id: keypad
|
||||
min_length: 4
|
||||
max_length: 4
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
id: led_strip
|
||||
pin: 13
|
||||
num_leds: 60
|
||||
rmt_channel: 6
|
||||
rgb_order: GRB
|
||||
chipset: ws2812
|
||||
- platform: esp32_rmt_led_strip
|
||||
id: led_strip2
|
||||
pin:
|
||||
allow_other_uses: true
|
||||
number: 15
|
||||
num_leds: 60
|
||||
rmt_channel: 2
|
||||
rgb_order: RGB
|
||||
bit0_high: 100us
|
||||
bit0_low: 100us
|
||||
bit1_high: 100us
|
||||
bit1_low: 100us
|
|
@ -1,77 +0,0 @@
|
|||
---
|
||||
esphome:
|
||||
name: test6
|
||||
project:
|
||||
name: esphome.test6_project
|
||||
version: "1.0.0"
|
||||
|
||||
rp2040:
|
||||
board: rpipicow
|
||||
framework:
|
||||
# Waiting for https://github.com/platformio/platform-raspberrypi/pull/36
|
||||
platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: "MySSID"
|
||||
password: "password1"
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
|
||||
api:
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
logger:
|
||||
|
||||
debug:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO5
|
||||
id: pin_5_button
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO4
|
||||
id: pin_4
|
||||
|
||||
switch:
|
||||
- platform: output
|
||||
output: pin_4
|
||||
id: pin_4_switch
|
||||
|
||||
spi: # Pins are for SPI1 on the RP2040 Pico-W
|
||||
miso_pin: 8
|
||||
clk_pin: 10
|
||||
mosi_pin: 11
|
||||
id: spi_0
|
||||
interface: hardware
|
||||
|
||||
# light:
|
||||
# - platform: rp2040_pio_led_strip
|
||||
# id: led_strip
|
||||
# pin: GPIO13
|
||||
# num_leds: 60
|
||||
# pio: 0
|
||||
# rgb_order: GRB
|
||||
# chipset: WS2812
|
||||
# - platform: rp2040_pio_led_strip
|
||||
# id: led_strip_custom_timings
|
||||
# pin: GPIO13
|
||||
# num_leds: 60
|
||||
# pio: 1
|
||||
# rgb_order: GRB
|
||||
# bit0_high: .1us
|
||||
# bit0_low: 1.2us
|
||||
# bit1_high: .69us
|
||||
# bit1_low: .4us
|
||||
|
||||
sensor:
|
||||
- platform: internal_temperature
|
||||
name: Internal Temperature
|
||||
- platform: adc
|
||||
pin: VCC
|
||||
name: VSYS
|
|
@ -1,27 +0,0 @@
|
|||
# Tests for ESP32-C3 boards which use toolchain-riscv32-esp
|
||||
---
|
||||
wifi:
|
||||
ssid: "ssid"
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
|
||||
esp32:
|
||||
board: lolin_c3_mini
|
||||
framework:
|
||||
type: arduino
|
||||
|
||||
esphome:
|
||||
name: test7
|
||||
|
||||
logger:
|
||||
|
||||
debug:
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: adc_sensor_p4
|
||||
name: ADC pin 4
|
||||
pin: 4
|
||||
attenuation: 11db
|
||||
update_interval: 1s
|
|
@ -1,78 +0,0 @@
|
|||
# Tests for ESP32-S3 boards - IDf
|
||||
---
|
||||
wifi:
|
||||
ssid: "ssid"
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
|
||||
esp32:
|
||||
board: esp32s3box
|
||||
variant: ESP32S3
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
esphome:
|
||||
name: esp32-s3-test
|
||||
|
||||
logger:
|
||||
|
||||
debug:
|
||||
|
||||
psram:
|
||||
|
||||
spi:
|
||||
- id: spi_id_1
|
||||
type: single
|
||||
clk_pin:
|
||||
number: GPIO7
|
||||
allow_other_uses: false
|
||||
mosi_pin: GPIO6
|
||||
interface: hardware
|
||||
spi_device:
|
||||
id: spidev
|
||||
data_rate: 2MHz
|
||||
spi_id: spi_id_1
|
||||
mode: 3
|
||||
bit_order: lsb_first
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: displ8
|
||||
model: ili9342
|
||||
cs_pin: GPIO5
|
||||
dc_pin: GPIO4
|
||||
reset_pin:
|
||||
number: GPIO48
|
||||
allow_other_uses: true
|
||||
|
||||
i2c:
|
||||
scl: GPIO18
|
||||
sda: GPIO8
|
||||
|
||||
touchscreen:
|
||||
- platform: tt21100
|
||||
display: displ8
|
||||
interrupt_pin:
|
||||
number: GPIO3
|
||||
ignore_strapping_warning: true
|
||||
allow_other_uses: false
|
||||
reset_pin:
|
||||
number: GPIO48
|
||||
allow_other_uses: true
|
||||
|
||||
binary_sensor:
|
||||
- platform: tt21100
|
||||
name: Home Button
|
||||
index: 1
|
||||
|
||||
sensor:
|
||||
- platform: debug
|
||||
free:
|
||||
name: "Heap Free"
|
||||
block:
|
||||
name: "Max Block Free"
|
||||
loop_time:
|
||||
name: "Loop Time"
|
||||
psram:
|
||||
name: "PSRAM Free"
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue