Skip to content

Commit

Permalink
X9C step delay with units (esphome#6898)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverhihn authored Jun 12, 2024
1 parent 1a242f9 commit 68dbf35
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 7 deletions.
8 changes: 7 additions & 1 deletion esphome/components/x9c/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@
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),
),
),
}
)
)
Expand Down
2 changes: 1 addition & 1 deletion tests/components/x9c/test.esp32-c3-idf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ output:
inc_pin: 4
ud_pin: 5
initial_value: 0.5
step_delay: 50
step_delay: 50us
2 changes: 1 addition & 1 deletion tests/components/x9c/test.esp32-c3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ output:
inc_pin: 4
ud_pin: 5
initial_value: 0.5
step_delay: 50
step_delay: 50us
2 changes: 1 addition & 1 deletion tests/components/x9c/test.esp32-idf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ output:
inc_pin: 14
ud_pin: 15
initial_value: 0.5
step_delay: 50
step_delay: 50us
2 changes: 1 addition & 1 deletion tests/components/x9c/test.esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ output:
inc_pin: 14
ud_pin: 15
initial_value: 0.5
step_delay: 50
step_delay: 50us
2 changes: 1 addition & 1 deletion tests/components/x9c/test.esp8266.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ output:
inc_pin: 14
ud_pin: 15
initial_value: 0.5
step_delay: 50
step_delay: 50us
2 changes: 1 addition & 1 deletion tests/components/x9c/test.rp2040.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ output:
inc_pin: 4
ud_pin: 5
initial_value: 0.5
step_delay: 50
step_delay: 50us

0 comments on commit 68dbf35

Please sign in to comment.