mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Fix lying docstring for relative_time template function (#116146)
* Fix lying docstring for relative_time template function * Update homeassistant/helpers/template.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
@@ -2477,7 +2477,8 @@ def relative_time(hass: HomeAssistant, value: Any) -> Any:
|
||||
The age can be in second, minute, hour, day, month or year. Only the
|
||||
biggest unit is considered, e.g. if it's 2 days and 3 hours, "2 days" will
|
||||
be returned.
|
||||
Make sure date is not in the future, or else it will return None.
|
||||
If the input datetime is in the future,
|
||||
the input datetime will be returned.
|
||||
|
||||
If the input are not a datetime object the input will be returned unmodified.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user