Binary sensor for detecting linear trends (#9808)

* Trend sensor now uses linear regression to calculate trend

* Added numpy to trend sensor test requirements

* Added trendline tests

* Trend sensor now has max_samples attribute

* Trend sensor uses utcnow from HA utils

* Trend sensor now completes setup in async_added_to_hass

* Fixed linter issues

* Fixed broken import

* Trend tests make use of max_samples

* Added @asyncio.coroutine decorator to trend update callback

* Update trend.py
This commit is contained in:
Sam Birch 2017-10-26 04:33:17 +13:00 committed by Pascal Vizeli
parent 63c9d59d54
commit fc8940111d
5 changed files with 199 additions and 49 deletions

View file

@ -55,6 +55,7 @@ TEST_REQUIREMENTS = (
'libpurecoollink',
'libsoundtouch',
'mficlient',
'numpy',
'paho-mqtt',
'pexpect',
'pilight',