Skip to content

Commit

Permalink
Fix time period validation for the auto cleaning interval (#4811)
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsch committed May 15, 2023
1 parent 7f83a6e commit 8e4aeec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion esphome/components/sen5x/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
device_class=DEVICE_CLASS_PM10,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_AUTO_CLEANING_INTERVAL): cv.time_period_in_seconds_,
cv.Optional(CONF_AUTO_CLEANING_INTERVAL): cv.update_interval,
cv.Optional(CONF_VOC): sensor.sensor_schema(
icon=ICON_RADIATOR,
accuracy_decimals=0,
Expand Down
1 change: 1 addition & 0 deletions tests/test5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ sensor:
offset: 0
normalized_offset_slope: 0
time_constant: 0
auto_cleaning_interval: 604800s
acceleration_mode: low
store_baseline: true
address: 0x69
Expand Down

0 comments on commit 8e4aeec

Please sign in to comment.