2021-06-08 01:56:21 +02:00
|
|
|
esphome:
|
|
|
|
name: test5
|
|
|
|
build_path: build/test5
|
2021-06-09 03:04:00 +02:00
|
|
|
project:
|
|
|
|
name: esphome.test5_project
|
|
|
|
version: "1.0.0"
|
2021-06-08 01:56:21 +02:00
|
|
|
|
2021-09-20 11:47:51 +02:00
|
|
|
esp32:
|
|
|
|
board: nodemcu-32s
|
|
|
|
framework:
|
|
|
|
type: esp-idf
|
2021-09-30 18:08:15 +02:00
|
|
|
advanced:
|
2021-11-30 20:11:38 +01:00
|
|
|
ignore_efuse_mac_crc: true
|
2021-09-20 11:47:51 +02:00
|
|
|
|
2021-06-08 01:56:21 +02:00
|
|
|
wifi:
|
|
|
|
networks:
|
2022-01-24 20:44:20 +01:00
|
|
|
- ssid: "MySSID"
|
|
|
|
password: "password1"
|
2021-12-01 20:55:27 +01:00
|
|
|
manual_ip:
|
|
|
|
static_ip: 192.168.1.23
|
|
|
|
gateway: 192.168.1.1
|
|
|
|
subnet: 255.255.255.0
|
2021-06-08 01:56:21 +02:00
|
|
|
|
|
|
|
api:
|
|
|
|
|
|
|
|
ota:
|
|
|
|
|
|
|
|
logger:
|
|
|
|
|
2021-07-22 05:31:28 +02:00
|
|
|
uart:
|
2021-07-29 11:24:36 +02:00
|
|
|
- id: uart1
|
|
|
|
tx_pin: 1
|
|
|
|
rx_pin: 3
|
|
|
|
baud_rate: 9600
|
|
|
|
- id: uart2
|
|
|
|
tx_pin: 17
|
|
|
|
rx_pin: 16
|
|
|
|
baud_rate: 19200
|
|
|
|
|
2021-09-13 16:55:01 +02:00
|
|
|
i2c:
|
|
|
|
|
2021-07-22 05:31:28 +02:00
|
|
|
modbus:
|
2021-07-29 11:24:36 +02:00
|
|
|
uart_id: uart1
|
2021-09-26 22:27:24 +02:00
|
|
|
flow_control_pin: 5
|
|
|
|
id: mod_bus1
|
|
|
|
|
|
|
|
modbus_controller:
|
|
|
|
- id: modbus_controller_test
|
|
|
|
address: 0x2
|
|
|
|
modbus_id: mod_bus1
|
2022-04-04 01:07:20 +02:00
|
|
|
|
|
|
|
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:
|
|
|
|
- lambda: |-
|
|
|
|
ESP_LOGD("Mqtt Test","testing/sensor/testing_sensor/state=[%s]",x.c_str());
|
2021-09-26 22:27:24 +02:00
|
|
|
|
2021-06-08 01:56:21 +02:00
|
|
|
binary_sensor:
|
|
|
|
- platform: gpio
|
|
|
|
pin: GPIO0
|
|
|
|
id: io0_button
|
2021-10-10 10:37:05 +02:00
|
|
|
icon: mdi:gesture-tap-button
|
2021-06-08 01:56:21 +02:00
|
|
|
|
2022-01-24 20:44:20 +01:00
|
|
|
- platform: modbus_controller
|
|
|
|
modbus_controller_id: modbus_controller_test
|
|
|
|
id: modbus_binsensortest
|
|
|
|
register_type: read
|
|
|
|
address: 0x3200
|
|
|
|
bitmask: 0x80 #(bit 8)
|
|
|
|
lambda: !lambda "{ return x ;}"
|
|
|
|
|
2021-07-29 11:16:04 +02:00
|
|
|
tlc5947:
|
|
|
|
data_pin: GPIO12
|
|
|
|
clock_pin: GPIO14
|
|
|
|
lat_pin: GPIO15
|
|
|
|
|
2021-06-08 01:56:21 +02:00
|
|
|
output:
|
|
|
|
- platform: gpio
|
|
|
|
pin: GPIO2
|
|
|
|
id: built_in_led
|
|
|
|
|
2021-07-29 11:16:04 +02:00
|
|
|
- platform: tlc5947
|
|
|
|
id: output_red
|
|
|
|
channel: 0
|
|
|
|
max_power: 0.8
|
|
|
|
|
2022-01-08 09:35:55 +01:00
|
|
|
- platform: mcp47a1
|
|
|
|
id: output_mcp47a1
|
|
|
|
|
2022-01-24 20:44:20 +01:00
|
|
|
- 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:
|
|
|
|
|
2021-06-08 01:56:21 +02:00
|
|
|
esp32_ble:
|
2021-06-11 22:31:15 +02:00
|
|
|
|
|
|
|
esp32_ble_server:
|
|
|
|
manufacturer: "ESPHome"
|
|
|
|
model: "Test5"
|
2021-06-08 01:56:21 +02:00
|
|
|
|
|
|
|
esp32_improv:
|
|
|
|
authorizer: io0_button
|
|
|
|
authorized_duration: 1min
|
|
|
|
status_indicator: built_in_led
|
2021-07-12 21:20:12 +02:00
|
|
|
|
|
|
|
number:
|
|
|
|
- platform: template
|
|
|
|
name: My template number
|
|
|
|
id: template_number_id
|
|
|
|
optimistic: true
|
|
|
|
on_value:
|
|
|
|
- logger.log:
|
|
|
|
format: "Number changed to %f"
|
|
|
|
args: ["x"]
|
|
|
|
set_action:
|
|
|
|
- logger.log:
|
|
|
|
format: "Template Number set to %f"
|
|
|
|
args: ["x"]
|
|
|
|
max_value: 100
|
|
|
|
min_value: 0
|
|
|
|
step: 5
|
2022-01-24 20:44:20 +01:00
|
|
|
unit_of_measurement: "%"
|
2021-11-30 20:11:38 +01:00
|
|
|
mode: slider
|
2021-07-22 05:31:28 +02:00
|
|
|
|
2022-01-24 20:44:20 +01:00
|
|
|
- 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
|
|
|
|
|
2021-08-02 10:00:51 +02:00
|
|
|
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"
|
|
|
|
args: ["x.c_str()"]
|
|
|
|
set_action:
|
|
|
|
- logger.log:
|
|
|
|
format: "Template Select set to %s"
|
|
|
|
args: ["x.c_str()"]
|
|
|
|
- select.set:
|
|
|
|
id: template_select_id
|
|
|
|
option: two
|
|
|
|
options:
|
|
|
|
- one
|
|
|
|
- two
|
|
|
|
- three
|
|
|
|
|
2021-07-22 05:31:28 +02:00
|
|
|
sensor:
|
|
|
|
- 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"
|
2021-08-10 03:45:31 +02:00
|
|
|
disabled_by_default: true
|
2021-07-22 05:31:28 +02:00
|
|
|
maximum_demand_reactive_power:
|
|
|
|
name: "SelecEM2M Maximum Demand Reactive Power"
|
2021-08-10 03:45:31 +02:00
|
|
|
disabled_by_default: true
|
2021-07-22 05:31:28 +02:00
|
|
|
maximum_demand_apparent_power:
|
|
|
|
name: "SelecEM2M Maximum Demand Apparent Power"
|
2021-08-10 03:45:31 +02:00
|
|
|
disabled_by_default: true
|
2021-07-29 11:50:55 +02:00
|
|
|
|
2022-01-24 20:44:20 +01:00
|
|
|
- id: modbus_sensortest
|
2021-09-26 22:27:24 +02:00
|
|
|
platform: modbus_controller
|
|
|
|
modbus_controller_id: modbus_controller_test
|
|
|
|
address: 0x331A
|
|
|
|
register_type: read
|
|
|
|
value_type: U_WORD
|
|
|
|
|
2021-07-29 11:24:36 +02:00
|
|
|
- platform: t6615
|
|
|
|
uart_id: uart2
|
|
|
|
co2:
|
|
|
|
name: CO2 Sensor
|
2021-11-10 19:30:07 +01:00
|
|
|
|
2022-01-06 03:01:50 +01:00
|
|
|
- platform: bmp3xx
|
|
|
|
temperature:
|
|
|
|
name: "BMP Temperature"
|
|
|
|
oversampling: 16x
|
|
|
|
pressure:
|
|
|
|
name: "BMP Pressure"
|
|
|
|
address: 0x77
|
|
|
|
iir_filter: 2X
|
|
|
|
|
2021-11-10 19:30:07 +01:00
|
|
|
script:
|
|
|
|
- id: automation_test
|
|
|
|
then:
|
|
|
|
- repeat:
|
|
|
|
count: 5
|
|
|
|
then:
|
|
|
|
- logger.log: "looping!"
|
2022-01-21 03:45:49 +01:00
|
|
|
|
2022-01-24 20:44:20 +01:00
|
|
|
switch:
|
|
|
|
- platform: modbus_controller
|
|
|
|
modbus_controller_id: modbus_controller_test
|
|
|
|
id: modbus_switch_test
|
|
|
|
register_type: coil
|
|
|
|
address: 2
|
|
|
|
bitmask: 1
|