mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
Add some components to the new testing framework (E) (#6176)
This commit is contained in:
33
tests/components/endstop/test.esp32-c3-idf.yaml
Normal file
33
tests/components/endstop/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
id: bin1
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: endstop
|
||||
id: endstop_cover
|
||||
name: Endstop Cover
|
||||
stop_action:
|
||||
- switch.turn_on: template_switch1
|
||||
open_endstop: bin1
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
open_duration: 5min
|
||||
close_endstop: bin1
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
close_duration: 4.5min
|
||||
max_duration: 10min
|
33
tests/components/endstop/test.esp32-c3.yaml
Normal file
33
tests/components/endstop/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
id: bin1
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: endstop
|
||||
id: endstop_cover
|
||||
name: Endstop Cover
|
||||
stop_action:
|
||||
- switch.turn_on: template_switch1
|
||||
open_endstop: bin1
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
open_duration: 5min
|
||||
close_endstop: bin1
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
close_duration: 4.5min
|
||||
max_duration: 10min
|
33
tests/components/endstop/test.esp32-idf.yaml
Normal file
33
tests/components/endstop/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
id: bin1
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: endstop
|
||||
id: endstop_cover
|
||||
name: Endstop Cover
|
||||
stop_action:
|
||||
- switch.turn_on: template_switch1
|
||||
open_endstop: bin1
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
open_duration: 5min
|
||||
close_endstop: bin1
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
close_duration: 4.5min
|
||||
max_duration: 10min
|
33
tests/components/endstop/test.esp32.yaml
Normal file
33
tests/components/endstop/test.esp32.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
id: bin1
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: endstop
|
||||
id: endstop_cover
|
||||
name: Endstop Cover
|
||||
stop_action:
|
||||
- switch.turn_on: template_switch1
|
||||
open_endstop: bin1
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
open_duration: 5min
|
||||
close_endstop: bin1
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
close_duration: 4.5min
|
||||
max_duration: 10min
|
33
tests/components/endstop/test.esp8266.yaml
Normal file
33
tests/components/endstop/test.esp8266.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
id: bin1
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: endstop
|
||||
id: endstop_cover
|
||||
name: Endstop Cover
|
||||
stop_action:
|
||||
- switch.turn_on: template_switch1
|
||||
open_endstop: bin1
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
open_duration: 5min
|
||||
close_endstop: bin1
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
close_duration: 4.5min
|
||||
max_duration: 10min
|
33
tests/components/endstop/test.rp2040.yaml
Normal file
33
tests/components/endstop/test.rp2040.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
id: bin1
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: endstop
|
||||
id: endstop_cover
|
||||
name: Endstop Cover
|
||||
stop_action:
|
||||
- switch.turn_on: template_switch1
|
||||
open_endstop: bin1
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
open_duration: 5min
|
||||
close_endstop: bin1
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
close_duration: 4.5min
|
||||
max_duration: 10min
|
Reference in New Issue
Block a user