mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Add some components to the new testing framework (O) (#6211)
This commit is contained in:
parent
c0dc9c20fc
commit
6806cb28f6
12 changed files with 258 additions and 0 deletions
30
tests/components/ota/test.esp32-c3-idf.yaml
Normal file
30
tests/components/ota/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,30 @@
|
|||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
ota:
|
||||
safe_mode: true
|
||||
password: "superlongpasswordthatnoonewillknow"
|
||||
port: 3286
|
||||
reboot_timeout: 2min
|
||||
num_attempts: 5
|
||||
on_begin:
|
||||
then:
|
||||
- logger.log: "OTA start"
|
||||
on_progress:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "OTA progress %0.1f%%"
|
||||
args: ["x"]
|
||||
on_end:
|
||||
then:
|
||||
- logger.log: "OTA end"
|
||||
on_error:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "OTA update error %d"
|
||||
args: ["x"]
|
||||
on_state_change:
|
||||
then:
|
||||
lambda: >-
|
||||
ESP_LOGD("ota", "State %d", state);
|
30
tests/components/ota/test.esp32-c3.yaml
Normal file
30
tests/components/ota/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,30 @@
|
|||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
ota:
|
||||
safe_mode: true
|
||||
password: "superlongpasswordthatnoonewillknow"
|
||||
port: 3286
|
||||
reboot_timeout: 2min
|
||||
num_attempts: 5
|
||||
on_begin:
|
||||
then:
|
||||
- logger.log: "OTA start"
|
||||
on_progress:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "OTA progress %0.1f%%"
|
||||
args: ["x"]
|
||||
on_end:
|
||||
then:
|
||||
- logger.log: "OTA end"
|
||||
on_error:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "OTA update error %d"
|
||||
args: ["x"]
|
||||
on_state_change:
|
||||
then:
|
||||
lambda: >-
|
||||
ESP_LOGD("ota", "State %d", state);
|
30
tests/components/ota/test.esp32-idf.yaml
Normal file
30
tests/components/ota/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,30 @@
|
|||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
ota:
|
||||
safe_mode: true
|
||||
password: "superlongpasswordthatnoonewillknow"
|
||||
port: 3286
|
||||
reboot_timeout: 2min
|
||||
num_attempts: 5
|
||||
on_begin:
|
||||
then:
|
||||
- logger.log: "OTA start"
|
||||
on_progress:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "OTA progress %0.1f%%"
|
||||
args: ["x"]
|
||||
on_end:
|
||||
then:
|
||||
- logger.log: "OTA end"
|
||||
on_error:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "OTA update error %d"
|
||||
args: ["x"]
|
||||
on_state_change:
|
||||
then:
|
||||
lambda: >-
|
||||
ESP_LOGD("ota", "State %d", state);
|
30
tests/components/ota/test.esp32.yaml
Normal file
30
tests/components/ota/test.esp32.yaml
Normal file
|
@ -0,0 +1,30 @@
|
|||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
ota:
|
||||
safe_mode: true
|
||||
password: "superlongpasswordthatnoonewillknow"
|
||||
port: 3286
|
||||
reboot_timeout: 2min
|
||||
num_attempts: 5
|
||||
on_begin:
|
||||
then:
|
||||
- logger.log: "OTA start"
|
||||
on_progress:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "OTA progress %0.1f%%"
|
||||
args: ["x"]
|
||||
on_end:
|
||||
then:
|
||||
- logger.log: "OTA end"
|
||||
on_error:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "OTA update error %d"
|
||||
args: ["x"]
|
||||
on_state_change:
|
||||
then:
|
||||
lambda: >-
|
||||
ESP_LOGD("ota", "State %d", state);
|
30
tests/components/ota/test.esp8266.yaml
Normal file
30
tests/components/ota/test.esp8266.yaml
Normal file
|
@ -0,0 +1,30 @@
|
|||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
ota:
|
||||
safe_mode: true
|
||||
password: "superlongpasswordthatnoonewillknow"
|
||||
port: 3286
|
||||
reboot_timeout: 2min
|
||||
num_attempts: 5
|
||||
on_begin:
|
||||
then:
|
||||
- logger.log: "OTA start"
|
||||
on_progress:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "OTA progress %0.1f%%"
|
||||
args: ["x"]
|
||||
on_end:
|
||||
then:
|
||||
- logger.log: "OTA end"
|
||||
on_error:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "OTA update error %d"
|
||||
args: ["x"]
|
||||
on_state_change:
|
||||
then:
|
||||
lambda: >-
|
||||
ESP_LOGD("ota", "State %d", state);
|
30
tests/components/ota/test.rp2040.yaml
Normal file
30
tests/components/ota/test.rp2040.yaml
Normal file
|
@ -0,0 +1,30 @@
|
|||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
ota:
|
||||
safe_mode: true
|
||||
password: "superlongpasswordthatnoonewillknow"
|
||||
port: 3286
|
||||
reboot_timeout: 2min
|
||||
num_attempts: 5
|
||||
on_begin:
|
||||
then:
|
||||
- logger.log: "OTA start"
|
||||
on_progress:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "OTA progress %0.1f%%"
|
||||
args: ["x"]
|
||||
on_end:
|
||||
then:
|
||||
- logger.log: "OTA end"
|
||||
on_error:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "OTA update error %d"
|
||||
args: ["x"]
|
||||
on_state_change:
|
||||
then:
|
||||
lambda: >-
|
||||
ESP_LOGD("ota", "State %d", state);
|
13
tests/components/output/test.esp32-c3-idf.yaml
Normal file
13
tests/components/output/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- output.turn_off: light_output_1
|
||||
- output.turn_on: light_output_1
|
||||
- output.set_level:
|
||||
id: light_output_1
|
||||
level: 50%
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 1
|
13
tests/components/output/test.esp32-c3.yaml
Normal file
13
tests/components/output/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- output.turn_off: light_output_1
|
||||
- output.turn_on: light_output_1
|
||||
- output.set_level:
|
||||
id: light_output_1
|
||||
level: 50%
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 1
|
13
tests/components/output/test.esp32-idf.yaml
Normal file
13
tests/components/output/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- output.turn_off: light_output_1
|
||||
- output.turn_on: light_output_1
|
||||
- output.set_level:
|
||||
id: light_output_1
|
||||
level: 50%
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 12
|
13
tests/components/output/test.esp32.yaml
Normal file
13
tests/components/output/test.esp32.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- output.turn_off: light_output_1
|
||||
- output.turn_on: light_output_1
|
||||
- output.set_level:
|
||||
id: light_output_1
|
||||
level: 50%
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 12
|
13
tests/components/output/test.esp8266.yaml
Normal file
13
tests/components/output/test.esp8266.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- output.turn_off: light_output_1
|
||||
- output.turn_on: light_output_1
|
||||
- output.set_level:
|
||||
id: light_output_1
|
||||
level: 50%
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: light_output_1
|
||||
pin: 12
|
13
tests/components/output/test.rp2040.yaml
Normal file
13
tests/components/output/test.rp2040.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- output.turn_off: light_output_1
|
||||
- output.turn_on: light_output_1
|
||||
- output.set_level:
|
||||
id: light_output_1
|
||||
level: 50%
|
||||
|
||||
output:
|
||||
- platform: rp2040_pwm
|
||||
id: light_output_1
|
||||
pin: 12
|
Loading…
Reference in a new issue