mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
Merge remote-tracking branch 'origin/dev' into nrf52
This commit is contained in:
58
tests/component_tests/text_sensor/test_text_sensor.py
Normal file
58
tests/component_tests/text_sensor/test_text_sensor.py
Normal file
@@ -0,0 +1,58 @@
|
||||
"""Tests for the text sensor component."""
|
||||
|
||||
|
||||
def test_text_sensor_is_setup(generate_main):
|
||||
"""
|
||||
When the text is set in the yaml file, it should be registered in main
|
||||
"""
|
||||
# Given
|
||||
|
||||
# When
|
||||
main_cpp = generate_main("tests/component_tests/text_sensor/test_text_sensor.yaml")
|
||||
|
||||
# Then
|
||||
assert "new template_::TemplateTextSensor();" in main_cpp
|
||||
assert "App.register_text_sensor" in main_cpp
|
||||
|
||||
|
||||
def test_text_sensor_sets_mandatory_fields(generate_main):
|
||||
"""
|
||||
When the mandatory fields are set in the yaml, they should be set in main
|
||||
"""
|
||||
# Given
|
||||
|
||||
# When
|
||||
main_cpp = generate_main("tests/component_tests/text_sensor/test_text_sensor.yaml")
|
||||
|
||||
# Then
|
||||
assert 'ts_1->set_name("Template Text Sensor 1");' in main_cpp
|
||||
assert 'ts_2->set_name("Template Text Sensor 2");' in main_cpp
|
||||
assert 'ts_3->set_name("Template Text Sensor 3");' in main_cpp
|
||||
|
||||
|
||||
def test_text_sensor_config_value_internal_set(generate_main):
|
||||
"""
|
||||
Test that the "internal" config value is correctly set
|
||||
"""
|
||||
# Given
|
||||
|
||||
# When
|
||||
main_cpp = generate_main("tests/component_tests/text_sensor/test_text_sensor.yaml")
|
||||
|
||||
# Then
|
||||
assert "ts_2->set_internal(true);" in main_cpp
|
||||
assert "ts_3->set_internal(false);" in main_cpp
|
||||
|
||||
|
||||
def test_text_sensor_device_class_set(generate_main):
|
||||
"""
|
||||
When the device_class of text_sensor is set in the yaml file, it should be registered in main
|
||||
"""
|
||||
# Given
|
||||
|
||||
# When
|
||||
main_cpp = generate_main("tests/component_tests/text_sensor/test_text_sensor.yaml")
|
||||
|
||||
# Then
|
||||
assert 'ts_2->set_device_class("timestamp");' in main_cpp
|
||||
assert 'ts_3->set_device_class("date");' in main_cpp
|
||||
26
tests/component_tests/text_sensor/test_text_sensor.yaml
Normal file
26
tests/component_tests/text_sensor/test_text_sensor.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
esphome:
|
||||
name: test
|
||||
platform: ESP8266
|
||||
board: d1_mini_lite
|
||||
|
||||
text_sensor:
|
||||
- platform: template
|
||||
id: ts_1
|
||||
name: "Template Text Sensor 1"
|
||||
lambda: |-
|
||||
return {"Hello World"};
|
||||
- platform: template
|
||||
id: ts_2
|
||||
name: "Template Text Sensor 2"
|
||||
lambda: |-
|
||||
return {"2023-06-22T18:43:52+00:00"};
|
||||
device_class: timestamp
|
||||
internal: true
|
||||
- platform: template
|
||||
id: ts_3
|
||||
name: "Template Text Sensor 3"
|
||||
lambda: |-
|
||||
return {"2023-06-22T18:43:52+00:00"};
|
||||
device_class: date
|
||||
internal: false
|
||||
13
tests/components/a01nyub/test.esp32-c3-idf.yaml
Normal file
13
tests/components/a01nyub/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
uart:
|
||||
- id: uart_a01nyub
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: a01nyub
|
||||
id: a01nyub_sensor
|
||||
name: a01nyub Distance
|
||||
uart_id: uart_a01nyub
|
||||
13
tests/components/a01nyub/test.esp32-c3.yaml
Normal file
13
tests/components/a01nyub/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
uart:
|
||||
- id: uart_a01nyub
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: a01nyub
|
||||
id: a01nyub_sensor
|
||||
name: a01nyub Distance
|
||||
uart_id: uart_a01nyub
|
||||
13
tests/components/a01nyub/test.esp32-idf.yaml
Normal file
13
tests/components/a01nyub/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
uart:
|
||||
- id: uart_a01nyub
|
||||
tx_pin:
|
||||
number: 17
|
||||
rx_pin:
|
||||
number: 16
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: a01nyub
|
||||
id: a01nyub_sensor
|
||||
name: a01nyub Distance
|
||||
uart_id: uart_a01nyub
|
||||
13
tests/components/a01nyub/test.esp32.yaml
Normal file
13
tests/components/a01nyub/test.esp32.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
uart:
|
||||
- id: uart_a01nyub
|
||||
tx_pin:
|
||||
number: 17
|
||||
rx_pin:
|
||||
number: 16
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: a01nyub
|
||||
id: a01nyub_sensor
|
||||
name: a01nyub Distance
|
||||
uart_id: uart_a01nyub
|
||||
13
tests/components/a01nyub/test.esp8266.yaml
Normal file
13
tests/components/a01nyub/test.esp8266.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
uart:
|
||||
- id: uart_a01nyub
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: a01nyub
|
||||
id: a01nyub_sensor
|
||||
name: a01nyub Distance
|
||||
uart_id: uart_a01nyub
|
||||
13
tests/components/a01nyub/test.rp2040.yaml
Normal file
13
tests/components/a01nyub/test.rp2040.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
uart:
|
||||
- id: uart_a01nyub
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: a01nyub
|
||||
id: a01nyub_sensor
|
||||
name: a01nyub Distance
|
||||
uart_id: uart_a01nyub
|
||||
13
tests/components/a02yyuw/test.esp32-c3-idf.yaml
Normal file
13
tests/components/a02yyuw/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
uart:
|
||||
- id: uart_a02yyuw
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: a02yyuw
|
||||
id: a02yyuw_sensor
|
||||
name: a02yyuw Distance
|
||||
uart_id: uart_a02yyuw
|
||||
13
tests/components/a02yyuw/test.esp32-c3.yaml
Normal file
13
tests/components/a02yyuw/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
uart:
|
||||
- id: uart_a02yyuw
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: a02yyuw
|
||||
id: a02yyuw_sensor
|
||||
name: a02yyuw Distance
|
||||
uart_id: uart_a02yyuw
|
||||
13
tests/components/a02yyuw/test.esp32-idf.yaml
Normal file
13
tests/components/a02yyuw/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
uart:
|
||||
- id: uart_a02yyuw
|
||||
tx_pin:
|
||||
number: 17
|
||||
rx_pin:
|
||||
number: 16
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: a02yyuw
|
||||
id: a02yyuw_sensor
|
||||
name: a02yyuw Distance
|
||||
uart_id: uart_a02yyuw
|
||||
13
tests/components/a02yyuw/test.esp32.yaml
Normal file
13
tests/components/a02yyuw/test.esp32.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
uart:
|
||||
- id: uart_a02yyuw
|
||||
tx_pin:
|
||||
number: 17
|
||||
rx_pin:
|
||||
number: 16
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: a02yyuw
|
||||
id: a02yyuw_sensor
|
||||
name: a02yyuw Distance
|
||||
uart_id: uart_a02yyuw
|
||||
13
tests/components/a02yyuw/test.esp8266.yaml
Normal file
13
tests/components/a02yyuw/test.esp8266.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
uart:
|
||||
- id: uart_a02yyuw
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: a02yyuw
|
||||
id: a02yyuw_sensor
|
||||
name: a02yyuw Distance
|
||||
uart_id: uart_a02yyuw
|
||||
13
tests/components/a02yyuw/test.rp2040.yaml
Normal file
13
tests/components/a02yyuw/test.rp2040.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
uart:
|
||||
- id: uart_a02yyuw
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 9600
|
||||
|
||||
sensor:
|
||||
- platform: a02yyuw
|
||||
id: a02yyuw_sensor
|
||||
name: a02yyuw Distance
|
||||
uart_id: uart_a02yyuw
|
||||
12
tests/components/a4988/test.esp32-c3-idf.yaml
Normal file
12
tests/components/a4988/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
stepper:
|
||||
- platform: a4988
|
||||
id: a4988_stepper
|
||||
step_pin:
|
||||
number: 2
|
||||
dir_pin:
|
||||
number: 3
|
||||
sleep_pin:
|
||||
number: 5
|
||||
max_speed: 250 steps/s
|
||||
acceleration: 100 steps/s^2
|
||||
deceleration: 200 steps/s^2
|
||||
12
tests/components/a4988/test.esp32-c3.yaml
Normal file
12
tests/components/a4988/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
stepper:
|
||||
- platform: a4988
|
||||
id: a4988_stepper
|
||||
step_pin:
|
||||
number: 2
|
||||
dir_pin:
|
||||
number: 3
|
||||
sleep_pin:
|
||||
number: 5
|
||||
max_speed: 250 steps/s
|
||||
acceleration: 100 steps/s^2
|
||||
deceleration: 200 steps/s^2
|
||||
12
tests/components/a4988/test.esp32-idf.yaml
Normal file
12
tests/components/a4988/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
stepper:
|
||||
- platform: a4988
|
||||
id: a4988_stepper
|
||||
step_pin:
|
||||
number: 22
|
||||
dir_pin:
|
||||
number: 23
|
||||
sleep_pin:
|
||||
number: 25
|
||||
max_speed: 250 steps/s
|
||||
acceleration: 100 steps/s^2
|
||||
deceleration: 200 steps/s^2
|
||||
12
tests/components/a4988/test.esp32.yaml
Normal file
12
tests/components/a4988/test.esp32.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
stepper:
|
||||
- platform: a4988
|
||||
id: a4988_stepper
|
||||
step_pin:
|
||||
number: 22
|
||||
dir_pin:
|
||||
number: 23
|
||||
sleep_pin:
|
||||
number: 25
|
||||
max_speed: 250 steps/s
|
||||
acceleration: 100 steps/s^2
|
||||
deceleration: 200 steps/s^2
|
||||
12
tests/components/a4988/test.esp8266.yaml
Normal file
12
tests/components/a4988/test.esp8266.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
stepper:
|
||||
- platform: a4988
|
||||
id: a4988_stepper
|
||||
step_pin:
|
||||
number: 1
|
||||
dir_pin:
|
||||
number: 2
|
||||
sleep_pin:
|
||||
number: 5
|
||||
max_speed: 250 steps/s
|
||||
acceleration: 100 steps/s^2
|
||||
deceleration: 200 steps/s^2
|
||||
12
tests/components/a4988/test.rp2040.yaml
Normal file
12
tests/components/a4988/test.rp2040.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
stepper:
|
||||
- platform: a4988
|
||||
id: a4988_stepper
|
||||
step_pin:
|
||||
number: 2
|
||||
dir_pin:
|
||||
number: 3
|
||||
sleep_pin:
|
||||
number: 5
|
||||
max_speed: 250 steps/s
|
||||
acceleration: 100 steps/s^2
|
||||
deceleration: 200 steps/s^2
|
||||
21
tests/components/absolute_humidity/test.esp32-c3-idf.yaml
Normal file
21
tests/components/absolute_humidity/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
sensor:
|
||||
- platform: absolute_humidity
|
||||
name: Absolute Humidity
|
||||
temperature: template_temperature
|
||||
humidity: template_humidity
|
||||
- platform: template
|
||||
id: template_humidity
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 0.6;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: template
|
||||
id: template_temperature
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 42.0;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
21
tests/components/absolute_humidity/test.esp32-c3.yaml
Normal file
21
tests/components/absolute_humidity/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
sensor:
|
||||
- platform: absolute_humidity
|
||||
name: Absolute Humidity
|
||||
temperature: template_temperature
|
||||
humidity: template_humidity
|
||||
- platform: template
|
||||
id: template_humidity
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 0.6;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: template
|
||||
id: template_temperature
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 42.0;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
21
tests/components/absolute_humidity/test.esp32-idf.yaml
Normal file
21
tests/components/absolute_humidity/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
sensor:
|
||||
- platform: absolute_humidity
|
||||
name: Absolute Humidity
|
||||
temperature: template_temperature
|
||||
humidity: template_humidity
|
||||
- platform: template
|
||||
id: template_humidity
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 0.6;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: template
|
||||
id: template_temperature
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 42.0;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
21
tests/components/absolute_humidity/test.esp32.yaml
Normal file
21
tests/components/absolute_humidity/test.esp32.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
sensor:
|
||||
- platform: absolute_humidity
|
||||
name: Absolute Humidity
|
||||
temperature: template_temperature
|
||||
humidity: template_humidity
|
||||
- platform: template
|
||||
id: template_humidity
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 0.6;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: template
|
||||
id: template_temperature
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 42.0;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
21
tests/components/absolute_humidity/test.esp8266.yaml
Normal file
21
tests/components/absolute_humidity/test.esp8266.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
sensor:
|
||||
- platform: absolute_humidity
|
||||
name: Absolute Humidity
|
||||
temperature: template_temperature
|
||||
humidity: template_humidity
|
||||
- platform: template
|
||||
id: template_humidity
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 0.6;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: template
|
||||
id: template_temperature
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 42.0;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
21
tests/components/absolute_humidity/test.rp2040.yaml
Normal file
21
tests/components/absolute_humidity/test.rp2040.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
sensor:
|
||||
- platform: absolute_humidity
|
||||
name: Absolute Humidity
|
||||
temperature: template_temperature
|
||||
humidity: template_humidity
|
||||
- platform: template
|
||||
id: template_humidity
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 0.6;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: template
|
||||
id: template_temperature
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 42.0;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
7
tests/components/ac_dimmer/test.esp32-c3.yaml
Normal file
7
tests/components/ac_dimmer/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
output:
|
||||
- platform: ac_dimmer
|
||||
id: ac_dimmer_1
|
||||
gate_pin:
|
||||
number: 5
|
||||
zero_cross_pin:
|
||||
number: 6
|
||||
7
tests/components/ac_dimmer/test.esp32.yaml
Normal file
7
tests/components/ac_dimmer/test.esp32.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
output:
|
||||
- platform: ac_dimmer
|
||||
id: ac_dimmer_1
|
||||
gate_pin:
|
||||
number: 12
|
||||
zero_cross_pin:
|
||||
number: 13
|
||||
7
tests/components/ac_dimmer/test.esp8266.yaml
Normal file
7
tests/components/ac_dimmer/test.esp8266.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
output:
|
||||
- platform: ac_dimmer
|
||||
id: ac_dimmer_1
|
||||
gate_pin:
|
||||
number: 5
|
||||
zero_cross_pin:
|
||||
number: 4
|
||||
7
tests/components/ac_dimmer/test.rp2040.yaml
Normal file
7
tests/components/ac_dimmer/test.rp2040.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
output:
|
||||
- platform: ac_dimmer
|
||||
id: ac_dimmer_1
|
||||
gate_pin:
|
||||
number: 5
|
||||
zero_cross_pin:
|
||||
number: 6
|
||||
14
tests/components/adc128s102/test.esp32-c3-idf.yaml
Normal file
14
tests/components/adc128s102/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
spi:
|
||||
- id: spi_adc128s102
|
||||
clk_pin: 6
|
||||
mosi_pin: 7
|
||||
miso_pin: 5
|
||||
|
||||
adc128s102:
|
||||
cs_pin: 8
|
||||
id: adc128s102_adc
|
||||
|
||||
sensor:
|
||||
- platform: adc128s102
|
||||
id: adc128s102_channel_0
|
||||
channel: 0
|
||||
14
tests/components/adc128s102/test.esp32-c3.yaml
Normal file
14
tests/components/adc128s102/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
spi:
|
||||
- id: spi_adc128s102
|
||||
clk_pin: 6
|
||||
mosi_pin: 7
|
||||
miso_pin: 5
|
||||
|
||||
adc128s102:
|
||||
cs_pin: 8
|
||||
id: adc128s102_adc
|
||||
|
||||
sensor:
|
||||
- platform: adc128s102
|
||||
id: adc128s102_channel_0
|
||||
channel: 0
|
||||
14
tests/components/adc128s102/test.esp32-idf.yaml
Normal file
14
tests/components/adc128s102/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
spi:
|
||||
- id: spi_adc128s102
|
||||
clk_pin: 16
|
||||
mosi_pin: 17
|
||||
miso_pin: 15
|
||||
|
||||
adc128s102:
|
||||
cs_pin: 12
|
||||
id: adc128s102_adc
|
||||
|
||||
sensor:
|
||||
- platform: adc128s102
|
||||
id: adc128s102_channel_0
|
||||
channel: 0
|
||||
14
tests/components/adc128s102/test.esp32.yaml
Normal file
14
tests/components/adc128s102/test.esp32.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
spi:
|
||||
- id: spi_adc128s102
|
||||
clk_pin: 16
|
||||
mosi_pin: 17
|
||||
miso_pin: 15
|
||||
|
||||
adc128s102:
|
||||
cs_pin: 12
|
||||
id: adc128s102_adc
|
||||
|
||||
sensor:
|
||||
- platform: adc128s102
|
||||
id: adc128s102_channel_0
|
||||
channel: 0
|
||||
14
tests/components/adc128s102/test.esp8266.yaml
Normal file
14
tests/components/adc128s102/test.esp8266.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
spi:
|
||||
- id: spi_adc128s102
|
||||
clk_pin: 14
|
||||
mosi_pin: 13
|
||||
miso_pin: 12
|
||||
|
||||
adc128s102:
|
||||
cs_pin: 15
|
||||
id: adc128s102_adc
|
||||
|
||||
sensor:
|
||||
- platform: adc128s102
|
||||
id: adc128s102_channel_0
|
||||
channel: 0
|
||||
14
tests/components/adc128s102/test.rp2040.yaml
Normal file
14
tests/components/adc128s102/test.rp2040.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
spi:
|
||||
- id: spi_adc128s102
|
||||
clk_pin: 2
|
||||
mosi_pin: 3
|
||||
miso_pin: 4
|
||||
|
||||
adc128s102:
|
||||
cs_pin: 5
|
||||
id: adc128s102_adc
|
||||
|
||||
sensor:
|
||||
- platform: adc128s102
|
||||
id: adc128s102_channel_0
|
||||
channel: 0
|
||||
31
tests/components/addressable_light/test.esp32-c3-idf.yaml
Normal file
31
tests/components/addressable_light/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
id: led_matrix_32x8
|
||||
default_transition_length: 500ms
|
||||
chipset: ws2812
|
||||
rgb_order: GRB
|
||||
num_leds: 256
|
||||
pin: 2
|
||||
rmt_channel: 0
|
||||
|
||||
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);
|
||||
rotation: 0°
|
||||
update_interval: 16ms
|
||||
31
tests/components/addressable_light/test.esp32-c3.yaml
Normal file
31
tests/components/addressable_light/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
id: led_matrix_32x8
|
||||
default_transition_length: 500ms
|
||||
chipset: ws2812
|
||||
rgb_order: GRB
|
||||
num_leds: 256
|
||||
pin: 2
|
||||
rmt_channel: 0
|
||||
|
||||
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);
|
||||
rotation: 0°
|
||||
update_interval: 16ms
|
||||
31
tests/components/addressable_light/test.esp32-idf.yaml
Normal file
31
tests/components/addressable_light/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
id: led_matrix_32x8
|
||||
default_transition_length: 500ms
|
||||
chipset: ws2812
|
||||
rgb_order: GRB
|
||||
num_leds: 256
|
||||
pin: 2
|
||||
rmt_channel: 0
|
||||
|
||||
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);
|
||||
rotation: 0°
|
||||
update_interval: 16ms
|
||||
32
tests/components/addressable_light/test.esp32.yaml
Normal file
32
tests/components/addressable_light/test.esp32.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
light:
|
||||
- platform: fastled_clockless
|
||||
id: led_matrix_32x8
|
||||
name: led_matrix_32x8
|
||||
chipset: WS2812B
|
||||
pin: 2
|
||||
num_leds: 256
|
||||
rgb_order: GRB
|
||||
default_transition_length: 0s
|
||||
color_correct: [50%, 50%, 50%]
|
||||
|
||||
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);
|
||||
rotation: 0°
|
||||
update_interval: 16ms
|
||||
56
tests/components/ade7880/common.yaml
Normal file
56
tests/components/ade7880/common.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
i2c:
|
||||
- id: i2c_ade7880
|
||||
scl: ${scl_pin}
|
||||
sda: ${sda_pin}
|
||||
|
||||
sensor:
|
||||
- platform: ade7880
|
||||
i2c_id: i2c_ade7880
|
||||
irq0_pin: ${irq0_pin}
|
||||
irq1_pin: ${irq1_pin}
|
||||
reset_pin: ${reset_pin}
|
||||
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
|
||||
8
tests/components/ade7880/test.esp32-c3-idf.yaml
Normal file
8
tests/components/ade7880/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq0_pin: GPIO6
|
||||
irq1_pin: GPIO7
|
||||
reset_pin: GPIO10
|
||||
|
||||
<<: !include common.yaml
|
||||
8
tests/components/ade7880/test.esp32-c3.yaml
Normal file
8
tests/components/ade7880/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq0_pin: GPIO6
|
||||
irq1_pin: GPIO7
|
||||
reset_pin: GPIO10
|
||||
|
||||
<<: !include common.yaml
|
||||
8
tests/components/ade7880/test.esp32-idf.yaml
Normal file
8
tests/components/ade7880/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq0_pin: GPIO13
|
||||
irq1_pin: GPIO15
|
||||
reset_pin: GPIO16
|
||||
|
||||
<<: !include common.yaml
|
||||
8
tests/components/ade7880/test.esp32.yaml
Normal file
8
tests/components/ade7880/test.esp32.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq0_pin: GPIO13
|
||||
irq1_pin: GPIO15
|
||||
reset_pin: GPIO16
|
||||
|
||||
<<: !include common.yaml
|
||||
8
tests/components/ade7880/test.esp8266.yaml
Normal file
8
tests/components/ade7880/test.esp8266.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq0_pin: GPIO13
|
||||
irq1_pin: GPIO15
|
||||
reset_pin: GPIO16
|
||||
|
||||
<<: !include common.yaml
|
||||
8
tests/components/ade7880/test.rp2040.yaml
Normal file
8
tests/components/ade7880/test.rp2040.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq0_pin: GPIO13
|
||||
irq1_pin: GPIO15
|
||||
reset_pin: GPIO16
|
||||
|
||||
<<: !include common.yaml
|
||||
34
tests/components/ade7953_i2c/test.esp32-c3-idf.yaml
Normal file
34
tests/components/ade7953_i2c/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: 6
|
||||
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
|
||||
34
tests/components/ade7953_i2c/test.esp32-c3.yaml
Normal file
34
tests/components/ade7953_i2c/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: 6
|
||||
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
|
||||
34
tests/components/ade7953_i2c/test.esp32-idf.yaml
Normal file
34
tests/components/ade7953_i2c/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: 15
|
||||
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
|
||||
34
tests/components/ade7953_i2c/test.esp32.yaml
Normal file
34
tests/components/ade7953_i2c/test.esp32.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: 15
|
||||
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
|
||||
34
tests/components/ade7953_i2c/test.esp8266.yaml
Normal file
34
tests/components/ade7953_i2c/test.esp8266.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: 15
|
||||
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
|
||||
34
tests/components/ade7953_i2c/test.rp2040.yaml
Normal file
34
tests/components/ade7953_i2c/test.rp2040.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: 6
|
||||
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
|
||||
36
tests/components/ade7953_spi/test.esp32-c3-idf.yaml
Normal file
36
tests/components/ade7953_spi/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
spi:
|
||||
- id: spi_ade7953
|
||||
clk_pin: 6
|
||||
mosi_pin: 7
|
||||
miso_pin: 5
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_spi
|
||||
cs_pin: 8
|
||||
irq_pin: 9
|
||||
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
|
||||
36
tests/components/ade7953_spi/test.esp32-c3.yaml
Normal file
36
tests/components/ade7953_spi/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
spi:
|
||||
- id: spi_ade7953
|
||||
clk_pin: 6
|
||||
mosi_pin: 7
|
||||
miso_pin: 5
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_spi
|
||||
cs_pin: 8
|
||||
irq_pin: 9
|
||||
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
|
||||
36
tests/components/ade7953_spi/test.esp32-idf.yaml
Normal file
36
tests/components/ade7953_spi/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
spi:
|
||||
- id: spi_ade7953
|
||||
clk_pin: 16
|
||||
mosi_pin: 17
|
||||
miso_pin: 15
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_spi
|
||||
cs_pin: 5
|
||||
irq_pin: 13
|
||||
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
|
||||
36
tests/components/ade7953_spi/test.esp32.yaml
Normal file
36
tests/components/ade7953_spi/test.esp32.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
spi:
|
||||
- id: spi_ade7953
|
||||
clk_pin: 16
|
||||
mosi_pin: 17
|
||||
miso_pin: 15
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_spi
|
||||
cs_pin: 5
|
||||
irq_pin: 13
|
||||
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
|
||||
36
tests/components/ade7953_spi/test.esp8266.yaml
Normal file
36
tests/components/ade7953_spi/test.esp8266.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
spi:
|
||||
- id: spi_ade7953
|
||||
clk_pin: 14
|
||||
mosi_pin: 13
|
||||
miso_pin: 12
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_spi
|
||||
cs_pin: 15
|
||||
irq_pin: 5
|
||||
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
|
||||
36
tests/components/ade7953_spi/test.rp2040.yaml
Normal file
36
tests/components/ade7953_spi/test.rp2040.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
spi:
|
||||
- id: spi_ade7953
|
||||
clk_pin: 2
|
||||
mosi_pin: 3
|
||||
miso_pin: 4
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_spi
|
||||
cs_pin: 5
|
||||
irq_pin: 6
|
||||
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
|
||||
13
tests/components/ads1115/test.esp32-c3-idf.yaml
Normal file
13
tests/components/ads1115/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ads1115
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
ads1115:
|
||||
address: 0x48
|
||||
|
||||
sensor:
|
||||
- platform: ads1115
|
||||
multiplexer: A0_A1
|
||||
gain: 1.024
|
||||
id: ads1115_sensor
|
||||
13
tests/components/ads1115/test.esp32-c3.yaml
Normal file
13
tests/components/ads1115/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ads1115
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
ads1115:
|
||||
address: 0x48
|
||||
|
||||
sensor:
|
||||
- platform: ads1115
|
||||
multiplexer: A0_A1
|
||||
gain: 1.024
|
||||
id: ads1115_sensor
|
||||
13
tests/components/ads1115/test.esp32-idf.yaml
Normal file
13
tests/components/ads1115/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ads1115
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
ads1115:
|
||||
address: 0x48
|
||||
|
||||
sensor:
|
||||
- platform: ads1115
|
||||
multiplexer: A0_A1
|
||||
gain: 1.024
|
||||
id: ads1115_sensor
|
||||
13
tests/components/ads1115/test.esp32.yaml
Normal file
13
tests/components/ads1115/test.esp32.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ads1115
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
ads1115:
|
||||
address: 0x48
|
||||
|
||||
sensor:
|
||||
- platform: ads1115
|
||||
multiplexer: A0_A1
|
||||
gain: 1.024
|
||||
id: ads1115_sensor
|
||||
13
tests/components/ads1115/test.esp8266.yaml
Normal file
13
tests/components/ads1115/test.esp8266.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ads1115
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
ads1115:
|
||||
address: 0x48
|
||||
|
||||
sensor:
|
||||
- platform: ads1115
|
||||
multiplexer: A0_A1
|
||||
gain: 1.024
|
||||
id: ads1115_sensor
|
||||
13
tests/components/ads1115/test.rp2040.yaml
Normal file
13
tests/components/ads1115/test.rp2040.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ads1115
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
ads1115:
|
||||
address: 0x48
|
||||
|
||||
sensor:
|
||||
- platform: ads1115
|
||||
multiplexer: A0_A1
|
||||
gain: 1.024
|
||||
id: ads1115_sensor
|
||||
11
tests/components/aht10/test.esp32-c3-idf.yaml
Normal file
11
tests/components/aht10/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_aht10
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: aht10
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
11
tests/components/aht10/test.esp32-c3.yaml
Normal file
11
tests/components/aht10/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_aht10
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: aht10
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
11
tests/components/aht10/test.esp32-idf.yaml
Normal file
11
tests/components/aht10/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_aht10
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
sensor:
|
||||
- platform: aht10
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
11
tests/components/aht10/test.esp32.yaml
Normal file
11
tests/components/aht10/test.esp32.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_aht10
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
sensor:
|
||||
- platform: aht10
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
11
tests/components/aht10/test.esp8266.yaml
Normal file
11
tests/components/aht10/test.esp8266.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_aht10
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: aht10
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
11
tests/components/aht10/test.rp2040.yaml
Normal file
11
tests/components/aht10/test.rp2040.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_aht10
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: aht10
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
22
tests/components/airthings_wave_mini/test.esp32-c3-idf.yaml
Normal file
22
tests/components/airthings_wave_mini/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: airthingsmini01
|
||||
|
||||
sensor:
|
||||
- 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
|
||||
22
tests/components/airthings_wave_mini/test.esp32-c3.yaml
Normal file
22
tests/components/airthings_wave_mini/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: airthingsmini01
|
||||
|
||||
sensor:
|
||||
- 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
|
||||
22
tests/components/airthings_wave_mini/test.esp32-idf.yaml
Normal file
22
tests/components/airthings_wave_mini/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: airthingsmini01
|
||||
|
||||
sensor:
|
||||
- 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
|
||||
22
tests/components/airthings_wave_mini/test.esp32.yaml
Normal file
22
tests/components/airthings_wave_mini/test.esp32.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: airthingsmini01
|
||||
|
||||
sensor:
|
||||
- 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
|
||||
28
tests/components/airthings_wave_plus/test.esp32-c3-idf.yaml
Normal file
28
tests/components/airthings_wave_plus/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: airthings01
|
||||
|
||||
sensor:
|
||||
- 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
|
||||
28
tests/components/airthings_wave_plus/test.esp32-c3.yaml
Normal file
28
tests/components/airthings_wave_plus/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: airthings01
|
||||
|
||||
sensor:
|
||||
- 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
|
||||
28
tests/components/airthings_wave_plus/test.esp32-idf.yaml
Normal file
28
tests/components/airthings_wave_plus/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: airthings01
|
||||
|
||||
sensor:
|
||||
- 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
|
||||
28
tests/components/airthings_wave_plus/test.esp32.yaml
Normal file
28
tests/components/airthings_wave_plus/test.esp32.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: airthings01
|
||||
|
||||
sensor:
|
||||
- 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
|
||||
64
tests/components/alarm_control_panel/test.esp32-c3-idf.yaml
Normal file
64
tests/components/alarm_control_panel/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: bin1
|
||||
pin: 1
|
||||
|
||||
alarm_control_panel:
|
||||
- platform: template
|
||||
id: alarmcontrolpanel1
|
||||
name: Alarm Panel
|
||||
codes:
|
||||
- "1234"
|
||||
requires_code_to_arm: true
|
||||
arming_home_time: 1s
|
||||
arming_night_time: 1s
|
||||
arming_away_time: 15s
|
||||
pending_time: 15s
|
||||
trigger_time: 30s
|
||||
binary_sensors:
|
||||
- input: bin1
|
||||
bypass_armed_home: true
|
||||
bypass_armed_night: true
|
||||
on_state:
|
||||
then:
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
||||
- platform: template
|
||||
id: alarmcontrolpanel2
|
||||
name: Alarm Panel
|
||||
codes:
|
||||
- "1234"
|
||||
requires_code_to_arm: true
|
||||
arming_home_time: 1s
|
||||
arming_night_time: 1s
|
||||
arming_away_time: 15s
|
||||
pending_time: 15s
|
||||
trigger_time: 30s
|
||||
binary_sensors:
|
||||
- input: bin1
|
||||
bypass_armed_home: true
|
||||
bypass_armed_night: true
|
||||
on_disarmed:
|
||||
then:
|
||||
- logger.log: "### DISARMED ###"
|
||||
on_pending:
|
||||
then:
|
||||
- logger.log: "### PENDING ###"
|
||||
on_arming:
|
||||
then:
|
||||
- logger.log: "### ARMING ###"
|
||||
on_armed_home:
|
||||
then:
|
||||
- logger.log: "### ARMED HOME ###"
|
||||
on_armed_night:
|
||||
then:
|
||||
- logger.log: "### ARMED NIGHT ###"
|
||||
on_armed_away:
|
||||
then:
|
||||
- logger.log: "### ARMED AWAY ###"
|
||||
on_triggered:
|
||||
then:
|
||||
- logger.log: "### TRIGGERED ###"
|
||||
on_cleared:
|
||||
then:
|
||||
- logger.log: "### CLEARED ###"
|
||||
64
tests/components/alarm_control_panel/test.esp32-c3.yaml
Normal file
64
tests/components/alarm_control_panel/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: bin1
|
||||
pin: 1
|
||||
|
||||
alarm_control_panel:
|
||||
- platform: template
|
||||
id: alarmcontrolpanel1
|
||||
name: Alarm Panel
|
||||
codes:
|
||||
- "1234"
|
||||
requires_code_to_arm: true
|
||||
arming_home_time: 1s
|
||||
arming_night_time: 1s
|
||||
arming_away_time: 15s
|
||||
pending_time: 15s
|
||||
trigger_time: 30s
|
||||
binary_sensors:
|
||||
- input: bin1
|
||||
bypass_armed_home: true
|
||||
bypass_armed_night: true
|
||||
on_state:
|
||||
then:
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
||||
- platform: template
|
||||
id: alarmcontrolpanel2
|
||||
name: Alarm Panel
|
||||
codes:
|
||||
- "1234"
|
||||
requires_code_to_arm: true
|
||||
arming_home_time: 1s
|
||||
arming_night_time: 1s
|
||||
arming_away_time: 15s
|
||||
pending_time: 15s
|
||||
trigger_time: 30s
|
||||
binary_sensors:
|
||||
- input: bin1
|
||||
bypass_armed_home: true
|
||||
bypass_armed_night: true
|
||||
on_disarmed:
|
||||
then:
|
||||
- logger.log: "### DISARMED ###"
|
||||
on_pending:
|
||||
then:
|
||||
- logger.log: "### PENDING ###"
|
||||
on_arming:
|
||||
then:
|
||||
- logger.log: "### ARMING ###"
|
||||
on_armed_home:
|
||||
then:
|
||||
- logger.log: "### ARMED HOME ###"
|
||||
on_armed_night:
|
||||
then:
|
||||
- logger.log: "### ARMED NIGHT ###"
|
||||
on_armed_away:
|
||||
then:
|
||||
- logger.log: "### ARMED AWAY ###"
|
||||
on_triggered:
|
||||
then:
|
||||
- logger.log: "### TRIGGERED ###"
|
||||
on_cleared:
|
||||
then:
|
||||
- logger.log: "### CLEARED ###"
|
||||
64
tests/components/alarm_control_panel/test.esp32-idf.yaml
Normal file
64
tests/components/alarm_control_panel/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: bin1
|
||||
pin: 1
|
||||
|
||||
alarm_control_panel:
|
||||
- platform: template
|
||||
id: alarmcontrolpanel1
|
||||
name: Alarm Panel
|
||||
codes:
|
||||
- "1234"
|
||||
requires_code_to_arm: true
|
||||
arming_home_time: 1s
|
||||
arming_night_time: 1s
|
||||
arming_away_time: 15s
|
||||
pending_time: 15s
|
||||
trigger_time: 30s
|
||||
binary_sensors:
|
||||
- input: bin1
|
||||
bypass_armed_home: true
|
||||
bypass_armed_night: true
|
||||
on_state:
|
||||
then:
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
||||
- platform: template
|
||||
id: alarmcontrolpanel2
|
||||
name: Alarm Panel
|
||||
codes:
|
||||
- "1234"
|
||||
requires_code_to_arm: true
|
||||
arming_home_time: 1s
|
||||
arming_night_time: 1s
|
||||
arming_away_time: 15s
|
||||
pending_time: 15s
|
||||
trigger_time: 30s
|
||||
binary_sensors:
|
||||
- input: bin1
|
||||
bypass_armed_home: true
|
||||
bypass_armed_night: true
|
||||
on_disarmed:
|
||||
then:
|
||||
- logger.log: "### DISARMED ###"
|
||||
on_pending:
|
||||
then:
|
||||
- logger.log: "### PENDING ###"
|
||||
on_arming:
|
||||
then:
|
||||
- logger.log: "### ARMING ###"
|
||||
on_armed_home:
|
||||
then:
|
||||
- logger.log: "### ARMED HOME ###"
|
||||
on_armed_night:
|
||||
then:
|
||||
- logger.log: "### ARMED NIGHT ###"
|
||||
on_armed_away:
|
||||
then:
|
||||
- logger.log: "### ARMED AWAY ###"
|
||||
on_triggered:
|
||||
then:
|
||||
- logger.log: "### TRIGGERED ###"
|
||||
on_cleared:
|
||||
then:
|
||||
- logger.log: "### CLEARED ###"
|
||||
64
tests/components/alarm_control_panel/test.esp32.yaml
Normal file
64
tests/components/alarm_control_panel/test.esp32.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: bin1
|
||||
pin: 1
|
||||
|
||||
alarm_control_panel:
|
||||
- platform: template
|
||||
id: alarmcontrolpanel1
|
||||
name: Alarm Panel
|
||||
codes:
|
||||
- "1234"
|
||||
requires_code_to_arm: true
|
||||
arming_home_time: 1s
|
||||
arming_night_time: 1s
|
||||
arming_away_time: 15s
|
||||
pending_time: 15s
|
||||
trigger_time: 30s
|
||||
binary_sensors:
|
||||
- input: bin1
|
||||
bypass_armed_home: true
|
||||
bypass_armed_night: true
|
||||
on_state:
|
||||
then:
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
||||
- platform: template
|
||||
id: alarmcontrolpanel2
|
||||
name: Alarm Panel
|
||||
codes:
|
||||
- "1234"
|
||||
requires_code_to_arm: true
|
||||
arming_home_time: 1s
|
||||
arming_night_time: 1s
|
||||
arming_away_time: 15s
|
||||
pending_time: 15s
|
||||
trigger_time: 30s
|
||||
binary_sensors:
|
||||
- input: bin1
|
||||
bypass_armed_home: true
|
||||
bypass_armed_night: true
|
||||
on_disarmed:
|
||||
then:
|
||||
- logger.log: "### DISARMED ###"
|
||||
on_pending:
|
||||
then:
|
||||
- logger.log: "### PENDING ###"
|
||||
on_arming:
|
||||
then:
|
||||
- logger.log: "### ARMING ###"
|
||||
on_armed_home:
|
||||
then:
|
||||
- logger.log: "### ARMED HOME ###"
|
||||
on_armed_night:
|
||||
then:
|
||||
- logger.log: "### ARMED NIGHT ###"
|
||||
on_armed_away:
|
||||
then:
|
||||
- logger.log: "### ARMED AWAY ###"
|
||||
on_triggered:
|
||||
then:
|
||||
- logger.log: "### TRIGGERED ###"
|
||||
on_cleared:
|
||||
then:
|
||||
- logger.log: "### CLEARED ###"
|
||||
64
tests/components/alarm_control_panel/test.esp8266.yaml
Normal file
64
tests/components/alarm_control_panel/test.esp8266.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: bin1
|
||||
pin: 1
|
||||
|
||||
alarm_control_panel:
|
||||
- platform: template
|
||||
id: alarmcontrolpanel1
|
||||
name: Alarm Panel
|
||||
codes:
|
||||
- "1234"
|
||||
requires_code_to_arm: true
|
||||
arming_home_time: 1s
|
||||
arming_night_time: 1s
|
||||
arming_away_time: 15s
|
||||
pending_time: 15s
|
||||
trigger_time: 30s
|
||||
binary_sensors:
|
||||
- input: bin1
|
||||
bypass_armed_home: true
|
||||
bypass_armed_night: true
|
||||
on_state:
|
||||
then:
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
||||
- platform: template
|
||||
id: alarmcontrolpanel2
|
||||
name: Alarm Panel
|
||||
codes:
|
||||
- "1234"
|
||||
requires_code_to_arm: true
|
||||
arming_home_time: 1s
|
||||
arming_night_time: 1s
|
||||
arming_away_time: 15s
|
||||
pending_time: 15s
|
||||
trigger_time: 30s
|
||||
binary_sensors:
|
||||
- input: bin1
|
||||
bypass_armed_home: true
|
||||
bypass_armed_night: true
|
||||
on_disarmed:
|
||||
then:
|
||||
- logger.log: "### DISARMED ###"
|
||||
on_pending:
|
||||
then:
|
||||
- logger.log: "### PENDING ###"
|
||||
on_arming:
|
||||
then:
|
||||
- logger.log: "### ARMING ###"
|
||||
on_armed_home:
|
||||
then:
|
||||
- logger.log: "### ARMED HOME ###"
|
||||
on_armed_night:
|
||||
then:
|
||||
- logger.log: "### ARMED NIGHT ###"
|
||||
on_armed_away:
|
||||
then:
|
||||
- logger.log: "### ARMED AWAY ###"
|
||||
on_triggered:
|
||||
then:
|
||||
- logger.log: "### TRIGGERED ###"
|
||||
on_cleared:
|
||||
then:
|
||||
- logger.log: "### CLEARED ###"
|
||||
64
tests/components/alarm_control_panel/test.rp2040.yaml
Normal file
64
tests/components/alarm_control_panel/test.rp2040.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: bin1
|
||||
pin: 1
|
||||
|
||||
alarm_control_panel:
|
||||
- platform: template
|
||||
id: alarmcontrolpanel1
|
||||
name: Alarm Panel
|
||||
codes:
|
||||
- "1234"
|
||||
requires_code_to_arm: true
|
||||
arming_home_time: 1s
|
||||
arming_night_time: 1s
|
||||
arming_away_time: 15s
|
||||
pending_time: 15s
|
||||
trigger_time: 30s
|
||||
binary_sensors:
|
||||
- input: bin1
|
||||
bypass_armed_home: true
|
||||
bypass_armed_night: true
|
||||
on_state:
|
||||
then:
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
||||
- platform: template
|
||||
id: alarmcontrolpanel2
|
||||
name: Alarm Panel
|
||||
codes:
|
||||
- "1234"
|
||||
requires_code_to_arm: true
|
||||
arming_home_time: 1s
|
||||
arming_night_time: 1s
|
||||
arming_away_time: 15s
|
||||
pending_time: 15s
|
||||
trigger_time: 30s
|
||||
binary_sensors:
|
||||
- input: bin1
|
||||
bypass_armed_home: true
|
||||
bypass_armed_night: true
|
||||
on_disarmed:
|
||||
then:
|
||||
- logger.log: "### DISARMED ###"
|
||||
on_pending:
|
||||
then:
|
||||
- logger.log: "### PENDING ###"
|
||||
on_arming:
|
||||
then:
|
||||
- logger.log: "### ARMING ###"
|
||||
on_armed_home:
|
||||
then:
|
||||
- logger.log: "### ARMED HOME ###"
|
||||
on_armed_night:
|
||||
then:
|
||||
- logger.log: "### ARMED NIGHT ###"
|
||||
on_armed_away:
|
||||
then:
|
||||
- logger.log: "### ARMED AWAY ###"
|
||||
on_triggered:
|
||||
then:
|
||||
- logger.log: "### TRIGGERED ###"
|
||||
on_cleared:
|
||||
then:
|
||||
- logger.log: "### CLEARED ###"
|
||||
17
tests/components/alpha3/test.esp32-c3-idf.yaml
Normal file
17
tests/components/alpha3/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: alpha3_blec
|
||||
|
||||
sensor:
|
||||
- platform: alpha3
|
||||
ble_client_id: alpha3_blec
|
||||
flow:
|
||||
name: "Radiator Pump Flow"
|
||||
head:
|
||||
name: "Radiator Pump Head"
|
||||
power:
|
||||
name: "Radiator Pump Power"
|
||||
speed:
|
||||
name: "Radiator Pump Speed"
|
||||
17
tests/components/alpha3/test.esp32-c3.yaml
Normal file
17
tests/components/alpha3/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: alpha3_blec
|
||||
|
||||
sensor:
|
||||
- platform: alpha3
|
||||
ble_client_id: alpha3_blec
|
||||
flow:
|
||||
name: "Radiator Pump Flow"
|
||||
head:
|
||||
name: "Radiator Pump Head"
|
||||
power:
|
||||
name: "Radiator Pump Power"
|
||||
speed:
|
||||
name: "Radiator Pump Speed"
|
||||
17
tests/components/alpha3/test.esp32-idf.yaml
Normal file
17
tests/components/alpha3/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: alpha3_blec
|
||||
|
||||
sensor:
|
||||
- platform: alpha3
|
||||
ble_client_id: alpha3_blec
|
||||
flow:
|
||||
name: "Radiator Pump Flow"
|
||||
head:
|
||||
name: "Radiator Pump Head"
|
||||
power:
|
||||
name: "Radiator Pump Power"
|
||||
speed:
|
||||
name: "Radiator Pump Speed"
|
||||
17
tests/components/alpha3/test.esp32.yaml
Normal file
17
tests/components/alpha3/test.esp32.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: alpha3_blec
|
||||
|
||||
sensor:
|
||||
- platform: alpha3
|
||||
ble_client_id: alpha3_blec
|
||||
flow:
|
||||
name: "Radiator Pump Flow"
|
||||
head:
|
||||
name: "Radiator Pump Head"
|
||||
power:
|
||||
name: "Radiator Pump Power"
|
||||
speed:
|
||||
name: "Radiator Pump Speed"
|
||||
11
tests/components/am2320/test.esp32-c3-idf.yaml
Normal file
11
tests/components/am2320/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_bme280
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: am2320
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
11
tests/components/am2320/test.esp32-c3.yaml
Normal file
11
tests/components/am2320/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_bme280
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: am2320
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
11
tests/components/am2320/test.esp32-idf.yaml
Normal file
11
tests/components/am2320/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_bme280
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
sensor:
|
||||
- platform: am2320
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
11
tests/components/am2320/test.esp32.yaml
Normal file
11
tests/components/am2320/test.esp32.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_bme280
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
sensor:
|
||||
- platform: am2320
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
11
tests/components/am2320/test.esp8266.yaml
Normal file
11
tests/components/am2320/test.esp8266.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_bme280
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: am2320
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
11
tests/components/am2320/test.rp2040.yaml
Normal file
11
tests/components/am2320/test.rp2040.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_bme280
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: am2320
|
||||
temperature:
|
||||
name: Temperature
|
||||
humidity:
|
||||
name: Humidity
|
||||
19
tests/components/am43/test.esp32-c3-idf.yaml
Normal file
19
tests/components/am43/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: am43_blec
|
||||
|
||||
cover:
|
||||
- platform: am43
|
||||
name: Test AM43 Cover
|
||||
id: am43_test
|
||||
ble_client_id: am43_blec
|
||||
|
||||
sensor:
|
||||
- platform: am43
|
||||
ble_client_id: am43_blec
|
||||
battery_level:
|
||||
name: Kitchen blinds battery
|
||||
illuminance:
|
||||
name: Kitchen blinds light
|
||||
19
tests/components/am43/test.esp32-c3.yaml
Normal file
19
tests/components/am43/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: am43_blec
|
||||
|
||||
cover:
|
||||
- platform: am43
|
||||
name: Test AM43 Cover
|
||||
id: am43_test
|
||||
ble_client_id: am43_blec
|
||||
|
||||
sensor:
|
||||
- platform: am43
|
||||
ble_client_id: am43_blec
|
||||
battery_level:
|
||||
name: Kitchen blinds battery
|
||||
illuminance:
|
||||
name: Kitchen blinds light
|
||||
19
tests/components/am43/test.esp32-idf.yaml
Normal file
19
tests/components/am43/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: am43_blec
|
||||
|
||||
cover:
|
||||
- platform: am43
|
||||
name: Test AM43 Cover
|
||||
id: am43_test
|
||||
ble_client_id: am43_blec
|
||||
|
||||
sensor:
|
||||
- platform: am43
|
||||
ble_client_id: am43_blec
|
||||
battery_level:
|
||||
name: Kitchen blinds battery
|
||||
illuminance:
|
||||
name: Kitchen blinds light
|
||||
19
tests/components/am43/test.esp32.yaml
Normal file
19
tests/components/am43/test.esp32.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
ble_client:
|
||||
- mac_address: 01:02:03:04:05:06
|
||||
id: am43_blec
|
||||
|
||||
cover:
|
||||
- platform: am43
|
||||
name: Test AM43 Cover
|
||||
id: am43_test
|
||||
ble_client_id: am43_blec
|
||||
|
||||
sensor:
|
||||
- platform: am43
|
||||
ble_client_id: am43_blec
|
||||
battery_level:
|
||||
name: Kitchen blinds battery
|
||||
illuminance:
|
||||
name: Kitchen blinds light
|
||||
28
tests/components/analog_threshold/test.esp32-c3-idf.yaml
Normal file
28
tests/components/analog_threshold/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
sensor:
|
||||
- platform: template
|
||||
id: template_sensor
|
||||
name: Template Sensor
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 42.0;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
update_interval: 15s
|
||||
|
||||
binary_sensor:
|
||||
- platform: analog_threshold
|
||||
name: Analog Threshold 1
|
||||
sensor_id: template_sensor
|
||||
threshold:
|
||||
upper: 110
|
||||
lower: 90
|
||||
filters:
|
||||
- delayed_on: 0s
|
||||
- delayed_off: 10s
|
||||
- platform: analog_threshold
|
||||
name: Analog Threshold 2
|
||||
sensor_id: template_sensor
|
||||
threshold: 100
|
||||
filters:
|
||||
- invert:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user