1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-13 14:18:14 +00:00

pass checks

This commit is contained in:
lastradanet 2024-12-20 21:38:00 -05:00 committed by GitHub
parent 81f38ed762
commit 1b49263a73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,12 +37,14 @@ def check_timeout(value):
if value.total_seconds > 60:
raise cv.Invalid("Maximum timeout can not be greater then 60 seconds")
return value
def check_timing_budget(value):
value = cv.positive_time_period_microseconds(value)
if value.total_microseconds < 17000 or value.total_microseconds > 4294967295:
raise cv.Invalid("Timing budget must be between 17000us and 4294967295us")
return value
CONFIG_SCHEMA = cv.All(
sensor.sensor_schema(