Commit Graph

39 Commits (f4594027fdbf6eb080504206edd52978fe82879e)

Author SHA1 Message Date
Alex Harvey 93fd6fa11b fixes for pep and delay start 2016-05-12 10:33:22 -07:00
Alex Harvey 67b0365f62 update to latest base 2016-05-12 10:32:28 -07:00
Paulus Schoutsen 68d92c3196 Use standardised datetime format 2016-04-16 01:46:50 -07:00
Justyn Shull d5ca97b1f6 Add tests for purging old states and events 2016-04-15 21:02:17 -05:00
Justyn Shull fd48fc5f83 Add CONFIG_SCHEMA to verify config. Move purge_days key name to
CONF_PURGE_DAYS so it can be changed easier later.

Use 'recorder' domain instead of 'history' domain.

Pass purge_days config directly into Recorder object instead of passing
the config object around.
2016-04-15 19:54:30 -05:00
Justyn Shull c89cd6a68c Add 'purge_days' option to the history/recorder component
Issue https://github.com/balloob/home-assistant/issues/1337

When purge_days is set under the history component, recorder.py will
delete all events and states that are older than purge_days days ago.

Currently, this is only done once at start up.   A vacuum command is
also run to free up the disk space sqlite would still use after deleting
records.
2016-04-15 19:54:30 -05:00
Jan Harkes c481cbce7e Make tox run faster by using in-memory sqlite db. (#1752)
Two tests were invariably grinding my system to a halt as it was
applying migrations to an empty sqlite database. This patch reduces
the time of a pytest run from 50 to about 16 seconds on my desktop.

The difference is even more noticable on a slower laptop drive, but
is probably insignificant for all you fancy SSD users.
2016-04-08 18:28:19 -07:00
Fabian Affolter b534244e40 Fix PEEP257 issues 2016-03-08 17:55:57 +01:00
Fabian Affolter b8a40457ee Update docstrings to match PEP257 2016-03-07 18:50:30 +01:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Paulus Schoutsen b0948bef5f Make State class immutable 2016-02-09 23:27:01 -08:00
Paulus Schoutsen cd25c8f72d Clean up some query stuff 2016-02-07 10:07:27 -08:00
Paulus Schoutsen 9ad1d290af Fix migration 5 2016-02-07 10:07:08 -08:00
Sean Dague 3d00735341 Add recording of domain to state tables
Some domains, like thermostat, need all state records, not just state
change ones, to provide accurate graphs. This introduces a new db
migration which adds a 'domain' column to all states so that is a fast
query.

Indexes were added to help with query performance.

This includes a data migration which post-date populates domain. On
large HA dbs this might take real time, as it has to touch every state
row. 100 MB db (91k states) updated in a couple of seconds on my
reasonably fast server. Be forewarned.

This is part of bug #881
2016-02-03 15:05:43 -05:00
Paulus Schoutsen 9e1ecd7124 Fix flaky history test 2015-12-27 10:38:27 -08:00
Paulus Schoutsen a301d869d7 PyLint 1.5 fixes 2015-11-29 13:49:05 -08:00
Paulus Schoutsen ad3f96fa25 Merge pull request #672 from balloob/some-cleanup
Make component dependencies optional
2015-11-27 15:08:22 -08:00
Paulus Schoutsen fabd0ced3f Make DEPENDENCIES optional for components 2015-11-26 13:11:59 -08:00
Fabian Affolter 3e60c4801c Update docstrings 2015-11-25 08:56:50 +01:00
Fabian Affolter 97f9f8aa49 Update link to docs (Jekyll 3 update) 2015-11-09 13:12:18 +01:00
Fabian Affolter bf027fcd48 Add link to docs 2015-10-25 15:58:58 +01:00
Jeff Schroeder 7e42b35b62 Set logging of SQL queries to sqlite as debug log messages 2015-09-16 23:11:57 -05:00
Paulus Schoutsen 1b89a502c4 Extract core into own submodule 2015-08-16 20:44:46 -07:00
Paulus Schoutsen df18acbabb Recorder saves which event caused state change 2015-05-10 23:41:42 -07:00
Paulus Schoutsen cf5278b7e9 Add tests for recorder component 2015-04-29 23:21:31 -07:00
Paulus Schoutsen 3720333927 UTC bugfixes 2015-04-28 22:38:43 -07:00
Paulus Schoutsen e0ecb64a10 Use UTC as the internal datetime format 2015-04-28 19:12:05 -07:00
Paulus Schoutsen 00bbc17e11 Add State.last_updated to JSON obj 2015-03-31 23:08:38 -07:00
Paulus Schoutsen 234bfe1199 Add logbook component 2015-03-29 14:47:21 -07:00
Paulus Schoutsen a2f8fa7b05 Add time_fired to Event class 2015-03-29 14:47:20 -07:00
Paulus Schoutsen 5a0251c3cd ps: Fix recorder.py fetching wrong run information 2015-03-27 23:11:07 -07:00
Paulus Schoutsen 7a7f486cb2 Rename config.get_config_path to config.path 2015-03-19 12:27:56 -07:00
Paulus Schoutsen 7a8f6500e2 Fix a bug in recorder. Fixes #33 2015-02-09 19:12:12 -08:00
Paulus Schoutsen 09bf64db42 Fix style issues 2015-02-07 15:54:58 -08:00
Paulus Schoutsen 06fac90ec2 Allow querying recorder for run info 2015-02-07 12:39:10 -08:00
Paulus Schoutsen fbae2ef725 Add Google Timelines to UI 2015-02-01 18:00:30 -08:00
Paulus Schoutsen 807ceadf8b Provide API for 5 last states of entity 2015-01-31 20:06:30 -08:00
Paulus Schoutsen 3709840327 Merge branch 'dev' into component-recorder
Conflicts:
	homeassistant/components/http/__init__.py
2015-01-31 10:31:16 -08:00
Paulus Schoutsen 7c45318c00 Recorder component: proof of concept 2015-01-28 00:22:09 -08:00