You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_docs/configuration/templating.markdown
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -149,7 +149,7 @@ With strings:
149
149
- For specific values: `now().second`, `now().minute`, `now().hour`, `now().day`, `now().month`, `now().year`, `now().weekday()` and `now().isoweekday()`
150
150
- `utcnow()`will be rendered as UTC time.
151
151
- For specific values: `utcnow().second`, `utcnow().minute`, `utcnow().hour`, `utcnow().day`, `utcnow().month`, `utcnow().year`, `utcnow().weekday()` and `utcnow().isoweekday()`.
152
-
- `as_timestamp()`will convert datetime object or string to UNIX timestamp.
152
+
- `as_timestamp()`will convert datetime object or string to UNIX timestamp. This function also be used as a filter.
153
153
- `strptime(string, format)`will parse a string to a datetime based on a [format](https://docs.python.org/3.6/library/datetime.html#strftime-and-strptime-behavior).
154
154
- Filter `timestamp_local` will convert an UNIX timestamp to local time/data.
155
155
- Filter `timestamp_utc` will convert a UNIX timestamp to UTC time/data.
@@ -236,10 +236,10 @@ The other part of templating is processing incoming data. It allows you to modif
236
236
237
237
It depends per component or platform, but it is common to be able to define a template using the `value_template` configuration key. When a new value arrives, your template will be rendered while having access to the following values on top of the usual Home Assistant extensions:
0 commit comments