128 lines
2.5 KiB
YAML
128 lines
2.5 KiB
YAML
# this configuration file has all empty components set up.
|
|
# use 'esphome compile test_empty_components.yaml' to build.
|
|
|
|
packages:
|
|
device: !include device.yaml # include our test device setup
|
|
|
|
interval:
|
|
- interval: 3s
|
|
then:
|
|
- if:
|
|
condition:
|
|
- empty_automation.component_on: empty_automation_1
|
|
then:
|
|
- logger.log: "empty_automation.component_on"
|
|
- empty_automation.set_state:
|
|
id: empty_automation_1
|
|
state: false
|
|
else:
|
|
- logger.log: "empty_automation.component_off"
|
|
- empty_automation.set_state:
|
|
id: empty_automation_1
|
|
state: true
|
|
|
|
sensor:
|
|
- platform: empty_sensor
|
|
name: Empty sensor
|
|
|
|
- platform: empty_i2c_sensor
|
|
name: Empty I2C sensor
|
|
|
|
- platform: empty_spi_sensor
|
|
name: Empty SPI sensor
|
|
cs_pin: 15
|
|
|
|
- platform: empty_uart_sensor
|
|
name: Empty UART sensor
|
|
|
|
- platform: empty_compound_sensor
|
|
sensor1:
|
|
name: Sensor 1
|
|
sensor2:
|
|
name: Sensor 2
|
|
sensor3:
|
|
name: Sensor 3
|
|
|
|
- platform: empty_sensor_hub
|
|
name: Sensor for empty sensor hub
|
|
empty_sensor_hub_id: empty_sensor_hub_1
|
|
|
|
binary_sensor:
|
|
- platform: empty_binary_sensor
|
|
name: Empty binary sensor
|
|
|
|
- platform: empty_sensor_hub
|
|
name: Binary sensor for empty sensor hub
|
|
empty_sensor_hub_id: empty_sensor_hub_1
|
|
|
|
output:
|
|
- platform: empty_binary_output
|
|
id: empty_binary_output_1
|
|
|
|
- platform: empty_float_output
|
|
id: empty_float_output_1
|
|
|
|
light:
|
|
- platform: empty_light
|
|
name: Empty light
|
|
output: empty_float_output_1
|
|
|
|
switch:
|
|
- platform: empty_switch
|
|
name: Empty switch
|
|
|
|
fan:
|
|
- platform: empty_fan
|
|
name: Empty fan
|
|
output: empty_binary_output_1
|
|
|
|
text_sensor:
|
|
- platform: empty_text_sensor
|
|
name: Empty text sensor
|
|
|
|
- platform: empty_sensor_hub
|
|
name: Text sensor for empty sensor hub
|
|
empty_sensor_hub_id: empty_sensor_hub_1
|
|
|
|
cover:
|
|
platform: empty_cover
|
|
name: Empty cover
|
|
|
|
empty_automation:
|
|
id: empty_automation_1
|
|
on_state:
|
|
- logger.log: "Empty automation on_state triggered"
|
|
|
|
empty_component:
|
|
id: empty_component_1
|
|
|
|
i2c:
|
|
sda: 21
|
|
scl: 22
|
|
|
|
empty_gpio_component:
|
|
id: empty_gpio_component_1
|
|
pin: 13
|
|
|
|
empty_i2c_component:
|
|
id: empty_i2c_component_1
|
|
address: 0x01
|
|
|
|
uart:
|
|
tx_pin: 17
|
|
rx_pin: 16
|
|
baud_rate: 9600
|
|
|
|
empty_uart_component:
|
|
id: empty_uart_component_1
|
|
|
|
spi:
|
|
clk_pin: 18
|
|
miso_pin: 19
|
|
|
|
empty_spi_component:
|
|
id: empty_spi_component_1
|
|
cs_pin: 5
|
|
|
|
empty_sensor_hub:
|
|
id: empty_sensor_hub_1
|