mirror of
https://github.com/home-assistant/core.git
synced 2025-12-23 20:39:01 +00:00
Add native Python types support to templates (#41227)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
@@ -458,7 +458,10 @@ def async_template(
|
||||
_LOGGER.error("Error during template condition: %s", ex)
|
||||
return False
|
||||
|
||||
return value.lower() == "true"
|
||||
if isinstance(value, bool):
|
||||
return value
|
||||
|
||||
return str(value).lower() == "true"
|
||||
|
||||
|
||||
def async_template_from_config(
|
||||
|
||||
Reference in New Issue
Block a user