1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-15 15:18:16 +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

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