Site updated at 2017-12-03 14:35:15 UTC
This commit is contained in:
parent
760ff5832e
commit
ce6c5b8ee1
1629 changed files with 9107 additions and 3280 deletions
|
@ -135,6 +135,7 @@ The frontend has a template editor developer tool to help develop and debug temp
|
|||
<li><code class="highlighter-rouge">relative_time(timestamp)</code> will format the date time as relative time vs now (ie 7 seconds)</li>
|
||||
<li><code class="highlighter-rouge">float</code> will format the output as float.</li>
|
||||
<li><code class="highlighter-rouge">strptime(string, format)</code> will parse a string to a datetime based on a <a href="https://docs.python.org/3.4/library/datetime.html#strftime-and-strptime-behavior">format</a>.</li>
|
||||
<li><code class="highlighter-rouge">log(value, base)</code> will take the logarithm of the input. When the base is omitted, it defaults to <code class="highlighter-rouge">e</code> - the natural logarithm. Can also be used as a filter.</li>
|
||||
<li>Filter <code class="highlighter-rouge">round(x)</code> will convert the input to a number and round it to <code class="highlighter-rouge">x</code> decimals.</li>
|
||||
<li>Filter <code class="highlighter-rouge">timestamp_local</code> will convert an UNIX timestamp to local time/data.</li>
|
||||
<li>Filter <code class="highlighter-rouge">timestamp_utc</code> will convert an UNIX timestamp to UTC time/data.</li>
|
||||
|
@ -286,6 +287,8 @@ Closest to an entity: {{ closest(states.zone.school, 'group.children') }}
|
|||
# Math
|
||||
{{ value_json | float * 1024 }}
|
||||
{{ float(value_json) * (2**10) }}
|
||||
{{ value_json | log }}
|
||||
{{ log(1000, 10) }}
|
||||
|
||||
# Timestamps
|
||||
{{ value_json.tst | timestamp_local }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue