hass-core/tests
Charles Spirakis b86a1ece01 Allow conversion from date strings to "unix" timestamp. (#1985)
"unix" timestamp is number of seconds since Jan 1, 1970 UTC.
This allows scripts that use templates to generate time
deltas in seconds if desired from state attributes such
as last_updated.

Some examples:

timestamp now is
{{ as_timestamp(now) }}

timstamp of last change is
{{ as_timestamp(states.binary_sensor.garage_door.last_changed) }}

seconds since last change is
{{ as_timestamp(now) - as_timestamp(states.binary_sensor.garage_door.last_changed) }}
2016-05-06 18:33:46 -07:00
..
cassettes VCR YR sensor test 2015-12-27 17:37:32 -08:00
components Initial HVAC component + Z-Wave platform (#1912) 2016-05-03 18:27:51 -07:00
config/custom_components Fix PEP257 issues 2016-03-09 11:15:04 +01:00
helpers Fix script condition issue (Thanks @bart274) (#1972) 2016-05-03 18:19:55 -07:00
resources Revised package util tests 2016-01-30 14:08:32 -05:00
util Allow conversion from date strings to "unix" timestamp. (#1985) 2016-05-06 18:33:46 -07:00
__init__.py Fix PEP257 issues 2016-03-09 10:25:50 +01:00
common.py Correct celcius to celsius (#1860) 2016-04-19 20:30:44 -07:00
test_bootstrap.py Change local library path from {config_dir}/lib to {config_dir}/deps. (#1799) 2016-04-11 20:07:50 -07:00
test_config.py Add initial config validation 2016-03-28 23:46:12 -07:00
test_core.py Correct celcius to celsius (#1860) 2016-04-19 20:30:44 -07:00
test_loader.py Fix PEP257 issues 2016-03-09 10:25:50 +01:00
test_remote.py Use standardised datetime format 2016-04-16 01:46:50 -07:00