diff --git a/esphome/components/x9c/output.py b/esphome/components/x9c/output.py index 56820efdfa..4497994982 100644 --- a/esphome/components/x9c/output.py +++ b/esphome/components/x9c/output.py @@ -27,7 +27,13 @@ CONFIG_SCHEMA = cv.All( cv.Optional(CONF_INITIAL_VALUE, default=1.0): cv.float_range( min=0.01, max=1.0 ), - cv.Optional(CONF_STEP_DELAY, default=1): cv.int_range(min=1, max=100), + cv.Optional(CONF_STEP_DELAY, default="1us"): cv.All( + cv.positive_time_period_microseconds, + cv.Range( + min=cv.TimePeriod(microseconds=1), + max=cv.TimePeriod(microseconds=100), + ), + ), } ) ) diff --git a/tests/components/x9c/test.esp32-c3-idf.yaml b/tests/components/x9c/test.esp32-c3-idf.yaml index 1234581329..972c743fcd 100644 --- a/tests/components/x9c/test.esp32-c3-idf.yaml +++ b/tests/components/x9c/test.esp32-c3-idf.yaml @@ -5,4 +5,4 @@ output: inc_pin: 4 ud_pin: 5 initial_value: 0.5 - step_delay: 50 + step_delay: 50us diff --git a/tests/components/x9c/test.esp32-c3.yaml b/tests/components/x9c/test.esp32-c3.yaml index 1234581329..972c743fcd 100644 --- a/tests/components/x9c/test.esp32-c3.yaml +++ b/tests/components/x9c/test.esp32-c3.yaml @@ -5,4 +5,4 @@ output: inc_pin: 4 ud_pin: 5 initial_value: 0.5 - step_delay: 50 + step_delay: 50us diff --git a/tests/components/x9c/test.esp32-idf.yaml b/tests/components/x9c/test.esp32-idf.yaml index 5f1468e94b..f587b69b4f 100644 --- a/tests/components/x9c/test.esp32-idf.yaml +++ b/tests/components/x9c/test.esp32-idf.yaml @@ -5,4 +5,4 @@ output: inc_pin: 14 ud_pin: 15 initial_value: 0.5 - step_delay: 50 + step_delay: 50us diff --git a/tests/components/x9c/test.esp32.yaml b/tests/components/x9c/test.esp32.yaml index 5f1468e94b..f587b69b4f 100644 --- a/tests/components/x9c/test.esp32.yaml +++ b/tests/components/x9c/test.esp32.yaml @@ -5,4 +5,4 @@ output: inc_pin: 14 ud_pin: 15 initial_value: 0.5 - step_delay: 50 + step_delay: 50us diff --git a/tests/components/x9c/test.esp8266.yaml b/tests/components/x9c/test.esp8266.yaml index 5f1468e94b..f587b69b4f 100644 --- a/tests/components/x9c/test.esp8266.yaml +++ b/tests/components/x9c/test.esp8266.yaml @@ -5,4 +5,4 @@ output: inc_pin: 14 ud_pin: 15 initial_value: 0.5 - step_delay: 50 + step_delay: 50us diff --git a/tests/components/x9c/test.rp2040.yaml b/tests/components/x9c/test.rp2040.yaml index 1234581329..972c743fcd 100644 --- a/tests/components/x9c/test.rp2040.yaml +++ b/tests/components/x9c/test.rp2040.yaml @@ -5,4 +5,4 @@ output: inc_pin: 4 ud_pin: 5 initial_value: 0.5 - step_delay: 50 + step_delay: 50us