From cce5b58de46a18f84f95160590064d82788b7f35 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 23 Oct 2025 08:19:48 -0600 Subject: [PATCH] Revert "[tests] Fix millis() ambiguity in component tests with gps component" This reverts commit f9b08491cc54d8fe24f3f5ce1a25ee257f5d0d09. --- tests/components/absolute_humidity/common.yaml | 4 ++-- tests/components/analog_threshold/common.yaml | 2 +- tests/components/bang_bang/common.yaml | 2 +- tests/components/binary_sensor_map/common.yaml | 6 +++--- tests/components/combination/common.yaml | 4 ++-- tests/components/duty_time/common.yaml | 2 +- tests/components/endstop/common.yaml | 2 +- tests/components/lock/common.yaml | 2 +- tests/components/pid/common.yaml | 2 +- tests/components/prometheus/common.yaml | 12 ++++++------ 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/components/absolute_humidity/common.yaml b/tests/components/absolute_humidity/common.yaml index f6b1c02886..026f88654f 100644 --- a/tests/components/absolute_humidity/common.yaml +++ b/tests/components/absolute_humidity/common.yaml @@ -6,14 +6,14 @@ sensor: - platform: template id: template_humidity lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return 0.6; } return 0.0; - platform: template id: template_temperature lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return 42.0; } return 0.0; diff --git a/tests/components/analog_threshold/common.yaml b/tests/components/analog_threshold/common.yaml index 7d9dc4bc9b..26c401b92a 100644 --- a/tests/components/analog_threshold/common.yaml +++ b/tests/components/analog_threshold/common.yaml @@ -3,7 +3,7 @@ sensor: id: template_sensor name: Template Sensor lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return 42.0; } return 0.0; diff --git a/tests/components/bang_bang/common.yaml b/tests/components/bang_bang/common.yaml index dc7798e2f2..5882025191 100644 --- a/tests/components/bang_bang/common.yaml +++ b/tests/components/bang_bang/common.yaml @@ -10,7 +10,7 @@ sensor: - platform: template id: template_sensor1 lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return 42.0; } else { return 0.0; diff --git a/tests/components/binary_sensor_map/common.yaml b/tests/components/binary_sensor_map/common.yaml index 71f4c0158e..c054022583 100644 --- a/tests/components/binary_sensor_map/common.yaml +++ b/tests/components/binary_sensor_map/common.yaml @@ -2,21 +2,21 @@ binary_sensor: - platform: template id: bin1 lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return true; } return false; - platform: template id: bin2 lambda: |- - if (esphome::millis() > 20000) { + if (millis() > 20000) { return true; } return false; - platform: template id: bin3 lambda: |- - if (esphome::millis() > 30000) { + if (millis() > 30000) { return true; } return false; diff --git a/tests/components/combination/common.yaml b/tests/components/combination/common.yaml index bb05fa375b..0e5d512d08 100644 --- a/tests/components/combination/common.yaml +++ b/tests/components/combination/common.yaml @@ -2,14 +2,14 @@ sensor: - platform: template id: template_temperature1 lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return 0.6; } return 0.0; - platform: template id: template_temperature2 lambda: |- - if (esphome::millis() > 20000) { + if (millis() > 20000) { return 0.8; } return 0.0; diff --git a/tests/components/duty_time/common.yaml b/tests/components/duty_time/common.yaml index ffe62ec7fc..761d10f16a 100644 --- a/tests/components/duty_time/common.yaml +++ b/tests/components/duty_time/common.yaml @@ -2,7 +2,7 @@ binary_sensor: - platform: template id: bin1 lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return true; } return false; diff --git a/tests/components/endstop/common.yaml b/tests/components/endstop/common.yaml index 317b31b1cb..b92b1e13b9 100644 --- a/tests/components/endstop/common.yaml +++ b/tests/components/endstop/common.yaml @@ -2,7 +2,7 @@ binary_sensor: - platform: template id: bin1 lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return true; } return false; diff --git a/tests/components/lock/common.yaml b/tests/components/lock/common.yaml index 35907fe679..9ba7f34857 100644 --- a/tests/components/lock/common.yaml +++ b/tests/components/lock/common.yaml @@ -15,7 +15,7 @@ lock: id: test_lock1 name: Template Lock lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return LOCK_STATE_LOCKED; } return LOCK_STATE_UNLOCKED; diff --git a/tests/components/pid/common.yaml b/tests/components/pid/common.yaml index e9478103f6..262e75591e 100644 --- a/tests/components/pid/common.yaml +++ b/tests/components/pid/common.yaml @@ -25,7 +25,7 @@ sensor: - platform: template id: template_sensor1 lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return 42.0; } return 0.0; diff --git a/tests/components/prometheus/common.yaml b/tests/components/prometheus/common.yaml index f9bd471ce7..cf46e882a7 100644 --- a/tests/components/prometheus/common.yaml +++ b/tests/components/prometheus/common.yaml @@ -33,7 +33,7 @@ sensor: - platform: template id: template_sensor1 lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return 42.0; } return 0.0; @@ -46,7 +46,7 @@ text_sensor: - platform: template id: template_text_sensor1 lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return {"Hello World"}; } return {"Goodbye (cruel) World"}; @@ -56,7 +56,7 @@ binary_sensor: - platform: template id: template_binary_sensor1 lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return true; } return false; @@ -65,7 +65,7 @@ switch: - platform: template id: template_switch1 lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return true; } return false; @@ -79,7 +79,7 @@ cover: - platform: template id: template_cover1 lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return COVER_OPEN; } return COVER_CLOSED; @@ -88,7 +88,7 @@ lock: - platform: template id: template_lock1 lambda: |- - if (esphome::millis() > 10000) { + if (millis() > 10000) { return LOCK_STATE_LOCKED; } return LOCK_STATE_UNLOCKED;