mirror of
https://github.com/esphome/esphome.git
synced 2025-10-25 21:23:53 +01:00
Revert "[tests] Fix millis() ambiguity in component tests with gps component"
This reverts commit f9b08491cc.
This commit is contained in:
@@ -6,14 +6,14 @@ sensor:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: template_humidity
|
id: template_humidity
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return 0.6;
|
return 0.6;
|
||||||
}
|
}
|
||||||
return 0.0;
|
return 0.0;
|
||||||
- platform: template
|
- platform: template
|
||||||
id: template_temperature
|
id: template_temperature
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return 42.0;
|
return 42.0;
|
||||||
}
|
}
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ sensor:
|
|||||||
id: template_sensor
|
id: template_sensor
|
||||||
name: Template Sensor
|
name: Template Sensor
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return 42.0;
|
return 42.0;
|
||||||
}
|
}
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ sensor:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: template_sensor1
|
id: template_sensor1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return 42.0;
|
return 42.0;
|
||||||
} else {
|
} else {
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
|||||||
@@ -2,21 +2,21 @@ binary_sensor:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: bin1
|
id: bin1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
- platform: template
|
- platform: template
|
||||||
id: bin2
|
id: bin2
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 20000) {
|
if (millis() > 20000) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
- platform: template
|
- platform: template
|
||||||
id: bin3
|
id: bin3
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 30000) {
|
if (millis() > 30000) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ sensor:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: template_temperature1
|
id: template_temperature1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return 0.6;
|
return 0.6;
|
||||||
}
|
}
|
||||||
return 0.0;
|
return 0.0;
|
||||||
- platform: template
|
- platform: template
|
||||||
id: template_temperature2
|
id: template_temperature2
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 20000) {
|
if (millis() > 20000) {
|
||||||
return 0.8;
|
return 0.8;
|
||||||
}
|
}
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ binary_sensor:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: bin1
|
id: bin1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ binary_sensor:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: bin1
|
id: bin1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ lock:
|
|||||||
id: test_lock1
|
id: test_lock1
|
||||||
name: Template Lock
|
name: Template Lock
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return LOCK_STATE_LOCKED;
|
return LOCK_STATE_LOCKED;
|
||||||
}
|
}
|
||||||
return LOCK_STATE_UNLOCKED;
|
return LOCK_STATE_UNLOCKED;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ sensor:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: template_sensor1
|
id: template_sensor1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return 42.0;
|
return 42.0;
|
||||||
}
|
}
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ sensor:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: template_sensor1
|
id: template_sensor1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return 42.0;
|
return 42.0;
|
||||||
}
|
}
|
||||||
return 0.0;
|
return 0.0;
|
||||||
@@ -46,7 +46,7 @@ text_sensor:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: template_text_sensor1
|
id: template_text_sensor1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return {"Hello World"};
|
return {"Hello World"};
|
||||||
}
|
}
|
||||||
return {"Goodbye (cruel) World"};
|
return {"Goodbye (cruel) World"};
|
||||||
@@ -56,7 +56,7 @@ binary_sensor:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: template_binary_sensor1
|
id: template_binary_sensor1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -65,7 +65,7 @@ switch:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: template_switch1
|
id: template_switch1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -79,7 +79,7 @@ cover:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: template_cover1
|
id: template_cover1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return COVER_OPEN;
|
return COVER_OPEN;
|
||||||
}
|
}
|
||||||
return COVER_CLOSED;
|
return COVER_CLOSED;
|
||||||
@@ -88,7 +88,7 @@ lock:
|
|||||||
- platform: template
|
- platform: template
|
||||||
id: template_lock1
|
id: template_lock1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (esphome::millis() > 10000) {
|
if (millis() > 10000) {
|
||||||
return LOCK_STATE_LOCKED;
|
return LOCK_STATE_LOCKED;
|
||||||
}
|
}
|
||||||
return LOCK_STATE_UNLOCKED;
|
return LOCK_STATE_UNLOCKED;
|
||||||
|
|||||||
Reference in New Issue
Block a user