esphome/tests/test5.yaml

357 lines
7.8 KiB
YAML
Raw Normal View History

2022-09-06 05:48:01 +02:00
---
esphome:
name: test5
build_path: build/test5
project:
name: esphome.test5_project
version: "1.0.0"
ESP-IDF support and generic target platforms (#2303) * Socket refactor and SSL * esp-idf temp * Fixes * Echo component and noise * Add noise API transport support * Updates * ESP-IDF * Complete * Fixes * Fixes * Versions update * New i2c APIs * Complete i2c refactor * SPI migration * Revert ESP Preferences migration, too complex for now * OTA support * Remove echo again * Remove ssl again * GPIOFlags updates * Rename esphal and ICACHE_RAM_ATTR * Make ESP32 arduino compilable again * Fix GPIO flags * Complete pin registry refactor and fixes * Fixes to make test1 compile * Remove sdkconfig file * Ignore sdkconfig file * Fixes in reviewing * Make test2 compile * Make test4 compile * Make test5 compile * Run clang-format * Fix lint errors * Use esp-idf APIs instead of btStart * Another round of fixes * Start implementing ESP8266 * Make test3 compile * Guard esp8266 code * Lint * Reformat * Fixes * Fixes v2 * more fixes * ESP-IDF tidy target * Convert ARDUINO_ARCH_ESPxx * Update WiFiSignalSensor * Update time ifdefs * OTA needs millis from hal * RestartSwitch needs delay from hal * ESP-IDF Uart * Fix OTA blank password * Allow setting sdkconfig * Fix idf partitions and allow setting sdkconfig from yaml * Re-add read/write compat APIs and fix esp8266 uart * Fix esp8266 store log strings in flash * Fix ESP32 arduino preferences not initialized * Update ifdefs * Change how sdkconfig change is detected * Add checks to ci-custom and fix them * Run clang-format * Add esp-idf clang-tidy target and fix errors * Fixes from clang-tidy idf round 2 * Fixes from compiling tests with esp-idf * Run clang-format * Switch test5.yaml to esp-idf * Implement ESP8266 Preferences * Lint * Re-do PIO package version selection a bit * Fix arduinoespressif32 package version * Fix unit tests * Lint * Lint fixes * Fix readv/writev not defined * Fix graphing component * Re-add all old options from core/config.py Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-09-20 11:47:51 +02:00
esp32:
board: nodemcu-32s
framework:
type: esp-idf
advanced:
2021-11-30 20:11:38 +01:00
ignore_efuse_mac_crc: true
ESP-IDF support and generic target platforms (#2303) * Socket refactor and SSL * esp-idf temp * Fixes * Echo component and noise * Add noise API transport support * Updates * ESP-IDF * Complete * Fixes * Fixes * Versions update * New i2c APIs * Complete i2c refactor * SPI migration * Revert ESP Preferences migration, too complex for now * OTA support * Remove echo again * Remove ssl again * GPIOFlags updates * Rename esphal and ICACHE_RAM_ATTR * Make ESP32 arduino compilable again * Fix GPIO flags * Complete pin registry refactor and fixes * Fixes to make test1 compile * Remove sdkconfig file * Ignore sdkconfig file * Fixes in reviewing * Make test2 compile * Make test4 compile * Make test5 compile * Run clang-format * Fix lint errors * Use esp-idf APIs instead of btStart * Another round of fixes * Start implementing ESP8266 * Make test3 compile * Guard esp8266 code * Lint * Reformat * Fixes * Fixes v2 * more fixes * ESP-IDF tidy target * Convert ARDUINO_ARCH_ESPxx * Update WiFiSignalSensor * Update time ifdefs * OTA needs millis from hal * RestartSwitch needs delay from hal * ESP-IDF Uart * Fix OTA blank password * Allow setting sdkconfig * Fix idf partitions and allow setting sdkconfig from yaml * Re-add read/write compat APIs and fix esp8266 uart * Fix esp8266 store log strings in flash * Fix ESP32 arduino preferences not initialized * Update ifdefs * Change how sdkconfig change is detected * Add checks to ci-custom and fix them * Run clang-format * Add esp-idf clang-tidy target and fix errors * Fixes from clang-tidy idf round 2 * Fixes from compiling tests with esp-idf * Run clang-format * Switch test5.yaml to esp-idf * Implement ESP8266 Preferences * Lint * Re-do PIO package version selection a bit * Fix arduinoespressif32 package version * Fix unit tests * Lint * Lint fixes * Fix readv/writev not defined * Fix graphing component * Re-add all old options from core/config.py Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-09-20 11:47:51 +02:00
wifi:
networks:
- ssid: "MySSID"
password: "password1"
manual_ip:
static_ip: 192.168.1.23
gateway: 192.168.1.1
subnet: 255.255.255.0
api:
ota:
logger:
uart:
- id: uart1
tx_pin: 1
rx_pin: 3
baud_rate: 9600
- id: uart2
tx_pin: 17
rx_pin: 16
baud_rate: 19200
i2c:
frequency: 100khz
modbus:
uart_id: uart1
flow_control_pin: 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:
2022-09-06 05:48:01 +02:00
# yamllint disable rule:line-length
- lambda: |-
2022-09-06 05:48:01 +02:00
ESP_LOGD("Mqtt Test", "testing/sensor/testing_sensor/state=[%s]", x.c_str());
# yamllint enable rule:line-length
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
2022-09-06 05:48:01 +02:00
bitmask: 0x80 # (bit 8)
lambda: "return x;"
tlc5947:
data_pin: GPIO12
clock_pin: GPIO14
lat_pin: GPIO15
output:
- platform: gpio
pin: GPIO2
id: built_in_led
- platform: tlc5947
id: output_red
channel: 0
max_power: 0.8
2022-01-08 09:35:55 +01:00
- 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
2021-07-29 11:50:55 +02:00
demo:
esp32_ble:
esp32_ble_server:
2022-09-06 05:48:01 +02:00
manufacturer: ESPHome
model: Test5
esp32_improv:
authorizer: io0_button
authorized_duration: 1min
status_indicator: built_in_led
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
on_value:
- logger.log:
2022-09-06 05:48:01 +02:00
format: Number changed to %f
args: [x]
set_action:
- logger.log:
2022-09-06 05:48:01 +02:00
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
2022-09-06 05:48:01 +02:00
name: ModbusNumber
address: 0x9002
value_type: U_WORD
2022-09-06 05:48:01 +02:00
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:
2022-09-06 05:48:01 +02:00
format: Select changed to %s (index %d)"
args: ["x.c_str()", "i"]
set_action:
- logger.log:
2022-09-06 05:48:01 +02:00
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
2022-09-06 05:48:01 +02:00
name: Modbus Select Register 1000
address: 1000
value_type: U_WORD
optionsmap:
"Zero": 0
"One": 1
"Two": 2
"Three": 3
sensor:
- platform: selec_meter
total_active_energy:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Total Active Energy
import_active_energy:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Import Active Energy
export_active_energy:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Export Active Energy
total_reactive_energy:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Total Reactive Energy
import_reactive_energy:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Import Reactive Energy
export_reactive_energy:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Export Reactive Energy
apparent_energy:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Apparent Energy
active_power:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Active Power
reactive_power:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Reactive Power
apparent_power:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Apparent Power
voltage:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Voltage
current:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Current
power_factor:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Power Factor
frequency:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Frequency
maximum_demand_active_power:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Maximum Demand Active Power
disabled_by_default: true
maximum_demand_reactive_power:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Maximum Demand Reactive Power
disabled_by_default: true
maximum_demand_apparent_power:
2022-09-06 05:48:01 +02:00
name: SelecEM2M Maximum Demand Apparent Power
disabled_by_default: true
2021-07-29 11:50:55 +02:00
- 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: uart2
co2:
name: CO2 Sensor
- platform: bmp3xx
temperature:
2022-09-06 05:48:01 +02:00
name: BMP Temperature
oversampling: 16x
pressure:
2022-09-06 05:48:01 +02:00
name: BMP Pressure
address: 0x77
iir_filter: 2X
- platform: sen5x
id: sen54
temperature:
2022-09-06 05:48:01 +02:00
name: Temperature
accuracy_decimals: 1
humidity:
2022-09-06 05:48:01 +02:00
name: Humidity
accuracy_decimals: 0
pm_1_0:
2022-09-06 05:48:01 +02:00
name: PM <1µm Weight concentration
id: pm_1_0
accuracy_decimals: 1
pm_2_5:
2022-09-06 05:48:01 +02:00
name: PM <2.5µm Weight concentration
id: pm_2_5
accuracy_decimals: 1
pm_4_0:
2022-09-06 05:48:01 +02:00
name: PM <4µm Weight concentration
id: pm_4_0
accuracy_decimals: 1
pm_10_0:
2022-09-06 05:48:01 +02:00
name: PM <10µm Weight concentration
id: pm_10_0
accuracy_decimals: 1
nox:
2022-09-06 05:48:01 +02:00
name: NOx
voc:
2022-09-06 05:48:01 +02:00
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
acceleration_mode: low
store_baseline: true
address: 0x69
- platform: mcp9600
thermocouple_type: K
hot_junction:
2022-09-06 05:48:01 +02:00
name: Thermocouple Temperature
cold_junction:
2022-09-06 05:48:01 +02:00
name: Ambient Temperature
script:
- id: automation_test
then:
- repeat:
count: 5
then:
2022-09-06 05:48:01 +02:00
- logger.log: looping!
switch:
- platform: modbus_controller
modbus_controller_id: modbus_controller_test
id: modbus_switch_test
register_type: coil
address: 2
bitmask: 1