mirror of
https://github.com/esphome/esphome.git
synced 2025-09-06 05:12:21 +01:00
remote updates
This commit is contained in:
@@ -227,6 +227,11 @@ def int_(value):
|
||||
check_not_templatable(value)
|
||||
if isinstance(value, integer_types):
|
||||
return value
|
||||
if isinstance(value, float):
|
||||
if int(value) == value:
|
||||
return int(value)
|
||||
raise Invalid("This option only accepts integers with no fractional part. Please remove "
|
||||
"the fractional part from {}".format(value))
|
||||
value = string_strict(value).lower()
|
||||
base = 10
|
||||
if value.startswith('0x'):
|
||||
|
Reference in New Issue
Block a user