Skip to content

Commit 715eec2

Browse files
committed
Update 'now()' and 'utcnow()'
1 parent b4a92c1 commit 715eec2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/_docs/configuration/templating.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ Home Assistant adds extensions to allow templates to access all of the current s
6969
- `is_state('device_tracker.paulus', 'home')` will test if the given entity is specified state.
7070
- `is_state_attr('device_tracker.paulus', 'battery', 40)` will test if the given entity is specified state.
7171
- `now()` will be rendered as current time in your time zone.
72+
- For specific values: `now().second`, `now().minute`, `now().hour`, `now().day`, `now().month`, `now().year`, `now().weekday()` and `now().isoweekday()`
7273
- `utcnow()` will be rendered as UTC time.
74+
- For specific values: `utcnow().second`, `utcnow().minute`, `utcnow().hour`, `utcnow().day`, `utcnow().month`, `utcnow().year`, `utcnow().weekday()` and `utcnow().isoweekday()`.
7375
- `as_timestamp()` will convert datetime object or string to UNIX timestamp
7476
- `distance()` will measure the distance in meters between home, entity, coordinates.
7577
- `closest()` will find the closest entity.

0 commit comments

Comments
 (0)