mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 11:22:24 +01:00
Consolidate test files where all tests are identical (#6690)
This commit is contained in:
28
tests/components/analog_threshold/common.yaml
Normal file
28
tests/components/analog_threshold/common.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:
|
@@ -1,28 +1 @@
|
||||
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:
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,28 +1 @@
|
||||
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:
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,28 +1 @@
|
||||
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:
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,28 +1 @@
|
||||
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:
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,28 +1 @@
|
||||
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:
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,28 +1 @@
|
||||
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:
|
||||
<<: !include common.yaml
|
||||
|
Reference in New Issue
Block a user