Compare commits

...

4445 Commits

Author SHA1 Message Date
Paulus Schoutsen
77f595c9a4 Merge pull request #24047 from home-assistant/rc
0.93.2
2019-05-22 20:34:12 -07:00
Paulus Schoutsen
8d0b1588be Bumped version to 0.93.2 2019-05-22 20:00:34 -07:00
Daniel Høyer Iversen
70c5c82541 upgrade broadlink library (#23966) 2019-05-22 20:00:12 -07:00
Cyro
bf910ef383 Make Discord payload data key not required (#23964) 2019-05-22 20:00:11 -07:00
Julien Brochet
99c49c0993 Setup integration dependencies before loading it (#23957) 2019-05-22 20:00:10 -07:00
Joakim Sørensen
f6e6c21ba6 Fixes issue with multiple alerts (#23945)
* Fixes issue with multiple alerts

* Adds missing new line

* Remove whitespace
2019-05-22 20:00:10 -07:00
Joakim Sørensen
41b7f5ab1c Bump pytraccar (#23939) 2019-05-22 20:00:09 -07:00
Pascal Vizeli
c5bd6b3d6b Fix auto version update Hass.io (#23935) 2019-05-22 20:00:08 -07:00
Paulus Schoutsen
7818c98c67 Merge pull request #23932 from home-assistant/rc
0.93.1
2019-05-17 08:03:45 +02:00
Paulus Schoutsen
e12222697c Bumped version to 0.93.1 2019-05-17 06:35:20 +02:00
karlkar
58f28f177d Fix problem with cameras that don't support time (#23924)
Some onvif cameras don't support Date management. In that case None is returned and script crashes when trying to obtain date
2019-05-17 06:35:09 +02:00
Joakim Plate
6030e419c5 Switch media player to SWITCH type (#23914)
MEDIA device type is being rejected by google now.
2019-05-17 06:33:20 +02:00
Paulus Schoutsen
8d2a784831 Update Honeywell warning (#23913) 2019-05-17 06:33:20 +02:00
Pascal Vizeli
5dc841ecae Fix Hassio-version for Azure Pipelines (#23895) 2019-05-17 06:33:19 +02:00
Paulus Schoutsen
584bfbaa76 Merge pull request #23864 from home-assistant/rc
0.93.0
2019-05-16 07:08:27 +02:00
Paulus Schoutsen
0f140751b2 Fix PS4 blocking startup (#23893) 2019-05-16 05:43:45 +02:00
Pascal Vizeli
6aa9844f8f Fix auto discovery if the monitor condition (#23880) 2019-05-15 16:28:35 +02:00
Paulus Schoutsen
177594f02c Update sensor.py 2019-05-15 14:00:42 +02:00
Pascal Vizeli
3f841a36a5 Update azure-pipelines.yml for Azure Pipelines
Automated version updates
2019-05-14 22:59:12 +02:00
damarco
80ae02cc49 Fix zha timed off (#23849) 2019-05-14 13:41:27 +02:00
Paulus Schoutsen
421b2962c6 Bumped version to 0.93.0 2019-05-14 13:18:36 +02:00
Paulus Schoutsen
bde5a9ef01 Bumped version to 0.93.0b4 2019-05-14 13:12:30 +02:00
Robbie Trencheny
b79886ad85 Fix improper usage of body attribute on web.Response. Should be text since we arent sending bytes (#23857) 2019-05-14 13:12:24 +02:00
Paulus Schoutsen
f083abbed1 Bumped version to 0.93.0b3 2019-05-14 07:19:37 +02:00
David F. Mulcahey
4dd8423b9b bump zha-quirks (#23855) 2019-05-14 07:19:31 +02:00
David F. Mulcahey
8ba2ab567e Fix ZHA battery when readings produce an unknown value (#23854)
* check for unknown readings

* only publish valid readings

* remove unused constant
2019-05-14 07:19:30 +02:00
David F. Mulcahey
3d821b9148 Correct ZHA illumination conversion (#23853)
* fix illumination values

* correct formula

* update illuminance calculation

* update test
2019-05-14 07:19:30 +02:00
Jason Hunter
04720175b9 fix onvif wsdl import - take 2 (#23807) 2019-05-14 07:19:29 +02:00
Alexei Chetroi
93ad7b2e45 Do not add coordinator to the ZHA entities. (#23803) 2019-05-14 07:19:28 +02:00
Paulus Schoutsen
9b12dd66e4 Updated frontend to 20190514.0 2019-05-14 07:08:06 +02:00
Paulus Schoutsen
6d40980de1 Bumped version to 0.93.0b2 2019-05-10 14:32:51 -07:00
Anders Melchiorsen
d4f79fc88a Synchronize Sonos service calls (#23791) 2019-05-10 14:32:43 -07:00
Paulus Schoutsen
2d724f5cc9 Updated frontend to 20190510.0 2019-05-10 14:23:09 -07:00
Pascal Vizeli
61ed604fda Bump version 0.93.0b1 2019-05-10 06:17:26 +00:00
Paulus Schoutsen
f17259c705 Updated frontend to 20190509.0 2019-05-10 06:16:54 +00:00
Jason Hunter
d5533cc10f Beta Fix: ONVIF (#23787)
* bump package to include wsdl

* update requirements all
2019-05-10 06:16:02 +00:00
dreed47
e6c5cc92d1 Fix for issue #23739. Added unique_id property so (#23769)
that entities will always get mapped to the same
property ZPID code.
2019-05-10 06:16:00 +00:00
cgtobi
0caa27094e Bump pyatmo to v1.11 (#23766) 2019-05-10 06:16:00 +00:00
Steven Looman
01578f78f1 Sort discovered entries by 'st' to ensure getting the same device each discovery (#23763) 2019-05-10 06:15:59 +00:00
Paulus Schoutsen
07b7d7b074 Bumped version to 0.93.0b0 2019-05-08 20:22:36 -07:00
Paulus Schoutsen
fb7343ecd2 Merge remote-tracking branch 'origin/master' into dev 2019-05-08 20:22:08 -07:00
Paulus Schoutsen
e51925fc58 Update translations 2019-05-08 20:20:58 -07:00
Paulus Schoutsen
d507adf13d Updated frontend to 20190508.0 2019-05-08 20:20:26 -07:00
Pascal Vizeli
c5230f7585 Update azure-pipelines.yml for Azure Pipelines 2019-05-08 23:47:01 +02:00
Paulus Schoutsen
cc13713abd No longer rely on requests (#23685)
* No longer rely on requests

* Lint

* Missed a few parts

* Fix types

* Fix more types

* Update __main__.py

* Fix tests

* Lint

* Fix script
2019-05-08 11:15:04 -07:00
Josef Schlehofer
f019e2a204 Upgrade zeroconf to 0.22.0 (#23524) 2019-05-08 08:40:00 -07:00
Jerry Chong
07126266dd Update Sesame component to use Candy House's library using the V3 API (#23621)
* Update Sesame component to use Candy House's library using the V3 API

* Updated requirements_all.txt

* Fix pylint warning

* Revert back to ATTR_DEVICE_ID
2019-05-08 08:34:00 -07:00
Martin Hjelmare
c26af22edd Refactor child validation (#23482)
* Try to make the process more readable and paritioned.
* Validate child values using set message.
* Only validate using relevant schemas.
* Extract node validation.
* Rework const types and schemas.
* Rework child validator.
* Enhance warning logging message.
2019-05-08 08:26:40 -07:00
Ville Skyttä
c384adeef4 Upgrade defusedxml to 0.6.0 (#23651) 2019-05-08 08:04:36 -07:00
Penny Wood
7f0953766b Prompt for pin only on open / unlock (#23751)
* Prompt for pin only on open / unlock

* Fixed test cases
2019-05-08 07:55:30 -07:00
Pascal Vizeli
ce1974b014 Update azure-pipelines.yml for Azure Pipelines 2019-05-08 16:02:19 +02:00
carstenschroeder
8822f0140d New cover platform for ADS integration (#23377)
* new cover platform

* improve logging II

* remove dependencies

* fix comment

* fix review findings
2019-05-08 14:08:26 +02:00
Fabian Affolter
45c041884a Upgrade Mastodon.py to 1.4.0 (#23753) 2019-05-08 11:20:22 +02:00
Fabian Affolter
1ecb3de643 Upgrade numpy to 1.16.3 (#23673) 2019-05-08 09:17:41 +02:00
cgtobi
f0f6787bf9 Merge netatmo_public sensor into the netatmo integration (#23531)
* Merge netatmo public into netatmo integration

* Remove netatmo_public platform

* Remove dev log messages

* Improve error handling

* Check config for unsupported conditions

* Fix linter

* Reduce nested blocks
2019-05-08 08:26:52 +02:00
Paulus Schoutsen
3e788aa1d6 Updated frontend to 20190507.0 2019-05-07 22:55:59 -07:00
Paulus Schoutsen
f4016b4aad Add integration step to onboarding (#23732)
* Return an extra oauth2 auth code during onboarding

* Areas in const

* Add integration step

* Lint

* Fix tests

* Fix test

* Verify integration added to done

* Verify step is marked as done
2019-05-07 22:51:24 -07:00
Paulus Schoutsen
07ee3b2eb9 Add update events to registries (#23746)
* Add update events to registries

* Add to websocket
2019-05-07 20:04:57 -07:00
Steven Looman
6e7a7ba4a0 Fix upnp logger name (#23724)
* Fix upnp logger name

* Fix more loggers
2019-05-07 15:52:48 -07:00
David Bonnes
7181d639fd Add Intergas InComfort Lan2RF gateway (#23736)
* fixed __init__.py

* add sensors

* switch to parent-child architecture

* make binary_sensor the parent

* revert parent - to water_heater

* first working version

* working, delinted (except TODO)

* update to latest client library

* remove debug code

* delint

* tweak device_state_attributes

* tweak device_state_attrbutes

* minor tweaks

* bump client library for bugfix

* improve state attributes for pumping

* update .coverage

* bugfix - binary sensors not updating

* rename to incomfort from intouch

* fix coveragerc regression

* bump client (bugfix for /protected URL)

* bump client (bugfix for /protected URL) 2

* bump client

* remove debug code

* ready for PR

* fix regression

* use xx._boiler instead of xx._objref

* improve current_temperature and delint

* use current_operation instead of state

* refactor vol.Schema

* remove unneeded instance attribute

* remove unneeded instance attribute 2

* refactor device_state_attributes

* change 'boiler' to 'heater'

* change 'boiler' to 'heater' 2

* correct a typo

* bugfix: add missing comma

* small tidy-up
2019-05-07 23:53:55 +02:00
Paulus Schoutsen
0f174250cc Update PR template (#23520)
* Update PR template

* Update config, PR template
2019-05-07 14:18:40 -07:00
Maciej Bieniek
16a27c3f2d Add abbreviation for position_topic (#23740) 2019-05-07 22:20:55 +02:00
Fabian Affolter
b253c7499d Upgrade aiodns to 2.0.0 (#23743) 2019-05-07 15:32:04 -04:00
Markus Jankowski
264e70922b Fix effects on HUE integration for Osram bulbs (#22789)
* Fix hue effect for others

* New suggestion

* switched implementation to remove colorloop for osram bulbs

* Check ATTR_EFFECT in kwargs

* Fix  tests
2019-05-07 09:53:14 -07:00
Richard Mitchell
482cb0146a Fix Hue sensor integration with multiple bridges. (#23713) 2019-05-07 09:45:04 -07:00
Andrew Sayre
02d8731a61 Add HEOS sign-in/out services (#23729)
* Add HEOS sign-in/out services

* Fix typo in comment
2019-05-07 09:39:42 -07:00
Erik Montnemery
102beaa044 Add debug prints to sun (#23598)
* Add debug prints to sun

* Review comment
2019-05-07 09:37:08 -07:00
David Bonnes
6611d585e6 Add water_heater to geniushub, bump client library (#23384)
* add water_heater

* add geniushub/water_heater.py

* de-lint

* de-lint 2

* remove temperature from device state attribs

* update to latest client library

* add me as CODEOWNER

* bump client

* bump client

* delint/refactor

* Update homeassistant/components/geniushub/water_heater.py

Co-Authored-By: zxdavb <david@bonnes.me>
2019-05-07 17:37:47 +02:00
unixko
f386088def add abbreviation for current_temperature_template (#23733) 2019-05-07 08:27:35 +02:00
rolfberkenbosch
c07c557298 Added new binary sensor meteoalarm to get weather alerts in Europe (#23663)
* Added new component meteoalarm

* Update sensor.py

* Update manifest.json

* Update manifest.json

* Update manifest.json

* Added file CODEOWNERS

* Modified some code, thanks @amelchio

* removed Throttle because is not being used anymore

* Update _attributes ad _state

* some cleanup

* Update sensor.py

Change sensor to binarysensor

* Rename sensor.py to binary_sensor.py

rename the file

* Update binary_sensor.py

Removed BinarySensorDevice from class

* Update binary_sensor.py

Made a mistake with BinarySensorDevice

* Update binary_sensor.py

clean up white spaces

* Update binary_sensor.py

Fix BinarySensorDevice

* Update binary_sensor.py

cleanup the import libs

* modified __init__

* fix

* final fix, thanks @amelchio

* forgot to change the sensor.py

* correct some typo in text

* fix typos

* fix another typo

* fix typo
2019-05-07 08:19:29 +02:00
Pawel
1f551e5f6f Add TTL support and custom headers support. (#22988)
* Add TTL custom support and custom headers support.

* fix pywebpush version

* removed whitespaces surrounding docstrings.

* fixes for tests

* priority option to data

* checking of ATTR_ENDPOINT

* change checking of target to vol.Schema

* more tests
2019-05-06 16:37:05 -07:00
Fabian Affolter
b60c815cde Share snmp constants across all platforms (#23678)
* Share constants across all platforms

* Update .coveragerc
2019-05-06 23:31:03 +02:00
Andrew Sayre
074142400a Fix SmartThings Samsung Air Conditioner Support (#23706)
* Bump pysmartthings to 0.6.8

* Fix AC climate device

* Fix stale comment
2019-05-06 10:21:16 -07:00
Daniel Høyer Iversen
d8a219fe0e Upgrade switchbot , fixes #23702 (#23716) 2019-05-06 10:18:50 -07:00
William Scanlon
a0230482bd Use the URL provided by the Wink API for subscriptions. (#23710)
* Use the URL provided by the Wink API for subscriptions.

* Changed python-wink version
2019-05-06 10:18:17 -07:00
Ville Skyttä
b9a72034f9 huawei_lte: handle icons for None sensor values gracefully (#23649) 2019-05-06 10:15:28 -07:00
Andrew Sayre
bf649e373c Update IDs after firmware upgrade in HEOS (#23641)
* Initial work

* Update tests
2019-05-06 17:53:11 +02:00
David F. Mulcahey
73aadbe8bc bump zha-quirks (#23714) 2019-05-06 08:35:11 -04:00
Fabian Affolter
e2afeca4fd Upgrade sendgrid to 6.0.5 (#23711) 2019-05-06 07:13:16 -05:00
Fredrik Erlandsson
0dfa5f9ffd Use local constant in Daikin for STATE_OFF (#23712) 2019-05-06 13:43:35 +02:00
Fabian Affolter
b331b081f0 Catch thethingsnetwork TypeError (#23667)
* Catch TypeError (fixes #23097)

* Re-add return values

* Update homeassistant/components/thethingsnetwork/sensor.py

Co-Authored-By: fabaff <mail@fabian-affolter.ch>
2019-05-06 09:47:46 +02:00
Andrew Sayre
cf03e42773 Bump pyheos to 0.5.2 (#23708) 2019-05-06 07:07:41 +02:00
droopanu
f87209605b Add a TCP timeout of 5 seconds to ffmpeg (#23617)
Add a TCP timeout of 5 seconds to ffmpeg to fix stream getting stuck when network connectivity is lost
https://github.com/home-assistant/home-assistant/issues/22741
2019-05-05 20:59:56 -04:00
ktnrg45
3e59e7f347 Add media_type_app to media_player (#23666)
* Add media_type_app

* Add MEDIA_TYPE_APP

* Bump 0.7.3

* Bump 0.7.3

* Bump 0.7.3

* typo
2019-05-05 18:53:08 -05:00
David F. Mulcahey
3dd1d3c418 Add additional single input cluster entries - ZHA (#23697)
* more profiles

* remove from binary sensor profile

* remove sensor profile mapping
2019-05-05 19:10:19 -04:00
Alexei Chetroi
8328ea6bd7 Bump ZHA modules versions. (#23705)
* Bump ZHA modules versions.

Bump bellows-homeassistant version.
Bump zigpy-homeassistant version.
Bump zigpy-xbee-homeassistant version.

* Update requirements_*.txt
2019-05-05 17:15:34 -04:00
Fredrik Erlandsson
9c1bbd1d9d Add support for SET_AWAY_MODE and TURN_ON/OFF on Daikin Climate (#23585)
* add support for on/off on daikin climate

* add support for away mode on daikin climate
2019-05-05 15:17:01 -05:00
Martin Hjelmare
8500244f8c Move owntracks device tracker test under owntracks (#23701) 2019-05-05 21:39:51 +02:00
Anders Melchiorsen
2efc1de349 Move Sonos services to sonos domain (#23670) 2019-05-05 14:25:57 -05:00
Martin Hjelmare
4796d674e6 Clean up device tracker tests (#23695)
* Clean up device tracker tests

* Fix async load config in device tracker tests.
* Clean up lint in device tracker tests.
* Sort device tracker tests imports.
* Patch config saving in device tracker tests.
* Rename fixture.
* Rename some tests that had long cryptic names.

* Replace calls  to device_tracker.async_setup
2019-05-05 14:14:46 -05:00
Martin Hjelmare
4fe0cd76f8 Clean up mqtt device tracker tests (#23700)
* Move mqtt device tracker test under mqtt dir

* Patch config file load and save

* Clean up

* Sort imports

* Put expected value last in assertions
2019-05-05 11:50:38 -07:00
Julius Mittenzwei
c0f9ccfdbb Update requirements for pyvlx. (#23694) 2019-05-05 19:19:35 +02:00
Martin Hjelmare
b9fda078a4 Clean and fix google calendar tests (#23608)
* Clean and fix google calendar tests

* Extract test calendar constant for google test
* Rewrite google calendar tests
* Clean and fix google calendar tests
* Clean and fix google component tests
* Add google conftest
* Skip flaky google calendar test

* Fix google calendar bug

* Fix yield fixture

* Set fixture names to avoid lint warning

* Fix yield fixture
2019-05-05 18:38:55 +02:00
Austin Drummond
e24d56aa5b Add HomeKit Television functionality (#22968) 2019-05-05 17:51:47 +02:00
UgaitzEtxebarria
8da600adff Add Bizkaibus, Biscays (Spain) bus service component (#22934)
* Updated to the current version of dev

* Added the component to .coveragerc

* Added __init__.py and manifest.json

* Changed the manifest to comply the json format

* Changes in for complete the PEP8 Code

* Fixed the api call to use PyPI package

* Fixed API correrct call

* Fixes for complete the requirements

* Added dependencies in manifest.json

* Changed the __init__.py to complete PEP8

* Simplified the __init__.py

* Runned codeowner script

* executed gen_requirements_all.py

* Direct call for dicts and unit changed to minutes

* Fixed the optional dict call, sorry, my bad, I did not that

* Deleted unused vars

* Changed optional parameter to required

* Remove blank first line
2019-05-05 11:00:15 +02:00
Fabian Affolter
9712bbc91c Upgrade spotcrime to 1.0.4 (fixes #13189) (#23679) 2019-05-05 07:29:04 +02:00
Fabian Affolter
fca0891320 Upgrade pysnmp to 4.4.9 (#23677) 2019-05-05 07:26:13 +02:00
Aaron Bach
1d2c5cb53c Remove extraneous update call in SimpliSafe (#23680) 2019-05-04 17:32:33 -06:00
Fabian Affolter
c309bd9ff0 Upgrade sqlalchemy to 1.3.3 (#23674) 2019-05-05 01:06:47 +02:00
Fabian Affolter
2f416b15c5 Upgrade tapsaff to 0.2.1 (#23676) 2019-05-05 00:07:55 +02:00
Fabian Affolter
85cd4ad022 Upgrade slacker to 0.13.0 (#23672) 2019-05-05 00:06:39 +02:00
Fabian Affolter
c8690865ec Upgrade shodan to 1.13.0 (#23675) 2019-05-05 00:05:01 +02:00
Fabian Affolter
8d8d2b6de9 Upgrade psutil to 5.6.2 (#23671) 2019-05-05 00:04:04 +02:00
SNoof85
97b5a38cb1 Bump pyteleloisirs version (#23661)
* Bump pyteleloisirs version

* requirements update
2019-05-04 12:53:06 +02:00
Geert van Horrik
8fc30569a9 Fix bad request for some IP ONVIF camera (#22972)
* Onvif camera improvements using zeep

* Fix static code checks

* Make obtain_input_uri async

* Convert several methods to async

* Fix static checks

* Fix static checks

* Fix requirements_all.txt

* Lint improvements

* Async services

* Use onvif-zeep-async and check if PTZ service is available before creating it

* Remove some hacks that are now defined in onvif-zeep-async

* Don't log input, it might contain sensitive information

* Static code analysis fixes

* Run requirements stuff

* Fix

* Remove suds requirement

* Onvif camera improvements using zeep

* Fix static code checks

* Make obtain_input_uri async

* Convert several methods to async

* Fix static checks

* Fix static checks

* Fix requirements_all.txt

* Lint improvements

* Async services

* Use onvif-zeep-async and check if PTZ service is available before creating it

* Remove some hacks that are now defined in onvif-zeep-async

* Don't log input, it might contain sensitive information

* Static code analysis fixes

* Run requirements stuff

* Fix

* Remove suds requirement

* Use dt_util.utcnow

* Platform setup should not have a return value

* Remove explicit dependency to zeep[async]

* Bump onvif-zeep-async to 0.1.2

* Update requirements_all.txt

* Add exception handling

* Fix static checks

* Don't catch generic exceptions

* Update camera.py
2019-05-03 10:01:12 -07:00
ThaStealth
0702407fac Added option to select photoblack cartridge (#23433)
* Added option to select photoblack cartridge

* Update sensor.py

* Name change
2019-05-03 18:57:41 +02:00
Robert Svensson
6e34015420 deCONZ - Retry on BridgeBusy errors (#23436) 2019-05-03 17:55:42 +02:00
Philippe Delodder
df9a9a1fec Add "soc-thermal 1" as CPU Temp label to Glances (#23635) 2019-05-03 15:43:51 +02:00
Daniel Høyer Iversen
9761c504eb update switchbot library (#23643) 2019-05-03 08:46:19 -04:00
Andrew Sayre
b30afde8ab Extend play_media support (#23580) 2019-05-02 19:54:36 -05:00
David Bonnes
6130831a43 Refactor evohome to prepare for water_heater (#23489)
* refactor - add const.py, change order of propertys, methods

* import client at top of file

* remove debug line

* de-lint

* delint

* add me as CODEOWNER

* remove lint hint

* delint
2019-05-03 01:43:19 +02:00
Penny Wood
3338f5c9b4 Further patch to fix of #22890 (#23627) 2019-05-02 14:05:16 -07:00
Paulus Schoutsen
592e99947d Convert frontend to do client-side modern JS detection (#23618)
* Convert frontend to do client-side async pick

* Further cleanup

* Updated frontend to 20190502.0

* Fix template caching

* Remove es5 test

* Lint

* Update description
2019-05-02 13:59:24 -07:00
Max
7331eb1f71 Allow removing Telegram reply keyboard (#23467)
*  Allow removing telegram reply keyboard by setting `keyboard` to an empty list

* Telegram keyboard: [] clearing in services.yaml
2019-05-02 15:14:40 -04:00
Ville Skyttä
f434e24252 Upgrade mypy (#23586)
* Upgrade mypy to 0.701

* Enable strict equality checks

* Strict equality error fixes

* StateMachine.is_state docstring fix
2019-05-02 21:18:20 +03:00
Ville Skyttä
b79d71065c Upgrade pytest to 4.4.1 (#23584) 2019-05-02 21:17:36 +03:00
Ville Skyttä
0a75a2c080 Clean up redundant same-package ..package imports (#23587) 2019-05-02 20:11:37 +03:00
Pascal Vizeli
41357965de Update azure-pipelines.yml for Azure Pipelines 2019-05-02 19:00:39 +02:00
Jc2k
1e6babe796 Loosen discovery config validation to avoid breaking changes (#23625)
* Allow optional service handlers to be promoted to config flow without a breaking change

* Updated wording

* Remove period
2019-05-02 16:57:42 +02:00
Daniel Høyer Iversen
04b680d9d0 Updgrade Tibber library (#23630)
* update tibber library

* update tibber library
2019-05-02 16:03:51 +02:00
Fabian Affolter
5267635d2c Polling is default (#23622) 2019-05-02 16:00:32 +02:00
Fabian Affolter
a6b898d702 Order imports (#23623) 2019-05-02 08:36:41 -04:00
Fabian Affolter
5c413eb497 Update docstrings (#23624) 2019-05-02 08:35:22 -04:00
Magnus Brange
21575938ef Prevent turning on tellduslive lights with 0 brightness (#23135)
* Prevent turning on tellduslive lights with 0 brightness

It was possible for the light compontent to get in a state where the last_brightness was set to zero, and when turning on (by calling turn_on) it would call the TellStick with 0 dim level, ergo not turning on the light.

With this, it will fall back on a 75% dim level if the level is set to zero.

* Wrap long log line over two lines

And using a more proper way of formatting the message

* Fallback to 100% instead of 75%
2019-05-02 12:53:32 +02:00
Pascal Vizeli
a7ef1eabb0 Update azure-pipelines.yml for Azure Pipelines 2019-05-02 10:29:16 +02:00
Pascal Vizeli
6124a6f7e5 Update azure-pipelines.yml for Azure Pipelines 2019-05-02 10:04:44 +02:00
Pascal Vizeli
d4ae73ce38 Merge pull request #23620 from home-assistant/rc
0.92.2
2019-05-02 09:49:23 +02:00
Brett T. Warden
2fbf29cda6 Update pyvesync_v2 version to 0.9.7 (#23603) 2019-05-02 09:48:22 +02:00
Erik Montnemery
3c5abcc71a Improve sun automation tests (#23588)
* Improve sun automation tests

* Lint

* Restore timezone after test
2019-05-02 09:46:32 +02:00
Martin Hjelmare
447440adc3 Clean caldav calendar tests (#23609) 2019-05-02 09:46:12 +02:00
Aaron Bach
daa1d103d4 Add support for flow sensor metrics in RainMachine (#23221)
* Initial commit

* In the clear
2019-05-02 09:45:51 +02:00
Paulus Schoutsen
58cde6b497 Bumped version to 0.92.2 2019-05-01 22:43:25 -07:00
Andrew Sayre
741d0fd09b Bump pyheos (#23616) 2019-05-01 22:43:17 -07:00
Robbie Trencheny
bc9548fdaf Fix unexpected error thrown if instance_domain is not set (#23615) 2019-05-01 22:43:17 -07:00
ehendrix23
35e9505ad5 Fix authentication issue (#23600)
Update to pymy1 version 1.2.1 to fix authentication issue
2019-05-01 22:43:16 -07:00
Klaas Schoute
38aa7d2c95 Fix problem with using Traccar event (#23543) 2019-05-01 22:43:15 -07:00
Pascal Vizeli
55a7ea6cc5 Fix media_player alexa power control bug (#23537) 2019-05-01 22:43:14 -07:00
Paulus Schoutsen
04bca7be6b Only include agent user ID in SYNC responses (#23497) 2019-05-01 22:43:14 -07:00
Paulus Schoutsen
8180797d2f Fix Hue sensors returning None value (#23478) 2019-05-01 22:43:13 -07:00
Erik Montnemery
0fe573ecc0 Fix cleanup of dynamic group (#23475) 2019-05-01 22:43:12 -07:00
Erik Montnemery
185595c113 Bump pychromecast (#23463) 2019-05-01 22:43:12 -07:00
cgtobi
ffdf48b15a Fix netatmo_public sensor to use netatmo authentication (#23455) 2019-05-01 22:43:11 -07:00
David Bonnes
fa4264be3f update geniushub client library to fix issue #23444 (#23450) 2019-05-01 22:43:10 -07:00
Steven Looman
c7a34d0222 Don't create connections between sensors. Fixes #22787 (#23202) 2019-05-01 22:43:09 -07:00
Robbie Trencheny
e054d68565 Further improve IndieAuth redirect_uri lookup failure logs (#23183) 2019-05-01 22:43:08 -07:00
Andrew Sayre
f3925b7ede Bump pyheos (#23616) 2019-05-01 22:39:59 -07:00
Robbie Trencheny
d1e44e35df Fix unexpected error thrown if instance_domain is not set (#23615) 2019-05-01 22:35:12 -07:00
Jc2k
0fe21f2015 Support STATE_AUTO in homekit_controller climate (#23583) 2019-05-01 22:44:54 -05:00
Aaron Bach
75abfd49ef Fixed unhandled exception in OpenUV data update (#23611) 2019-05-01 21:15:10 -06:00
4lloyd
f0c582ebbd Added message to data_template at notify REST (#23108)
* Added message to data_template at notify rest

* Added missing newlines
2019-05-01 17:04:05 -06:00
Jc2k
7ff77936ad Add and improve Homekit controller pairing messages and errors (#23532)
* Be clear about pairing code format

* Handle more homekit errors while pairing

* Update en translation

* Fix log message feedback
2019-05-01 17:02:29 -06:00
teliov
44d0d0624b updated manifest.json with correct version of hangup (#23596) 2019-05-01 17:02:03 -06:00
Paul Madden
a8c7804db2 Update bomradarloop to v0.1.3 (#23599) 2019-05-01 17:00:40 -06:00
Cyro
beb678e259 Move I/O to executor thread pool (#23589)
* Move I/O to executor thread pool

* Check if image is in whitelist_external_dir

* Move import to top of file

* Fix bad indentation
2019-05-01 17:00:17 -06:00
ehendrix23
d9d5c91adc Fix authentication issue (#23600)
Update to pymy1 version 1.2.1 to fix authentication issue
2019-05-01 16:05:35 -06:00
Daniel Høyer Iversen
19aee50bbc Ambiclimate (#22827)
* Ambiclimate

* Ambiclimate

* style

* Add config flow to ambicliamte

* Add config flow to ambicliamte

* update requirements_all.txt

* ambiclimate

* tests

* typo

* ambiclimate

* coverage

* add manifest.json

* services

* codeowner

* req

* ambicliamte

* style

* ambicliamte

* add to requirements all tests

* add to requirements all tests

* .coveragerc

* Add tests

* add doc

* style

* fix test

* update tests

* update tests

* update tests

* update tests

* update tests

* tests

* tests

* fix comment
2019-05-01 22:05:40 +02:00
Pascal Vizeli
bb6300efe3 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 21:49:08 +02:00
Markus Jankowski
dd53434742 Redesign AlarmControlPanel for Homematic IP (#23565)
* redesign AlarmControlPanel

* Fix lint

* Fixes after review
2019-05-01 21:35:57 +02:00
cdce8p
db2904624a Fix low_battery_threshold issue HomeKit (#23593) 2019-05-01 16:48:56 +02:00
Pascal Vizeli
d3cbd5b5e4 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 16:46:15 +02:00
Ville Skyttä
f9205d0ccc Simplify Travis cache config (#23592) 2019-05-01 16:08:57 +02:00
Pascal Vizeli
127cc5f942 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 14:49:12 +02:00
Pascal Vizeli
ab60235811 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 14:47:38 +02:00
Pascal Vizeli
7faa061b29 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 14:42:52 +02:00
Pascal Vizeli
c7d49a0c6a Update azure-pipelines.yml for Azure Pipelines 2019-05-01 14:38:51 +02:00
Pascal Vizeli
ac731a817a Update azure-pipelines.yml for Azure Pipelines 2019-05-01 14:28:35 +02:00
Pascal Vizeli
f0a34ddf46 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 14:23:54 +02:00
Pascal Vizeli
918ce74b26 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 14:14:26 +02:00
Pascal Vizeli
e8f496c016 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 14:09:34 +02:00
Pascal Vizeli
9b57075c3b Update azure-pipelines.yml for Azure Pipelines 2019-05-01 13:58:43 +02:00
William Scanlon
09cd302b46 Bumpped the pyeconet version (#23578) 2019-05-01 12:28:37 +02:00
Pascal Vizeli
bf25b74bf1 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 11:04:11 +02:00
Pascal Vizeli
3269da16f6 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 11:01:51 +02:00
Pascal Vizeli
0a428868fe Update azure-pipelines.yml for Azure Pipelines 2019-05-01 10:14:51 +02:00
Pascal Vizeli
8cfc316e06 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 10:06:08 +02:00
Pascal Vizeli
31e3c563b5 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 09:57:21 +02:00
Pascal Vizeli
f28ca34307 Update azure-pipelines.yml for Azure Pipelines 2019-05-01 09:56:09 +02:00
Pascal Vizeli
09296b4fd4 Set up CI with Azure Pipelines
[skip ci]
2019-05-01 09:54:48 +02:00
Fabian Affolter
0b9302ac3d Upgrade youtube_dl to 2019.04.30 (#23579) 2019-05-01 08:31:24 +02:00
Penny Wood
5b9d01139d render_with_collect method for template (#23283)
* Make entity_filter be a modifiable builder

* Add render_with_collect method

* Use sync render_with_collect and non-class based test case

* Refactor: Template renders to RenderInfo

* Freeze with exception too

* Finish merging test changes

* Removed unused sync interface

* Final bits of the diff
2019-05-01 10:54:25 +08:00
etheralm
581b16e9fa Fix failing state update tests (#23575) 2019-04-30 16:47:40 -07:00
Jc2k
1c4367e5a9 Fix min/max temp and humidity for homekit_controller climate (#23421)
* Fix min/max temp and humidity for homekit_controller climate.

* Fix typo
2019-05-01 00:08:30 +02:00
Penny Wood
b0843f4a38 Ptvsd debugger component. (#23336)
* ptvsd debugger component.

* Add test case

* ptvsd as test dependency

* Fix for 3.5

* Fixed bootstrap test

* Use dict direct lookup.

* Don't need to load dependencies.

* Get the test working.

* 3.5 fix

* Set mock return value

* Put tests back, but skip them

* Change log level
2019-05-01 00:07:34 +02:00
Jonas Pedersen
24060e0fb5 Add bypass and automatic bypass switch for Danfor Air. (#23572)
Add bypass and automatic bypass switch for Danfoss Air
2019-04-30 23:07:49 +02:00
Martin Hjelmare
5ded0dd3fa Update mysensors sensor icons (#23491)
* Add some icons.
* Sort sensor types according to mysensors serial api numbering.
2019-04-30 23:06:44 +02:00
Mike Miller
09012e7baa Always pad mac addresses from nmap tracker with leading zeros (#23492) 2019-04-30 22:43:21 +02:00
Cyro
75a2c057f2 Upgrade discord.py to v1.0.1 (#23523) 2019-04-30 22:12:39 +02:00
Sylvia van Os
603e2cd961 Essent sensor (#23513)
* Initial commit for Essent

* Cleanup Essent component

* Update CODEOWNERS

* Move stuff to PyEssent

* Update requirements_all

* Fix PyEssent

* Move meter list to PyEssent library

* Update requirements_all

* Only check for updates once an hour

* Use PyEssent 0.10

* Fixing up Essent component

* Fix crash

* Don't add unused meter/tariff combos

* Fix lint

* Get tariffs per meter

* Don't hammer Essent API

* Fix linting errors

* Fix old description

* Fix old call

* Cleanup Essent component
2019-04-30 21:02:16 +02:00
Andrew Sayre
cfaaae661a Add core APIs to migrate device identifiers and entity unique_id (#23481)
* Add device identifiers migration

* Add entity unique_id migration

* Update per arch issue

* Move to existing update methods
2019-04-30 10:04:37 -07:00
David F. Mulcahey
41f0066e76 bump zha-quirks version (#23568) 2019-04-30 12:57:06 -04:00
Erik Montnemery
407e0c58f9 Migrate tests to pytest (#23544)
* Migrate tests to pytest

* Fixup

* Use loop fixture in test_check_config

* Lint
2019-04-30 09:20:38 -07:00
David F. Mulcahey
d71424f285 Clean up ZHA discovery logic (#23563)
* use domain constants from HA

* cleanup endpoint processing in discovery

* Whitespace.
2019-04-30 10:40:52 -04:00
Anders Melchiorsen
6a6a999833 Upgrade pysonos to 0.0.12 (#23560) 2019-04-30 08:45:56 -04:00
Jc2k
7612703092 Bump homekit_python to 0.14.0 (#23562) 2019-04-30 08:44:48 -04:00
Klaas Schoute
5d5f073cff Fix problem with using Traccar event (#23543) 2019-04-30 08:02:45 +02:00
etheralm
1d70005b01 Add sensor support for dyson 2018 models (#22578)
fix check for already created entities

remove hepa and carbon filter

add AQI attribute

initial commit

fix check for already created entities

remove hepa and carbon filter

add AQI attribute

add air quality component tests

fix method call tests

fix line lengths

fix pylint issues

fix docstrings

revert fan related changes

remove whitespace change

fix fan update state test

add for loop for platform initialization

add requested changes to aiq platform

change string concatenation to new style string formatting

update air quality tests

update air quality tests

refactor sensor component changes

fix pylint issues

fix debug string in the air quality component

replace failing tests for older devices

fix line length fan tests

remove dependencies const and move imports

move back imports to methods

remove whitespace from blank line
2019-04-30 02:24:05 +02:00
Austin Drummond
b4e2a0ef84 Add HomeKit low battery threshold config (#23363) 2019-04-30 02:02:53 +02:00
David F. Mulcahey
2aee31ec6a Don't use zigpy profiles for ZHA entities (#22844)
* don't use zigpy profiles
* use sets as they're the correct structure to use
2019-04-29 19:31:27 -04:00
Erik Montnemery
8d775caaac Always print invalid configuration data (#21972)
* Always print invalide configuration data

* Print offending data as yaml

* Revert "Print offending data as yaml"

This reverts commit 01721a21a9ff918ed2c8595151ebfe55eb2f7d36.

* Do not print sensitive data

* Print MQTT topic

* Add line break

* Review comments

* review comments
2019-04-29 13:45:53 -07:00
Pascal Vizeli
4c4f0e38d4 Fix media_player alexa power control bug (#23537) 2019-04-29 22:40:55 +02:00
Paulus Schoutsen
5e3e730496 Install requirements when checking config (#23500)
* Install requirements when checking config

* PyLint
2019-04-29 09:54:42 -07:00
Erik Montnemery
84f778d23c Improve logging of exceptions in async_create_task (#22689)
* Improve logging of exceptions in async_create_task

* Move wrapping+logging to util.logging

* Minor refactor, fix typing

* Add test

* Remove useless @wraps, fix confusing parameter name

* Review comment
2019-04-29 09:53:22 -07:00
David F. Mulcahey
75f53b2799 Allow direct binding via ZHA for the ZLL profile (#23536)
* allow binding for zll profile
* update check - review comment
2019-04-29 11:35:18 -04:00
Aaron Bach
e08f2ad18d Add current disease data to IQVIA (#23052)
* Add current and historical disease data to IQVIA

* Added fetcher

* Added disease sensor mapping

* Changed incorrect key

* Removed other extraneous const usage
2019-04-29 09:06:23 -06:00
David F. Mulcahey
5aa9a1a7c2 limit concurrent updates to avoid network flood (#23534) 2019-04-29 09:39:37 -04:00
Penny Wood
5e045f3df2 Allow device_class for template covers
* #23486. Allows device_class to be set for template covers
2019-04-29 20:38:59 +08:00
Anders Melchiorsen
471a26bde1 Do not log tracebacks for influxdb write errors (#23522)
* Do not log influxdb write exceptions

* Log exception name
2019-04-29 06:39:45 -05:00
Anders Melchiorsen
2245ee98e3 Ignore stale directories (#23464)
* Ignore stale directories

* Remove redundant tests

* Revert "Remove redundant tests"

* Print warning when skipping directories

* Suggest to remove stale directory
2019-04-29 10:53:27 +02:00
Anders Melchiorsen
0ecf152153 Continuous discovery of Sonos speakers (#23484) 2019-04-29 10:20:09 +02:00
mcc05
5529bcc114 Fixed AlexaPowerController to report power state for thermostats (#23468)
Fixed AlexaPowerController to report power state for thermostats, to look if state is OFF return OFF, otherwise report ON as thermostats have multiple values for ON
2019-04-28 21:29:12 -04:00
Joakim Plate
b4a7980084 Update Philips js to v0.0.8 (#23462)
* Don't send volume on volume set

This needs updated lib

* Bump version and avoid getting channels explicitly

* Add myself as codeowner

* Use version 0.0.8 instead which doesn't reuse session

Some TV's doesn't play nice with HTTP/1.1 connection
re-use.

* Add new requirement to requirements_all.txt
2019-04-28 21:27:35 -04:00
Paulus Schoutsen
0f49a9cb7b Return state when changing optimistic covers (#23498) 2019-04-28 12:09:20 -07:00
Erik Montnemery
2f45a7e3b9 Fix cleanup of dynamic group (#23475) 2019-04-28 12:09:06 -07:00
Wojciech Mamak
b60c7ce479 Fixed bug with max_result (#23507)
The config option 'max_result' was assigned to not existing 'max_result' variable, it should be assigned to 'maxResult'.
The current version causes an error when max_result option is used.
2019-04-28 21:01:33 +02:00
Anders Melchiorsen
41d9bd42af Catch RequestException in influxdb writer (#23508) 2019-04-28 20:57:58 +02:00
Alok Saboo
2fecc7d5a4 Update aiolifx_effects to 0.2.2 (#23473) 2019-04-28 20:46:49 +02:00
Robin
687bbce900 Fixes local_file camera service (#23479)
* Fixes service

Fixes service so only the target camera is updated

* Update test_camera.py

* fix lint
2019-04-28 19:32:02 +01:00
chmielowiec
54c34bb224 Display person component as occupancy sensor HomeKit (#23451) 2019-04-28 18:38:21 +02:00
Anders Melchiorsen
37badbbf09 Skip flaky stream tests (#23493)
* Skip flaky test_hls tests

* Skip flaky test_recorder tests
2019-04-28 13:58:19 +02:00
Paulus Schoutsen
b09f5b6743 Only include agent user ID in SYNC responses (#23497) 2019-04-28 09:42:05 +02:00
Paulus Schoutsen
2dbe6d3289 Updated frontend to 20190427.0 2019-04-27 22:18:18 -07:00
Paulus Schoutsen
300d1f44a6 Updated frontend to 20190427.0 2019-04-27 22:18:05 -07:00
David Bonnes
7458f1f6ef Add a warning that honeywell/EU is to be deprecated (#23469)
* Add a warning that honeywell/EU is to be deprecated

* improve warning
2019-04-27 22:27:41 +02:00
Paulus Schoutsen
26bf1b2173 Fix Hue sensors returning None value (#23478) 2019-04-27 13:27:17 -07:00
Andrew Sayre
f1b2622d78 Use remote image for HEOS (#23420) 2019-04-27 13:02:42 -07:00
Anders Melchiorsen
5efe089699 Improve handling of unavailable Sonos speakers (#23472) 2019-04-27 19:05:50 +02:00
Erik Montnemery
b6a13262da Bump pychromecast (#23463) 2019-04-27 09:17:50 -07:00
Anders Melchiorsen
148860587c No longer promote imports inside methods (#23471) 2019-04-27 09:16:44 -07:00
anrudolph
6be798bffc Added option to use self-signed certificates (#23139)
* Added option to use self-signed certificates

I defined a new option for configuration.yaml, 'verify_ssl', which is set to 'True' by default for obvious security reasons. However, in order to work with self-signed certificates, it is now possible to disable the certificate validation.(eg, I use a nextcloud instance with self-signed certificates)
Credit for code in line 57 goes to user 'gen2' on the homeassistant community, who suggested this solution. 
https://community.home-assistant.io/t/caldav-configuration/38198/25
I only took it a step further and made it a config option.

* Update calendar.py

* Added the import of CONF_VERIFY_SSL

I hope this passes the test now...

* Update homeassistant/components/caldav/calendar.py

Cool! Didn't know about that possibility, my coding experience is literally two weeks. Thanks for sharing!

Co-Authored-By: anrudolph <49680492+anrudolph@users.noreply.github.com>

* Removed some lines of code

I think, in order for the last commit to work, these lines have to be removed. Correct?

* Trying to get this passing the checks

Trying around to get the simplified code to work
2019-04-27 10:40:20 -05:00
Phil Bruckner
1dbfa8f3be Bump amcrest to 1.4.0 and use new storage_all method (#23446)
Improve sdcard sensor so it only sends one command to camera per update as opposed to the four it used to send to reduce network traffic and make data consistent. Also better handle returned values of 'unknown'.
2019-04-27 10:24:07 -05:00
cgtobi
96fb311f6b Fix netatmo_public sensor to use netatmo authentication (#23455) 2019-04-27 10:18:55 -05:00
Aaron Bach
bdc95e76d0 Fix broken forecast trend attribute in IQVIA (#23454) 2019-04-27 10:17:57 -05:00
Anders Melchiorsen
c174b83f54 Return of travis (#23409)
* Return .travis.yml

This reverts commit a5b03541e9.

* Remove coveralls

* Remove deploy

* Support only the extreme Python versions

* Ignore bleeding edge

* Remove docker service
2019-04-27 12:30:24 +02:00
Aaron Bach
bf050adcf3 Remove historical allergen and asthma sensors from IQVIA (#23258)
* Remove historical sensors from IQVIA

* Removed old imports

* Removed "Yesterday" sensors
2019-04-26 23:28:55 -06:00
Ian
c2e7445271 Add new nextbus sensor (#20197)
* Added new nextbus sensor

* Fix order in requirements_all after merge

* Add more flexible parsing of JSON lists

* Undo tox change
2019-04-26 19:51:58 -05:00
David Bonnes
f25183ba30 update geniushub client library to fix issue #23444 (#23450) 2019-04-26 18:18:30 -04:00
Pascal Vizeli
ee107755f8 Merge pull request #23448 from home-assistant/rc
0.92.1
2019-04-26 22:41:20 +02:00
Pascal Vizeli
081a0290ba Bump version 0.91.1 2019-04-26 20:00:33 +00:00
Fredrik Erlandsson
95ed8fb245 Fix point setup (#23441)
Fix point setup
2019-04-26 19:58:46 +00:00
Fredrik Erlandsson
0d4858e296 Fix daikin setup (#23440)
Fix daikin setup
2019-04-26 19:58:46 +00:00
Toon Willems
f6a6be9a22 Fix Flux component (#23431)
* Fix Flux component

* Update manifest.json

* Update manifest.json
2019-04-26 19:58:45 +00:00
cgtobi
065b077369 Refactor netatmo to use hass.data (#23429)
* Refactor NETATMO_AUTH to use hass.data

* Minor cleanup

* Rename conf to auth and other suggestions by Martin

* Revert webhook name change

* Rename constant

* Move auth

* Don't use hass.data.get()

* Fix auth string
2019-04-26 19:58:44 +00:00
Andrew Sayre
1ec08ce243 Fix supported features gates in media_player volume up/down services (#23419)
* Correct media player feature gates

* Fix failing test

* Lint...
2019-04-26 19:58:44 +00:00
Andrew Sayre
46c955a501 Add missing feature support flag (#23417) 2019-04-26 19:58:43 +00:00
Paulus Schoutsen
c1429f5d80 Make setup more robust (#23414)
* Make setup more robust

* Fix typing
2019-04-26 19:58:42 +00:00
Joakim Plate
ed16681b8e Broadlink fixup unintended breakage from service refactor (#23408)
* Allow host/ipv6 address for broadlink service

This matches switch config and is a regression fix

* Restore padding of packets for broadlink

* Drop unused import

* Fix comment on test
2019-04-26 19:58:42 +00:00
Jason Hu
1ab03d9e15 Add error handling for migration failure (#23383) 2019-04-26 19:55:26 +00:00
Chuang Zheng
ffcaeb4ef1 async_setup_component stage_1_domains (#23375) 2019-04-26 19:55:25 +00:00
Andrew Sayre
dd1e352d1d Bump pyheos to 0.4.1 (#23360)
* Bump pyheos==0.4.1

* Refresh player after reconnection
2019-04-26 19:55:24 +00:00
Greg Laabs
3bfb5b119a Bump ecovacs lib 2 (#23354)
* Bump Ecovacs dependency (sucks)

Update to new version of sucks, which switches to a custom-built SleekXMPP that turns off certificate validation. This is to fix issues caused by Ecovacs serving invalid certificates.

* Update requirements file
2019-04-26 19:55:24 +00:00
dreed47
a269603e3b fix for issue #21381 (#23306) 2019-04-26 19:55:23 +00:00
Paulus Schoutsen
d6f6273ac2 Make setup more robust (#23414)
* Make setup more robust

* Fix typing
2019-04-26 21:41:29 +02:00
Fredrik Erlandsson
61ea6256c6 Fix point setup (#23441)
Fix point setup
2019-04-26 20:56:55 +02:00
Fredrik Erlandsson
08c36e0089 Fix daikin setup (#23440)
Fix daikin setup
2019-04-26 20:24:01 +02:00
Aaron Bach
8fe95f4bab Additional cleanup of IQVIA integration (#23403)
* Additional cleanup of IQVIA integration

* Task

* Moved import

* Fixed exception

* Member comments (round 1)

* Member comments (round 2)

* Member comments
2019-04-26 11:06:46 -06:00
Toon Willems
606dbb85d2 Fix Flux component (#23431)
* Fix Flux component

* Update manifest.json

* Update manifest.json
2019-04-26 08:55:30 -07:00
cgtobi
b84ba93c42 Refactor netatmo to use hass.data (#23429)
* Refactor NETATMO_AUTH to use hass.data

* Minor cleanup

* Rename conf to auth and other suggestions by Martin

* Revert webhook name change

* Rename constant

* Move auth

* Don't use hass.data.get()

* Fix auth string
2019-04-26 17:15:37 +02:00
Anders Melchiorsen
5dbf58d67f Remove support for deprecated Sonos configuration (#23385) 2019-04-26 08:56:43 +02:00
Andrew Sayre
d038d2426b Add missing feature support flag (#23417) 2019-04-26 08:47:40 +02:00
Andrew Sayre
b5725f8f19 Fix supported features gates in media_player volume up/down services (#23419)
* Correct media player feature gates

* Fix failing test

* Lint...
2019-04-25 21:42:39 -07:00
Tom Schneider
eefb9406c2 restore battery_quantity for zha devices (#23320) 2019-04-25 22:44:38 -05:00
Robert Svensson
c229a314c6 Bump requirement to v55 (#23410) 2019-04-25 22:42:07 -05:00
Joakim Plate
7d5c1ede72 Broadlink fixup unintended breakage from service refactor (#23408)
* Allow host/ipv6 address for broadlink service

This matches switch config and is a regression fix

* Restore padding of packets for broadlink

* Drop unused import

* Fix comment on test
2019-04-25 21:33:05 -05:00
Evan Bruhn
7a6acca6bb Add device info for Logi Circle camera and sensor entities (#23373) 2019-04-25 15:21:04 -07:00
Markus Jankowski
9d67c9feb6 Add Types to Homematic IP (#23401) 2019-04-25 15:13:07 -07:00
Markus Jankowski
cef7ce11ad check if sabotage attr is in device (#23397) 2019-04-25 15:12:36 -07:00
panosmz
e182b95921 add key parameter (#23381) 2019-04-25 23:35:30 +02:00
cgtobi
d2e0c6dbc2 Bump youtube-dl version to 2019.04.24 (#23398) 2019-04-25 23:21:23 +02:00
Joakim Plate
39932d132d Add device classes for media player and map to google types (#23236)
* Add device classes for media player and map to google types

* Switch default class for media_player to media
2019-04-25 13:12:11 -07:00
Jason Hu
7e8f2d72b6 Add error handling for migration failure (#23383) 2019-04-25 12:58:10 -07:00
Daniel Høyer Iversen
4816a24b3c Update xiaomi library (#23391) 2019-04-25 14:25:32 -04:00
Chuang Zheng
3d91d76d3d async_setup_component stage_1_domains (#23375) 2019-04-25 05:50:28 -07:00
Erik Montnemery
5376e15286 Convert some test helpers to coroutines and adjust tests (#23352)
* Convert some test helpers to coroutines

* Fix tests
2019-04-25 10:14:16 +02:00
Phil Bruckner
86b017e2f0 Add amcrest camera services and deprecate switches (#22949)
* Add amcrest camera services and deprecate switches

- Implement enabling and disabling motion detection from camera platform.
- Add amcrest specific camera services for controlling audio stream, motion recording, continuous recording and camera color mode, as well as moving camera to PTZ preset and starting and stopping PTZ tour function.
- Add camera attributes to indicate the state of the various camera settings controlled by the new services.
- Deprecate switches in favor of camera services and attributes.

* Rename services and move service handling to __init__.py

Rename services from 'camera.amcrest_xxx' to 'amcrest.xxx'. This allows services to be documented in services.yaml.

Add services.yaml.

Reorganize hass.data[DATA_AMCREST] and do some general cleanup to make various platform modules more consistent.

Move service handling code to __init__.py from camera.py.

* Update per review comments, part 1

- Rebase
- Add permission checking to services
- Change cv.ensure_list_csv to cv.ensure_list
- Add comment for "pointless-statement" in setup
- Change handler_services to handled_services
- Remove check if services have alreaday been registered
- Pass ffmpeg instead of hass to AmcrestCam __init__
- Remove writing motion_detection attr from device_state_attributes
- Change service methods from callbacks to coroutines

* Update per review comments, part 2

- Use dispatcher to signal camera entities to run services.
- Reorganize a bit, including moving a few things to new modules const.py & helpers.py.

* Update per review comments, part 3

Move call data extraction from camera.py to __init__.py.
2019-04-24 22:39:49 -07:00
Richard Mitchell
c216ac7260 Fix race condition. (#21244)
If the updater is running at the same time, this can result in this dict changing size during iteration, which Python does not like.
2019-04-24 22:38:10 -07:00
Paulus Schoutsen
de6fdb09f4 Add media player external url (#23337)
* Add media player external url

* Lint

* Simplify

* Update __init__.py

* Update __init__.py

* Use 302
2019-04-24 22:37:29 -07:00
Andrew Sayre
e3e7fb5ff6 Bump pyheos to 0.4.1 (#23360)
* Bump pyheos==0.4.1

* Refresh player after reconnection
2019-04-24 21:31:31 -07:00
Ian
6fb5b8467b Fix tox.ini lint target (#23359)
tox fails due to being unable to reference the `script` module when
trying to run `script/gen_requirements_all.py`. Instead it needs to be
run as a module.
2019-04-24 21:30:46 -07:00
Steven Looman
24766df179 Upgrade to pyubee==0.6 (#23355) 2019-04-24 21:13:31 -07:00
dreed47
ec9db7f9a2 fix for issue #21381 (#23306) 2019-04-24 21:11:07 -07:00
Aaron Bach
0d796a0fb9 Convert Pollen.com sensor into IQVIA component (#22986)
* Moved pollen integration to iqvia

* Stitched in new library

* Added __init__

* Completed component v1

* Updated requirements

* Updated CODEOWNERS

* Updated .coveragerc

* Removed requirements

* Static check
2019-04-24 21:09:01 -06:00
Beat
96735e41af Add support for a wider variety of EnOcean devices (#22052)
* Implement EnOcean temperature and humidity sensors.

* Bump EnOcean version to 0.50
* Refactor components for more generic device handling
* Move radio packet data interpretation to specific devices

* Update CODEOWNERS

* Implement code review changes
2019-04-25 00:30:46 +02:00
Greg Laabs
fef1dc8c54 Bump ecovacs lib 2 (#23354)
* Bump Ecovacs dependency (sucks)

Update to new version of sucks, which switches to a custom-built SleekXMPP that turns off certificate validation. This is to fix issues caused by Ecovacs serving invalid certificates.

* Update requirements file
2019-04-24 14:47:22 -07:00
Niels Mündler
ef5ca63bf0 Fix non-syncthru supporting printers (#21482)
* Fix non syncthru-syncthru supporting printers

* Formatting

* Update requirements_all

* Update syncthru.py

* Fix component to be async (as is the used SyncThru implementation)

* Add async syntax

* Omit loop passing

* Don't await async_add_platform

* Generate new all requirements

* Explain, why exception is caught in setuExplain, why exception is caught in setupp

* Handle failing initial setup correctly

* Formatting

* Formatting

* Fix requested changes

* Update requirements and add nielstron as codeowner

* Run codeowners script

* Make notification about missing syncthru support a warning

* Revert pure formatting

* Fix logging
2019-04-24 23:39:31 +02:00
Paulus Schoutsen
8ae2ce2299 Merge pull request #23353 from home-assistant/rc
0.92.0
2019-04-24 13:37:44 -07:00
Paulus Schoutsen
700b8b2d0c Fix config test when current version is 92 (#23356) 2019-04-24 13:37:19 -07:00
Paulus Schoutsen
d218ba98e7 Fix config test when current version is 92 (#23356) 2019-04-24 13:37:08 -07:00
Paulus Schoutsen
806aba4a1a Bumped version to 0.92.0 2019-04-24 11:25:57 -07:00
Jason Hu
1128cf576f Remove ghost folder (#23350) 2019-04-24 11:25:02 -07:00
Jason Hu
febdb72fb2 Support unicode in configuration migration (#23335) 2019-04-24 11:25:00 -07:00
Paulus Schoutsen
3c0146d382 Add sensor and binary senseor to default expose (#23332) 2019-04-24 11:24:59 -07:00
Paulus Schoutsen
9e76293141 Always set latest pin (#23328) 2019-04-24 11:24:58 -07:00
dreed47
6149c2877d Zestimate - Added check for the existence of data in response (#23310) 2019-04-24 11:24:58 -07:00
Joakim Plate
2efe607b78 Expose door cover/binary_sensor as door type (#23307)
* Expose door cover/binary_sensor as door type

More logical to ask "What doors are open" than "What sensors are open"

* Add test for binary_sensor device_classes

* Cosmetic flake8

* Add test for device class for cover
2019-04-24 11:24:57 -07:00
Paulus Schoutsen
9fc271d178 Updated frontend to 20190424.0 2019-04-24 11:16:30 -07:00
Paulus Schoutsen
d53a00d054 Updated frontend to 20190424.0 2019-04-24 11:15:56 -07:00
Joakim Plate
62fcb1895e Device type garage for binary sensor garage_door (#23345)
* Switch binary sensor to garage for garage_door

* Add test for cover garage device type
2019-04-24 09:56:22 -07:00
Jason Hu
843bad83fa Remove ghost folder (#23350) 2019-04-24 09:55:48 -07:00
Penny Wood
e850ccb82c Fixed test (#23343) 2019-04-24 09:55:37 -07:00
Pascal Vizeli
f4e7364651 Netatmo 5min fetch interval (#23341) 2019-04-24 09:54:51 -07:00
Fabian Affolter
82ff5cbe0f Upgrade ruamel.yaml to 0.15.94 (#23344) 2019-04-24 09:52:29 -07:00
Joakim Plate
e11e6e1b04 Volume trait for google assistant (#23237)
* Add action.devices.traits.Volume

* Drop media player from brightness trait

* Factor out commands into separate functions

* Drop support for explicit mute
2019-04-24 09:08:41 -07:00
Markus Jankowski
2863ac1068 Fix Homematic IP Cloud remaining light imports (#23339)
* Fix missing impor reorg

* Add brackets

* Removed trailing whitespaces
2019-04-24 13:27:45 +02:00
Fabian Affolter
3d04856cbd Upgrade youtube_dl to 2019.04.17 (#23342) 2019-04-24 11:56:43 +02:00
Joakim Plate
7c55b9f087 Expose door cover/binary_sensor as door type (#23307)
* Expose door cover/binary_sensor as door type

More logical to ask "What doors are open" than "What sensors are open"

* Add test for binary_sensor device_classes

* Cosmetic flake8

* Add test for device class for cover
2019-04-23 19:25:20 -07:00
Kyle Pinette
6681605c34 Added override for kwikset 888. (#23327) 2019-04-23 22:24:43 -04:00
Daniel Høyer Iversen
95bbea20a8 Fix Switchbot restore state (#23325)
* switchbot library

* req

* req

* issue #23039
2019-04-23 19:23:52 -07:00
Andre Lengwenus
662375bdd7 Changes due to manifest.json. Awaiting coroutines instead of creating tasks (#23321) 2019-04-23 19:20:20 -07:00
Paulus Schoutsen
aa26f90420 Add sensor and binary senseor to default expose (#23332) 2019-04-23 19:19:23 -07:00
Jason Hu
c61b6cf616 Support unicode in configuration migration (#23335) 2019-04-23 17:47:09 -07:00
Markus Jankowski
16d8e92b06 Reorg Homematic IP Cloud imports and minor fixes (#23330)
* reorg HmiP Imports after introduction of manifests

* add type to some functions

* fix usage of dimLevel (HomematicipDimmer,HomematicipNotificationLight)

* align naming to HomematicipMultiSwitch: channel_index -> channel for (HomematicipNotificationLight)

* fix lint

* Fix is_on for dimmers

* fix lint
2019-04-24 01:47:31 +02:00
ktnrg45
68d3e624e6 Fix ps4 not able to use different PSN accounts (#22799)
* Remove skipping of creds step.

* Check for device added per account

* typo

* lint

* Pylint

* Fix test

* Fix test

* Typo

* Add auto location

* blank space

* Add new identifier handling + fix select source

* Add cred_timeout error

* add credential timeout error

* Fix Tests

* patch decorator

* Update test_config_flow.py

* add test

* Revert

* Rename vars

* fix tests

* Add attr location

* Bump 0.6.0

* Bump 0.6.0

* Bump 0.6.0

* Update handling exception

* Update remove method

* Update tests

* Refactoring

* Pylint

* revert

* chmod

* 0.6.1

* 0.6.1

* 0.6.1

* Remove func

* Add migration

* Version 3

* Remove redefinition

* Add format unique id

* Add format unique id

* pylint

* pylint

* 0.7.1

* 0.7.1

* 0.7.1

* Changes with media_art call

* Add library exception

* 0.7.2

* 0.7.2

* 0.7.2

* Version and entry_version update

* Revert list comprehension

* Corrected exception handling

* Update media_player.py

* Update media_player.py

* white space
2019-04-24 01:32:36 +02:00
Paulus Schoutsen
d505f1c5f2 Always set latest pin (#23328) 2019-04-23 13:13:00 -07:00
dreed47
b252d8e2cd Zestimate - Added check for the existence of data in response (#23310) 2019-04-23 11:44:13 -07:00
Josef Schlehofer
c040f7abc0 Upgrade attrs to 19.1.0 (#23323) 2019-04-23 10:14:02 -07:00
Joakim Sørensen
2871a650f6 Handle traccar connection errors (#23289)
* Handle connection errors

* Fix lint issue E127

* Remove periods from logs

* Merge connection checks

* Fail with bad credentials

* Move stuff around for async_init

* Fix E128 linting issue

* Simplify
2019-04-23 08:46:11 -04:00
Paulus Schoutsen
5b0ee473b6 Add get_states faster (#23315) 2019-04-23 12:46:22 +02:00
Paulus Schoutsen
00d26b3049 Random hassfest fixes (#23314) 2019-04-23 08:34:36 +02:00
Paulus Schoutsen
06f76e8e97 Bumped version to 0.92.0b3 2019-04-22 22:09:33 -07:00
Paulus Schoutsen
d5bd8b9405 Dont cache integrations that are not found (#23316) 2019-04-22 22:09:13 -07:00
Pascal Vizeli
34c03109e5 Fix hass.io panel_custom/frontend (#23313)
* Fix hass.io panel_custom/frontend

* Update manifest.json
2019-04-22 22:09:12 -07:00
Richard Mitchell
df3ceb8d87 Correct calculation and units of light level values. (#23309) 2019-04-22 22:09:12 -07:00
VDRainer
f514d44224 Create services.yaml for input_datetime (#23303)
* Create services.yaml for input_datetime

* HA error while parsing a flow mapping
2019-04-22 22:09:11 -07:00
Austin Mroczek
7fb0055a92 Bump skybellpy to 0.4.0 (#23294)
* Bump skybellpy to 0.4.0

* Bump skybellpy to 0.4.0 in requirements_all.txt
2019-04-22 22:09:10 -07:00
Joakim Sørensen
f81eeded90 Show correct version for stable (#23291) 2019-04-22 22:09:10 -07:00
damarco
6df31da180 Bump zigpy and zigpy-xbee (#23275) 2019-04-22 22:09:09 -07:00
damarco
364f5c8c02 Bump zigpy-deconz (#23270) 2019-04-22 22:09:08 -07:00
Otto Winter
85ac85c959 Fix ESPHome setup errors in beta (#23242)
* Fix ESPHome setup errors in beta

* Update requirements_all.txt
2019-04-22 22:09:08 -07:00
Andrew Sayre
a2565ad3b4 Update pyheos and log service errors in HEOS integration (#23222)
* Update pyheos and command error handling

* Correct comment and remove unnecessary autospec
2019-04-22 22:09:07 -07:00
Joakim Sørensen
ddb5ff3b71 Show correct version for stable (#23291) 2019-04-22 22:07:56 -07:00
Paulus Schoutsen
72bbe2203e Dont cache integrations that are not found (#23316) 2019-04-22 22:06:58 -07:00
Pascal Vizeli
2a720efbd4 Fix hass.io panel_custom/frontend (#23313)
* Fix hass.io panel_custom/frontend

* Update manifest.json
2019-04-22 21:47:12 -07:00
Jc2k
baeb3cddc6 Set placeholders in homekit config flow title (#23311) 2019-04-22 21:32:39 -07:00
VDRainer
ee88433fb1 Create services.yaml for input_datetime (#23303)
* Create services.yaml for input_datetime

* HA error while parsing a flow mapping
2019-04-22 21:29:34 -07:00
Richard Mitchell
845d81bdae Correct calculation and units of light level values. (#23309) 2019-04-22 21:28:40 -07:00
Anders Melchiorsen
d0f9595ad9 Add connection control for netgear_lte (#22946) 2019-04-22 22:44:46 +02:00
Pawel
9007e17c3e MQTT Vacuum State Device (#23171)
* add StateVacuum MQTT
2019-04-22 21:49:15 +02:00
Joakim Plate
e85af58e43 RFC: Upgrade philips_js component version and support channels and sources (#23061)
* Drop unused constant

* Don't default to localhost

A philips tv will never run on localhost

* Use library internal state

* Add play media support for channels

* Control update manually

This allow us to delay update of state when we perform
and action.

* Bump version for support for api v1 again

* Consider missing source and only channels as channels

* Fix some flake8 tasks

* Fix some pylint errors

* Adjust requirements_all file

* Switch to async_add_executor_job

* Assume device turns of off a sucessfull standby call
2019-04-22 12:26:15 -07:00
Otto Winter
0c90bfb936 Fix ESPHome setup errors in beta (#23242)
* Fix ESPHome setup errors in beta

* Update requirements_all.txt
2019-04-22 12:13:21 -07:00
Andrew Sayre
8daba68dc1 Add support to play url (#23273) 2019-04-22 12:10:55 -07:00
Austin Mroczek
e3981b6498 Bump skybellpy to 0.4.0 (#23294)
* Bump skybellpy to 0.4.0

* Bump skybellpy to 0.4.0 in requirements_all.txt
2019-04-22 12:09:55 -07:00
Jc2k
6d31d56c03 Backport missing folder fix from #23191 (#23297) 2019-04-22 12:07:03 -07:00
Erik Montnemery
a89c7f8feb Improve MQTT tests (#23296)
* Improve MQTT tests

* Tweak
2019-04-22 08:48:50 -04:00
Markus Jankowski
357631d659 Add homematicip cloud temperature sensor from thermostats (#23263) 2019-04-22 09:30:49 +02:00
Josef Schlehofer
3b0660ae89 Upgrade pyotp to 2.2.7 (#23274) 2019-04-21 09:03:17 +02:00
Josef Schlehofer
a8632480ff Upgrade xmltodict to 0.12.0 (#23277) 2019-04-21 13:52:20 +09:00
Aaron Bach
80653824d9 Add ctags file to .gitignore (#23279) 2019-04-20 21:15:19 -06:00
damarco
b3c7142030 Bump zigpy and zigpy-xbee (#23275) 2019-04-20 18:04:30 -04:00
damarco
df32830f17 Bump zigpy-deconz (#23270) 2019-04-20 10:12:28 -04:00
Andrew Sayre
b697bb7a26 Update pyheos and log service errors in HEOS integration (#23222)
* Update pyheos and command error handling

* Correct comment and remove unnecessary autospec
2019-04-19 22:22:40 -04:00
Paulus Schoutsen
ef28e2cc2a Bumped version to 0.92.0b2 2019-04-19 17:05:56 -07:00
Andrew Sayre
ff047e1cd1 Return 0 instead of None (#23261) 2019-04-19 17:05:46 -07:00
Paulus Schoutsen
8741a20191 Async fix for bluetooth stopping (#23225) 2019-04-19 17:05:45 -07:00
Paulus Schoutsen
d0c6f0b710 Ask users for a pin when interacting with locks/garage doors (#23223)
* Ask users for a pin when interacting with locks/garage doors

* Deprecate allow_unlock option
2019-04-19 17:05:44 -07:00
cgtobi
15c1213928 Add missing services.yaml file for hue (#23217)
* Add hue services.yaml

* Add lifx services.yaml

* Add lutron services.yaml

* Update lifx services.yaml

* Update hue services.yaml

* Revert lifx services.yaml as it is not necessary

* Remove hue from lights/services.yaml
2019-04-19 17:05:44 -07:00
David F. Mulcahey
f618e7253a fix bindable devices (#23216) 2019-04-19 17:05:43 -07:00
David F. Mulcahey
5df57bbda5 update zha-quirks (#23215) 2019-04-19 17:05:43 -07:00
Paulus Schoutsen
4433ad0a06 Add stub services.yaml and make validation mandatory (#23213) 2019-04-19 17:05:42 -07:00
Alok Saboo
f18a49ce97 create services.yaml for shell_command (#23210) 2019-04-19 17:05:41 -07:00
Alok Saboo
23cb053e82 Create services.yaml for Tuya (#23209) 2019-04-19 17:05:41 -07:00
Richard Mitchell
52eb9e50aa Name sensors correctly (#23208)
* Hue motion senors are motion sensors, not presence sensors.

* Name the sensors 'motion' instead of 'presence' - match the HA paradigm.
2019-04-19 17:05:40 -07:00
Erik Montnemery
35da3f053c Fix clearing error message for MQTT vacuum (#23206)
* Fix clearing error message

* Remove redundant hass.async_block_till_done
2019-04-19 17:05:39 -07:00
Paulus Schoutsen
1a4a9532dd Add services.yaml validator (#23205)
* Add services.yaml validator

* Fix path
2019-04-19 17:05:39 -07:00
Robbie Trencheny
2bb772bbdc Set encoding before connecting (#23204) 2019-04-19 17:05:38 -07:00
Alok Saboo
ad5d4bbf51 Create services.yaml for python_script and script (#23201)
* Create services.yaml for python_script

* Create services.yaml for script
2019-04-19 17:05:38 -07:00
Otto Winter
9c9b25d4b9 Create empty services.yaml for esphome (#23200) 2019-04-19 17:05:37 -07:00
Paulus Schoutsen
89037b367b Don't load component when fetching translations (#23196) 2019-04-19 17:05:37 -07:00
Richard Mitchell
a3c3c41faa Hue motion senors are motion sensors, not presence sensors. (#23193) 2019-04-19 17:05:36 -07:00
Pascal Vizeli
7eebf4631d Hass.io Add-on panel support for Ingress (#23185)
* Hass.io Add-on panel support for Ingress

* Revert part of discovery startup handling

* Add type

* Fix tests

* Add tests

* Fix lint

* Fix lint on test
2019-04-19 17:05:35 -07:00
Dries De Peuter
decaabeb4a Fix niko home control dependency installation (#23176)
* Upgrade niko-home-control library

* Fix additional feedback

* Lint
2019-04-19 17:05:35 -07:00
David Bonnes
df02879c51 Improve configuration schema for Geniushub integration (#23155)
* configuration for hub tokens are now separate from host addresses/credentials

* small change to docstring

* use *args **kwargs
2019-04-19 17:05:34 -07:00
Paulus Schoutsen
dbb49afb3e Updated frontend to 20190419.0 2019-04-19 17:05:08 -07:00
Paulus Schoutsen
a3ecde01ee Updated frontend to 20190419.0 2019-04-19 16:57:45 -07:00
Andrew Sayre
e2ed2ecdc0 Return 0 instead of None (#23261) 2019-04-19 16:56:34 -07:00
Erik Montnemery
1e0bc97f56 Drop unnecessary block_till_done (#23256) 2019-04-19 16:08:11 -07:00
Erik Montnemery
eebb452fb5 Drop unnecessary block_till_done, improve tests for MQTT Cover tests (#23255) 2019-04-19 16:07:28 -07:00
Erik Montnemery
2c42e1a5cb Drop unnecessary block_till_done for MQTT tests (#23254)
* Drop unnecessary block_till_done

* Drop unnecessary block_till_done
2019-04-19 14:59:16 -07:00
Erik Montnemery
28c411c742 Drop unnecessary block_till_done for MQTT fan tests (#23253) 2019-04-19 14:58:44 -07:00
Tomer Figenblat
9d8d8afa82 Added component named switcher_kis switcher water heater integration. (#22325)
* Added component named switcher_kis switcher water heater integration.

* Fixed conflicts.

* Updated requirements.

* Added manifest.json file and updated CODEOWNERS.

* Fixed requirements_all.txt.

* Better component tests.

* Removed unnecessary parameter from fixture function.

* Removed tests section from mypy.ini.

* Remove unused ENTITY_ID_FORMAT.

* Stop udp bridge when failed to setup the component.

* Replace DISCOVERY_ constants prefix with DATA_.

* Various change requests.

* Fixed constant name change remifications.

* Added explicit name to fixture.

* Various change requests.

* More various change requests.

* Added EventType for homeassistant.core.Event.

* Switched from event driven data distribution to dispatcher type plus clean-ups.

* Removed name and icon keys from the component configuration.

* Various change requests.

* Various change reqeusts and clean-ups.

* Removed unnecessary DEPENDENCIES constant from swith platform.

* Replaced configuration data guard with assert.

* Removed unused constants.

* Removed confusing type casting for mypy sake.

* Refactor property device_name to name.

* Removed None guard effecting mypy only.

* Removed unnecessary function from switch entity.

* Removed None guard in use by mypy only.

* Removed unused constant.

* Removed unnecessary context manager.

* Stopped messing around with mypy.ini.

* Referring to typing.TYPE_CHECKING for non-runtime imports.

* Added test requierment correctyly.

* Replaced queue.get() with queue.get_nowait() to avoid backing up intervals requests.

* Revert changes in mypy.ini.

* Changed attributes content to device properties instead of entity properties.

* Fixed typo in constant name.

* Remove unnecessary async keyword from callable.

* Waiting for tasks on event loop to end.

* Added callback decorator to callable.
2019-04-19 16:54:48 -05:00
cgtobi
31e514ec15 Add missing services.yaml file for hue (#23217)
* Add hue services.yaml

* Add lifx services.yaml

* Add lutron services.yaml

* Update lifx services.yaml

* Update hue services.yaml

* Revert lifx services.yaml as it is not necessary

* Remove hue from lights/services.yaml
2019-04-19 14:53:58 -07:00
Erik Montnemery
73a7d5e6f4 Drop unnecessary block_till_done, improve tests (#23252) 2019-04-19 14:52:23 -07:00
Erik Montnemery
f584878204 Drop unnecessary block_till_done (#23251) 2019-04-19 14:51:48 -07:00
Paulus Schoutsen
0533f56fe3 Ask users for a pin when interacting with locks/garage doors (#23223)
* Ask users for a pin when interacting with locks/garage doors

* Deprecate allow_unlock option
2019-04-19 14:50:21 -07:00
Erik Montnemery
416af5cf57 Drop unnecessary block_till_done (#23250) 2019-04-19 14:10:48 -07:00
Erik Montnemery
557211240e Drop unnecessary block_till_done, improve tests (#23249) 2019-04-19 14:08:54 -07:00
Erik Montnemery
13e0691c90 Drop unnecessary block_till_done, improve tests (#23248) 2019-04-19 14:08:02 -07:00
Erik Montnemery
0e429cca33 Drop unnecessary block_till_done, improve tests (#23247) 2019-04-19 12:26:56 -07:00
Erik Montnemery
887e1cd8e3 Drop unnecessary block_till_done, improve tests (#23246) 2019-04-19 12:19:46 -07:00
Richard Mitchell
c899e2a662 Name sensors correctly (#23208)
* Hue motion senors are motion sensors, not presence sensors.

* Name the sensors 'motion' instead of 'presence' - match the HA paradigm.
2019-04-19 11:01:54 -07:00
Jc2k
e7054e0fd2 Avoid calling async code in sync context (#23235) 2019-04-19 10:59:54 -07:00
GoNzCiD
9cf9be8850 Add accuracy and status for Traccar (#23180)
* Fix read gps position accuracy & read device status

* Fix: W291 trailing whitespace & E501 line too long (80 > 79 characters)

* Upgrade pytraccar dependency to 0.7.0

* met snake case
2019-04-19 18:42:27 +02:00
Christopher Viel
b1b269b302 Add more CPU temp. labels to Glances (#23179) 2019-04-19 15:21:16 +02:00
Maciej Bieniek
6e300bd438 Add missing service for persistent_notification (#23230) 2019-04-19 15:14:48 +02:00
Jc2k
21a194f9d8 Review feedback from #23191 (#23233) 2019-04-19 08:39:06 -04:00
Jc2k
b3a8b0056b Add and use an async_fire_service_discovered helper (#23232) 2019-04-19 08:38:50 -04:00
Pascal Roeleven
b2a7699cdf Change configuration for orangepi (#23231) 2019-04-19 13:26:53 +02:00
Pascal Vizeli
3e443d253c Hass.io Add-on panel support for Ingress (#23185)
* Hass.io Add-on panel support for Ingress

* Revert part of discovery startup handling

* Add type

* Fix tests

* Add tests

* Fix lint

* Fix lint on test
2019-04-19 09:43:47 +02:00
Aaron Bach
6a7bd19a5a Remove archived 17track packages from the entity registry (#23049)
* Remove archived 17track packages from the entity registry

* Fix incorrect __init__.py

* Member comments

* Member comments

* Fix too many params

* Member comments

* Member comments
2019-04-19 09:14:14 +02:00
Paulus Schoutsen
dbe0ba87a3 Async fix for bluetooth stopping (#23225) 2019-04-19 08:56:24 +02:00
Erik Montnemery
bea7e2a7fa Fix clearing error message for MQTT vacuum (#23206)
* Fix clearing error message

* Remove redundant hass.async_block_till_done
2019-04-18 21:01:19 -07:00
Tsvi Mostovicz
eac2388d49 Set default value for input_datetime (#21919)
* Set default value for input_datetime

If no initial value is set and no value is available to be restored, set the default value as specified in the docs to 1970-01-01 00:00.

* Use regular if statement

Ternary statements can be tricky if you try to keep the value the same if not something

* Add test for default values

Check that if no initial value is set, state returns 1970-01-01 at 00:00

* Fix tests - was passing wrong args to time/date

* Verify we get a timestamp attribute for input_datetime

This adds a check that when using the default timestamp of 1970-1-1 00:00:00, we
get a timestamp attribute. This is waht prompted this PR in the first place, as
when specifying an automation trying to access the timestamp attribute for a non-
initialized input_datetime HASS wouldn't start.

* Simplify the change for a default value

Based on @balloob comment. Simplifying the code

* Revert "Simplify the change for a default value"

This reverts commit c2d67f19a6.
2019-04-18 21:00:35 -07:00
Erik Montnemery
7a84cfb0be Fix optimistic mode + other bugs, tests (#22976) 2019-04-18 20:59:41 -07:00
Paulus Schoutsen
b0ce3dc683 Only comment with changed coverage on release PRs [skip-ci] (#23224) 2019-04-18 20:58:35 -07:00
Erik Montnemery
70ba5eb0ef Add json_attributes_template (#22981) 2019-04-18 20:55:10 -07:00
Paulus Schoutsen
1761b25879 Remove copy paste error 2019-04-18 20:31:53 -07:00
David F. Mulcahey
c2b4e24372 update zha-quirks (#23215) 2019-04-18 20:23:48 -04:00
David F. Mulcahey
5e363d124e fix bindable devices (#23216) 2019-04-18 20:21:30 -04:00
Paulus Schoutsen
a52f96b23a Add stub services.yaml and make validation mandatory (#23213) 2019-04-18 15:13:35 -07:00
Raman Gupta
620c6a22ac Update vizio component to support latest pyvizio with soundbar support (#22294)
* update vizio component to support latest pyvizio with soundbar support

* Resolved Hound issues

* Additional Hound issue

* Updated based on feedback

* Style updates

* Additional code styling changes

* Added check for auth token not being set for tv device_class

* Limited lines to 80 characters

* moved MAX_VOLUME into base package

* fixed supported commands

* styling changes

* fix styling yet again

* remove unnecessary elif

* removed play/pause since I can't get current state

* changed value access method from config dict

* fixed flake failures

* try to fix docstring

* try to fix docstring

* fixed auth token validation

* rebase and regenerate requirements_all.txt

* updated log text

* line length fix

* added config validation to handle conditionally optional parameter

* updated validate setup log message and string formatting based on review

* fix pylint error

* less ugly
2019-04-18 22:48:05 +02:00
Steven Looman
e1d1f21a74 Don't create connections between sensors. Fixes #22787 (#23202) 2019-04-18 13:47:17 -07:00
Robbie Trencheny
66b2ed930c Set encoding before connecting (#23204) 2019-04-18 13:46:49 -07:00
Paulus Schoutsen
33b8241d26 Add services.yaml validator (#23205)
* Add services.yaml validator

* Fix path
2019-04-18 13:40:46 -07:00
Otto Winter
37cd711c96 Create empty services.yaml for esphome (#23200) 2019-04-18 13:10:36 -07:00
Alok Saboo
0eb8c77889 Create services.yaml for python_script and script (#23201)
* Create services.yaml for python_script

* Create services.yaml for script
2019-04-18 13:10:25 -07:00
Alok Saboo
4be30f7c88 create services.yaml for shell_command (#23210) 2019-04-18 13:10:10 -07:00
Alok Saboo
70c5bd4316 Create services.yaml for Tuya (#23209) 2019-04-18 13:09:41 -07:00
Florian Klien
daf2f30822 set myself as codeowner of xmpp, removed me from notify/* (#23207)
* set myself as codeowner of xmpp, removed me from notify/*

* changed the manifests as well
2019-04-18 12:26:02 -07:00
Paulus Schoutsen
fda483f482 Don't load component when fetching translations (#23196) 2019-04-18 11:11:43 -07:00
Robbie Trencheny
c2cce13e2a Migrating codeowners-mention to Heroku 2019-04-18 11:11:26 -07:00
David F. Mulcahey
38d23ba0af Misc. ZHA changes (#23190)
* handle the off part of on with timed off command

* use correct var

* only bind / configure cluster once

* clean up channel configuration

* additional debug logging

* add guard

* prevent multiple discoveries for a device

* cleanup and still configure on rejoin
2019-04-18 12:24:02 -04:00
Robbie Trencheny
5e1338a9e4 Further improve IndieAuth redirect_uri lookup failure logs (#23183) 2019-04-18 09:03:25 -07:00
Jc2k
4ac9a2e9de Add storage for cacheable homekit entity maps. (#23191) 2019-04-18 08:55:34 -07:00
Richard Mitchell
f57191e8dd Hue motion senors are motion sensors, not presence sensors. (#23193) 2019-04-18 08:53:02 -07:00
David Bonnes
11fb4866a8 Improve configuration schema for Geniushub integration (#23155)
* configuration for hub tokens are now separate from host addresses/credentials

* small change to docstring

* use *args **kwargs
2019-04-18 14:37:52 +02:00
Penny Wood
d9fb3c8c28 Potential None (#23187) 2019-04-18 14:04:30 +02:00
Pascal Roeleven
df475cb797 Adds Orange Pi GPIO platform (#22541)
* Adds Orange Pi GPIO platform

* Add manifest.json

* Remove cover platform

* Apply requested changes

* Remove switch platform

* Update CODEOWNERS

* Remove obsolete dependecies/requirements
2019-04-18 19:43:34 +09:00
Rohan Kapoor
f588fef3b4 Add minimum/maximum to counter (#22608)
* Added minimum/maximum to counter

* Added min/max testcases

* remove duplicate

* cosmetic changes

* removed blank lines at eof

* added newline at eof

* type cv -> vol

* more fixes

* - fixed min/max warnings
- fixed failing tests

* Added linewrap

* - Added cast to int
- Fixed double quotes

* - removed None check in __init__
- fixed failing test

* copy paste fix

* copy paste fix

* Added possibility to change counter properties trough service call

* fixed copy paste errors

* Added '.' to comment

* rephrased docstring

* Fix tests after rebase

* Clean up per previous code review comments

* Replace setup service with configure

* Update services description

* Update tests to use configure instead of setup
2019-04-18 19:02:01 +09:00
Dries De Peuter
6e4083d7f4 Fix niko home control dependency installation (#23176)
* Upgrade niko-home-control library

* Fix additional feedback

* Lint
2019-04-18 10:52:48 +02:00
Paulus Schoutsen
25a5bd32e2 Bumped version to 0.92.0b1 2019-04-17 22:42:41 -07:00
Paulus Schoutsen
3665e87800 Don't warn for missing services (#23182) 2019-04-17 22:42:35 -07:00
Paulus Schoutsen
fa0d538358 Fix empty components (#23177) 2019-04-17 22:42:34 -07:00
Joakim Plate
c508d5905b Google assistant skip missing type (#23174)
* Skip entity if no device type found

* Add test for potentially skipped binary sensors

* Reorg code, add tests to ensure all exposed things have types

* Lint

* Fix tests

* Lint
2019-04-17 22:42:34 -07:00
Richard Mitchell
dc2cb62265 Add basic support for native Hue sensors (#22598)
* Add basic support for native Hue sensors

* Update coveragerc

* Simplify attributes

* Remove config option

* Refactor and document device-ness and update mechanism

* Entity docstrings

* Remove lingering config for sensors

* Whitespace

* Remove redundant entity ID generation and hass assignment.

* More meaningful variable name.

* Add new 'not-darkness' pseudo-sensor.

* Refactor sensors into separate binary, non-binary, and shared modules.

* formatting

* make linter happy.

* Refactor again, fix update mechanism, and address comments.

* Remove unnecessary assignment

* Small fixes.

* docstring

* Another refactor: only call API once and make testing easier

* Tests & test fixes

* Flake & lint

* Use gather and dispatcher

* Remove unnecessary whitespace change.

* Move component related stuff out of the shared module

* Remove unused remnant of failed approach.

* Increase test coverage

* Don't get too upset if we're already trying to update an entity before it has finished adding

* relative imports
2019-04-17 22:42:33 -07:00
Richard Mitchell
d0c3a8ecaf Kill bluetooth LE scanning gracefully when asked to shut down. (#22586)
* Kill bluetooth LE scanning gracefully when asked to shut down.

* Add missing argument.

* Refactor to use data instead of passing nonlocal variables about.

* Fix typo.
2019-04-17 22:42:33 -07:00
Joakim Plate
4a2a130bfa Google assistant skip missing type (#23174)
* Skip entity if no device type found

* Add test for potentially skipped binary sensors

* Reorg code, add tests to ensure all exposed things have types

* Lint

* Fix tests

* Lint
2019-04-17 22:37:39 -07:00
Paulus Schoutsen
ce8ec3acb1 Don't warn for missing services (#23182) 2019-04-17 22:27:11 -07:00
Richard Mitchell
474ac8b09e Add basic support for native Hue sensors (#22598)
* Add basic support for native Hue sensors

* Update coveragerc

* Simplify attributes

* Remove config option

* Refactor and document device-ness and update mechanism

* Entity docstrings

* Remove lingering config for sensors

* Whitespace

* Remove redundant entity ID generation and hass assignment.

* More meaningful variable name.

* Add new 'not-darkness' pseudo-sensor.

* Refactor sensors into separate binary, non-binary, and shared modules.

* formatting

* make linter happy.

* Refactor again, fix update mechanism, and address comments.

* Remove unnecessary assignment

* Small fixes.

* docstring

* Another refactor: only call API once and make testing easier

* Tests & test fixes

* Flake & lint

* Use gather and dispatcher

* Remove unnecessary whitespace change.

* Move component related stuff out of the shared module

* Remove unused remnant of failed approach.

* Increase test coverage

* Don't get too upset if we're already trying to update an entity before it has finished adding

* relative imports
2019-04-17 22:13:03 -07:00
Paulus Schoutsen
77244eab1e Fix empty components (#23177) 2019-04-17 19:17:13 -07:00
Jc2k
6bb4199824 Add @Jc2k to codeowners for homekit_controller (#23173) 2019-04-17 19:16:20 -07:00
Richard Mitchell
f6349a6cf4 Kill bluetooth LE scanning gracefully when asked to shut down. (#22586)
* Kill bluetooth LE scanning gracefully when asked to shut down.

* Add missing argument.

* Refactor to use data instead of passing nonlocal variables about.

* Fix typo.
2019-04-17 13:48:17 -07:00
zewelor
fa73b8e37a Make less imports from yeelight (#23124) 2019-04-17 22:05:49 +02:00
Ingo Theiss
0afa01609c Pass configured host string instead of always forcing an ip-address (#23164)
* Pass host string instead of forcing an ip-address

Pass the configured host (https://www.home-assistant.io/components/homematic/#host) instead of always forcing an ip-address. This is required to get SSL certificate validation working.

* Remove unused 'socket' import
2019-04-17 21:35:16 +02:00
Paulus Schoutsen
723d00d33a Bumped version to 0.93.0.dev0 2019-04-17 10:49:25 -07:00
Paulus Schoutsen
9986df358a Bumped version to 0.92.0b0 2019-04-17 10:32:59 -07:00
Paulus Schoutsen
e75820fc97 Merge remote-tracking branch 'origin/master' into dev 2019-04-17 10:32:37 -07:00
Jasper van der Neut - Stulen
8e4e6a50d8 Only create sensors if the station actually has values for them. (#20643)
Because Luftdaten assigns separate ids for particle and weather
measurements, most if not all stations added with config flow will
have non-functional sensors, as mentioned in #19591. This change
prevents the creation of sensors without data.
2019-04-17 10:27:59 -07:00
Andrey "Limych" Khrolenok
2e57d48191 Adding Telegram bot leave_chat() service (#22259)
* Adding leave_chat() service

* Fix indent
2019-04-17 10:15:33 -07:00
Jc2k
a97fb8fd10 Support fetching/setting humidity of HomeKit controller thermostats (#23040)
* Add support for homekit humidity control

* Add tests
2019-04-17 10:03:32 -07:00
Jc2k
f7afd9d6bc Fix handling of homekit_controler zeroconf c# changes (#22995) 2019-04-17 10:02:51 -07:00
Jc2k
88455a8a8b homekit_controller: Support cover stop (#23046) 2019-04-17 10:02:04 -07:00
pbalogh77
7d4083cdd3 Changed scene unique IDs (#22987)
There was a potential unique ID collission which caused problems for some users, as scenes and devices are enumerated separately, so the same ID could be assigned to in they are unnamed.
So I changed the unique ID generation for scenes to avoid this, which is a breaking change wrt scenes.
2019-04-17 09:56:34 -07:00
Penny Wood
7a9c9031af I think this is a potential bug (#23157) 2019-04-17 09:52:08 -07:00
Paulus Schoutsen
6a40a712cd Install deps and reqs early for config flows (#23169) 2019-04-17 09:49:45 -07:00
Paulus Schoutsen
3d85999258 Updated frontend to 20190417.0 2019-04-17 09:48:59 -07:00
ThaStealth
5b33d952aa Added epson workforce component (#23144)
* Added epson workforce component

* Added __init__ file
2019-04-17 18:33:22 +02:00
Paulus Schoutsen
dcb4eb39fa Update translations 2019-04-17 09:31:34 -07:00
Pascal Vizeli
073f947ca4 Bump Home Assistant Cloud 0.12 (#23159)
* Home Assistant Cloud 0.12

* Fix raising error

* Fix requirements

* Fix lint
2019-04-17 06:57:26 -07:00
Robert Svensson
0b7e62f737 Axis change how new event is signalled (#23152) 2019-04-17 15:21:42 +02:00
Erik Eriksson
e114ae9b53 catch asyncio.TimeoutError (#23156) 2019-04-17 22:00:57 +09:00
trilu2000
b909e5823f Homematic Lock: state_uncertain attribute, Homematic dimmer: Light service transition attribute (#22928)
* STATE_UNCERTAIN for Homematic Lock devices introduced

Homematic Lock devices provides an uncertain flag if the lock was opened manually an the lock is uncertain regards the status.
The other necassary functionality was implemented in pyhomematic by Daniel earlier...

* enabled attribute transition in light service for homematic dimmer devices

* Update light.py

* Revert "Update light.py"

This reverts commit f5565a006d.

* Revert "Revert "Update light.py""

This reverts commit 2c264826ef.

* fix for line too long error

* trailing whitespace
2019-04-17 14:30:53 +02:00
Paulus Schoutsen
37ca9cabd1 Fix check config script (#23151)
* Fix check config script

* Fix typings

* Fix test
2019-04-16 17:14:25 -07:00
Joakim Plate
1bfccd803f Allow switches to be represented as outlets on google assistant (#23149)
* Add device class support for switch to support outlet type

* Add a test for cover device class sync

* Drop remnant unused import
2019-04-16 17:07:14 -07:00
GeoffAtHome
e02a5f0b31 Genius hub (#21598)
* Adding Genius Hub

* Added Genius hub

* Correct hound errors

* Correct hound errors.

* Correct tox errors.

* Fix travis errors

* Correct sensor names

* Correct travis errors

* Correct hound  errors

* Follow up from code review by Martin Hjelmare

* More changes from code review.

* Attempt to resolve conflicts in requirements_all

* de-lint for the houndci-bot

* better logging message, and small tidy-up

* minor refactor and de-lint

* domain name should be the same as the component name

* use self where appropriate

* minor de-lint

* add entities as a single call

* de-lint

* all read-only attrs almost done

* refactor - near the end

* change state/,ode mapping

* override temp from curr_temp

* all read-only properties working

* working now

* ready for PR, but need to remove logging

* de-lint

* de-linted, ready for merge

* de-linted, ready for merge 2

* didn't like import in climate/__init__

* improve footprint logic

* add manifest.json

* add manifest.json 2

* correct a regression

* fix regression with device.is_on()

* use latest client library

* update to latest client library, 3.3.6

* delint and shoudl be OK to go
2019-04-16 23:54:46 +02:00
Joakim Plate
4ed1d9ba8e Add target_temp_high/low and current_temperature (#21393)
* Add target_temp_high/low and current_temperature

water_heater piggy back on climate(thermostat) component in gui,
so these things are already supported by frontend for display
purposes.

* Drop support tags for target high/low
2019-04-16 14:37:27 -07:00
Mike Megally
d7183d642e update caldav to fix calendar issues with synology clients (#23145) 2019-04-16 14:30:40 -07:00
Jason Hu
308d1fbba0 Rename google/tts.py to google_translate/tts.py (#23090)
* Rename google/tts.py to google_translate/tts.py

* Move config migration before load config file

Migrate default config google tts to google_translate tts

* Revert change in process component config

* Fix tests
2019-04-16 14:27:07 -07:00
Paulus Schoutsen
ca524233ec Update components that can be used without being set up (#23133) 2019-04-16 14:11:58 -07:00
Otto Winter
3186109172 Simplify esphome (#22868)
* Add ESPHome climate support

* Adjust line length

* Update .coveragerc

* Update climate.py

* Simplify esphome integration

* Undo change

* Update cover.py
2019-04-16 13:48:46 -07:00
Paulus Schoutsen
10e8f4f70a Add support for after_dependencies (#23148)
* Add support for after_dependencies

* Remove assert false"

* Fix types
2019-04-16 13:40:21 -07:00
Nikolay Vasilchuk
7b1cbeaf80 Fix verify_ssl configuration (#23146)
Fix verify_ssl configuration
2019-04-16 11:55:12 -07:00
Dries De Peuter
45e5f5de78 Fix niko_home_control integration (#23093)
Update base library and only pull for state once.
2019-04-16 11:47:16 -07:00
Villhellm
177ae3fd32 Added state workaround exception for Kwikset 99100-078 (#23130)
I have verified that this does work with my lock.
2019-04-16 08:19:31 -04:00
Pascal Vizeli
6bb95f6b58 Merge pull request #23137 from home-assistant/rc
0.91.4
2019-04-16 10:53:12 +02:00
Pascal Vizeli
c90219ad2e Bumped version to 0.91.4 2019-04-16 08:47:36 +00:00
Robert Svensson
a45df7aac9 Axis - improved internal parameter handling (#23122)
Will result in faster startup per entry due to less network data
2019-04-16 10:46:29 +02:00
Pascal Vizeli
0e7a2f163c Fix ingress bug with Firefox (#23121)
* Fix ingress bug with Firefox

* Fix mock

* Fix tests

* Fix test lint
2019-04-16 08:44:30 +00:00
Jason Hunter
e7102eaf30 only preload when stream is setup (#23134) 2019-04-15 22:36:57 -07:00
Paulus Schoutsen
8b86bf7dd2 Load integrations only once (#23132) 2019-04-15 20:38:24 -07:00
Teemu R
f48eb913b3 Bump pyhs100 requirement for tplink integration (#23065)
* bump pyhs100 requirement for tplink integration

* Fixes #20994

* Run script/gen_requirements_all.py
2019-04-15 20:29:31 -04:00
Sidney
48138189b3 Fix flux_led only-white controllers (and remove explicit declaration as RGBW in automatic add) (#22210)
* Remove explicit declaration of automatic found devices as RGBW

* fixes for Magic Home only-white controllers

* mode is now set to None instead of removed entirely

* flux_led now changes no values when turned on from off state.

* better checking for changed values in turn_on

* Reduce waiting time to 1 second

* Correction of turn on logic

* Remove accidentally inserted 'not'

* Remove lint

* Remove redundant code
2019-04-15 17:07:15 -07:00
Paulus Schoutsen
6a2da9f9a5 load cleanups (#23112)
* load cleanups

* Remove unused methods

* Allow importing requirements at the top of a file

* Fix test

* Lint

* Install reqs ASAP when loading platforms
2019-04-15 16:45:46 -07:00
Fredrik Erlandsson
4d080f8b17 skip non existing zones (#23113) 2019-04-15 16:41:33 -07:00
Tim Lyakhovetskiy
9e15fc1376 Update Leviton Decora WiFi library version. (#23125) 2019-04-15 16:15:51 -07:00
zewelor
7bed448100 Update yeelight lib (#23123)
* Update yeelight lib

* Run gen requirements
2019-04-15 16:10:26 -07:00
Pascal Vizeli
7a78d65633 Fix ingress bug with Firefox (#23121)
* Fix ingress bug with Firefox

* Fix mock

* Fix tests

* Fix test lint
2019-04-15 15:27:13 -07:00
Robert Svensson
60c787c2e6 Axis component support unloading entries (#22692)
* Add support for unloading entries

* Improve config entry tests

* Improve coverage for device

* Remove callback when relevant
2019-04-15 15:06:45 -07:00
Andrew Loe
dbcdc32f05 Ensure Boolean configuration values are handled correctly. (#22810) 2019-04-15 14:24:20 -07:00
Michał Węgrzynek
7251e29e60 Add basic Supla cover support (#22133)
* Added basic Supla (https://www.supla.org) support (covers)

* PySupla upgrade, minor spelling corrections and .coveragerc update

* Linter errors cleanup

* More linter cleanups.

* Documentation link removal and import sorting

* Docstring formatting

* PR suggestions

* Styling and linting

* PySupla version update

* Removal of ALLOW_EXTRA in SERVER_CONFIG

* Return False on failed connection validation, function order cleanup

* Component manifest

* Missing return None and different way of setting unique_id

* CODEOWNERS update

* CircleCI nudge
2019-04-15 13:20:08 -07:00
Pascal Vizeli
8a4dd093f8 Add pvizeli/danielperna84 to code owner of homematic (#22989)
* Add pvizeli/danielperna84 to code owner of homematic

* Update CODEOWNERS

* Run hassfest
2019-04-15 13:13:29 -07:00
giefca
497038b332 Add Google Assistant garage type (#23115)
* Tests

* Add Google Assistant GARAGE type

* Update test_trait.py

* Key device class by domain

* Update smart_home.py
2019-04-15 13:05:53 -07:00
cgtobi
f5878e1f22 Clean coveragerc of removed integrations (#23118) 2019-04-15 10:58:37 -07:00
cgtobi
6ab158ba88 Bump pyatmo version (#23116) 2019-04-15 10:58:02 -07:00
Tsvi Mostovicz
d894025365 Lower verbosity of command line sensor (#23120)
The command line sensor prints every minute the command that is run. This fills up the log.
The command run should be a debug statement.
2019-04-15 10:56:32 -07:00
Jeff Irion
c341e33749 Handle missing 'serialno' of Android TV (#22996)
* Handle missing 'serialno' for unique ID

* Use None for unique_id if serialno is missing

* Remove name from unique ID

* Use serialno as unique_id
2019-04-15 10:28:58 -07:00
Robert Svensson
ec171b9928 Axis - start stream when system is ready (#23119)
* Make sure that event stream doesn't start until event listeners are ready

* Change order
2019-04-15 09:20:01 -07:00
Jc2k
e97b2b7015 Fix homekit_controller climate supported operation_list being blank (#23095)
* Fix tado supported operation modes when used with homekit_controller

* Replace with list comp as requested in review

* More list comps
2019-04-15 17:09:21 +02:00
Jason Hu
2f89f88d23 Load component which contains data entry flow handler (#23107)
* Load component which contains data entry flow handler

* Use integration.get_component()

* Add error log
2019-04-14 23:24:47 -07:00
Paulus Schoutsen
b0d893afc9 Remove loader.get_component (#23111)
* Remove get_component

* Lint
2019-04-14 22:31:01 -07:00
Robert Svensson
23cb579f9f Support updating deCONZ host address (#22784)
* Update config flow to support updating host address
Improve tests

* Update gateway to handle new address signal

* Improve description why whe need to keep step_init
2019-04-14 21:50:01 -07:00
Maikel Punie
96f689a70f Upgraded python-velbus package, this fixes a lot of problems with the… (#23100)
* Upgraded python-velbus package, this fixes a lot of problems with the velbus component

* updated manifest.json
2019-04-14 21:42:30 -07:00
giefca
b804919eaa Fix for stateless covers (#22962)
* Corrections and test

* Raise error if does not support setting position

* Raising error for stateless and assumed state covers

* Fix pylint

* Tests

* Update test_trait.py
2019-04-14 19:52:00 -07:00
Paulus Schoutsen
d722f4d64a Further integration load cleanups (#23104)
* Further integration load cleanups

* Fix tests

* Unflake MQTT vacuum command test
2019-04-14 19:07:05 -07:00
Alexei Chetroi
930f75220c Await merge_packages_config(). (#23109) 2019-04-14 19:02:49 -07:00
Paulus Schoutsen
6b0180f753 Fix demo (#23087)
* Fix demo

* Fix types

* Fix all the things

* Fix type

* Fix test

* Lint
2019-04-14 16:59:06 -07:00
Pawel
1d2e9b6915 Add support for params in send_command (#23071)
* add support for params in send_command

* add more tests
2019-04-14 11:09:46 -07:00
ActuallyRuben
df580b2322 Add URL query parameters to webhook trigger result data (#23043)
* Added query parameters to webhook data

* Added test for query webhook

* Add second blank line in new test for webhook trigger
2019-04-14 10:53:35 -07:00
Jason Hu
d1398e24be Increase timeout (#23098) 2019-04-14 10:18:45 -07:00
Paulus Schoutsen
3368e30279 Migrate packages and check config (#23082)
* Migrate packages and check config

* Fix typing

* Fix check config script
2019-04-14 07:23:01 -07:00
Jason Hu
95662f82d4 Remove validate from aws_config (#23084) 2019-04-14 07:21:47 -07:00
choss
c314220167 Ignore secrets.yaml when using include_dir_named (#22929)
* ignore secrets.yaml in include_dir_named include

* updating test for include_dir_named secrets ignore
2019-04-13 21:24:06 -07:00
Erik Montnemery
c6bc47b32d Refactor MQTT climate to deduplicate code (#23044) 2019-04-13 20:34:39 -07:00
Erik Montnemery
b390de1598 Fix bugs in MQTT vacuum (#23048) 2019-04-13 20:29:01 -07:00
Erik Montnemery
d99637e51b Deprecate implicit state_topic for MQTT discovery (#22998)
* Deprecate implicit state_topic for MQTT discovery

* Lint

* Add comments

* Modernize tests
2019-04-13 20:25:45 -07:00
Aaron Bach
56b08a6ddb Ensure OpenUV service checks permissions (#22668)
* Create decorator to check service permissions

* Ensure OpenUV service has proper user permissions

* Reverting strange changes
2019-04-13 16:50:19 -06:00
Martin Fuchs
0a0975b5d9 Add support for Stiebel Eltron heat pumps (#21199)
* Start with Stiebel Eltron heatpump

* STE HP

* Add read of operating mode

* Add read-write operation mode

* Further extract ModBus access

* Separation of platform and API

* Last changes

* Use modbus hub

* Update module doc with config

* Clean up platform code

* Cleanup and update to dev2 of pystiebeleltron

* Remove slave configuration

* Add translation of states

* Make name parameter optional

* Consolidate platform

* Correct .coveragerc after conflict

* Prepare component for sensor platform

* Fix issues found in review

* Remove custom states and map to existing HA states

* Force update, when values are modified

* Update CODEOWNERS and requirements_all.txt

* Fix .coveragerc file

* Exclude stiebel_eltron components in .coveragerc

* Break out to module level constant

* Rename constant

* Removed REQ and DEP constant.
2019-04-13 23:53:36 +02:00
Teemu R
39264af310 Add missing async for tplink's async_setup_platform methods (#23066)
* add missing async for tplink's async_setup_platform methods

thanks to @MartinHjelmare for spotting this, related to #21916

* fix line lengths
2019-04-13 23:50:21 +02:00
Andrew Sayre
8c89e260df HEOS confirm discovered devices before adding (#23063)
* Add host selection step to discovery

* Review feedback

* Fix failing test
2019-04-13 16:44:45 -05:00
Aaron Bach
46ee7d7b22 Fix test (#23081) 2019-04-13 14:32:07 -07:00
Paulus Schoutsen
e8343452cd Validate component usage (#23037)
* Update manifest validator

* Update circle

* Update text

* Typo

* fix link to codeowners

* Merge CODEOWNERS into hassfest

* Annotate errors with fixable

* Convert error to warning

* Lint

* Make abs path

* Python 3.5...

* Typo

* Fix tests
2019-04-13 13:17:01 -07:00
Aaron Bach
fc481133e7 Create decorator to check service permissions (#22667)
* Create decorator to check service permissions

* Typing

* Linting

* Member comments

* Linting

* Member comments

* Updated import

* Owner comments

* Linting

* Linting

* More work

* Fixed tests

* Removed service helper tests in RainMachine

* Linting

* Owner comments

* Linting

* Owner comments

Co-Authored-By: bachya <bachya1208@gmail.com>
2019-04-13 13:54:29 -06:00
Joakim Plate
7a6950fd72 Validate data packet format on config validation (#23062) 2019-04-13 10:58:12 -07:00
Penny Wood
2527731865 Fix websocket connection sensor (#22923)
* Fix for #22890

* Singleton count
2019-04-13 10:48:40 -07:00
Alexei Chetroi
479511ee42 Bugfix ZHA device_removed() handler. (#23074) 2019-04-13 12:57:22 -04:00
c-soft
2f17529f28 Add Satel_integra switchable outputs and multiple partitions (#21992)
* Added editable outputs and multiple zones.

* Updated requirements_all.txt

* Linter fixes.

* Post-review changes

* Fixed too many lines separation error

* Passing satel controller as parameter to entities.

* Fixed linter error.

* Fixed forgotten requirements update.

* Fixed satel_integra version (again!?!)

* Fixed manifest.json.

* Fixed passing non-serializable controller

* Removed unnecessary isinstance check.

* Post review changes
2019-04-13 14:24:12 +02:00
Josef Schlehofer
18cf8275b8 Upgrade python-slugify to 3.0.2 (#22997) 2019-04-13 11:29:44 +02:00
Jason Hu
73a473ac29 Allow aws credential skip validation (#22991)
* Allow aws credential skip validation

* Don't validate the auto-created default profile
2019-04-12 17:19:05 -07:00
Paulus Schoutsen
3f69d0283d Convert translation helper to use async_get_integration (#23054)
* Convert translation helper to use async_get_integration

* Simplify after comments

* Lint

* Fix typing

* Typo
2019-04-12 17:10:19 -07:00
Paulus Schoutsen
b767232e50 Only load stream when av package available (#23058) 2019-04-12 17:09:58 -07:00
Aaron Bach
05f267de6e Update RainMachine sensors in parallel (#23057) 2019-04-12 17:44:04 -06:00
Diogo Gomes
51508d69ad Bandage telegram bot (#23022)
* Bandage

* lint

* move everything into __init__.py

* fix lint
2019-04-12 14:28:59 -07:00
Joakim Plate
0a3e11aa12 Move Broadlink services to component (#21465)
* Register services in broadlink domain

* Add tests for broadlink services

* Resolve review comments

* One more review fix

* Restore auth retry

* Drop unused constants

* Fix flake8 errors
2019-04-12 20:11:36 +02:00
Paulus Schoutsen
f269135ae9 Migrate check-config to use get_integration (#23026)
* Migrate check-config to use get_integration

* ImportError
2019-04-12 10:14:16 -07:00
cgtobi
2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Paulus Schoutsen
f7d4c48199 Convert service helper to use async_get_integration (#23023)
* Convert service helper to use async_get_integration

* Fix tests
2019-04-12 10:09:17 -07:00
Charles Garwood
c8375be4b1 Replace get_platform (#23014)
* Update Z-Wave to use async_get_integration

* Change load method per PR comments

* update tests
2019-04-12 12:22:56 -04:00
Aaron Bach
7d46ed0bf9 Remove expired 17track.net packages from entity registry (#23001)
* Remove expired 17track.net packages from entity registry

* Reverse order
2019-04-12 08:03:14 -06:00
Austin Drummond
3d441dffad Update HAP-python to 2.5.0 (#23031) 2019-04-12 13:26:52 +02:00
Malte Franken
6c51592e34 Instituto Geográfico Nacional Sismología (Earthquakes) Feed platform (#22696)
* wip

* added new requirements

* fixed tests

* improved test coverage

* added feed entry's title

* added manifest

* updated codeowners

* generated requirements
2019-04-12 09:01:28 +02:00
Paulus Schoutsen
c94b031db1 Fix unnecessary hass.components interaction (#23029)
* Fix wemo

* Fix bloomsky

* Fix netatmo

* Fix one more reference
2019-04-11 23:37:45 -07:00
Paulus Schoutsen
57f17707c6 Specify configurator as dependency (#23030) 2019-04-11 20:11:56 -07:00
Robbie Trencheny
7303d56a55 Mobile App: Remove component loading support (#23025)
Loading a component defined in a registration didn't actually work and was undocumented, so let's just remove it instead of fixing #23005.

## Checklist:
  - [X] The code change is tested and works locally.
  - [X] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [X] There is no commented out code in this PR.
2019-04-11 19:06:36 -07:00
Paulus Schoutsen
7e39e14086 Merge remote-tracking branch 'origin/master' into dev 2019-04-11 16:06:31 -07:00
Ian Richardson
8bfe77a1a0 Add aftership package details and add/remove services (#22275)
* 📦 Package details and add/remove services

* lint

* Cleanup

* lint

* Fix add tracking service call

* cleanup

* Make data easier to consume on the front-end

* lint

* Add expected delivery date

* call update after add/remove

* lint

* cleanup

* Add last_checkpoint

* address review comments

* remove formatting changes

* lint

* Address review comments

* address review comments

* address review comments

* lint

* lint
2019-04-11 15:57:48 -07:00
Jason Hu
ac7f1a7a37 Fix test failed in py35 (#23002) 2019-04-11 12:52:02 -07:00
Stephan Beier
02347df140 Prevent the projector to toogle on/off (#22985) 2019-04-11 11:32:25 -05:00
Markus Jankowski
d078e50fb8 Add device HmIP-MIOB to Homematic IP Cloud (#22975)
* Update upstream dependency

* Add two switches
2019-04-11 10:49:02 +02:00
Rohan Kapoor
6ba9ccf052 Load requirements and dependencies from manifests. Fallback to current REQUIREMENTS and DEPENDENCIES (#22717)
* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Fix tests

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix light tests [skip ci]

* Fix tests/common

* Fix some mqtt tests [skip ci]

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Fix more tests and manifests

* Readability over shorthand format

* Fix demo/notify tests

* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Load requirements from manifests. Fallback to current REQUIREMENTS

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Readability over shorthand format

* Clean up requirements

* Use integration to resolve deps/reqs

* Lint

* Lint

* revert a change

* Revert a test change

* Fix types

* Fix types

* Add back cache for load component

* Fix test_component_not_found

* Move light.test and device_tracker.test into test package instead with manifest to fix tests

* Fix broken device_tracker tests

* Add docstrings to __init__

* Fix all of the light tests that I broke earlier

* Embed the test.switch platform to fix other tests

* Embed and fix the test.imagimage_processing platform

* Fix tests for nx584

* Add dependencies from platform file's DEPENDENCIES

* Try to setup component when entity_platform is setting up

Fix tests in helpers folder

* Rewrite test_setup

* Simplify

* Lint

* Disable demo component if running in test

Temp workaround to unblock CI tests

* Skip demo tests

* Fix config entry test

* Fix repeat test

* Clarify doc

* One extra guard

* Fix import

* Lint

* Workaround google tts
2019-04-11 01:26:36 -07:00
Miroslav Ždrale
8a81286abb Bump pyubee version to support more models and detect model automatically (#22450)
* Bump pyubee to 0.4, support more models and detect model automatically

* Update requirements_all.txt

* Check for supported models

* Add model aliases

* Code clean-up

* Updated code to meet reviewer's requests.

* Updated code to meet reviewer's requests.

* Minor update

* Minor update

* Populate mac2name dict

* Return list of MAC addresses, not dict

Co-Authored-By: mzdrale <mzdrale@gmail.com>

* Minor update
2019-04-11 10:25:46 +02:00
Robbie Trencheny
f5c677146a Make inlined JSON example valid 2019-04-10 21:58:50 -07:00
Paulus Schoutsen
f33bf718c7 Google Assistant: Migrate light setting trait to use HSV color spectrum (#22980)
* Migrate light setting trait to use HSV

* Fix tests

* Fix all the typos
2019-04-10 21:35:37 -07:00
cgtobi
c2cfc4a813 Stream support for Netatmo cameras (#22952)
* Add stream feature

* Add a missing slash

* Get config parameter

* Get default quality
2019-04-10 16:10:14 -07:00
Paulus Schoutsen
373b2009c9 Catch connection reset (#22982) 2019-04-10 15:42:10 -07:00
Paulus Schoutsen
e9d9861bda Update translations 2019-04-10 15:01:32 -07:00
Paulus Schoutsen
c81b1956da Updated frontend to 20190410.0 2019-04-10 15:01:14 -07:00
Aaron Bach
153c6957b9 Add watchdog reset to on_connect in Ambient (#22956) 2019-04-10 15:25:19 -06:00
ehendrix23
7862fdd27e Fix myq increasing number of network connections (#22432)
* Fix for network issues

Fix for network issues

* Further changes to network connection

* websession is created in pymyq

websession is created in pymyq instead.
Added call on stop event to close web session.

* Updated requirements file

* Added comment

* Changed back to use aiohttp_client

* Cleanup closed sockets in aiohttp

Enable automatic cleanup of closed sockets in aiohttp client helper.

* Updated manifest & requirements

* Updated comment block
2019-04-10 14:24:12 -07:00
Erik Montnemery
38d92b2abf Fix optimistic mode and add tests (#22899) 2019-04-10 13:56:34 -07:00
Robert Svensson
6463b8165f Fix deCONZ change entity_id bug (#22974)
Fix deCONZ change entity_id bug
2019-04-10 22:35:28 +02:00
Otto Winter
72af4276b9 Add ESPHome climate support (#22859)
* Add ESPHome climate support

* Adjust line length

* Update .coveragerc

* Update climate.py

* Rename
2019-04-10 22:13:13 +02:00
Andrew Sayre
7624d0e79f Check for supported features in media_player services (#22878)
* Add check for supported features

* Move logic to service helper

* Fix hacked in test for seek

* Test for service required features
2019-04-10 09:44:58 -07:00
Pascal Vizeli
fc7a187dd6 Update uvloop 0.12.2 2019-04-10 16:46:23 +02:00
Pascal Vizeli
536356ceec Merge pull request #22969 from home-assistant/rc
0.91.3
2019-04-10 16:42:00 +02:00
Pascal Vizeli
984af45bb2 Bumped version to 0.91.3 2019-04-10 13:22:19 +00:00
Pascal Vizeli
eab575e65d Bugfix: pass protocol out of header to application layer (#22955) 2019-04-10 13:19:54 +00:00
Robbie Trencheny
e7a17b710d Add cloudhook and remote UI vals to get_config (#22921) 2019-04-10 13:19:54 +00:00
Robbie Trencheny
a267df2abb More Mobile app sensor fixes (#22914)
* Ensure we only add a sensor once

* Ensure that we dont process updates for entities that arent what we were setup for

* Add debug logging to ease development of apps

* Use str representation
2019-04-10 13:19:53 +00:00
Fabian Affolter
f531ca61c6 Set pytz>=2019.01 (#22966) 2019-04-10 15:18:30 +02:00
John Raahauge
9e56283eaf Fix position of add_entities of binary sensor (#22866)
* Bugfix - binary_sensor.py

* Added features to Concord232 Alarm Panel

* Added New Line End Of File

* Deleted Whitespace

* Back to original

Removed added feature and sticking to bugfix
2019-04-10 13:18:10 +00:00
Fabian Affolter
be51a3ae12 Upgrade ruamel.yaml to 0.15.91 (#22965) 2019-04-10 15:15:12 +02:00
Fabian Affolter
f4309dfcc6 Add missing attribution (#22964) 2019-04-10 14:51:42 +02:00
Fabian Affolter
691271147e Update ordering (#22963) 2019-04-10 14:35:57 +02:00
Fabian Affolter
3d5ee0eb58 Upgrade youtube_dl to 2019.04.07 (#22961) 2019-04-10 13:05:16 +02:00
Fabian Affolter
6156bb4e5b Upgrade Sphinx to 2.0.1 (#22960) 2019-04-10 13:03:30 +02:00
Ville Skyttä
7058249c01 Uprade asynctest to 0.12.3 (#22824) 2019-04-10 11:17:02 +02:00
Ville Skyttä
fa8a4de019 Upgrade pytest to 4.4.0 (#22822) 2019-04-10 11:16:52 +02:00
Erik Montnemery
bc5f0ff0b3 Use dict[key] for required config keys and keys with default values of MQTT light (#22834)
* Use dict[key] for required config keys and keys with default values.

* Improve tests

* Lint

* Improve tests of JSON data
2019-04-10 11:16:41 +02:00
mgiako
bbedf091aa Add functionality to the version sensor (#22896)
* Update manifest.json

* Update sensor.py

* new version option
2019-04-10 09:55:39 +02:00
Fredrik Erlandsson
5d3aac8130 Use ConfigEntryNotReady when setting up Daikin (#22901)
* raise ConfigEntryNotReady

* better debugging
2019-04-10 09:44:00 +02:00
Anders Melchiorsen
a833736a1e Add sms_total sensor to netgear_lte (#22954) 2019-04-10 09:41:57 +02:00
cdce8p
6d2412022b Fix HomeKit fan speed conversion (#22951)
* Check that speed value from state is not 'None'
* Added tests
2019-04-10 08:35:17 +02:00
Paulus Schoutsen
51e6d5380e Add color setting trait (#22894) 2019-04-09 20:17:13 -07:00
Pascal Vizeli
37f3eccb1e Bugfix: pass protocol out of header to application layer (#22955) 2019-04-09 20:13:39 -07:00
Paulus Schoutsen
e48ef7f441 Fix broken platform components (#22943)
* Fix broken platform components

* Lint
2019-04-09 15:42:44 -07:00
Paulus Schoutsen
8582e390f8 Remove introduction component (#22944)
* Remove introduction component

* Remove more usage
2019-04-09 14:45:09 -07:00
Austin Drummond
c4e31bc4df Add linked battery sensor to HomeKit (#22788) 2019-04-09 23:13:48 +02:00
Anders Melchiorsen
6244a397b1 Hide unsupported Sonos favorites (#22940) 2019-04-09 23:09:18 +02:00
Jason Hu
c82d2cb11c Cherry pick test fix (#22939) 2019-04-09 13:59:15 -07:00
Anders Melchiorsen
58ec77b017 Binary sensors for netgear_lte (#22902)
* Binary sensors for netgear_lte

* Move LTEEntity to component

* Revert unrelated manifest changes

* Address review comments

* Remove unused import
2019-04-09 20:28:20 +02:00
Justin Vanderhooft
4803f319b6 bump raincloudy to 0.0.7 (#22935) 2019-04-09 19:00:50 +02:00
Paulus Schoutsen
cac00f5b26 Test for circular dependencies using manifests (#22908)
* Integration dependencies

* Lint

* Lint

* Fix one test

* Lint

* Fix load custom component integration

Fix async issue
Add circular dependency detection in manifest validation

* Fix test

* Address review comment

* Apply suggestions from code review

Co-Authored-By: balloob <paulus@home-assistant.io>
2019-04-09 09:30:32 -07:00
Andrew Sayre
4110bd0acf Add support for when device is not logged in to HEOS (#22913) 2019-04-09 18:21:00 +02:00
Paulus Schoutsen
0d2646ba25 Update translations 2019-04-09 08:34:20 -07:00
Phil Bruckner
34bb31f4ec Add amcrest binary_sensors (#22703)
* Add amcrest binary_sensors

Add binary_sensors with option motion_detected. Deprecate motion_detector sensor.

* Update per review

* Update per review

Add custom validators to make sure camera names are unique, and to issue warning if deprecated sensors option motion_detector is used.

async_setup_platform should not return a value.

* Another review update

Since there is only one type of binary_sensor, remove type test in update method.
2019-04-09 15:21:47 +02:00
Evan Bruhn
a48c0f2991 Logi Circle public API refactor and config flow (#20624)
* Logi Circle now uses OAuth2 for authentication, added config flow.

* Service calls now dispatched to camera entities via signalled events

* Update from PR review

* Add unit tests for config flow

* Updated CODEOWNERS

* Reverted change to .coveragerc

* Improved test coverage of config flow
2019-04-09 14:26:58 +02:00
Ben Dews
f81ce0b720 Add 'Assumed State' property to Somfy MyLink covers (#22922)
* Explicitly return none for is_closed property

* Set the assumed_state property to true

* Added period to docstring
2019-04-09 05:58:09 -04:00
Paul Madden
88694c978b Camera component for BOM integration (#22816)
* Work on PR comments

* Work on PR comments

* Update imports

* Work on schema validation

* Fix package

* Add bomradarcam to .coveragerc

* Improve error message for location

* Delinting

* Correct module name in .coveragerc

* Add manifest.json

* Update requirements_all.txt

* Merge bomradarcam into existing bom integration
2019-04-09 05:56:04 -04:00
John Raahauge
d48fe4cebc Added features to Concord232 Alarm Panel (#22892)
* Added features to Concord232 Alarm Panel

* Update homeassistant/components/concord232/alarm_control_panel.py

Deleted 'or None' as per @syssi suggestion.
2019-04-09 05:49:48 -04:00
Robbie Trencheny
fd8d9747ef More Mobile app sensor fixes (#22914)
* Ensure we only add a sensor once

* Ensure that we dont process updates for entities that arent what we were setup for

* Add debug logging to ease development of apps

* Use str representation
2019-04-09 05:48:59 -04:00
Alexei Chetroi
64ea13104e Fix ZHA Light color conversion. (#22909) 2019-04-09 05:48:17 -04:00
Robbie Trencheny
75bed93d3d Add cloudhook and remote UI vals to get_config (#22921) 2019-04-09 05:47:57 -04:00
Ben Dews
6ee23bdf4e Add Somfy MyLink support for Covers (#22514)
* Added MyLink component

* Updated requirements.txt

* Fix lint issues

* Removed ‘Scene’ functionality

* Removed state restoration, as state is no longer tracked

* Add component manifest

* Remove documentation links in Docstring

* Removed redundant try/except block

* Removed default dict

* Removed features already implemented in default CoverDevice

* Removed attributes for tracking state

* Simplified loading of covers

No options exist other than reversal, so just check reversal status directly and update if needed

* Reimplemented is_closed property

* Import ENTITY_ID_FORMAT from base component

* Removed misc unused vars

* Update module docstrings to one line

* Removed too many blank lines, giving one back :)

* Return none on TimeoutError

* Added component to .coveragerc
2019-04-09 08:31:34 +02:00
Jason Hunter
43487aa0d6 Stream Timestamp Fixes (#22912)
* reset timestamps for streams that do not do so when first requested

* update inline comments to be more descriptive
2019-04-08 23:24:51 -07:00
Paulus Schoutsen
590eead128 Test fixes (#22911)
* Fix light tests [skip ci]

* Fix tests/common

* Fix some mqtt tests [skip ci]

* Fix tests and component manifests which have only one platform

* Fix more tests and manifests

* Fix demo/notify tests

* Rollback test for demo.geo_location
2019-04-08 23:16:55 -07:00
pbalogh77
1a05f7b04d Initial Fibaro HC Climate support (#20256)
* Initial version of climate

* initial commit of climate device support

* Fixed opmode and fanmode

* Cleanup

* meh

* added back all other components

Oops

* wider support for thermostats

Added one more identifier for thermostats to broaden compatibility

* Added even more climate types

* Reworked detection mechanism

Better support for combined devices

* Added additional modes

* force visibility on climate

* Changed logging of device data

* Improved operatingmode support

Improved operatingmode support

* Updated logic for opmode/fanmode list creation

Implemented a universal mapping logic for opmode and fanmode, to make it more widely compatible
Improved mapping of Fibaro FGT devices

* Lint fixes

* bump

* Fixes based on code review

* Fixes

* Moved to fibaro folder

* lint inspired cosmetic changes

* Mapped all operating modes to existing HA ones

Mapped all operating modes to existing HA ones

* Improved compatibility with Heatit thermostats

Thanks to astrandb for testing, debugging and fixing my code

* Changes based on code review

Changes based on code review

* more fixes based on more code review

more fixes based on more code review
2019-04-09 06:24:57 +02:00
Andrew Sayre
38f063a158 Fix HEOS discovery could result in multiple config entries (#22903)
* Prevent duplicate entries from discovery

* Update reqs files

* Prevent duplicate entries from discovery
2019-04-08 21:24:40 -05:00
Anders Melchiorsen
d577955d1e Fix Sonos handling of unsupported favorites (#22906) 2019-04-08 19:32:56 -05:00
Fredrik Erlandsson
55c8417ec0 fix aiohttp ServerDisconnectedError in Daikin (#22880) 2019-04-08 10:08:03 -07:00
Erik Montnemery
49a2f5a40b Use dict[key] for required config keys and keys with default values. (#22832) 2019-04-08 08:47:40 -07:00
Otto Winter
5727beed8e Add ESPHome Cover position/tilt support (#22858)
## Description:

Add ESPHome cover position and tilt support.

The aioesphomeapi also received a small refactor for these changes and those are part of this PR (constants were refactored into enums and optimistic was renamed to assumed_state). If possible, I'd like to include those in this PR because:

 1. It's mostly just very simple changes
 2. Because of the new position change the dev branch would be in a non-working state for a while until the split PR is merged (unless I write some temporary glue logic, but I'd prefer to avoid that)

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.

If the code communicates with devices, web services, or third-party tools:
  - [x] [_The manifest file_][manifest-docs] has all fields filled out correctly ([example][ex-manifest]).
  - [x] New dependencies have been added to `requirements` in the manifest ([example][ex-requir]).
  - [x] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.

[ex-manifest]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/mobile_app/manifest.json
[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/mobile_app/manifest.json#L5
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23
[manifest-docs]: https://developers.home-assistant.io/docs/en/development_checklist.html#_the-manifest-file_
2019-04-08 15:44:24 +02:00
Rohan Kapoor
6c53528ae8 Update harmony manifest to match REQUIREMENTS in module (#22826) 2019-04-08 06:43:38 -07:00
Otto Winter
c9ec166f4b Add MQTT climate two-point target temperature support (#22860)
* Add MQTT climate two-point target temperature support

* Sort

* Fix test
2019-04-08 06:28:42 -07:00
Matt Snyder
36c135c785 Stream support for Doorbird component (#22876)
* Support stream source for doorbird live camera

* Support stream source for doorbird live camera

* Support stream component on Doorbird camera entities

* Bump library version

* Update manifest

* Lint

* Correct parameter order
2019-04-08 09:22:31 -04:00
akasma74
d8c7160377 force_update=False (not None) (#22867)
because force_update: boolean
2019-04-08 06:21:13 -07:00
cgtobi
8cc5cc7f43 Add zwave network key validator (#22785)
* Add zwave network key validator

* Move validator to zwave component

* Move validator to zwave component

* Move stuff

* Move stuff

* Remove helper and replace with voluptuous method

* Add test

* Fix long line

* Improve tests

* Add more negative tests

* Remove unnecessary assertion

* Make the linter happy

* Remove print
2019-04-08 06:18:52 -07:00
John Raahauge
45a43592bd Fix position of add_entities of binary sensor (#22866)
* Bugfix - binary_sensor.py

* Added features to Concord232 Alarm Panel

* Added New Line End Of File

* Deleted Whitespace

* Back to original

Removed added feature and sticking to bugfix
2019-04-08 08:53:00 -04:00
Finbarr Brady
a0d6e08421 Bump pypi module version for enigma2 (#22886)
* Bug fix for #22727

* Update requirements_all.txt

* Update manifest.json
2019-04-08 08:49:52 -04:00
Finbarr Brady
a4ffc9e37a add myself as codeowner (#22885) 2019-04-08 08:48:19 -04:00
Pascal Vizeli
8f9c2000ce Merge pull request #22883 from home-assistant/rc
0.91.2
2019-04-08 11:27:14 +02:00
Robbie Trencheny
a04d44d97a Minor sensor fixes (#22884)
* Minor sensor fixes

* Fix tests
2019-04-08 08:17:11 +00:00
Robbie Trencheny
137d80452d Minor sensor fixes (#22884)
* Minor sensor fixes

* Fix tests
2019-04-08 01:13:26 -07:00
Pascal Vizeli
3f73973970 Bumped version to 0.91.2 2019-04-08 08:00:22 +00:00
Pascal Vizeli
3a79e37cde Fix content_type handling ingress (#22864) 2019-04-08 07:59:05 +00:00
zewelor
3f15b6b2d3 Fix yeelight possible array change during iteration (#22849) 2019-04-08 07:59:04 +00:00
zewelor
c5d4b7c243 Use relative imports in yeelight (#22839) 2019-04-08 07:59:04 +00:00
Robbie Trencheny
236e484dc2 Fix for rate limits should be optional (#22823) 2019-04-08 07:59:02 +00:00
Jason Hunter
f51e8c3012 coerce duration and lookback to int so they can be used in template automation (#22819) 2019-04-08 07:59:01 +00:00
Robbie Trencheny
474fc21c66 Fix for optional values in the update_location webhook call (#22817)
* Fix for optional values in the update_location webhook call

* Square brackets instead of .get
2019-04-08 07:59:00 +00:00
Robbie Trencheny
82f6bed3a3 Add a new mobile_app webhook command to get config (#22813)
* Add a new mobile_app webhook command to get config

* Limit fields returned
2019-04-08 07:58:59 +00:00
zewelor
abb531c06b Improve yeelight imports (#22804) 2019-04-08 07:58:10 +00:00
Chris Helming
7a8aa79f19 Add optional rtsp_port for Foscam (#22786)
* add optional rtsp port for config

* getting rid of default=None

* removing vol.Any
2019-04-08 07:56:56 +00:00
Robbie Trencheny
ed9d1e776f Add new mobile_app webhook command: get_zones (#22604)
## Description:

Adds a new `mobile_app` webhook command, `get_zones`, which just returns all zones.

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-04-08 07:56:55 +00:00
Wolfgang Malgadey
d8119b2281 Fix tado turn on off (#22291)
* fix for turn on and off, with new pyTado

missing blank line

* removed, because can't push

* uploaded the file through github again
2019-04-08 07:54:58 +00:00
Pascal Vizeli
2d287d2abe Fix content_type handling ingress (#22864) 2019-04-08 09:22:55 +02:00
Aaron Bach
4982c0b196 Added REQUIREMENTS back to Ambient (#22875) 2019-04-07 21:02:03 -07:00
cdce8p
8bebd8583f Fix manifest codeowners (#22871)
* Added individual files section
* Replaced some manifest/codeowners
2019-04-07 21:01:05 -07:00
David F. Mulcahey
3086e1d39d get temp and color for light during init and poll (#22847) 2019-04-07 22:03:38 -04:00
Aaron Bach
a40a0c4042 Bump aioambient to 0.3.0 (#22855)
* Bump aioambient to 0.3.0

* Updated requirements

* Removed old REQUIREMENTS reference
2019-04-07 14:21:29 -06:00
zewelor
e407226afc Fix yeelight possible array change during iteration (#22849) 2019-04-07 14:05:38 -06:00
Jason Hu
abe85c73ae Fix flaky test (#22850) 2019-04-07 12:42:16 -07:00
Jason Hunter
3fde1d3bab coerce duration and lookback to int so they can be used in template automation (#22819) 2019-04-07 13:08:08 -04:00
roblandry
c7a49e0820 Fix glances docker container errors (#22846)
* Fix unavailable container errors

* Update to dev

* Use const
2019-04-07 13:07:05 -04:00
Robbie Trencheny
02b7fd93ed Fix for rate limits should be optional (#22823) 2019-04-07 07:37:27 -07:00
Erik Montnemery
fa2e07d7c5 Use dict[key] for required config keys and keys with default values. (#22830) 2019-04-07 10:11:45 -04:00
Erik Montnemery
58220a9448 Use dict[key] for required config keys and keys with default values. (#22829) 2019-04-07 10:11:20 -04:00
Erik Montnemery
dbb42e5890 Use dict[key] for required config keys and keys with default values. (#22838) 2019-04-07 10:10:57 -04:00
Erik Montnemery
2a62906965 Use dict[key] for required config keys and keys with default values. (#22837) 2019-04-07 10:10:13 -04:00
Erik Montnemery
b1213b7a2d Use dict[key] for required config keys and keys with default values. (#22836) 2019-04-07 10:09:43 -04:00
Erik Montnemery
a4e7708450 Use dict[key] for required config keys and keys with default values. (#22833) 2019-04-07 10:08:47 -04:00
Erik Montnemery
439197ea3e Use dict[key] for required config keys and keys with default values. (#22828) 2019-04-07 10:08:04 -04:00
zewelor
f62d1d8d09 Optimize yeelight signal handling (#22806) 2019-04-07 16:07:50 +02:00
zewelor
a91e79ee77 Improve yeelight imports (#22804) 2019-04-07 16:07:34 +02:00
zewelor
bb5c18f7be Use relative imports in yeelight (#22839) 2019-04-07 16:07:15 +02:00
Erik Montnemery
842534d472 Use dict[key] for required config keys and keys with default values. (#22831) 2019-04-07 10:00:40 -04:00
Erik Montnemery
83fb3637d9 Sort configuration schema. (#22835) 2019-04-07 09:56:38 -04:00
Robbie Trencheny
6492809a7e Fix for optional values in the update_location webhook call (#22817)
* Fix for optional values in the update_location webhook call

* Square brackets instead of .get
2019-04-07 01:17:14 -07:00
Robbie Trencheny
3ce6be6297 Add a new mobile_app webhook command to get config (#22813)
* Add a new mobile_app webhook command to get config

* Limit fields returned
2019-04-07 01:16:54 -07:00
Markus Jankowski
c8eebb6b4a Add HmIP-SMO to Homematic IP (#22802) 2019-04-07 00:43:07 -07:00
Justin Vanderhooft
8c17b2f7dd Bump raincloud dependency to fix broken integration: Fixes #22422 (#22805)
* Bump raincloud dependency to fix broken integration: Fixes #22422

* bump requirements_all

* bump CODEOWNERS

* edit codeowners in response to PR feedback
2019-04-06 20:33:28 -07:00
Erik Montnemery
353fca3b6e Raise severity of MQTT callback deprecation warning (#22792) 2019-04-06 20:31:39 -07:00
Erik Montnemery
55619da722 Remove unused group status (#22791) 2019-04-06 20:31:21 -07:00
Andrew Hayworth
87cabc933c Update version of python_awair to 0.0.4 (#22809)
The awair API has changed again, this time substituting 'lat' and 'lon'
for 'latitude' and 'longitude'.
2019-04-06 18:55:15 -07:00
Jeff Irion
a747eaa3ba Remove pycryptodome requirement for Android TV (#22552)
* Bump androidtv to 0.0.15

* Bump androidtv to 0.0.15 in manifest.json
2019-04-06 16:18:50 +01:00
panosmz
6351c5c6ab Add OASA Telematics greek public transport sensor component (#22196)
* add telematics sensor

* add missing final newline

* code cleanup & add manifest

* fixes from review

* fix flake8 warning

* rerun gen_requirements_all.py script
2019-04-06 15:20:51 +02:00
Pascal Vizeli
8b3cf2d493 Update homeassistant-pyozw 0.1.4 (#22794) 2019-04-06 12:09:15 +02:00
Chris Helming
2b490e4486 Add optional rtsp_port for Foscam (#22786)
* add optional rtsp port for config

* getting rid of default=None

* removing vol.Any
2019-04-05 23:02:38 -04:00
Alexei Chetroi
a69b1a359d ZHA Light debug logging. (#22776) 2019-04-05 17:06:59 -07:00
David F. Mulcahey
f004f440d3 make the custom polling actually request state (#22778) 2019-04-05 17:01:06 -07:00
Nate Clark
dbe53a3947 Fix konnected unique_id computation for switches (#22777) 2019-04-05 16:52:30 -07:00
Rohan Kapoor
a44966f483 Correctly load Mopar's config (#22771) 2019-04-05 16:52:29 -07:00
David F. Mulcahey
192ed90773 make the custom polling actually request state (#22778) 2019-04-05 16:50:20 -07:00
Alexei Chetroi
8dfbfae270 ZHA Light debug logging. (#22776) 2019-04-05 19:06:41 -04:00
Nate Clark
144632a81b Fix konnected unique_id computation for switches (#22777) 2019-04-06 00:22:57 +02:00
Robert Svensson
d1bf470899 deCONZ multiple gateways fixup (#22774)
* Initial PR was merged before a proper review was performed
* These fixes follow Martins review comments after merge
2019-04-05 22:21:06 +02:00
Per Osbäck
7a33dc5cec update core dependencies due to pywebpush update (#22767) 2019-04-05 12:22:24 -07:00
Robert Svensson
008b641c56 Axis - support stream (#22593)
* Add support for new stream component
2019-04-05 19:14:54 +02:00
teliov
b3e60df82a Add google hangouts manual authentication option (#22158)
* Added option to use manual authentication for google hangout component
See: https://hangups.readthedocs.io/en/latest/user_guide.html#logging-in for manual log in example

Bumped up version of hangups to 0.4.9

* Updated components/hangouts/strings.json and generated translation string by running script/translations_develop
Reduced verbosity of modifications to components/hangouts/config_flow.py

* Added option to use manual authentication for google hangout component
See: https://hangups.readthedocs.io/en/latest/user_guide.html#logging-in for manual log in example

Bumped up version of hangups to 0.4.9

* Updated components/hangouts/strings.json and generated translation string by running script/translations_develop
Reduced verbosity of modifications to components/hangouts/config_flow.py

* fixing missing rebase
2019-04-05 10:11:04 -07:00
Rohan Kapoor
879967bed2 Correctly load Mopar's config (#22771) 2019-04-05 18:15:35 +02:00
carstenschroeder
323dc5b78a Improve exception handling in ADS integration (#22627)
* add exception handling

* fix hound findings

* improve logging

* improve logging II

* fix try..except to large
2019-04-05 17:14:44 +02:00
Pascal Vizeli
c209236f47 Merge pull request #22755 from home-assistant/rc
0.91.1
2019-04-05 15:44:21 +02:00
zewelor
9eb32728f1 Fix yeelight recorder warning (#22756) 2019-04-05 13:33:10 +02:00
zewelor
5e7fdb479b Fix yeelight recorder warning (#22756) 2019-04-05 13:32:46 +02:00
Pascal Vizeli
9198047ad5 Cleanup cookie handling (#22757) 2019-04-05 13:31:17 +02:00
Pascal Vizeli
4b877dd96f Cleanup cookie handling (#22757) 2019-04-05 13:29:43 +02:00
Paulus Schoutsen
cd3f51f7b1 Bumped version to 0.91.1 2019-04-04 23:49:37 -07:00
Fredrik Erlandsson
e9d55bf1c0 fixes configuration flow #22706 (#22754) 2019-04-04 23:49:12 -07:00
Jason Hunter
5252c92670 use the input stream codec as the template for the output streams (#22747) 2019-04-04 23:49:12 -07:00
Chris Helming
dc185b994d Update Foscam stream for newer models (#22744)
* Update Foscam to support stream source

* Removing spaces and tabs

* Changing to Python3-style string formatting

* Adding '_media_port' to hopefully cover other models

* changing logic for success and return none

* Update Foscam stream for newer models

* change if to or
2019-04-04 23:49:11 -07:00
Aaron Bach
74a7d4117e Bump aioambient to 0.2.0 (#22736) 2019-04-04 23:49:10 -07:00
Aaron Bach
bab966fb29 Fix incorrect "Unavailable" Ambient sensors (#22734)
* Fix incorrect "Unavailable" Ambient sensors

* Removed unnecessary cast
2019-04-04 23:49:10 -07:00
Pascal Vizeli
79facb82c6 Fix chunk streaming (#22730)
* Fix chunk streaming

* Cleanup a print

* Better error handling

* Fix import order
2019-04-04 23:49:09 -07:00
Pascal Vizeli
ec07affe0d Fix ingress routing with / (#22728) 2019-04-04 23:49:08 -07:00
David F. Mulcahey
193b608ee0 fix device class lookup for binary sensors (#22724) 2019-04-04 23:49:08 -07:00
Pascal Vizeli
8eb93a8bea Change URL handling (#22713) 2019-04-04 23:49:07 -07:00
Fredrik Erlandsson
876b5fbe96 fixes configuration flow #22706 (#22754) 2019-04-04 23:48:41 -07:00
Pascal Vizeli
71e120ce97 Fix chunk streaming (#22730)
* Fix chunk streaming

* Cleanup a print

* Better error handling

* Fix import order
2019-04-04 23:41:13 -07:00
Chris Helming
82a1c0d0e8 Update Foscam stream for newer models (#22744)
* Update Foscam to support stream source

* Removing spaces and tabs

* Changing to Python3-style string formatting

* Adding '_media_port' to hopefully cover other models

* changing logic for success and return none

* Update Foscam stream for newer models

* change if to or
2019-04-04 23:40:47 -07:00
Jason Hunter
8c657d4254 use the input stream codec as the template for the output streams (#22747) 2019-04-04 23:40:22 -07:00
Jason Hunter
a75b151dfa fix flaky test (#22748) 2019-04-04 23:39:19 -07:00
Erik Montnemery
563e4fbfca Add deprecation warning to embedded broker (#22753) 2019-04-04 23:38:10 -07:00
Robbie Trencheny
8b77298908 More fallout from #22737 and b130c433c9 2019-04-04 21:57:34 -07:00
Rohan Kapoor
d15eedc0fb Generate requirements_* from manifests (#22718)
## Description:
Generate requirements_* from manifests (if present). If not, fallback to the current approach of reading `REQUIREMENTS` from the module attribute. I disabled exploring the children of the `homeassistant.components.*` packages since that will just add a dependency (from the manifest) due to each of the python files in the package. Just having one for the top level package should be sufficient.

**Related issue (if applicable):** relates to #22700 

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23


Co-authored-by: Jason Hu <awaregit@gmail.com>
2019-04-04 21:29:29 -07:00
Robbie Trencheny
6c5f0b7434 It doesnt count as a fail if you catch it within 2 minutes 2019-04-04 21:27:18 -07:00
Rohan Kapoor
be579b783a Update PR template requirements to point to the manifest (#22751)
## Description:
Update the PR template to point requirements to the new manifest requirements.

**Related issue (if applicable):** relates to #22700

**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** https://github.com/home-assistant/developers.home-assistant/pull/214

## Example entry for `configuration.yaml` (if applicable):
```yaml

```

## Checklist:
  - [ ] The code change is tested and works locally.
  - [ ] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [ ] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:
  - [ ] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
  - [ ] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
  - [ ] New dependencies are only imported inside functions that use them ([example][ex-import]).
  - [ ] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
  - [ ] New files were added to `.coveragerc`.

If the code does not interact with devices:
  - [ ] Tests have been added to verify that the new code works.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23
2019-04-04 21:24:55 -07:00
Robbie Trencheny
b130c433c9 Update pywebpush version in manifest.json
Missed during #22737
2019-04-04 20:50:07 -07:00
Markus Jankowski
eadc1e037a add device class signal strength (#22738) 2019-04-04 21:37:59 -04:00
Wolfgang Malgadey
6996fec809 Fix tado turn on off (#22291)
* fix for turn on and off, with new pyTado

missing blank line

* removed, because can't push

* uploaded the file through github again
2019-04-04 17:52:06 -07:00
Robert Svensson
b50afec5f1 Support multiple deCONZ gateways (#22449)
* Store gateways inside a dict in deconz domain

* Make reachable events gateway specific

* Gateway shall always exist

* Adapt new device signalling to support multiple gateways

* Services follow gateway master

* Working on unload entry

* Make unload and master handover work
Improve tests for init

* Fix config flow

* Fix linting

* Clean up init tests

* Clean up hassio discovery to fit with the rest

* Store gateways inside a dict in deconz domain

* Make reachable events gateway specific

* Gateway shall always exist

* Adapt new device signalling to support multiple gateways

* Services follow gateway master

* Working on unload entry

* Make unload and master handover work
Improve tests for init

* Fix config flow

* Fix linting

* Clean up init tests

* Clean up hassio discovery to fit with the rest

* Add support for services to specify bridgeid
2019-04-04 17:48:24 -07:00
Per Osbäck
b9ec623ad9 Bump pywebpush to latest 1.9.2 (#22737) 2019-04-04 14:19:29 -07:00
Aaron Bach
96adbfdc36 Fix incorrect "Unavailable" Ambient sensors (#22734)
* Fix incorrect "Unavailable" Ambient sensors

* Removed unnecessary cast
2019-04-04 13:50:10 -06:00
Aaron Bach
0438dffe25 Bump aioambient to 0.2.0 (#22736) 2019-04-04 13:43:21 -06:00
Markus Ressel
07d739c14e Add N26 component (#22684)
* upgraded n26 dependency
removed card_id config parameter (unnecessary)
get_token is now a public method inside n26 dependency

* Add manifest.json
2019-04-04 10:18:54 -07:00
Pascal Vizeli
9bb88a6143 Fix ingress routing with / (#22728) 2019-04-04 17:43:18 +02:00
David F. Mulcahey
e29eb4fa23 fix device class lookup for binary sensors (#22724) 2019-04-04 09:06:54 -04:00
Eliran Turgeman
172ede217a Add 10 additional language options to DarkSky (#22719) 2019-04-04 14:23:31 +02:00
Martin Hjelmare
5d7c29dee2 Only post coverage comment if coverage changes (#22721) 2019-04-04 04:01:56 -07:00
Robbie Trencheny
754c4d205b Allow users to set encoding of mikrotik connection (#22715)
## Description:

Mikrotik does some stupid stuff with character encoding that can screw up the DHCP responses. See #15257 for more detail. 

**Related issue (if applicable):** fixes #15257

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-04-04 02:15:20 -07:00
Pascal Vizeli
beb6ddfa68 Change URL handling (#22713) 2019-04-04 11:10:44 +02:00
Paulus Schoutsen
d231d59896 Remove deprecated Insteon components (#22710) 2019-04-04 00:46:20 -07:00
Robbie Trencheny
704983a64f Fix hassio CODEOWNER to be the actual team name, hass-io 2019-04-04 00:34:34 -07:00
Robbie Trencheny
f9564400e8 Activate codeowners-mention via GitHub actions 2019-04-03 23:53:17 -07:00
Paulus Schoutsen
d5307c03d8 Generate codeowners based on manifests (#22705)
* Gen codeowners

* Update manifest_helper.py
2019-04-03 23:46:06 -07:00
Paulus Schoutsen
0c284161eb Validate manifests in CI (#22708)
* Validate manifests

* Fix mode

* Activate venv

* Validate manifests after installing HA which includes voluptuous
2019-04-03 23:45:09 -07:00
Rohan Kapoor
afac09932f Remove all config deprecations invalidated in 0.91 (#22704)
* Remove all config deprecations invalidated in 0.91

* Fix lint
2019-04-03 23:31:55 -07:00
Markus Jankowski
8e39939b7e Add device_class_power to sensor (#22691)
* Add device_class_power to sensor

* Fix comment
2019-04-03 21:52:23 -07:00
Kyle Niewiada
a5a926bcc6 Raise ConfigEntryNotReady for MQTT connection exception (#22540)
* Raise ConfigEntryNotReady for connection exception

Raise ConfigEntryNotReady for the connection exception like if the MQTT Server container/device is being restarted or was unavailable on boot.

* Add new exception

* grammar fix

* Possibly resolve hound comments

* raise `ConfigEntryNotReady` for mqtt connection error

* revert exceptions.py

* Update exceptions.py

* modify test to handle exception

* use constants to control exception scope

* Raise ConfigEntryNotReady for connection exception

Raise ConfigEntryNotReady for the connection exception like if the MQTT Server container/device is being restarted or was unavailable on boot.

* Add new exception

* Add new exception

* grammar fix

* Possibly resolve hound comments

* raise `ConfigEntryNotReady` for mqtt connection error

* revert exceptions.py

* Update exceptions.py

* modify test to handle exception

* use constants to control exception scope

* revert test change as it's not the same thing

* Update test_init.py

* Add test for MQTT OSError

* revert file changes from a bad rebase

* Rewrite test with valid syntax

* rewrite test to be less ambiguous

* add empty line

* add back 'axis'

* Remove empty line

* Update tests and undo merge from earlier

* correctly restore test for no connect broker

* fix test mock correctly

* line was too long. hit enter.
2019-04-03 21:51:01 -07:00
Robbie Trencheny
d81a627739 Add a .codecov.yml to control coverage statuses and enable notifications (#22707)
* Add a .codecov.yml to control coverage statuses and enable notifications

* Comment about Slack/Discord notification
2019-04-03 21:44:15 -07:00
Paulus Schoutsen
cfe4cf30ad Add manifests (#22699)
* Add manifests

* Update auto name

* Update codeowners

* Add requirements from platforms

* Minor cleanup

* Incorporate changes from awarecan PR
2019-04-03 21:14:45 -07:00
Jason Hu
6aac49de7e Remove aws_* notify platforms (#22698) 2019-04-03 20:14:02 -07:00
ehendrix23
a85bcce857 Fix connection loss issues for Harmony (#22687)
* Increase aioharmony version to 0.1.11

Update aioharmony version to 0.1.11, this new update contains fixes for websocket connection losses.

* Update requirements_all
2019-04-03 19:29:49 -05:00
Paulus Schoutsen
360caa3b1f Merge pull request #22688 from home-assistant/rc
0.91.0
2019-04-03 14:39:21 -07:00
Erik Montnemery
98644135fa Update light/services.yaml (#22662) 2019-04-03 20:30:03 +02:00
Paulus Schoutsen
63d8dd9f7a Bumped version to 0.91.0 2019-04-03 11:27:57 -07:00
Paulus Schoutsen
685de23a4e Run PyLint under Python 3.5 (#22642)
* Run PyLint under Python 3.5

* Remove -q from pip install to debug

* Upgrade setuptools before install

* Use correct cache key for pylint
2019-04-03 11:27:50 -07:00
Jason Hu
b30c140648 Require static-check success first for rest of workflow (#22635)
* Require static-check success first

* Update config.yml
2019-04-03 11:27:49 -07:00
Jason Hu
2c10563205 Config CircleCI workflow (#22590)
* Add mypyrc to control typing check, add mypy to circle

* Add translation upload circlci job
2019-04-03 11:27:49 -07:00
Jason Hu
5dd444fcd8 Set up Circleci workflow (#22519)
* Set up Circleci workflow

* Update python tag

* Add pre-test job to cache the requirements

* Upgrade pip itself

* Use 3.7 for lint

* Parallelize pylint

* Tweak run gen_requirements_all

* tweak cache key
2019-04-03 11:27:48 -07:00
Jason Hu
273007fa19 Fix Circleci config (#22509)
* Add libav depends on circleci

* tweak circleci config
2019-04-03 11:27:48 -07:00
Jason Hu
2e8c690033 A very basic Circleci setup (#22503)
* Add circleci support

* Add buildpack-deps

* Install libudev-dev

* sudo

* always run test

* Add test report

* no sugar

* quite pytest

* better junit test result

* Add $CODE_COVERAGE env var
2019-04-03 11:27:47 -07:00
Pascal Vizeli
836aab283f Fix ffmpeg default extra options (#22682) 2019-04-03 11:25:38 -07:00
Paulus Schoutsen
7cf92c2210 Deal with cover assumed state (#22673)
* Deal with cover assumed state

* Add docs
2019-04-03 11:25:38 -07:00
Jason Hu
9eb4f89da4 Fix trusted networks auth provider warning message (#22671)
* Fix trusted networks auth provider warning message

* Update auth.py
2019-04-03 11:25:37 -07:00
Diogo Gomes
167d8cbaba Fix #22648 - Utility_meter would try to cancel a non existing task (#22669)
* don't cancel tariff that are paused

* test tariffs
2019-04-03 11:25:36 -07:00
mvn23
e90d980e67 Don't use room setpoint override in climate.opentherm_gw (#22656)
* Dont use DATA_ROOM_SETPOINT_OVRD in climate.opentherm_gw as it is unreliable with some thermostats.

* Show new target temperature immediately until the backend notices a change

* Only update target temp on the gateway if the value differs from the current target_temperature.
2019-04-03 11:25:36 -07:00
Pascal Vizeli
81a659be0d Hass.io discovery flow deconz (#22623)
* Add Hass.io deCONZ discovery flow

* add bridge ID

* fix attribute

* fix strings

* Address comments

* Add test

* Add only instance / changed maybe later
2019-04-03 11:25:35 -07:00
Robbie Trencheny
51c7cbc6b9 Add mobile_app notify platform (#22580)
* Add mobile_app notify platform

* Requested changes

* Fix incorrect param for status code

* Move push_registrations to notify platform file

* Trim down registration information sent in push

* quotes

* Use async version of load_platform

* Add warning for duplicate device names

* Switch to async_get_service

* add mobile_app.notify test

* Update tests/components/mobile_app/test_notify.py

* Update tests/components/mobile_app/test_notify.py
2019-04-03 11:25:34 -07:00
Paulus Schoutsen
14da2fd8c9 Google Assistant: Add support for open/close binary sensors (#22674)
* Google Assistant: Add support for binary sensors

* Update test
2019-04-03 10:20:56 -07:00
Martin Hjelmare
3872ac9bf9 Fix citybikes (#22683)
* Move asyncio condition to instance from class, to be able to pass in
  lopp.
* Avoid not needed sife effects in init methods.
* Clean up.
2019-04-03 09:05:18 -07:00
Jason Hu
b4fc1d77ea Fix trend binary sensor and tests (#22686) 2019-04-03 09:04:30 -07:00
Tobias Sauerwein
048b100eea Clean up docstrings (#22679)
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Alexei Chetroi
625c8e0cee Shutdown ZHAGateway on hass closing. (#22646)
* Shutdown ZHAGateway on hass stop.
* Cleanup ZHA event leftovers.
2019-04-03 09:40:48 -04:00
Robbie Trencheny
b797b1513a Add mobile_app notify platform (#22580)
* Add mobile_app notify platform

* Requested changes

* Fix incorrect param for status code

* Move push_registrations to notify platform file

* Trim down registration information sent in push

* quotes

* Use async version of load_platform

* Add warning for duplicate device names

* Switch to async_get_service

* add mobile_app.notify test

* Update tests/components/mobile_app/test_notify.py

* Update tests/components/mobile_app/test_notify.py
2019-04-03 08:21:25 -04:00
Paulus Schoutsen
b1cca25299 Deal with cover assumed state (#22673)
* Deal with cover assumed state

* Add docs
2019-04-03 13:53:44 +02:00
Pascal Vizeli
7066fb0d10 Fix ffmpeg default extra options (#22682) 2019-04-03 13:46:41 +02:00
Pascal Vizeli
58a89640bb Update uvloop to 0.12.2 (#22681) 2019-04-03 12:20:05 +02:00
Diogo Gomes
7c5846aed2 Fix #22648 - Utility_meter would try to cancel a non existing task (#22669)
* don't cancel tariff that are paused

* test tariffs
2019-04-03 08:49:53 +02:00
Finbarr Brady
a7d49e40c0 Rebrand Cisco Spark notify to be Cisco Webex Teams (#21938)
* Rebrand Cisco Spark notify to be Cisco Webex Teams

* Remove property from class

* Switch to use html for api

* Update notify.py

* Rename CONF_ROOMID to CONF_ROOM_ID

* updated

* Fix lint errors

* Update notify.py

* Update notify.py

* Also validate room  ID

* Update notify.py

* Update .coveragerc

* Update notify.py
2019-04-02 23:25:02 -07:00
Jason Hu
6a411710df Fix trusted networks auth provider warning message (#22671)
* Fix trusted networks auth provider warning message

* Update auth.py
2019-04-02 21:23:59 -07:00
Johann Kellerman
f2941522ca Person tests - split from #21703 (#22663) 2019-04-03 05:35:33 +02:00
emontnemery
e736521e9f Fix regression from PR #22396 (#22661)
* Fix regression from PR #22396

* Fix test
2019-04-02 19:58:28 -07:00
emontnemery
4f2435103b Cast: Fix next/previous track (#22634)
* Fix next/previous track

* Bump pychromecast

* Update test, fixup
2019-04-02 19:58:02 -07:00
Johann Kellerman
3453d67cfe Person schema for merge_packages #21307 (#21703)
* Person schema for merge_packages #21307

* empty list

* skip empty persons

* hound

* test schema

* ensure_none

* remove any test changes

* remove_falsy validator

* nice!

* coretests
2019-04-02 19:43:06 -07:00
Pascal Vizeli
5613e8bb60 Hass.io discovery flow deconz (#22623)
* Add Hass.io deCONZ discovery flow

* add bridge ID

* fix attribute

* fix strings

* Address comments

* Add test

* Add only instance / changed maybe later
2019-04-02 19:23:33 -07:00
mvn23
22d93a74a4 Don't use room setpoint override in climate.opentherm_gw (#22656)
* Dont use DATA_ROOM_SETPOINT_OVRD in climate.opentherm_gw as it is unreliable with some thermostats.

* Show new target temperature immediately until the backend notices a change

* Only update target temp on the gateway if the value differs from the current target_temperature.
2019-04-02 13:57:38 -07:00
Andrew Sayre
5651db4b5c Add discovery support to HEOS component (#22652)
* Add discovery entry point

* Fix test

* Correct test call method

* Update netdisco to 2.6.0
2019-04-02 15:22:49 -05:00
Paulus Schoutsen
3357596215 Bumped version to 0.91.0b5 2019-04-02 11:42:01 -07:00
Jc2k
31ac965b16 Fix racy homekit_controller platform setup caused by #22368 (#22655) 2019-04-02 11:41:56 -07:00
Chris Helming
e3ca1e6203 Return 0 for failed Foscam streams (#22651)
* Update Foscam to support stream source

* Removing spaces and tabs

* Changing to Python3-style string formatting

* Adding '_media_port' to hopefully cover other models

* changing logic for success and return none
2019-04-02 11:41:55 -07:00
Pascal Vizeli
6d741d68b7 Support GET params for websocket ingress path (#22638) 2019-04-02 11:41:55 -07:00
Daniel Høyer Iversen
a5c7f131ee Handle disonnect bug in Tibber library (#22629) 2019-04-02 11:41:54 -07:00
Paulus Schoutsen
c7576999ca Disable Z-Wave autoheal (#22628) 2019-04-02 11:41:53 -07:00
Pascal Vizeli
56c75d7706 Update face_recognition to 1.2.3 (#22622) 2019-04-02 11:41:53 -07:00
Chris Helming
e0b4e88544 Update Foscam component to support stream source (#22568)
* Update Foscam to support stream source

* Removing spaces and tabs

* Changing to Python3-style string formatting

* Adding '_media_port' to hopefully cover other models
2019-04-02 11:41:52 -07:00
Pascal Vizeli
6f345c55c9 Hass.io ingress (#22505)
* Fix API stream of snapshot / Add ingress

* fix lint

* Fix stream handling

* Cleanup api handling

* fix typing

* Set proxy header

* Use header constant

* Enable the ingress setup

* fix lint

* Fix name

* Fix tests

* fix lint

* forward params

* Add tests for ingress

* Cleanup cookie handling with aiohttp 3.5

* Add more tests

* Fix tests

* Fix lint

* Fix header handling for steam

* forward header too

* fix lint

* fix flake
2019-04-02 11:41:51 -07:00
Jason Hu
5cb69cf163 Add trusted networks deprecating warning (#22487)
* Add trusted networks deprecating warning

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Tweak
2019-04-02 11:41:51 -07:00
Alex Bahm
471afb4702 Add color support to emulated hue (#19590)
* [Hue API] Add color support

Adds color support to the hue api (specifically hue/saturation). Switched from using a tuple to convey state internally to using a dict to make adding new fields easier.

* [Hue API] Add unit test for color support
2019-04-02 11:25:58 -07:00
OleksandrBerchenko
8a86a79040 Add missing properties and scenes support to Osram Lightify (#22597)
* Rewrite Osram Lightify component

* Update python-lightify version to 1.0.7.2

* Remove unneeded code

* 1. Remove changes in light/__init__.py, 2. Set properties to None by default

* Fix typo

* Implement missing features (including scenes)

* Make input parameters to setup_platform standardized
2019-04-02 11:14:46 -07:00
Robert Svensson
8a0b210f87 Axis discovery updates host address (#22632)
* Discovery can update host on existing entries

* Add support in device to update host on entry update

* Fix tests and listener

* Fix hound comment

* Fix failing tests from cleanup
2019-04-02 11:13:11 -07:00
Markus Jankowski
6c14e7afa7 Add battery sensor to Homematic IP (#22630) 2019-04-02 10:29:48 -07:00
Chris Helming
429e2cdde8 Return 0 for failed Foscam streams (#22651)
* Update Foscam to support stream source

* Removing spaces and tabs

* Changing to Python3-style string formatting

* Adding '_media_port' to hopefully cover other models

* changing logic for success and return none
2019-04-02 09:59:38 -07:00
Jason Hu
d6e2862115 Ignore code coverages for component without test (#22653) 2019-04-02 09:51:44 -07:00
Paulus Schoutsen
e00ae35e07 Admin service to automatically add empty schema (#22637)
* Admin service to automatically add empty schema

* Lint
2019-04-02 09:34:11 -07:00
cgtobi
b8b3f4e88f Fix pytest durations parameter (#22658)
* Fix durations parameter

* Update config.yml
2019-04-02 09:31:29 -07:00
Alexei Chetroi
0427154963 Don't force updates on ZHA Electrical Measurement sensor. (#22647) 2019-04-02 08:28:55 -07:00
David Bonnes
3bd37d6a65 Improve evohome exception handling and fix bugs (#22140)
* Use latest client library, evohomeclient v0.3.1

* Fix issue #22097: Failed to call service climate/turn_on...

* BUGFIX: handle case where a Zone doesn't have a temperature

* BUGFIX: missing exception handler, and inappropriate delint hints

* Improve exception handling, and also better messages

* improve code (REDACT secrets); remove TODOs

* minor refactor - improve error message

* more refactoring - improve error message

* remove TODOs

* update to latest evohomeclient library

* Use latest client library, evohomeclient v0.3.1

* Fix issue #22097: Failed to call service climate/turn_on...

* BUGFIX: handle case where a Zone doesn't have a temperature

* BUGFIX: missing exception handler, and inappropriate delint hints

* Improve exception handling, and also better messages

* improve code (REDACT secrets); remove TODOs

* minor refactor - improve error message

* more refactoring - improve error message

* remove TODOs

* update to latest evohomeclient library

* fix requests for houndci-bot

* Tidy up requests exception handling

* Correct lint error

* update to latest client library

* minor de-lint

* more cleanup of exceptions, messages

* refactored for new exception

* fix error in requirements*_all.txt

* de-lint

* delint unused import

* import 3rd-party library only inside methods

* change honeywell tests

* delint, fix typo

* we dont log usernames, passwords, etc.

* de-lint
2019-04-02 15:11:26 +02:00
Jc2k
16e0953f26 Fix racy homekit_controller platform setup caused by #22368 (#22655) 2019-04-02 09:57:58 +02:00
Paulus Schoutsen
48189dd152 Run PyLint under Python 3.5 (#22642)
* Run PyLint under Python 3.5

* Remove -q from pip install to debug

* Upgrade setuptools before install

* Use correct cache key for pylint
2019-04-01 21:51:43 -07:00
Johann Kellerman
2578c8525b Qwikswitch fix listen loop (#22600)
* Qwikswitch fix listen loop
* 0.93 fix qwikcord upstream
2019-04-02 05:57:25 +02:00
Jason Hu
7646dc00e0 Add codecov (#22649) 2019-04-01 20:31:05 -07:00
Jason Hu
39eaa7fc8d Add trusted networks deprecating warning (#22487)
* Add trusted networks deprecating warning

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Tweak
2019-04-01 17:43:29 -07:00
Jason Hu
1e26151069 Require static-check success first for rest of workflow (#22635)
* Require static-check success first

* Update config.yml
2019-04-01 17:42:04 -07:00
Pascal Vizeli
e708032669 Support GET params for websocket ingress path (#22638) 2019-04-01 17:41:08 -07:00
Malte Franken
a7e613616c change library to georss_generic_client (#22615) 2019-04-01 19:27:58 -04:00
Phil Bruckner
82296aeb71 Amcrest: Add on/off support & attributes. Bump amcrest to 1.3.0 (#22418)
* Amcrest: Add on/off support & attributes to camera entity. Bump amcrest package to 1.3.0.

Add support for turn_on & turn_off services.

Add implementation of is_recording method, as well as brand, model, hardware_version, machine_name, serial_number, software_build and software_version attributes.

Bump amcrest package to 1.3.0 required for above changes and also handles errors in storage commands which resolves #19982.

* Update per review

Rebase to upstream/dev.

Remove video_enabled property and setter and replace with _enable_video_stream
method.

Remove static attributes from camera and sensors.
2019-04-01 17:36:29 -05:00
etheralm
e78709c5f5 Add support for Dyson Purecool 2018 Air Purifiers models TP04 and DP04 (#22215)
* initial commit

initial commit

rewrite tests

fix merge issue with fan component

fix merge issue with fan component

* correct line length

* change to sync_setup_component for tests

* rename services and move services.yaml

* move hepa and carbon filter state from sensor to fan

* add test for duplicate entities

* fix method call tests

* fix docstring
2019-04-01 19:57:11 +02:00
René-Marc Simard
1ce622469d Fix GTFS variable type mismatch (#22624) 2019-04-01 10:49:53 -07:00
Anna Prosvetova
ab2ac60d12 Fix xiaomi vacuum resume functionality (#22626) 2019-04-01 10:44:46 -07:00
Daniel Høyer Iversen
2e02efed10 Handle disonnect bug in Tibber library (#22629) 2019-04-01 10:33:38 -07:00
Paulus Schoutsen
bbc4775eab Disable Z-Wave autoheal (#22628) 2019-04-01 10:20:13 -07:00
VDRainer
431cc63aaf Trend binary sensor check for state unavailable (#22621)
* Trend binary sensor check for state unavailable

Fixes: https://github.com/home-assistant/home-assistant/issues/20210

* Fix pylint
2019-04-01 10:03:18 -07:00
Fredrik Erlandsson
0056fcf904 Make platform setup a coroutine (#22620)
* make setup_platform a coroutine

* Update homeassistant/components/tellduslive/sensor.py

Co-Authored-By: fredrike <fredrik.e@gmail.com>
2019-04-01 10:01:31 -07:00
Pascal Vizeli
1e96d69688 Update face_recognition to 1.2.3 (#22622) 2019-04-01 10:00:25 -07:00
Andrew Sayre
9f2c5b7231 Add source selection to Heos component (#22592)
* Add select source support

* Review feedback changes

* Removed unused import

* Ignore 'umused' import used in typing

* Only include trace back on useful errors

* Remove return from play_source
2019-04-01 11:58:52 -05:00
Pascal Vizeli
a5b03541e9 Delete .travis.yml 2019-04-01 17:16:56 +02:00
Jason Hu
de4d1f2c19 Config CircleCI workflow (#22590)
* Add mypyrc to control typing check, add mypy to circle

* Add translation upload circlci job
2019-04-01 07:12:59 -07:00
Pascal Vizeli
6829ecad9d Hass.io ingress (#22505)
* Fix API stream of snapshot / Add ingress

* fix lint

* Fix stream handling

* Cleanup api handling

* fix typing

* Set proxy header

* Use header constant

* Enable the ingress setup

* fix lint

* Fix name

* Fix tests

* fix lint

* forward params

* Add tests for ingress

* Cleanup cookie handling with aiohttp 3.5

* Add more tests

* Fix tests

* Fix lint

* Fix header handling for steam

* forward header too

* fix lint

* fix flake
2019-04-01 14:16:16 +02:00
Paulus Schoutsen
42e3e878df Cloudhooks for webhook config flows (#22611) 2019-04-01 14:07:12 +02:00
Paulus Schoutsen
c96804954c Only allow admins to enable remote connection (#22609)
* Only allow admins to enable remote connection

* Protect WS API

* Lint
2019-04-01 10:22:51 +02:00
Anders Melchiorsen
282fd225c9 Add netgear_lte connection sensors (#22558) 2019-03-31 23:47:29 -07:00
N1nja98
a61181b10c Fixed brightness reducing after each light change (#22606)
self._brightness max is 255 and hsv brightness max is 100. Assigning 255 based brightness value directly with 100 based hsv reduces brightness eventually to zero.
2019-03-31 23:27:47 -07:00
Robbie Trencheny
7bd8c0d39a Add new mobile_app webhook command: get_zones (#22604)
## Description:

Adds a new `mobile_app` webhook command, `get_zones`, which just returns all zones.

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-31 21:30:45 -07:00
Paulus Schoutsen
fbb28c401e Bumped version to 0.91.0b4 2019-03-31 20:30:30 -07:00
carstenschroeder
734a67ede0 Refactor of ADS integration and introduce ADSEntity (#22583)
* Prevent toogle to false at restart

* change to asyncio.run_coroutine_threadsafe

* refactor ADS platforms; introduce AdsEntity

* fix hound findings

* some formatting

* remove redundant def.

* fix useless super delegation

* fix inconsistent ADS data type for brightness

* fix requested changes

* fix comment
2019-03-31 20:28:43 -07:00
Paulus Schoutsen
0e42cb64d6 Add stream to the default config (#22602) 2019-03-31 20:02:01 -07:00
drjared88
2e61ead4fd Update ONVIF component to SUPPORT_STREAM (#22569)
* Update Onvif component to SUPPORT_STREAM

* Update camera.py

* Update camera.py

* Update camera.py

Remove extra spaces.

* lookup URL when camera is added to hass and add extra guards
2019-03-31 20:02:00 -07:00
Jason Hu
de16059365 Fix name conflict in tests (#22556)
* Fix name conflict in tests

* Lint

* Lint
2019-03-31 20:01:59 -07:00
drjared88
a71fcfb6e5 Update Amcrest component to SUPPORT_STREAM (#22553)
* Update camera.py

Update Amcrest component to SUPPORT_STREAM to allow streaming in the UI and Google Assistant.

* Update camera.py
2019-03-31 20:01:59 -07:00
giefca
8af70d5d19 Google assistant: add blinds trait for covers (#22336)
* Update const.py

* Update smart_home.py

* Update trait.py

* Update test_trait.py

* Update smart_home.py

* Update test_trait.py

* Update trait.py

* Update trait.py

* Update test_trait.py

* Update test_trait.py

* Update __init__.py

* Update test_trait.py

* Change email

* Trying to correct CLA

* Update __init__.py

* Update trait.py

* Update trait.py

* Update trait.py

* Update trait.py

* Update __init__.py

* Update test_trait.py

* Update test_google_assistant.py

* Update trait.py

* Update trait.py

* Update test_trait.py

* Update test_trait.py
2019-03-31 20:01:59 -07:00
Paulus Schoutsen
ec9a58442b Updated frontend to 20190331.0 2019-03-31 20:01:35 -07:00
Paulus Schoutsen
804f1d1cc8 Update translations 2019-03-31 20:01:23 -07:00
Paulus Schoutsen
9a4b0cfb9b Updated frontend to 20190331.0 2019-03-31 19:52:44 -07:00
Aaron Bach
3d8efd4200 Add permission checking to all RainMachine services (#22399)
* Add permission checking to all RainMachine services

* Linting

* Some initial work

* Owner comments

* Test in place (I think)

* Linting

* Update conftest.py
2019-03-31 19:32:55 -07:00
Paulus Schoutsen
50a0504e07 Add stream to the default config (#22602) 2019-03-31 17:14:19 -07:00
drjared88
e085383d2d Update ONVIF component to SUPPORT_STREAM (#22569)
* Update Onvif component to SUPPORT_STREAM

* Update camera.py

* Update camera.py

* Update camera.py

Remove extra spaces.

* lookup URL when camera is added to hass and add extra guards
2019-03-31 15:12:55 -07:00
René-Marc Simard
755571abe3 Fix gtfs typing and logger issues (#22572)
## Description:
Some code cleanup requests where raised in the [latest merged GTFS commit](9153e3b671). This new PR aims to address them, including:
- Clear all typing issues.
- Respect logger levels and format.
- Simplify some non-pythonic lines.

This sensor now passes `mypy` testing, but does so by ignoring two lines with `# type: ignore`.

**Related issue (if applicable):** fixes issues raised by @MartinHjelmare in #20966

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23
2019-03-31 14:21:45 -07:00
Sander Cornelissen
7d7b931163 Retrying connecting Influxdb at setup (#22567)
* Also retry Influxdb at setup()

* Use event.call_later() for retry setup Influxdb

* Fix max line length in setup() in Influxdb

* Add extra space before comment

* Fix sec -> seconds and add return True
2019-03-31 16:00:48 -04:00
Markus Jankowski
5abfc84382 Clean up homematicip cloud (#22589)
* Code Cleanup

- removed unused constants
- more icons on binary_sensor groups
- alligned  code for device_state_attributes
- fixed temperature unit origin for weather

* removed icons
2019-03-31 21:18:45 +02:00
OleksandrBerchenko
842a36dc9e Rewrite Osram Lightify component (#22184)
* Rewrite Osram Lightify component

* Update python-lightify version to 1.0.7.2

* Remove unneeded code

* 1. Remove changes in light/__init__.py, 2. Set properties to None by default

* Fix typo
2019-03-31 21:02:45 +02:00
Anders Melchiorsen
1b0b5b4b8c Fix lightwave config validation (#22576) 2019-03-31 09:19:39 -05:00
OleksandrBerchenko
800b1c7fe6 Fix typo in light/__init__.py (#22581) 2019-03-31 13:43:54 +02:00
Jason Hu
388d614e30 Ignore flaky test (#22563) 2019-03-30 21:10:32 -07:00
emontnemery
4d1633807c Turn light off if brightness is 0 (#22400)
* Turn light off if brightness is 0

* Lint

* Review comments

* Lint

* Fixup, add tests

* Fix trådfri light + test
2019-03-30 21:04:32 -07:00
Chris Helming
f6e9dd4832 Update Foscam component to support stream source (#22568)
* Update Foscam to support stream source

* Removing spaces and tabs

* Changing to Python3-style string formatting

* Adding '_media_port' to hopefully cover other models
2019-03-30 21:01:58 -07:00
emontnemery
54777a81bc Forward media control to playing group (#22566)
* Forward media control to playing group

* Fix forwarding control to dynamic group

* Fix, add tests
2019-03-30 20:07:01 -07:00
Pascal Vizeli
71ecaa4385 Delete main.workflow 2019-03-30 21:59:15 +01:00
Paulus Schoutsen
e70931da67 Delete azure-pipelines.yml 2019-03-30 12:30:35 -07:00
Greg Dowling
9bf0f60784 Bump pyloopenergy library to 0.1.2 (#22561) 2019-03-30 12:52:54 -05:00
Klaudiusz Staniek
2eafa5f81a Ampio Smog Air Quality Sensor (#21152)
* Initial commit for Ampio Smog Air Quality Sensor

* coveragerc and requirements_all update

* Lint fixed

* Moved to vendor folder

* Updated according to review

* Docs string fix

* Docstring fix

* Docstring fix

* Requirements fixed

* Lint fix

* .coveragerc updated
2019-03-30 18:49:59 +01:00
carstenschroeder
34324afbde Prevent toogle to false at restart of ADS platforms (#22522)
* Prevent toogle to false at restart

* change to asyncio.run_coroutine_threadsafe
2019-03-30 18:47:39 +01:00
emontnemery
2e375aa802 Improve handling of audio groups (#22396)
* Improve handling of audio groups

* Review comments

* Fix tests

* Add tests

* Review comment

* Bump pychromecast
2019-03-30 10:19:18 -07:00
Jason Hu
64306922b1 Fix name conflict in tests (#22556)
* Fix name conflict in tests

* Lint

* Lint
2019-03-30 08:30:21 -07:00
Andrew Sayre
ecba87179f Add Heos config flow (#22554)
* Add UI initiated config flow

* Fix alpha order
2019-03-30 08:52:17 -05:00
Marco Orovecchia
b6ac964df3 Added support for transitions for nanoleaf light (#22192)
* Added transition support for nanoleaf

* Formatting for comments

* Inline comment instead of additional line

* Set color_temp before starting transition
2019-03-30 12:08:30 +01:00
Jc2k
906f0113ad Add more HomeKit device enumeration tests (#22194)
* Test that Aqara Gateway, Ecobee 3 and Lennox E30 is correctly enumerated

* Move json to fixtures directory

* Move IO to executor
2019-03-30 11:21:11 +01:00
Anders Melchiorsen
1a39fb4de7 Add table with netgear_lte sensor units (#22508) 2019-03-30 10:09:36 +01:00
Kevin Cooper
4b9e3258dc Add command_template and value_template for MQTT alarm (#21438)
* Option to send pin code with the MQTT payload for MQTT alarm

* publish code via json

Add publish code via json
add code_disarm_required

* publish code via json

Add publish code via json
add code_disarm_required

* implemented command_template

* Fix issue with night arm and add template test

* implemented value_template for mqtt alarm

* Fixed merge errors

* Requested changes

* Resolve lint errors

* Resolve hound issues

* Fix test formatting
2019-03-30 07:36:10 +01:00
Andrew Sayre
1bfe86b30d Change HEOS component library and add basic config flow (#22517)
* Update heos lib

* Update requirements files

* Removed unecessary mock_coro usage

* Remove assert_called_once usage

* Updates from review feedback

* Remove extra param to error format
2019-03-29 21:10:00 -07:00
drjared88
fe8e51e2e9 Update Amcrest component to SUPPORT_STREAM (#22553)
* Update camera.py

Update Amcrest component to SUPPORT_STREAM to allow streaming in the UI and Google Assistant.

* Update camera.py
2019-03-29 20:53:01 -07:00
giefca
b04fd08cea Google assistant: add blinds trait for covers (#22336)
* Update const.py

* Update smart_home.py

* Update trait.py

* Update test_trait.py

* Update smart_home.py

* Update test_trait.py

* Update trait.py

* Update trait.py

* Update test_trait.py

* Update test_trait.py

* Update __init__.py

* Update test_trait.py

* Change email

* Trying to correct CLA

* Update __init__.py

* Update trait.py

* Update trait.py

* Update trait.py

* Update trait.py

* Update __init__.py

* Update test_trait.py

* Update test_google_assistant.py

* Update trait.py

* Update trait.py

* Update test_trait.py

* Update test_trait.py
2019-03-29 20:51:47 -07:00
Paulus Schoutsen
95a7077b41 Move core services.yaml file to Home Assistant integration (#22489)
* Move services.yaml to correct dir

* Remove special case for HA servicesgs
2019-03-29 20:48:45 -07:00
Julien Roy
8e975395be upgrade pylinky to 0.3.3 (#22544) 2019-03-29 19:22:28 -07:00
Paulus Schoutsen
b1a6539290 Bumped version to 0.91.0b3 2019-03-29 17:05:40 -07:00
Paulus Schoutsen
3ad4419cb6 Fix platform warnings (#22551) 2019-03-29 17:05:30 -07:00
Paulus Schoutsen
f9f100b575 Add support for streaming to ffmpeg (#22549) 2019-03-29 17:05:29 -07:00
Paulus Schoutsen
cc886821bc Fix platform warnings (#22551) 2019-03-29 17:04:59 -07:00
Paulus Schoutsen
c05bff7d17 Add support for streaming to ffmpeg (#22549) 2019-03-29 17:03:02 -07:00
Paulus Schoutsen
65c47824a0 Updated frontend to 20190329.0 2019-03-29 16:47:27 -07:00
Paulus Schoutsen
fbb9097f6c Updated frontend to 20190329.0 2019-03-29 16:46:15 -07:00
Jason Hu
e81e5ea796 Set up Circleci workflow (#22519)
* Set up Circleci workflow

* Update python tag

* Add pre-test job to cache the requirements

* Upgrade pip itself

* Use 3.7 for lint

* Parallelize pylint

* Tweak run gen_requirements_all

* tweak cache key
2019-03-29 16:37:45 -07:00
Paulus Schoutsen
c4a4af7c29 Bumped version to 0.91.0b2 2019-03-29 14:07:22 -07:00
damarco
24095c0d7b Bump zigpy (#22545) 2019-03-29 14:07:18 -07:00
Steven Looman
ae18705c45 Upgrade to async_upnp_client==0.14.7 (#22543) 2019-03-29 14:07:17 -07:00
Jason Hu
ab642ca4eb Fix tts Great Migration issue (#22539) 2019-03-29 14:07:16 -07:00
David F. Mulcahey
b7bc520a0e clean up channel configuration (#22534) 2019-03-29 14:07:16 -07:00
ktnrg45
53595e76d8 PS4 bump to 0.5.2 (#22523)
* Bump pyps4 to 0.5.2

* Bump pyps4 to 0.5.2

* Bump pyps4 to 0.5.2
2019-03-29 14:07:15 -07:00
David F. Mulcahey
173ef7cac5 Do not use zha default light polling (#22513)
* don't use default light polling

* review comment
2019-03-29 14:07:15 -07:00
Jason Hu
9f72764cff Fix lint on dev (#22512)
## Description:

Fix a lint issue in credstash script.


**Related issue (if applicable):** fixes #<home-assistant issue number goes here>

**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

## Example entry for `configuration.yaml` (if applicable):
```yaml

```

## Checklist:
  - [ ] The code change is tested and works locally.
  - [ ] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [ ] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:
  - [ ] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
  - [ ] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
  - [ ] New dependencies are only imported inside functions that use them ([example][ex-import]).
  - [ ] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
  - [ ] New files were added to `.coveragerc`.

If the code does not interact with devices:
  - [ ] Tests have been added to verify that the new code works.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23
2019-03-29 14:07:14 -07:00
Jason Hu
77f7a53d9f Remove botocore dependency from credstash script (#22511)
* Remove botocore dependency from credstash script

* Update requirements_all.txt

* Update pylintrc

* Update credstash.py
2019-03-29 14:07:13 -07:00
zewelor
fae8265a37 Fixes for yeelight availbility state (#22502) 2019-03-29 14:07:13 -07:00
mvn23
a95fb809a5 Update pyotgw to 0.4b3 (#22496) 2019-03-29 14:07:12 -07:00
Jason Hu
21917f4dc4 Fix dev branch (#22493) 2019-03-29 14:07:12 -07:00
Sebastian Muszynski
9aa5b904c6 Fix regression of the xiaomi_aqara config validation (#22435)
* Fix regression of the xiaomi_aqara config validation

* Make the key optional again

* Add base schema

* Remove the GW_MAC default
2019-03-29 14:07:11 -07:00
damarco
c0ce86fa8e Bump zigpy (#22545) 2019-03-29 14:01:51 -07:00
Steven Looman
613c356c5f Upgrade to async_upnp_client==0.14.7 (#22543) 2019-03-29 13:41:50 -07:00
Sebastian Muszynski
f46a8378b0 Fix regression of the xiaomi_aqara config validation (#22435)
* Fix regression of the xiaomi_aqara config validation

* Make the key optional again

* Add base schema

* Remove the GW_MAC default
2019-03-29 13:41:13 -07:00
David F. Mulcahey
6401920019 clean up channel configuration (#22534) 2019-03-29 16:41:04 -04:00
ktnrg45
a07919ced2 PS4 bump to 0.5.2 (#22523)
* Bump pyps4 to 0.5.2

* Bump pyps4 to 0.5.2

* Bump pyps4 to 0.5.2
2019-03-29 12:10:28 -07:00
Yaroslav
daf6b01b98 Ring camera improvements (#22526)
* Ring camera improvements

Expose last_video_id attribute.
Fix missing last_video_url
Only update last_video_id when video is ready

* Fix formatting
2019-03-29 12:10:00 -07:00
Jason Hu
c31ab7a175 Fix tts Great Migration issue (#22539) 2019-03-29 11:45:02 -07:00
zewelor
4e78d895d9 Fixes for yeelight availbility state (#22502) 2019-03-29 18:43:29 +01:00
Paulus Schoutsen
ec076c7c10 Azure Pipelines: No Python 3.5.3 available, use any 3.5 version [skip ci] 2019-03-29 09:21:20 -07:00
Paulus Schoutsen
e7d3b22b46 Add lint task to Azure Pipelines [skip ci] 2019-03-29 09:18:25 -07:00
Paulus Schoutsen
75eeeae920 Set up CI with Azure Pipelines [skip ci] 2019-03-29 09:11:13 -07:00
David F. Mulcahey
6dc127780e Do not use zha default light polling (#22513)
* don't use default light polling

* review comment
2019-03-29 16:52:13 +01:00
Kyle Niewiada
1050baa9cc throw PlatformNotReady if unable to connect (#22515)
Throw `PlatformNotReady` for when the device disconnects, or when the Home Assistant is booting and the ADB server is not ready yet.
2019-03-29 08:08:36 -07:00
Robert Svensson
5f6037d563 Axis component reflect device availability (#22401) 2019-03-29 15:20:12 +01:00
Aaron Bach
f4625fd561 Speed up status updating in SimpliSafe (#22506)
* Speed up status updating in SimpliSafe

* Linting

* Member comments
2019-03-29 01:38:58 -07:00
mvn23
424543f34a Update pyotgw to 0.4b3 (#22496) 2019-03-29 08:28:50 +01:00
Andrew Sayre
78047c8c3c Fix .coveragerc from merge/rebase (#22516)
* Fix coveragerc

* Fix coveragerc
2019-03-28 20:01:53 -07:00
yosilevy
e14dbfb006 Add google calendar max_results config option (#21874)
* Added max_results config capability to google calendar (people are creating custom components just to override that)

* Dummy commit

* Dummy commit 2

* Changed to positive_int

* Removed double imports
2019-03-28 19:56:12 -07:00
Andreas Rydbrink
01052f516b Add HEOS media player component (#21721)
## Description:
Denon HEOS media player.

**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#8848

## Example entry for `configuration.yaml` (if applicable):
```yaml
heos:
  host: HEOS-1                              
```

## Checklist:
  - [X] The code change is tested and works locally.
  - [X] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [X] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:
  - [X] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
  - [X] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
  - [X] New dependencies are only imported inside functions that use them ([example][ex-import]).
  - [X] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
  - [X] New files were added to `.coveragerc`.

If the code does not interact with devices:
  - [ ] Tests have been added to verify that the new code works.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23


Co-authored-by: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>
2019-03-28 19:03:02 -07:00
Jason Hu
709419e465 Fix lint on dev (#22512)
## Description:

Fix a lint issue in credstash script.


**Related issue (if applicable):** fixes #<home-assistant issue number goes here>

**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

## Example entry for `configuration.yaml` (if applicable):
```yaml

```

## Checklist:
  - [ ] The code change is tested and works locally.
  - [ ] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [ ] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:
  - [ ] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
  - [ ] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
  - [ ] New dependencies are only imported inside functions that use them ([example][ex-import]).
  - [ ] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
  - [ ] New files were added to `.coveragerc`.

If the code does not interact with devices:
  - [ ] Tests have been added to verify that the new code works.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23
2019-03-28 15:33:21 -07:00
Andre Lengwenus
ee8cd861e0 Add LCN binary_sensor component (#22341) 2019-03-28 23:09:45 +01:00
Jason Hu
821a90fa54 Remove botocore dependency from credstash script (#22511)
* Remove botocore dependency from credstash script

* Update requirements_all.txt

* Update pylintrc

* Update credstash.py
2019-03-28 14:37:44 -07:00
Jason Hu
8874422e8a Fix Circleci config (#22509)
* Add libav depends on circleci

* tweak circleci config
2019-03-28 14:37:10 -07:00
Jason Hu
59476ab475 A very basic Circleci setup (#22503)
* Add circleci support

* Add buildpack-deps

* Install libudev-dev

* sudo

* always run test

* Add test report

* no sugar

* quite pytest

* better junit test result

* Add $CODE_COVERAGE env var
2019-03-28 09:54:49 -07:00
Jason Hu
8d86722c0e Fix dev branch (#22493) 2019-03-28 11:09:12 +01:00
Paulus Schoutsen
615b1cbfc7 Bumped version to 0.91.0b1 2019-03-27 23:50:58 -07:00
Paulus Schoutsen
3a406f5677 Fix YAML 2019-03-27 23:49:34 -07:00
Paulus Schoutsen
4db224ceb5 Fix YAML 2019-03-27 23:49:10 -07:00
Paulus Schoutsen
5d8d905822 Version bump to 0.92.0dev0 2019-03-27 22:10:35 -07:00
Paulus Schoutsen
a2c9834852 Bumped version to 0.91.0b0 2019-03-27 22:09:25 -07:00
Paulus Schoutsen
4f820aef83 Merge remote-tracking branch 'origin/master' into dev 2019-03-27 22:08:48 -07:00
Jason Hu
6ba2891604 Add trusted_users in trusted networks auth provider (#22478) 2019-03-27 21:53:11 -07:00
Jason Hunter
26726af689 Stream Record Service (#22456)
* Initial commit of record service for live streams

* fix lint

* update service descriptions

* add tests

* fix lint
2019-03-27 21:47:07 -07:00
Paulus Schoutsen
9d21afa444 Update translations 2019-03-27 21:32:58 -07:00
Paulus Schoutsen
05cdab03b1 Updated frontend to 20190327.0 2019-03-27 21:32:40 -07:00
Clifford W. Hansen
ece9c62ee8 Add game and app media types (#22459)
* Added game and app media types

* Changed media type to game from music

* Removed app type as it is not used yet
2019-03-27 21:20:43 -07:00
Paulus Schoutsen
a69080ba73 Print error instead of warning for custom platforms in legacy format (#22486)
* Legacy platform format prints error

* Enforce no partial overlays
2019-03-27 20:52:28 -07:00
Robbie Trencheny
7741ec4d5a Great migration notify (#22406)
* Move notify platforms into components

* Move notify tests

* Fix notify tests

* More fixes

* Update requirements

* Update .coveragerc

* Run gen reqs
2019-03-27 20:36:13 -07:00
Paulus Schoutsen
92457ca5ca Fix syntax error 2019-03-27 20:16:00 -07:00
Aaron Bach
8777146053 Fix too-abrubt SimpliSafe data refresh termination on error (#22466) 2019-03-27 20:14:49 -07:00
Rohan Kapoor
c4eab21736 Mopar split (#21526)
* Split out mopar into a component and sensor platform

* Add the mopar switch platform

* Add the mopar lock platform

* Clean up and bump version

* Update per review

* Re-add service to trigger horn

* Clean up again

* Don't call async from sync context

* Lint

* Implement changes from review

* Lint

* A little more clean up
2019-03-27 20:09:36 -07:00
Heine Furubotten
f11f5255ae Entur upgrade to v0.2.0: async polling, number of departures, omit non boarding departures (#22001)
* The Great Migration

* removed outdated tests

* Upgraded enturclient to v0.2.0
- client has gone async
- configurable if non boarding departures should be omitted from result
- configurable how many departures should be shown
- more clear which attributes are included and when

* reduced nesting and clearing of attributes

* Removed test data

* ensure attribution and stop id in attributes

* docstring fixes

* fix rebase errors
went a bit too fast on continue on one of the conflicts..

* fix test requirements comment from gen
2019-03-27 20:04:35 -07:00
Anders Melchiorsen
a1369c2fee Incoming SMS handling for netgear_lte (#22402)
* Fire netgear_lte events for incoming SMS

* Add netgear_lte.delete_sms service call

* Fix log statement

* Add services.yaml
2019-03-27 20:02:04 -07:00
Jc2k
8bf5e57b7f Move HKDevice into connection (#22430) 2019-03-27 20:01:10 -07:00
Jack Wilsdon
14ceb8472f Return percentage information in Alexa Smart Home response (#22440) 2019-03-27 19:58:52 -07:00
Finbarr Brady
e022f4465c Bump pypi again for Cisco Mobility Express (#22467)
* Fix empty device clId

Fix for https://github.com/fbradyirl/ciscomobilityexpress/issues/13

* Update requirements_all.txt
2019-03-27 19:58:06 -07:00
Maciej Bieniek
b8e38c1b25 Add new data fields and bump python-join-api (#22472)
* Add new data fields and bump python-join-api

* Update __init__.py
2019-03-27 19:56:27 -07:00
Daniel Høyer Iversen
c7904a4b37 Improve Sensibo error handling (#22475)
* Handle sensibo exception

* improve sensibo
2019-03-27 19:54:44 -07:00
Robert Svensson
8f3434c2ab Fix events so they work with multiple devices (#22477) 2019-03-27 19:54:27 -07:00
Nate Clark
d13c892b28 fix inverse state changes for binary sensors (#22479) 2019-03-27 19:54:01 -07:00
Sebastian Muszynski
26d4736ebf Fix auto discovery of yeelights (#22481)
* Fix auto discovery of yeelights

* Fix lint
2019-03-27 19:51:22 -07:00
Alexei Chetroi
e670491c86 Targeted ZHA permit joins. (#22482)
* Targeted ZHA permit service.

* Convert IEEE string to EUI64 usiv vol schema.

* Update test units.

* Lint.

isort imports.
2019-03-27 19:50:52 -07:00
Andrew Sayre
e26a5abb2b Don't return cover position when not supported (#22484) 2019-03-27 19:50:02 -07:00
Rohan Kapoor
78e162c1d3 Centralize all usages of host as a configuration param to the constant CONF_HOST (#22458)
* Centralize all usages of  as a configuration param to the constant CONF_HOST

* Clean up test
2019-03-27 19:48:05 -07:00
dilruacs
9176e13a97 Modify check for ADB public key (#22378)
* Remove check for public key

* Remove has_adb_files, directly call cv.isfile

* Check for missing adbkey.pub, create dummy if not found

* Reorder imports

* Bumped androidtv library version, deactivated pubkey test

* Code works without pubkey, removed function

* Removed "import os", not needed anymore

* Bump library version
2019-03-27 20:19:24 -05:00
René-Marc Simard
217782cd05 Cache GTFS metadata and expose utility attributes (breaking change) (#20966)
## Description:
Current sensor updates run 7 additional SQLite database queries to populate attributes, on top of the bus schedule queries themselves. Double that if you have two sensors. That leads to a lot of slowdowns for everything else when using an SD card!

Considering that some data never changes (agency, routes...) and that others like departure times are good until invalidated, let's fetch such metadata at first then only when relevant changes do occur.

**Breaking Change:**
GTFS sensor attributes are now named using the standard snake_case format.

### Work performed:
- All metadata queries are now cached.
- Metadata queries are now all regrouped in the `update()` method.
- Attributes assembling is now done in ~~`device_state_attributes()` where it belongs.~~ in a utility method called from `update()`, for code clarity and since there is potential I/O from SQLAlchemy.
- As a bonus, many metadata entries with cryptic values have complementary entries added that provide easier to use data:
	- .\* Stop Drop Off Type: .\* Stop Drop Off Type **State** -> (string, unknown)
	- .\* Stop Pickup Type: .\* Stop Pickup Type **State** -> (string, unknown)
	- .\* Stop Timepoint: .\* Stop Timepoint **Exact** -> boolean
	- .\* Station Location Type: .\* Station Location Type **Name** -> string
	- .\* Wheelchair Boarding: .\* Wheelchair Boarding **Available** -> (boolean, unknown)
	- Route Type: Route Type **Name** (string)
	- Trip Bikes Allowed: Trip Bikes Allowed **State** -> (boolean, unknown)
	- Trip Wheelchair Access: Trip Wheelchair Access **Available** -> (boolean, unknown)
- Attribute names are now using snake_case.
- Added type hints.

**Related issue (if applicable):** fixes #21222

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-27 17:58:23 -07:00
Jc2k
d8817bb127 Remove homekit_controller duplicate legacy pairing loader code (#22442) 2019-03-28 00:36:50 +01:00
Anders Melchiorsen
90c4f6f6e5 Do data extraction in sensors (#22444)
* Do data extraction in sensors

* Hopefully fix lint
2019-03-27 19:24:02 -04:00
Jason Hu
f795d03503 Fix aws.notify platform schema (#22374)
* Fix aws component notify platform schema

* Address code review comment

* Do not allow load aws.notify from notify component

* Revert unrelated translation update

* Review comment
2019-03-27 14:53:06 -07:00
Gido
24c7c2aa6e Solaredge new sensors (#21047)
* Remove unused hass parameter for SolarEdgeData

* Add factory to create different types of sensors
Rename SolarEdgeSensor to SolarEdgeOverviewSensor
Rename SolarEdgeData to SolarEdgeOverviewDataService
Remove unused hass parameter in SolarEdgeOverviewDataService

* Add SolarEdgeDetailsDataService to retrieve details data
Add SolarEdgeDetailsSensor to report details data
Add abstract class SolarEdgeSensor
Add details sensor types

* Combine multiple details sensor into one sensor with attributes

* Fix pylint and flake8 errors

* Resolve conflict with solaredge component update

* Add SolarEdgeInventoryDataService to retrieve inventory information
Add SolarEdgeInventorySensor to view inventory information
Add inverters to monitored_conditions

* Fix pylint and flake8 errors

* Add additional monitored variables for solaredge

* Add new sensors to solaredge component

* Add SolarEdgePowerFlowDataService
Add SolarEdgePowerFlowSensor
Add new monitored_conditions for power consumption and grid, load and
solar power production/consumption

* Set entity_id for each sensor based on platform and sensor type

* Fix flake8 and pylint errors

* Add check for connections in return data

* Fix pylint and flake8 errors

* Renamed state_attributes to device_state_attributes
Moved request import to top

* Remove explicit definition of entity_id

* Fix pylint and flake8 errors

* Add check for None before adding sensor

* Update SolarEdgeSensorFactory with initial dict which maps sensor_key to
entity class and data service

* Update attribute values to snakecase
Added stingcase as requirement

* Update requirements_all.txt to include stringcase for solaredge

* Update some initial values for data and unit_of_measurement
Update sensor factory
2019-03-27 17:08:52 -04:00
Nate Clark
2b48ecd5c5 better algorithm for computing unique_id (#22389) 2019-03-27 16:47:03 -04:00
Fredrik Erlandsson
71b800457b Add switches to control Daikin Airbase zones (#22417)
* initial AirBase zone support

* fix zone name

* version bump pydaikin

* don't use get()
2019-03-27 16:37:21 -04:00
Ryan Claussen
c3f090af17 Add hourly forecasts to Dark Sky (#21820) 2019-03-27 20:11:25 +00:00
Leonardo Merza
29ad3961e5 Use voluptuous error string for websocket validation error (#21883)
* use voluptuous error string to websocket validation error

* added exception logging to websocket error

* add detailed message to websocket validation error

* add error message to websocket validation error

* Add humanize error for websocket invalid vol error

* Add humanize error for websocket invalid vol error

* Add humanize error for websocket invalid vol error
2019-03-27 10:40:39 -07:00
Robert Svensson
52437f6246 Axis devices support device registry (#22367)
* Add support for device registry

* Fix test
2019-03-27 18:25:01 +01:00
Penny Wood
646c4a7137 Bootstrap to start registry loading early (#22321)
* Registries store directly in data on loading.

* Loading registries concurent with stage 1.

* Removed comments
2019-03-27 22:06:20 +08:00
zewelor
4de2efd07f Add support for yeelight ceiling ambilight (#22346) 2019-03-27 13:39:55 +01:00
Alexei Chetroi
6540114ec5 Update ZHA component CODEOWNERS (#22452) 2019-03-27 07:17:10 -04:00
zewelor
fa9a6f072e Add myself as codeowner for yeelight component (#22438) 2019-03-27 08:02:30 +01:00
Pascal Vizeli
a55afa8119 Update ha-ffmpeg 2.0 (#22427) 2019-03-27 07:55:05 +01:00
Thomas Lovén
19d99ddf57 Lower severity level of log messages from http.view (#21091) 2019-03-26 19:18:32 -04:00
Paulus Schoutsen
1766536812 Fix test name (#22421) 2019-03-26 15:24:28 -07:00
Finbarr Brady
02b12ec1b9 Adding conf for deep standby, wake and specific source bouquet of Enigma2 (#22393)
* - adding deep standby, conf for wake and specify source bouquet

* set defaults to strings

* bump pip

* bump pip

* bump pip

* bump pip

* bump pip

* bump pip
2019-03-26 17:49:53 -04:00
Pascal Vizeli
80250add9e Update homeassistant-pyozw to 0.1.3 (#22433) 2019-03-26 17:42:43 -04:00
Paulus Schoutsen
eb3355b05d Merge pull request #22420 from home-assistant/rc
0.90.2
2019-03-26 14:26:59 -07:00
mvn23
24ba434e6a Improve opentherm gw startup (#22121)
* Improve fix in c90f0d5 (#22106). Schedule connect coroutine directly on the loop rather than waiting for EVENT_HOMEASSISTANT_START.

* Remove unused import.
2019-03-26 14:25:47 -07:00
mvn23
ddefb74215 Fix TypeError in current_temperature if no temperature is known. (#22112)
Don't set opentherm_gw climate temperatures to 0 on init.
2019-03-26 14:25:47 -07:00
mvn23
42e75dc45c Fix opentherm_gw blocks HA startup when gateway unreachable. (#22106) 2019-03-26 14:25:46 -07:00
mvn23
44dc85204c Bump pyotgw to 0.4b2 (#21973) 2019-03-26 14:25:16 -07:00
Finbarr Brady
7e3567319f ciscomobilityexpress pypi version update (#22431)
* Bump pip

* Bump ciscomobilityexpress to 0.1.4
2019-03-26 21:13:56 +01:00
Anders Melchiorsen
afa99c9189 Use dispatcher for netgear_lte state updates (#22328)
* Use dispatcher for netgear_lte state updates

* Also dispatch unavailable state
2019-03-26 08:06:11 -07:00
Jason Hu
7519e8d417 Update translate, fix dev build error (#22419) 2019-03-26 07:48:26 -07:00
Paulus Schoutsen
ab1f1316ba Bumped version to 0.90.2 2019-03-26 07:40:10 -07:00
Jason Hunter
8a6d9cc0e4 reset unsub to None on timeout (#22404) 2019-03-26 07:39:59 -07:00
Pascal Vizeli
fac214828d Enable hass.io panel without ping (#22388)
* Enable hass.io panel without ping

* fix tests
2019-03-26 07:39:58 -07:00
Pascal Vizeli
a2508b4f52 Update hass-nabucasa & fix state (#22385)
* Update hass-nabucasa & fix state

* Fix lint
2019-03-26 07:39:56 -07:00
Jason Hunter
24a55834f9 Prefer TCP for RTSP streams (#22338)
## Description:

For RTSP streams, set the `prefer_tcp` FFMPEG flag.  This should resolve some of the "green feed" issues that some users are reporting, likely due to packets being lost over UDP on their network.

Resources: [FFMPEG protocols documentation](https://ffmpeg.org/ffmpeg-protocols.html#rtsp)

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-26 07:39:55 -07:00
ktnrg45
4d0a28fa56 Fix ps4 no creds with additional device (#22300)
* Fix no creds with additional device.

* Update config_flow.py
2019-03-26 07:39:54 -07:00
Jc2k
133ae63ed0 Add missing append (#22414) 2019-03-26 07:39:05 -07:00
Pascal Vizeli
3fddf5df08 Enable hass.io panel without ping (#22388)
* Enable hass.io panel without ping

* fix tests
2019-03-26 07:38:25 -07:00
cgtobi
a27e821e8b Migrate tts (#22403)
* Migrate tts

* Migrate tts tests

* Update requirements

* Fix path to demo mp3
2019-03-26 07:34:16 -07:00
Kevin Fronczak
c71e5ed588 Changed busy error to warning (#22398) 2019-03-26 09:20:50 -04:00
zewelor
2cebf9ef71 Fix yeelight state update (#22373) 2019-03-26 09:18:53 -04:00
David F. Mulcahey
3cca3c37f0 zha fixes (#22381) 2019-03-26 09:17:43 -04:00
Daniel Høyer Iversen
77e7b63f4a Tibber add support for Watty (#22397) 2019-03-26 14:02:10 +01:00
Paulus Schoutsen
65432ba552 Move core stuff into Home Assistant integration (#22407)
* Move core stuff into Home Assistant integration

* Lint
2019-03-26 13:38:32 +01:00
Jason Hunter
bad0a8b342 Camera Preferences + Preload Stream (#22339)
* initial commit for camera preferences and preload stream

* cleanup and add tests

* respect camera preferences on each request stream call

* return the new prefs after update
2019-03-26 08:31:29 -04:00
Jason Hunter
baa4945944 reset unsub to None on timeout (#22404) 2019-03-26 08:39:09 +01:00
Jason Hu
e85b089eff Set default parallel_update value should base on async_update (#22149)
* Set default parallel_update value should base on async_update

* Set default parallel_update value should base on async_update

* Delay the parallel_update_semaphore creation

* Remove outdated comment
2019-03-25 23:53:36 -07:00
Jc2k
a62c116959 Remove get_serial helper that is no longer needed. (#22368) 2019-03-25 23:49:51 -07:00
Sebastian Muszynski
6fa8fdf555 Fix data_key of the xiaomi_aqara cover for LAN protocol v2 (#22358) 2019-03-25 23:46:00 -07:00
Robert Svensson
79445a7ccc deCONZ support Xiaomi vibration sensor (#22366)
* Martin pointed out in previous PR that no ending '.' in logging

* Add support for Xiaomi vibration sensor
2019-03-25 23:43:58 -07:00
Nick Whyte
73b38572f0 Add infer_arming_state option to ness alarm (#22379)
* Add infer_arming_state option to ness alarm

* actually use config value

* 🤦‍♂️
2019-03-25 23:43:24 -07:00
Jc2k
b2ba9d07ca Fix unavailable state for homekit locks and covers (#22390) 2019-03-25 23:40:28 -07:00
Daniel Shokouhi
8aef8c6bb4 Update ring_doorbell to 0.2.3 (#22395) 2019-03-25 23:37:59 -07:00
uchagani
0c4380a78d remove config sections from hass.config.components (#22370)
* remove config sections from hass.config.components

* fix tests
2019-03-25 22:36:39 -07:00
René-Marc Simard
42c27e5b72 Search GTFS departures across midnight (#20992) 2019-03-25 21:51:49 -07:00
Niccolò Maggioni
5ad3e75a4d Support for Plex sensor with enforced SSL (#21432) 2019-03-25 20:45:13 +01:00
Fredrik Erlandsson
6ffe9ad473 updated pydaikin (#22382) 2019-03-25 19:37:31 +01:00
zewelor
6a74c403c0 Update python yeelight and add nightlight mode sensor (#22345) 2019-03-25 19:06:43 +01:00
lapy
2731777c7e Add traccar events (#22348)
* Add import_events(), small refactoring, traccar_id

I isolated the code that imports traccar tracking data and added a new function that imports the traccar events to make them run in parallel and reduce delay. The events that are imported in hass, will be fired with the prefix "traccar_". Furthermore a traccar_id is now imported in hass entities, useful for matching the traccar hass entities with the traccar hass events in the most accurate way.

* bump pytraccar version

* Code format fix

* Code format fix 2

* Code format fix 3

* Implement requested changes

* Add new traccar dependency

* Fix line too long

* Update device_tracker.py

* Update requirements_all.txt
2019-03-25 18:52:53 +01:00
Andrew
a59487a438 Fix TpLink Device Tracker initialize error (#22349)
Catch RequestException instead of ConnectionError
In some cases TpLinkDeviceScanner throws various successors of
RequestException. They should be caught.
2019-03-25 10:25:49 -07:00
Paulus Schoutsen
f1a0ad9e4a Frontend indicate require admin (#22272)
* Allow panels to indicate they are meant for admins

* Panels to indicate when they require admin access

* Do not return admin-only panels to non-admin users

* Fix flake8
2019-03-25 10:04:35 -07:00
Pascal Vizeli
b57d809dad Update hass-nabucasa & fix state (#22385)
* Update hass-nabucasa & fix state

* Fix lint
2019-03-25 09:43:15 -07:00
Jc2k
f997957054 Remove unused const (#22383) 2019-03-25 16:28:34 +01:00
Jeff Irion
c8048e1aff Allow for custom turn on/off commands (#22354) 2019-03-25 08:37:10 -04:00
ktnrg45
17a96c6d9b Improve PS4 media art fetching and config flow (#22167)
* improved config flow

* Added errors, docs url

* Added errors, docs url

* Added manual config mode

* Add tests for manual/auto host input

* fix inline docs

* fix inline docs

* Changed region list

* Added deprecated region message

* removed DEFAULT_REGION

* Added close method

* Fixes

* Update const.py

* Update const.py

* Update const.py

* Update test_config_flow.py

* Added invalid pin errors

* Update strings.json

* Update strings.json

* bump pyps4 to 0.5.0

* Bump pyps4 0.5.0

* Bump pyps4 to 0.5.0

* test fixes

* pylint

* Change error reference

* remove pin messages

* remove pin messages

* Update en.json

* remove pin tests

* fix tests

* update vol

* Vol fix

* Update config_flow.py

* Add migration for v1 entry

* lint

* fixes

* typo

* fix

* Update config_flow.py

* Fix vol

* Executor job for io method.

* Update __init__.py

* blank line

* Update __init__.py

* Update tests/components/ps4/test_config_flow.py

Co-Authored-By: ktnrg45 <38207570+ktnrg45@users.noreply.github.com>
2019-03-25 08:25:15 -04:00
zewelor
96133f5e6b Improve yeelight component (#22347) 2019-03-25 08:50:47 +01:00
Jc2k
af4b85d39d Give HomeKit locks better names by default (#22333)
## Description:

This is a follow up to #22171. There we set the name of an entity based on the `accessory-information` homekit service, rather than using the zeroconf/avahi name metadata. Unfortunately Lock also sets its name from zeroconf directly, rather than picking it up from the base class. This test updates it to be like the other homekit entities and use the base class.

(This is from my ongoing homekit_controller configentry branch).

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-24 18:21:04 -07:00
fabtesta
324a7c7875 Add ClickSend "caller" option (#20780)
* removed "from" parameter from ClickSend API call

Removed "from" parameter from API call to let ClickSend choose a random number and be more compliant with some cellular networks that do not allow incoming calls from the same recipient number.

* fixed "line too long (94 > 79 characters)" houndci code review

fixed "line too long (94 > 79 characters)" houndci code review

* Added new component optional parameter "caller".
If defined is used to override default logic that uses recipient phone number in "from" API call parameter

* Removed default value for CALLER parameter. If not defined then will take the RECIPIENT value.
2019-03-24 18:13:56 -07:00
Nick Horvath
c59d45caa3 Expose detailed Ecobee equipment status (#20767)
* ecobee: expose detailed equipment status

* Fix #18244 for ecobee by moving current_operation property to current_operation_mode which is more accurate and defining current_operation properly, thanks @ZetaPhoenix

* fix docstring and lint issue

* Revert "fix docstring and lint issue"

This reverts commit d3a645f075.

* Revert "Fix #18244 for ecobee by moving current_operation property to current_operation_mode which is more accurate and defining current_operation properly, thanks @ZetaPhoenix"

This reverts commit bfd90551ef.
2019-03-24 18:13:06 -07:00
Moritz Fey
f272ed3b91 Add 'method' parameter to forgiving_round method (#21708)
* Add 'method' parameter to forgiving_round method

Fixes #21707

* fix rounding behavior in round() filter

* add test cases for new rounding behaviour
2019-03-24 18:10:49 -07:00
karlkar
548371e94c Check if mac is set when more than 2 gateways (#21834)
* Check if mac is set when more than 2 gateways

When more than 2 gateways mac is required for each of them. Now voluptuous will require it.

* fix line length

* remove trailing whitespace

* Make it more readable
2019-03-24 17:59:12 -07:00
Jason Hu
1aee7a1673 Add aws component and consolidate aws notify platform (#22240)
* Add aws component

* Move notify config under aws component

* Add basic tests for aws component

* Add deprecated warning for notify.aws_*

* Add more tests
2019-03-24 17:58:20 -07:00
Fredrik Erlandsson
b6987a1235 Add support for Tfiac Climate component (#21823)
## Description:

Add support for AC-models that follows the Tfiac protocol. Built together with @mellado.

**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#8910

## Example entry for `configuration.yaml` (if applicable):
```yaml
climate:
   platform: tfiac
   host: 192.168.10.26
```

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:
  - [x] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
  - [x] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
  - [x] New dependencies are only imported inside functions that use them ([example][ex-import]).
  - [x] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
  - [x] New files were added to `.coveragerc`.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23


Co-authored-by: Robbie Trencheny <me@robbiet.us>
2019-03-24 17:57:53 -07:00
Steven Looman
d1f75fcf32 Properly connect sensors to hub (#21414)
* Properly connect sensors to hub
Refs #20958

* Don't connect (merge) with main device

* Provide manufacturer

* Linting

* Do connect upnp-sensors to main device

* Linting

* Fix requirements_all.txt
2019-03-24 17:46:15 -07:00
dilruacs
adca598172 Turn Panasonic Viera TV on without WOL (#22084)
* Turn the TV on via remote

* Turn the TV on via remote

* Use turn_on() from panasonic-viera==0.3.2

* make power option configurable

* add app_power as argument

* formatting
2019-03-24 17:41:16 -07:00
Hmmbob
7f940423ad Warn user about HTML5 GCM deprecation (#22351)
* Warn user about GCM deprecation

* Fixing hound

* Fixing typo

* Fixing Travis fail
2019-03-24 17:40:43 -07:00
Steven Looman
1b0e523a60 Add support for 'image' media type (#22353) 2019-03-24 17:40:27 -07:00
shanbs
0d46e2c0b5 Fix the crash due to absence of the "default_home" in HomeData from pyatmo (netatmo/climate) (#22363) 2019-03-25 01:31:22 +01:00
cgtobi
d2a83c2732 Upgrade netatmo smart_home module (#22365) 2019-03-25 01:30:21 +01:00
Robbie Trencheny
dc64634e21 Set Onkyo reset log to debug instead of info (#22369)
Onkyo logs this message somewhat frequently, and its spammy, so lets make it a debug message instead of info. 

See also: #20081
2019-03-24 17:15:07 -07:00
Jason Hunter
0ae38aece8 Prefer TCP for RTSP streams (#22338)
## Description:

For RTSP streams, set the `prefer_tcp` FFMPEG flag.  This should resolve some of the "green feed" issues that some users are reporting, likely due to packets being lost over UDP on their network.

Resources: [FFMPEG protocols documentation](https://ffmpeg.org/ffmpeg-protocols.html#rtsp)

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-24 17:13:20 -07:00
ktnrg45
88df2e0ea5 Fix ps4 no creds with additional device (#22300)
* Fix no creds with additional device.

* Update config_flow.py
2019-03-24 20:08:59 -04:00
Sebastian Muszynski
7421156dfc Add support for the power socket of the Xiaomi AC Partner V3 (#22205) 2019-03-24 20:15:29 +01:00
Sebastian Muszynski
d5732c4dba Add color support to Philips Moonlight (#22204) 2019-03-24 20:14:35 +01:00
Anders Melchiorsen
eabb68ad7d Do not warn when creating an empty database (#22343) 2019-03-24 12:00:29 -07:00
Robert Svensson
8d1cf553de Support deCONZ library with exception handling (#21952) 2019-03-24 19:27:32 +01:00
Yu
89f8203163 Fix xiaomi aqara cube with lumi.acpartner.v3 gateway (#22130) 2019-03-24 18:56:17 +01:00
MatthewFlamm
ed93c3b2c1 Fix pressure in dark sky and openweathermap and add pressure utility (#21210) 2019-03-24 18:37:31 +01:00
Robert Svensson
6988fe783c Axis config flow (#18543)
* Initial draft

* Add tests for init
Fix hound comments

* Add tests for device
Change parameter handling to make device easier to test

* Remove superfluous functionality per Martins request

* Fix hound comments

* Embedded platforms

* Fix device import

* Config flow retry

* Options default values will be set automatically to options in config entry before component can be used

* Clean up init
Add populate options
Fix small issues in config flow
Add tests covering init

* Improve device tests

* Add config flow tests

* Fix hound comments

* Rebase miss

* Initial tests for binary sensors

* Clean up
More binary sensor tests

* Hound comments

* Add camera tests

* Fix initial state of sensors

* Bump dependency to v17

* Fix pylint and flake8

* Fix comments
2019-03-24 16:16:50 +01:00
zewelor
9214934d47 Move yeelight into component (#21593) 2019-03-24 13:01:12 +01:00
René-Marc Simard
71ebc4f594 Define GTFS sensor as a timestamp device class (#21053) 2019-03-24 12:15:30 +01:00
uchagani
c5f4aa0466 show which component is causing translation errors (#22340) 2019-03-23 23:06:55 -07:00
Jason Hunter
49b92b5349 fix where PLATFORM_SCHEMA gets pulled from (#22334) 2019-03-23 23:49:44 -04:00
Paulus Schoutsen
1ddc249989 Consolidate more platforms (#22308)
* Consolidate final platforms

* Fix some tests

* Fix more tests

* Fix more tests
2019-03-23 20:22:35 -07:00
Fabian Affolter
4c4eff1d62 Update file header (#22318)
* Update file header

* Fix indent

* Fix lint issue
2019-03-23 22:05:47 +01:00
Thibault Maekelbergh
16dbf9b2ea Remove occupancy as it is not available in API (#22320) 2019-03-23 20:05:08 +01:00
Paulus Schoutsen
c68b621972 Google Assistant: Add camera stream trait (#22278)
* Add camera stream trait

* Lint
2019-03-23 09:16:43 -07:00
SNoof85
d81df1f0ae Add Freebox switch platform (#21710)
* Added Freebox switch and bump aiofreepybox version

* Added missing modified files

* removed unused import

* gen_requirements_all passed

* removed unused import

* Remove unused code

* lint fixes

* More lint fixe

* Bump aiofreepybox version and API version to Freebox

* Remove URL from log entry

* import relative

* Sort imports
2019-03-23 15:32:53 +01:00
Markus Jankowski
112ed88d64 Add homematicip cloud connection quality related attributes (#21990) 2019-03-23 13:21:55 +01:00
Fabian Affolter
5f34d3ccb9 Update abbreviation (#22317) 2019-03-23 12:07:32 +01:00
Fabian Affolter
3c811bbf1a Upgrade py-cpuinfo to 5.0.0 (#22287) 2019-03-23 08:00:43 +01:00
Fabian Affolter
90dfe72d31 Upgrade pylast to 3.1.0 (#22302) 2019-03-23 08:00:13 +01:00
Robbie Trencheny
89221bfab9 Fix for embedded MQTT server configuration (#22305)
## Description:

Passing in a configuration for the embedded MQTT server has been broken for a while. This fixes that. See related issue number for further details.

**Related issue (if applicable):** fixes #18228

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-22 16:01:58 -07:00
Robbie Trencheny
773c567563 Switch from using Google Maps API for elevation to Open Elevation API (#22306)
## Description:

Switches elevation helper to use [Open Elevation](https://open-elevation.com/) instead of Google Maps API which now requires a API key. It's a drop in replacement for Google Maps too!

**Related issue (if applicable):** fixes #19860

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-22 16:01:43 -07:00
Robbie Trencheny
58c23bc2d9 Update srpenergy library (#22307)
Fixes #18899
2019-03-22 16:01:21 -07:00
cgtobi
611597a87b Sort code owners alphabetically (#22304)
## Description:
Sort the code oweners list alphabetically.

**Related issue (if applicable):** fixes #<home-assistant issue number goes here>

**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

## Example entry for `configuration.yaml` (if applicable):
```yaml

```

## Checklist:
  - [ ] The code change is tested and works locally.
  - [ ] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [ ] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:
  - [ ] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
  - [ ] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
  - [ ] New dependencies are only imported inside functions that use them ([example][ex-import]).
  - [ ] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
  - [ ] New files were added to `.coveragerc`.

If the code does not interact with devices:
  - [ ] Tests have been added to verify that the new code works.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23
2019-03-22 14:05:26 -07:00
Penny Wood
ecabf92504 Update trait to support auto without ranges. (#21847) 2019-03-22 13:42:56 -07:00
Robbie Trencheny
e9cd9f88be Fix Prometheus casting issues (#22282)
## Description:

Fix Prometheus casting issues

**Related issue (if applicable):** fixes #8659.
## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-22 13:16:17 -07:00
Leonardo Merza
a58f1eedda Add sort by config and tests for Reddit integration (#22081)
* add sort type to reddit sensor

add sort type to reddit sensor

automated commit 14/03/2019 15:53:15

automated commit 15/03/2019 09:43:39

reddit sensor add tests and sort by config

reddit sensor add tests and sort by config

reddit sensor add tests and sort by config

reddit sensor add tests and sort by config

* Add reddit sensor sort_by config and tests

* Add reddit sensor sort_by config and tests

* Add reddit sensor sort_by config and tests

* Add reddit sensor sort_by config and tests

* Add reddit sensor sort_by config and tests
2019-03-22 21:05:08 +01:00
jjlawren
ce550206a4 Fix progress for Plex media_players (#22224)
* Return current position and last updated timestamp needed by UI

* Add throttling to position updating

* Simplify logic, don't clear position when refreshing

* Use seconds

* Update homeassistant/components/plex/media_player.py

Co-Authored-By: jjlawren <jjlawren@users.noreply.github.com>

* Add throttling to position updating

* Simplify logic, don't clear position when refreshing
2019-03-22 14:00:12 -06:00
Penny Wood
1ddc65a0ce Fixing the api_streams sensor (#22200)
* Fire events with websocket messages.

* Added tests to validate

* Fixed api_streams sensor to use new sensor

* Delete from coverageac as now works.

* Removed websocket request event.

* Use dispatcher instead of events.

* Moved sensor to under websocket_api

* Changes as per code review

* Fixed tests.

* Modified test

* Patch
2019-03-22 11:59:10 -07:00
Anders Melchiorsen
2b6e197deb Consolidate the netgear_lte configuration (#22105)
* Consolidate the netgear_lte configuration

* Simplfications from review

* Extract sensor_types

* Simplify defaults
2019-03-22 14:43:39 +01:00
Jeff Irion
b125514655 Improved exception handling and logging (#22268)
Catch RuntimeError exceptions. Don't log ADB command output if there isn't any.
2019-03-22 08:47:06 -04:00
Jeff Irion
c90e13bfef Bump androidtv to 0.0.13 (#22279)
* Bump androidtv to 0.0.13

* Bump androidtv to 0.0.13 in requirements_all.txt
2019-03-22 09:25:31 +01:00
jjlawren
30d4a9f12c Plex: Avoid refreshing by both device and session methods (#22266)
* Avoid refreshing by both device and session methods

* Fix indentation
2019-03-21 19:41:41 -07:00
Fabian Affolter
3432c5da9e Upgrade sqlalchemy to 1.3.0 (#22269) 2019-03-21 19:40:11 -07:00
Paulus Schoutsen
ae2153f1fc Merge pull request #22265 from home-assistant/rc
0.90.1
2019-03-21 14:24:28 -07:00
Pascal Vizeli
8085e9206a Update hass-nabucasa 0.10 (#22267) 2019-03-21 14:21:37 -07:00
Pascal Vizeli
5716d0aa1a Update hass-nabucasa 0.10 (#22267) 2019-03-21 14:21:13 -07:00
Daniel Høyer Iversen
86a510441c Upgrade tibber libary, support solar production (#22261) 2019-03-21 16:46:25 -04:00
Paulus Schoutsen
ff93591aaf Lint 2019-03-21 13:22:08 -07:00
Pascal Vizeli
8a314d7da0 Update Hass-NabuCasa 0.9 (#22258) 2019-03-21 13:06:15 -07:00
Andrew Sayre
f47a50aa24 Fix validate webhook requirements (#22248) 2019-03-21 13:06:13 -07:00
Michaël Arnauts
b2bb70b5aa Allow on/off on tado climate component. (#22242)
* Allow on/off on tado climate component. Bump python-tado version. Patch from @wmalgadey

* Revert wrongly change in tado device tracker
2019-03-21 13:05:46 -07:00
Jason Hunter
56cbe8a73f Stream fixes (#22238)
* fix issues with out of order packets, and empty first packet on some IP camera models

* do not skip the first packet
2019-03-21 13:05:09 -07:00
Paulus Schoutsen
0f730310a4 Bumped version to 0.90.1 2019-03-21 13:03:40 -07:00
Karim Roukoz
1aab284012 Bump total-connect-client to 0.25, fixing issue with Total Connect (#22230)
* Bump total-connect-client to 0.25

* Bump version in requirements_all.txt
2019-03-21 13:03:25 -07:00
Alexei Chetroi
a84ba90c9e Fix ZHA force polled entities. (#22222)
## Description:
Fix "force_polled" ZHA entities.

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23
2019-03-21 13:02:35 -07:00
Ryan Bahm
bc85d47878 Change .now() to .utcnow() (#22233)
ephem works in UTC time, not local time. As a result, our comparison needs to be in UTC for accurate results.
2019-03-21 12:59:07 -07:00
Paulus Schoutsen
ee1c270c89 Updated frontend to 20190321.0 2019-03-21 12:57:47 -07:00
Paulus Schoutsen
72bb94de96 Update translations 2019-03-21 12:57:20 -07:00
Paulus Schoutsen
0a4251e08f Updated frontend to 20190321.0 2019-03-21 12:56:59 -07:00
Pascal Vizeli
1b66520e31 Update Hass-NabuCasa 0.9 (#22258) 2019-03-21 19:39:24 +01:00
Penny Wood
81bb928394 Handle on/off through TemperatrureSetting trait. (#21842) 2019-03-21 10:57:42 -07:00
Karim Roukoz
fe468ace34 Bump total-connect-client to 0.25, fixing issue with Total Connect (#22230)
* Bump total-connect-client to 0.25

* Bump version in requirements_all.txt
2019-03-21 09:39:30 -07:00
Andrew Sayre
6526c68e2d Fix validate webhook requirements (#22248) 2019-03-21 09:13:20 -07:00
Michaël Arnauts
f64a99878f Allow on/off on tado climate component. (#22242)
* Allow on/off on tado climate component. Bump python-tado version. Patch from @wmalgadey

* Revert wrongly change in tado device tracker
2019-03-21 08:24:30 -07:00
Alexei Chetroi
03855c18fc add ZHA channel name property (#22218)
* Make channel name a property.

* Cleanup Zigbee channels.

Use zcl.Cluster.ep_attribute as default channel name.
2019-03-21 07:40:12 -07:00
Jason Hu
2b02c0d0fc Fix build issue (#22251) 2019-03-21 07:32:13 -07:00
Jason Hunter
07dc23a0e3 Stream fixes (#22238)
* fix issues with out of order packets, and empty first packet on some IP camera models

* do not skip the first packet
2019-03-21 07:31:55 -07:00
Steven Looman
77635d40e2 Upgrade to async_upnp_client==0.14.6 (#22223)
Upgrade to async_upnp_client to 0.14.6
2019-03-21 08:58:04 +01:00
Sebastian Muszynski
f4102339c1 Bump python-miio version (#22202)
* Bump python-miio version

* Rename speed property to motor_speed

* Enable set_led service of the Air Humidifier

* Allow a favorite level in [0...17]

* Allow a scene in [0...6]
2019-03-21 08:56:36 +01:00
uchagani
21871b3d6b add date_time_iso to time_date sensor (#22199)
* add date_time_iso to time_date sensor

* hound fixes

* lint fixes
2019-03-21 08:55:30 +01:00
Quentin Stafford-Fraser
88be786e82 Make !include_dir_list use alphanumeric order (#21902)
* Make YAML includes such as !include_dir_list incorporate files in alphabetical order

* Test for !include_dir_list sorting
2019-03-20 23:10:08 -07:00
Paulus Schoutsen
4b1de61110 Use relative imports inside integrations (#22235)
* Use relative imports inside integrations

* Lint

* Fix automation tests

* Fix scene imports
2019-03-20 22:56:46 -07:00
Marco Orovecchia
ab17b22239 Removed overly broad exception handling for nanoleaf light (#22189) 2019-03-20 20:32:06 -07:00
Fabian Affolter
423d595edf Upgrade holidays to 0.9.10 (#22182) 2019-03-20 20:31:15 -07:00
Fabian Affolter
e044eace20 Upgrade psutil to 5.6.1 (#22183)
* Upgrade psutil to 5.6.1

* Upgrade speedtest-cli to 2.1.1
2019-03-20 20:30:52 -07:00
Alexei Chetroi
9653544144 Fix ZHA force polled entities. (#22222)
## Description:
Fix "force_polled" ZHA entities.

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23
2019-03-20 19:15:21 -07:00
Paulus Schoutsen
937eba3dbe Merge pull request #22216 from home-assistant/rc
0.90.0
2019-03-20 10:16:24 -07:00
Paulus Schoutsen
01d8b5831e Updated frontend to 20190320.0 2019-03-20 07:51:38 -07:00
Paulus Schoutsen
9d8054e6e2 Bumped version to 0.90.0 2019-03-20 07:51:23 -07:00
Penny Wood
d4cd39e43e Fixed typing errors (#22207) 2019-03-20 07:51:14 -07:00
Paulus Schoutsen
1bf49ce5a3 Updated frontend to 20190320.0 2019-03-20 07:50:24 -07:00
Penny Wood
62c2bbd59a Fixed typing errors (#22207) 2019-03-20 07:49:27 -07:00
Matt Snyder
398281959a Update codeowners (#22198) 2019-03-20 11:33:42 +01:00
Paulus Schoutsen
7cf1f4f9fe Bumped version to 0.90.0b7 2019-03-19 16:48:31 -07:00
Paulus Schoutsen
268d129ea9 Updated frontend to 20190319.1 2019-03-19 16:36:11 -07:00
CV
db07e45df8 Fix breaking on HTML email without images (#22143)
* Fix breaking on HTML email without images

If using html emails with no images the code breaks since it is not tested for empty (uninitialized) key images.

* fixed long line

* Implemented suggested better solution

Better solution to allow data -> html email without images.

* Protecting data -> without html key from crashing

If the data key does not contain the html key, sending the email would crash this "script". Preventing this by returning an default empty array.
2019-03-19 14:37:12 -07:00
Jc2k
0344c761fc Better handling of HomeKit accessory-information service (#22171)
* HomeKit controller: Better handling of accessory-information service

* Changes from review
2019-03-19 15:04:20 -04:00
Fabian Affolter
6cb8806085 Upgrade Sphinx to 1.8.5 (#22180) 2019-03-19 15:02:56 -04:00
Fabian Affolter
2b250a7ec8 Upgrade youtube_dl to 2019.03.18 (#22181) 2019-03-19 15:01:58 -04:00
Paulus Schoutsen
b8f246356a Bumped version to 0.90.0b6 2019-03-19 11:41:08 -07:00
Paulus Schoutsen
e6ffc790f2 Always load Hass.io component on Hass.io (#22185)
* Always load Hass.io component on Hass.io

* Lint

* Lint
2019-03-19 11:40:49 -07:00
Pascal Vizeli
b85189e699 Update Hass-NabuCasa 0.8 (#22177) 2019-03-19 11:40:48 -07:00
uchagani
f202114ead bump total_connect_client to 0.24 (#22166) 2019-03-19 11:40:06 -07:00
Paulus Schoutsen
fff6927f9c Updated frontend to 20190319.0 2019-03-19 11:38:16 -07:00
Paulus Schoutsen
08849fd3e8 Updated frontend to 20190319.0 2019-03-19 11:38:05 -07:00
Paulus Schoutsen
92dc26bab3 Always load Hass.io component on Hass.io (#22185)
* Always load Hass.io component on Hass.io

* Lint

* Lint
2019-03-19 11:33:50 -07:00
Eliseo Martelli
88669c6543 removed iliad (#22175) 2019-03-19 16:16:29 +01:00
Daniel Høyer Iversen
350904870e restore entity for switchbot (#22087) 2019-03-19 16:16:10 +01:00
Pascal Vizeli
1499485a71 Update Hass-NabuCasa 0.8 (#22177) 2019-03-19 15:10:30 +01:00
Penny Wood
bf4b7a82b4 Move platforms patch (#22168)
* move mold sensor

* Get tests working

* Move moon and season sensor strings.

* Renamed sensor strings.
2019-03-19 06:43:15 -07:00
Jc2k
c2aa06d0d4 Add some tests for Koogeek LS1 (#22141) 2019-03-19 00:58:56 -07:00
uchagani
188293770e bump total_connect_client to 0.24 (#22166) 2019-03-19 00:51:42 -07:00
Andrew Hall
12df14b87b Change ATTR_BATTERY_STATE_UNPLUGGED for ios component (#22152)
* AH - Updated Text Description of ATTR_BATTERY_STATE_UNPLUGGED

* AH - updated device_tracker ios test to use new battery state description
2019-03-19 00:46:04 -07:00
Penny Wood
f195ecca4b Consolidate all platforms that have tests (#22109)
* Moved climate components with tests into platform dirs.

* Updated tests from climate component.

* Moved binary_sensor components with tests into platform dirs.

* Updated tests from binary_sensor component.

* Moved calendar components with tests into platform dirs.

* Updated tests from calendar component.

* Moved camera components with tests into platform dirs.

* Updated tests from camera component.

* Moved cover components with tests into platform dirs.

* Updated tests from cover component.

* Moved device_tracker components with tests into platform dirs.

* Updated tests from device_tracker component.

* Moved fan components with tests into platform dirs.

* Updated tests from fan component.

* Moved geo_location components with tests into platform dirs.

* Updated tests from geo_location component.

* Moved image_processing components with tests into platform dirs.

* Updated tests from image_processing component.

* Moved light components with tests into platform dirs.

* Updated tests from light component.

* Moved lock components with tests into platform dirs.

* Moved media_player components with tests into platform dirs.

* Updated tests from media_player component.

* Moved scene components with tests into platform dirs.

* Moved sensor components with tests into platform dirs.

* Updated tests from sensor component.

* Moved switch components with tests into platform dirs.

* Updated tests from sensor component.

* Moved vacuum components with tests into platform dirs.

* Updated tests from vacuum component.

* Moved weather components with tests into platform dirs.

* Fixed __init__.py files

* Fixes for stuff moved as part of this branch.

* Fix stuff needed to merge with balloob's branch.

* Formatting issues.

* Missing __init__.py files.

* Fix-ups

* Fixup

* Regenerated requirements.

* Linting errors fixed.

* Fixed more broken tests.

* Missing init files.

* Fix broken tests.

* More broken tests

* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.

* Disabled tests, will remove sensor in #22147

* Updated coverage and codeowners.
2019-03-18 23:07:39 -07:00
David F. Mulcahey
46ece3603f Add dynamic subscription for ZHA add device page (#22164)
* add ws subscription for zha gateway messages
* add debug mode
* only relay certain logs
* add missing require admin
* add devices command
* add area_id
* fix manufacturer code
2019-03-18 22:35:03 -04:00
Paulus Schoutsen
ad0ec66353 Bumped version to 0.90.0b5 2019-03-18 17:04:49 -07:00
Franck Nijhof
592edd10ef Upgrade toonapilib to 3.2.2 + lower interval (#22160) 2019-03-18 17:04:43 -07:00
Pascal Vizeli
d75d75e49f Remove config check over supervisor (#22156)
* Remove config check over supervisor

* Fix lint

* Fix tests
2019-03-18 17:04:42 -07:00
Jason Hunter
1c9b750e36 Fix resetting access token on streams with keepalive (#22148) 2019-03-18 17:04:41 -07:00
WebSpider
33a7075883 Bump tado version (#22145)
* Bump python-tado, new API endpoint

* Change references of old API endpoint to new

* Update REQUIREMENTS
2019-03-18 17:04:40 -07:00
Paulus Schoutsen
cc00f3cd2e Allow non-admins to listen to certain events (#22137) 2019-03-18 17:04:39 -07:00
Jason Hu
22624715a9 Remove hass.config from aws_lambda notify payload (#22125) 2019-03-18 17:04:38 -07:00
Paulus Schoutsen
05db444832 Updated frontend to 20190318.0 2019-03-18 17:04:04 -07:00
Pascal Vizeli
ecfe0fc3dd Remove config check over supervisor (#22156)
* Remove config check over supervisor

* Fix lint

* Fix tests
2019-03-18 16:58:48 -07:00
Franck Nijhof
e5a2ef9b8d Upgrade toonapilib to 3.2.2 + lower interval (#22160) 2019-03-18 16:56:57 -07:00
Paulus Schoutsen
c37dcacf54 Updated frontend to 20190318.0 2019-03-18 16:54:31 -07:00
zewelor
9591aa66ba Fixx yeelight flow action param for declared effects (#22159) 2019-03-18 20:51:42 +01:00
Ben Lebherz
af473cddf0 replace einder lib with horimote (#22135) 2019-03-18 20:14:14 +01:00
James Hilliard
9c7ef13f91 Fix hlk-sw16 inverted switch state (#22059) 2019-03-18 10:57:44 -07:00
endor
9f96aab2f4 Additional sensors and fixed icons, attributes and device classes. (#22139) 2019-03-18 18:55:09 +01:00
Jason Hunter
ce5cf5803c Fix resetting access token on streams with keepalive (#22148) 2019-03-18 09:27:34 -04:00
WebSpider
e14b243336 Bump tado version (#22145)
* Bump python-tado, new API endpoint

* Change references of old API endpoint to new

* Update REQUIREMENTS
2019-03-18 08:54:24 -04:00
Paulus Schoutsen
29131a655d Allow non-admins to listen to certain events (#22137) 2019-03-17 19:13:06 -07:00
Aaron Bach
c020b7c47d Handle possible exception during Ambient PWS reconnect (#22134)
* Handle possible exception during Ambient PWS reconnect

* Hound
2019-03-17 13:06:19 -06:00
Aaron Bach
8529ad3ba1 Loosen field retrieval from Pollen.com (#22132) 2019-03-17 11:55:58 -06:00
Aaron Bach
0d42ed1861 Handle occassional 502 Bad Gateway from SimpliSafe (#22131) 2019-03-17 11:55:10 -06:00
cgtobi
ba923d2d66 Add service description for services. (#21897)
* Add service description for services.

* Make service description more clear
2019-03-17 13:04:09 +01:00
Tyler Page
9b1491a98d Fix AttributeError traceback with darksky (#22101)
* Update darksky.py

* fixes
2019-03-17 12:06:39 +01:00
Jason Hu
1aab551eed Remove hass.config from aws_lambda notify payload (#22125) 2019-03-17 11:42:49 +01:00
Daniel Høyer Iversen
54dfc3e2b4 Tibber, Add price level (#22085)
* Add price level to Tibber sensor

* bump pyTibber version
2019-03-17 09:34:50 +01:00
Otto Winter
cf5ba7d922 Add ESPHome Camera (#22107)
* Add ESPHome Camera

* Bump aioesphomeapi to 1.7.0
2019-03-16 23:36:31 -07:00
Paulus Schoutsen
872ee3eb21 Bumped version to 0.90.0b4 2019-03-16 23:26:48 -07:00
Jason Hunter
f218564185 delete previously removed service option from services yaml (#22123) 2019-03-16 23:26:17 -07:00
Paulus Schoutsen
16ac1d4600 Updated frontend to 20190316.0 2019-03-16 23:25:57 -07:00
Paulus Schoutsen
d16c507f34 Updated frontend to 20190316.0 2019-03-16 23:23:28 -07:00
Jason Hunter
54489a3514 delete previously removed service option from services yaml (#22123) 2019-03-16 23:16:05 -07:00
Paulus Schoutsen
f5076188ef Consolidate all platforms that have no tests (#22096)
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00
mvn23
d33cad0b24 Improve opentherm gw startup (#22121)
* Improve fix in c90f0d5 (#22106). Schedule connect coroutine directly on the loop rather than waiting for EVENT_HOMEASSISTANT_START.

* Remove unused import.
2019-03-16 23:51:50 +01:00
mvn23
4423572682 Fix TypeError in current_temperature if no temperature is known. (#22112)
Don't set opentherm_gw climate temperatures to 0 on init.
2019-03-16 16:34:31 +01:00
mvn23
c90f0d5bd6 Fix opentherm_gw blocks HA startup when gateway unreachable. (#22106) 2019-03-16 16:32:51 +01:00
Andre Lengwenus
0466e43478 Restricted temperature units for Celsius and Fahrenheit to the standardized units (#22108) 2019-03-16 16:31:58 +01:00
Aaron Bach
7807b40925 Add available property to Ambient PWS (#22092)
* Add available property to Ambient PWS

* Linting

* remove blank line
2019-03-16 11:33:22 +01:00
Phil Bruckner
9e4bd88a06 Bump amcrest to 1.2.7 for correct RTSP port (#22099)
amcrest 1.2.7 now includes camera's configured RTSP port in generated URL. Necessary to make new stream component work correctly if camera does not use default RTSP port.
2019-03-16 08:20:49 +01:00
Ville Skyttä
b4f8d157d6 Upgrade pytest to 4.3.1 (#22088) 2019-03-16 08:13:45 +01:00
Paulus Schoutsen
ade86b9b8d Version bump to 0.91.0dev0 2019-03-15 23:25:48 -07:00
Paulus Schoutsen
179c2315be Updated frontend to 20190315.1 2019-03-15 23:24:37 -07:00
Paulus Schoutsen
7b224dde23 Bumped version to 0.90.0b3 2019-03-15 23:20:19 -07:00
Jason Hunter
7a88c58ffa Beta Fix: FFMPEG and Stream component (#22091)
* remove stream_source from ffmpeg and onvif and add to generic ip cam

* fix tests
2019-03-15 23:19:52 -07:00
Jason Hunter
f396de623b Beta Fix: FFMPEG and Stream component (#22091)
* remove stream_source from ffmpeg and onvif and add to generic ip cam

* fix tests
2019-03-15 23:19:32 -07:00
Paulus Schoutsen
68d1a5322a Prevent cloud remote UI when using 127.0.0.1 as trusted network (#22093)
* Prevent cloud remote UI when using trusted networks

* Limit to 127.0.0.1 trusted network

* Update error msg

* Disable ipv6 loopback
2019-03-15 23:19:26 -07:00
Jeff Irion
a46b64d227 Bump androidtv to 0.0.12 (#22072) 2019-03-15 23:19:26 -07:00
Paulus Schoutsen
5924479272 Updated frontend to 20190315.1 2019-03-15 23:19:09 -07:00
Andre Lengwenus
d0365f5911 Add LCN sensor platform (#21440) 2019-03-15 22:10:56 -05:00
Paulus Schoutsen
dbdf5558e6 Prevent cloud remote UI when using 127.0.0.1 as trusted network (#22093)
* Prevent cloud remote UI when using trusted networks

* Limit to 127.0.0.1 trusted network

* Update error msg

* Disable ipv6 loopback
2019-03-15 19:26:10 -07:00
Nacho Barrientos
42265036ff Telegram_bot: Allow fetching data from unverified SSL endpoints (#22067) (#22069)
* Telegram_bot: Allow fetching data from unverified SSL endpoints (#22067)

This patch adds an extra option to the payload that describes the
resource to send to disable the SSL server verification when polling
data from URLs.

* Use the boolean interpretation of the variable directly

Co-Authored-By: nbarrientos <nacho@criptonita.com>
2019-03-16 09:18:10 +08:00
Jeff Irion
53b204347d Bump androidtv to 0.0.12 (#22072) 2019-03-15 12:25:09 -07:00
Paulus Schoutsen
aa81819683 Fix func 2019-03-15 11:12:12 -07:00
Paulus Schoutsen
dc656205c4 Fix func 2019-03-15 11:11:59 -07:00
Paulus Schoutsen
ff6b86b5a8 Bumped version to 0.90.0b2 2019-03-15 10:59:55 -07:00
Paulus Schoutsen
3d404c43c8 Fix more test 2019-03-15 10:59:50 -07:00
Paulus Schoutsen
b18aef8d31 Fix test 2019-03-15 10:59:50 -07:00
Pascal Vizeli
ac1aeb35a6 Binary Sensor for Remote UI & Fix timezone (#22076)
* Binary Sensor for Remote UI

* Fix lint

* Revert make hass public

* Add tests
2019-03-15 10:59:27 -07:00
Jason Hu
3ec8b5a170 Correct context (#22061) 2019-03-15 10:59:26 -07:00
Paulus Schoutsen
8f10345468 Return config entry ID after creation (#22060) 2019-03-15 10:59:25 -07:00
Robbie Trencheny
0029dc3813 Mobile App: Expose Cloud Remote UI FQDN in registration response (#22055)
* Add a callback to get the cloud remote UI FQDN

* Expose Cloud Remote UI FQDN in the registration response

* Return a URL instead of FQDN
2019-03-15 10:59:25 -07:00
Robbie Trencheny
11ebb3f24e Mobile App: Discovery to default configuration.yaml, zeroconf to default_config (#22028)
* Move discovery into default configuration.yaml

* Add zeroconf to default_config
2019-03-15 10:59:25 -07:00
Robbie Trencheny
4835fb2c57 Mobile App: Enable loading via discovery (surprise inside!) (#22027)
![](http://funpeep.com/wp-content/uploads/2014/04/Cute-White-Cat-Wallpaper.jpg)
2019-03-15 10:59:23 -07:00
Jeff Irion
25a7f71ec2 Bump androidtv to 0.0.11 (#22025) 2019-03-15 10:59:22 -07:00
Robbie Trencheny
f0b7d76e26 Mobile App: Sensors (#21854)
## Description:

**Related issue (if applicable):** fixes #21782

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-15 10:57:24 -07:00
Robbie Trencheny
f7dcfe28b6 Mobile App: Register devices into the registry (#21856)
* Register devices into the registry

* Switch to device ID instead of webhook ID

* Rearchitect mobile_app to support config entries

* Kill DATA_REGISTRATIONS by migrating registrations into config entries

* Fix tests

* Improve how we get the config_entry_id

* Remove single_instance_allowed

* Simplify setup_registration

* Move webhook registering functions into __init__.py since they are only ever used once

* Kill get_registration websocket command

* Support description_placeholders in async_abort

* Add link to mobile_app implementing apps in abort dialog

* Store config entry and device registry entry in hass.data instead of looking it up

* Add testing to ensure that the config entry is created at registration

* Fix busted async_abort test

* Remove unnecessary check for entry is None
2019-03-15 10:57:00 -07:00
Robbie Trencheny
3fd1e8d382 Mobile App: Update Location schema updates & device ID generation (#21849)
* Update location schema

* Generate a random device ID at registration time for later use with device_tracker.see

* Remove host name from device_tracker.see payload

* Drop consider_home from the payload

* Remove stale consider_home in schema

* Remove source_type
2019-03-15 10:56:36 -07:00
Robbie Trencheny
c67113ad55 Mobile App: Support rendering multiple templates at once (#21851)
* Support rendering multiple templates at once

* Only catch TemplateError and dont log the error
2019-03-15 10:56:06 -07:00
Robbie Trencheny
b336322e9e Mobile App: Require encryption for registrations that support it (#21852)
## Description:

**Related issue (if applicable):** fixes #21758

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-15 10:55:45 -07:00
Paulus Schoutsen
9e6a7a6357 Updated frontend to 20190315.0 2019-03-15 10:49:13 -07:00
Paulus Schoutsen
087748b5ff Updated frontend to 20190315.0 2019-03-15 10:43:32 -07:00
Pascal Vizeli
17ba33004c Binary Sensor for Remote UI & Fix timezone (#22076)
* Binary Sensor for Remote UI

* Fix lint

* Revert make hass public

* Add tests
2019-03-15 10:39:53 -07:00
Isabella Gross Alström
9520d38288 Update rest.py (#22077)
Added specific error logs for 5xx and 4xx responses, debug log for 2xx and other statuses.
2019-03-15 10:14:22 -07:00
Jason Hu
cf69f25354 Correct context (#22061) 2019-03-15 10:01:15 -07:00
Fabian Affolter
101225749b Upgrade ruamel.yaml to 0.15.89 (#22064) 2019-03-15 09:22:00 -07:00
Paulus Schoutsen
e581d9e249 Fix more test 2019-03-15 09:14:20 -07:00
Paulus Schoutsen
3ce50b0a6a Fix test 2019-03-15 07:47:13 -07:00
Paulus Schoutsen
941f9b29dc Return config entry ID after creation (#22060) 2019-03-15 07:41:34 -07:00
escoand
3b34594aa3 Add HTTP auth and SSL verification to REST notify (#22016)
* add HTTP auth and SSL verification

* use internal import

* fix long line

* avoid extra import
2019-03-15 08:43:54 +01:00
Robbie Trencheny
5a9e8b2d3e Mobile App: Expose Cloud Remote UI FQDN in registration response (#22055)
* Add a callback to get the cloud remote UI FQDN

* Expose Cloud Remote UI FQDN in the registration response

* Return a URL instead of FQDN
2019-03-14 19:46:59 -07:00
David F. Mulcahey
89c96279ce Cleanup remaining constants stuff in ZHA (#22050)
* clean up constants
* fix quirks until it can be upgradded
2019-03-14 21:00:49 -04:00
Robbie Trencheny
851378739f Fix cloud services.yaml 2019-03-14 17:48:38 -07:00
Alexei Chetroi
9575c20b7c Minor ZHA consts fixes (#22049)
* Use consts for zha.core.consts

* Fix ZHA battery reporting config.
2019-03-14 20:29:12 -04:00
Robbie Trencheny
dcaced1966 Mobile App: Sensors (#21854)
## Description:

**Related issue (if applicable):** fixes #21782

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-14 17:24:53 -07:00
Paulus Schoutsen
fb895bba80 Bumped version to 0.90.0b1 2019-03-14 16:25:00 -07:00
Pascal Vizeli
707d32495b Fix Google Assistant User with Cloud (#22042)
* Fix Google Assistant User with Cloud

* Fix User Agent ID

* respell

* Fix object

* Fix tests

* fix lint

* Fix lint
2019-03-14 16:19:19 -07:00
Jason Hu
7057958e3e Fix lifx light async error (#22031) 2019-03-14 16:19:19 -07:00
emontnemery
90c878a7ed Update additional platforms to use new MQTT message callback (#22030)
* Move additional platforms to new MQTT callback

* Fix automation.mqtt
2019-03-14 16:19:18 -07:00
cgtobi
c78e332df3 Bring back the boiler status (#22021) 2019-03-14 16:19:18 -07:00
Phil Hawthorne
42c9472a74 Remove UTF8 decoding for Waze (#22020)
Removes the UFT8 decoding for the Waze sensor, which broke in 0.89

Fixes #21739
2019-03-14 16:19:17 -07:00
Pascal Vizeli
6a80ffa8cc Fix Google Assistant User with Cloud (#22042)
* Fix Google Assistant User with Cloud

* Fix User Agent ID

* respell

* Fix object

* Fix tests

* fix lint

* Fix lint
2019-03-14 16:18:31 -07:00
Robbie Trencheny
3769f5893a Mobile App: Register devices into the registry (#21856)
* Register devices into the registry

* Switch to device ID instead of webhook ID

* Rearchitect mobile_app to support config entries

* Kill DATA_REGISTRATIONS by migrating registrations into config entries

* Fix tests

* Improve how we get the config_entry_id

* Remove single_instance_allowed

* Simplify setup_registration

* Move webhook registering functions into __init__.py since they are only ever used once

* Kill get_registration websocket command

* Support description_placeholders in async_abort

* Add link to mobile_app implementing apps in abort dialog

* Store config entry and device registry entry in hass.data instead of looking it up

* Add testing to ensure that the config entry is created at registration

* Fix busted async_abort test

* Remove unnecessary check for entry is None
2019-03-14 12:57:50 -07:00
Charles Garwood
62f12d242a Z-Wave usb_path in configuration.yaml overrides config entry usb_path (#22038)
* usb_path in configuration.yaml overrides config entry

* Minor text update

* Update __init__.py
2019-03-14 12:29:21 -07:00
emontnemery
b25e951dcc Update additional platforms to use new MQTT message callback (#22030)
* Move additional platforms to new MQTT callback

* Fix automation.mqtt
2019-03-14 10:58:32 -07:00
Phil Bruckner
8d2d71c16a Bump amcrest to 1.2.6 & use new exceptions (#22040)
* Bump amcrest to 1.2.6 & use new exceptions

* Fix lint failure

* Use AmcrestError instead of individual ones
2019-03-14 10:56:33 -07:00
Fredrik Erlandsson
4e84e8a15e Async support for Daikin (#21638)
* asyncio support for Daikin

* version bump pydaikin

* pass session to pydaikin.Appliance

* all entities should have update
2019-03-14 18:33:43 +01:00
cgtobi
018a5d5c1f Bring back the boiler status (#22021) 2019-03-14 10:18:25 -07:00
Fabian Affolter
bd930b6e96 Upgrade youtube_dl to 2019.03.09 (#22041) 2019-03-14 10:14:27 -07:00
ktnrg45
ef2e3f607a Ps4 remove throttling (#21961)
* Remove throttling

* Correct docstring
2019-03-14 17:49:57 +01:00
Jason Hu
e480f75d6d Fix lifx light async error (#22031) 2019-03-14 17:10:36 +01:00
David F. Mulcahey
300384410f Refactor ZHA gateway into modules and add admin protections to API (#22023)
* refactor

* cleanup

* fix tests

* admin all the things
2019-03-14 10:20:25 -04:00
Daniel Høyer Iversen
b022428cb6 change logging to debug for nmap (#22036) 2019-03-14 10:00:19 -04:00
mvn23
2b25c25ca8 Bump pyotgw to 0.4b2 (#21973) 2019-03-14 13:11:04 +01:00
Jason Hu
4ff8a46acf Upgrade prefetched tox env to py37 (#22029) 2019-03-14 13:09:32 +01:00
kbickar
abf2e763b1 Add sense guard clause (#22014) 2019-03-14 11:46:44 +01:00
Jeff Irion
6381242eca Bump androidtv to 0.0.11 (#22025) 2019-03-14 17:25:07 +08:00
Robbie Trencheny
e75b12b92a Add myself to CODEOWNERS 2019-03-14 00:34:52 -07:00
Robbie Trencheny
95da6d41f9 Mobile App: Discovery to default configuration.yaml, zeroconf to default_config (#22028)
* Move discovery into default configuration.yaml

* Add zeroconf to default_config
2019-03-13 22:05:56 -07:00
Robbie Trencheny
3fcfba0a1e Mobile App: Enable loading via discovery (surprise inside!) (#22027)
![](http://funpeep.com/wp-content/uploads/2014/04/Cute-White-Cat-Wallpaper.jpg)
2019-03-13 21:55:30 -07:00
Phil Hawthorne
2787671de5 Remove UTF8 decoding for Waze (#22020)
Removes the UFT8 decoding for the Waze sensor, which broke in 0.89

Fixes #21739
2019-03-13 19:08:23 -07:00
Robbie Trencheny
673c8907e3 Mobile App: Update Location schema updates & device ID generation (#21849)
* Update location schema

* Generate a random device ID at registration time for later use with device_tracker.see

* Remove host name from device_tracker.see payload

* Drop consider_home from the payload

* Remove stale consider_home in schema

* Remove source_type
2019-03-13 15:38:53 -07:00
Robbie Trencheny
5ef602bc2e Mobile App: Support rendering multiple templates at once (#21851)
* Support rendering multiple templates at once

* Only catch TemplateError and dont log the error
2019-03-13 15:33:37 -07:00
Robbie Trencheny
acc44aaf6c Mobile App: Require encryption for registrations that support it (#21852)
## Description:

**Related issue (if applicable):** fixes #21758

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-13 15:22:43 -07:00
Paulus Schoutsen
07022c46f2 Version bump to 0.90.0b0 2019-03-13 13:03:58 -07:00
Paulus Schoutsen
b601fa52ba Bumped version to 0.89.0b0 2019-03-13 13:02:55 -07:00
Paulus Schoutsen
ce5efcdb26 Merge branch 'master' into dev 2019-03-13 13:02:26 -07:00
Gijs Reichert
1ffc0e3c7c Check updated_date for list and pick first (#22008) 2019-03-13 13:00:58 -07:00
Isabella Gross Alström
2dcd9d94c8 Allow all success status codes in REST notify response (#22011)
For example Discord webhooks returns a 204 success code as response, which gets logged as an error in the log, even though it is successful.
Update the allowed statuses to accept all 2xx responses as successful.
2019-03-13 13:00:08 -07:00
Andrew Sayre
83243e95d3 Remove default temp unit (#22012) 2019-03-13 12:59:37 -07:00
emontnemery
5957e4b75b Pass Message object to MQTT message callbacks (#21959)
* Pass Message object to MQTT message callbacks

* Improve method of detecting deprecated msg callback

* Fix mysensors

* Fixup

* Review comments

* Fix merge error
2019-03-13 12:58:20 -07:00
Paulus Schoutsen
50ec3d7de5 Update translations 2019-03-13 12:57:00 -07:00
Paulus Schoutsen
d0c8f6de56 Updated frontend to 20190313.0 2019-03-13 12:57:00 -07:00
Marco Orovecchia
cac8e34841 Nanoleaf availability check (#21945)
* Added availability check for nanoleaf lights

* pylint errors fixed

* pynanoleaf bump
2019-03-13 12:54:15 -07:00
Jc2k
deb66bb748 HomeKit controller light - remove code that can never execute (#21951) 2019-03-13 12:53:33 -07:00
beavis9k
eed1168fa1 fix error in LutronButton init if Button doesn't have a type (#21921) 2019-03-13 12:52:45 -07:00
Anders Melchiorsen
de2c7a9567 Wait for Sonos regrouping in service calls (#22006) 2019-03-13 12:51:41 -07:00
Anders Melchiorsen
fe5e4b5b9b Avoid playing queue pollution with Sonos unjoin (#22004) 2019-03-13 12:51:08 -07:00
Pascal Vizeli
186b48e2eb Bump NabuCasa library to 0.5 (#22010) 2019-03-13 16:45:26 +01:00
Aaron Bach
a71394a0ce Add program/zone enable/disable services to RainMachine (#21785) 2019-03-13 08:20:13 -06:00
Aaron Bach
897862fca4 Add availability and next run datetime to RainMachine switches (#21786) 2019-03-13 08:19:26 -06:00
endor
18daee9af6 Tellstick sensor configuration cleanup (#21402)
* Cleaned up named sensor handling for future

Breaking change for tellstick sensor configuration.

* Fixed linting of long lines and closing bracket

Linting warning for long line and not using best practice for visual indentation of closing bracket.
Who's a good boy..

* Whitespace on line was not cleaned.

* Removed spaces to clean up

* More.. whitespace. Sloppy.

* Constants from const, altered loops, added dictionary for sensor names.

* Fixed whitespace

* Inverted condition and created guard clause

* Changed condition from not ... in to not in.

* Fixed bad indentation on L91 and 92
2019-03-13 12:20:15 +01:00
Jeff Irion
007bf2bcb5 Rename 'firetv' to 'androidtv' and add Android TV functionality (#21944)
* Working on adding androidtv functionality to firetv component

* 'should_poll' must return True

* Change 'properties' to 'device_properties'

* Also mention 'Android TV' in services.yaml

* Use GitHub for 'androidtv' requirement

* Add 'androidtv==0.0.10' to requirements, remove 'firetv==1.0.9'

* Add 'GET_PROPERTIES' adb command option; use pypi for REQUIREMENTS

* Rename integration from 'firetv' to 'androidtv'

* Change default name to 'Android TV'

* Rename integration from 'firetv' to 'androidtv'

* Change firetv to androidtv in .coveragerc

* Change firetv to androidtv in requirements_all.txt

* Remove 'DEFAULT_APPS'
2019-03-13 11:18:59 +01:00
Jason Hu
e5da7a0014 Add breaking change section to PR template (#21994) 2019-03-13 10:54:30 +01:00
Anders Melchiorsen
c8692fe70c Use asyncio lock (#21985) 2019-03-13 10:17:09 +01:00
Daniel Perna
0162e2abe5 Update pyhomematic to 0.1.58 (#21989) 2019-03-13 08:56:59 +01:00
Paulus Schoutsen
c15f433c3e Add a service require_admin wrapper (#21953)
* Add a service require_admin wrapper

* Allow it to be used as a decorator

* Lint

* Add comment

* Add docstring

* Update syntax
2019-03-12 22:09:50 -07:00
Robbie Trencheny
bf839687ad Mobile App: Registration schema improvements (#21850)
* Update registration schema to add os_name (required) and make app_name required

* Ensure that a provided app_component is valid and available

* Ensure that component DEPENDENCIES declares mobile_app

* Update homeassistant/helpers/config_validation.py

* Standardize error responses

* Dont generalize REGISTER_BAD_COMPONENT

* Fix tests after merge
2019-03-12 22:04:27 -07:00
Diogo Gomes
a99d83390e Centrally define Energy Units (kWh and Wh) (#21719)
* centralize energy units kWh and Wh

* lint
2019-03-12 18:46:41 -07:00
Jc2k
c0b859d8da Set homekit controller entity as unavailable if new connections fail (#21901)
* Set entity as unavailable if new connections fail

* Fix docstring
2019-03-12 18:45:34 -07:00
Daniel Shokouhi
d66cc9befa Add stream source for amcrest component (#21983) 2019-03-12 21:40:24 -04:00
Jc2k
e618e2f348 Fix error introduced by #21933 (#21988) 2019-03-12 18:37:33 -07:00
Robbie Trencheny
9428ed7690 Use .get to ensure we dont get KeyError (#21993) 2019-03-12 18:00:18 -07:00
emontnemery
ce1fe06193 Write state directly in all MQTT platforms (#21971) 2019-03-12 14:46:48 -07:00
Paulus Schoutsen
f8921f84d7 skip flaky test (#21981) 2019-03-12 14:19:11 -07:00
Jc2k
2b1b47bfdd homekit_controller: Bump homekit to 0.13.0 (#21965)
* Bump homekit to 0.13.0

* Update gen_requirements_all.py

* Escape values used in TESTS_REQUIREMENTS
2019-03-12 21:54:08 +01:00
Paulus Schoutsen
97a87b2e4e Merge pull request #21982 from home-assistant/rc
0.89.2
2019-03-12 13:38:43 -07:00
Paulus Schoutsen
737c7e871d Bumped version to 0.89.2 2019-03-12 11:51:09 -07:00
Klaudiusz Staniek
1f3e4c5776 Fixes issues #21821 and #21819 (#21911)
* Fix #21821

* datetime fix

* local time to utc conversion fix

* Test cases update

* date import removed

* Update tod.py
2019-03-12 11:51:02 -07:00
Daniel Shokouhi
00d01865cf Fix botvac when no map exists (#21877) 2019-03-12 11:51:02 -07:00
Jason Hu
1b4905ae5a Override http.trusted_networks by auth_provider.trusted_networks (#21844) 2019-03-12 11:51:00 -07:00
Andrew Sayre
39749952ee Update dependencies to receive data on webhook callbacks (#21838) 2019-03-12 11:51:00 -07:00
Paulus Schoutsen
d3960bf745 Fix some cloud things (#21977) 2019-03-12 11:49:46 -07:00
Paulus Schoutsen
9416af5b56 Allow changing password without being admin (#21978) 2019-03-12 11:49:28 -07:00
Paulus Schoutsen
4a4bb43422 Stream: Only add base url when needed (#21979) 2019-03-12 11:46:20 -07:00
Paulus Schoutsen
d635111e4f Update translations 2019-03-12 11:31:17 -07:00
Paulus Schoutsen
9178ac17ad Updated frontend to 20190312.0 2019-03-12 11:30:50 -07:00
Sidney
1444a684e0 Fix MagicHome LEDs with flux_led component (#20733)
* bug fixing for MagicHome LEDs with flux_led component.

* corrections of the fixes for flux_led

* now asyncio sleep and turn on with brigthness possible

* indention fix with flux_led

* async now works

* houndci fixes

* little fixes for flux_led

* self._color fix for flux_led

* Add docstring
2019-03-12 16:51:51 +01:00
Paulus Schoutsen
d3bab30dbe Add cloud status (#21960)
* Add cloud status

* Expose certificate details

* store & reset last state

* Fix tests

* update tests

* update req

* fix lint
2019-03-12 15:54:04 +01:00
Markus Jankowski
ac97cebe11 Add Weather Sensors to Homematic IP (#21887)
* Add HmIP Weather Sensor Devices

* Fix test and icons

* fix test

* Fix comments
2019-03-12 14:52:13 +01:00
Thom Troy
cc34ee5559 fix ephember doing http call from property (#21855) 2019-03-12 14:49:36 +01:00
kbickar
62df6cbd09 Update to sense component to fully be async (#21698)
* Update to sense component to fully be async

* Shortened lines

* Whitespace
2019-03-12 14:44:53 +01:00
Anders Melchiorsen
dd11f8d3fe Avoid playing queue pollution when restoring Sonos snapshots (#21963)
Assume a snapshot state with three speakers in two groups, AB and C. They will
be playing the A and C queues, respectively. The B queue exists but is hidden
in this topology.

Unjoin B and form a new group BC, playing the B queue (now with the C queue
hidden).

To restore the snapshot we would join B back to A. The BC group would now only
contain the C speaker, still playing the B queue. The C queue has been lost :-(

The problem is that unjoining a coordinator will elect a new coordinator that
inherits the group queue and thus has its hidden queue overwritten.

This commit avoids the situation by having restore unjoin all slaves. Above, C
would be unjoined before joining B to A. This restores the C queue and since B
is then alone, it can be joined to A without having to transfer its playing
queue to remaining speakers.
2019-03-12 14:39:55 +01:00
Robbie Trencheny
2225425ed2 Update lametric icon to be HA logo (#21957) 2019-03-11 20:42:13 -07:00
Jason Hunter
7ccd0bba9a Live Streams Component (#21473)
* initial commit of streams

* refactor stream component

* refactor so stream formats are not considered a platform

* initial test and minor refactor

* fix linting

* update requirements

* need av in tests as well

* fix import in class def vs method

* fix travis and docker builds

* address code review comments

* fix logger, add stream start/stop logs, listen to HASS stop

* address additional code review comments

* beef up tests

* fix tests

* fix lint

* add stream_source to onvif camera

* address pr comments

* add keepalive to camera play_stream service

* remove keepalive and move import

* implement registry and have output provider remove itself from stream after idle, set libav log level to error
2019-03-11 19:57:10 -07:00
Klaudiusz Staniek
0a6ba14444 Fixes issues #21821 and #21819 (#21911)
* Fix #21821

* datetime fix

* local time to utc conversion fix

* Test cases update

* date import removed

* Update tod.py
2019-03-11 21:27:41 +01:00
Fabian Affolter
650658ea01 Upgrade schiene to 0.23 (#21940) 2019-03-11 21:25:29 +01:00
Pascal Vizeli
92ff49212b Offload Cloud component (#21937)
* Offload Cloud component & Remote support

* Make hound happy

* Address comments
2019-03-11 12:21:20 -07:00
Paulus Schoutsen
8bfbe3e085 Add update user command (#21922)
* Add update user command

* Add is_admin to current user
2019-03-11 12:08:02 -07:00
Jc2k
5e2302e469 Add an asyncio Lock around pairing, which cant be used concurrently (#21933) 2019-03-11 11:59:41 -07:00
Paulus Schoutsen
4f5446ff02 Add area permission check (#21835) 2019-03-11 11:02:37 -07:00
David McNett
4f49bdf262 Minor version bump for anthemav package (#21932)
Additional Python 3.7 fixes in the anthemav package.
See also: https://pypi.org/project/anthemav/
2019-03-11 20:47:57 +05:30
Marco Orovecchia
e7c85d350e Changed from nanoleaf_aurora to nanoleaf (#21913)
Nanoleaf component now supports both nanoleaf lights, Aurora and Canvas
Changed the dependency to pynanoleaf, nanoleaf does not seem to be
maintained anymore
2019-03-11 20:46:32 +05:30
Michaël Arnauts
bc76055c17 Allow inverting netdata sensor values (#21711)
* Allow inverting netdata sensor values

* Fix lint issue

* Use parentheses
2019-03-11 20:43:53 +05:30
Robbie Trencheny
785fd273e3 If registration supports encryption then return encrypted payloads (#21853) 2019-03-11 08:34:58 -04:00
Andrew Sayre
c401f35a43 Add cloudhook support to SmartThings component (#21905)
* Add support for Nabu Casa cloudhooks

* Added tests to cover cloudhook creation and removal

* Remove cloud dependency
2019-03-11 08:33:25 -04:00
gertdb
3fd6aa0ba9 Fixes Modbus service.yaml validity (#21923)
* Update __init__.py

* Update services.yaml

* Update services.yaml
2019-03-11 08:17:31 -04:00
Anders Melchiorsen
49014ac13f Remove confusing warning for TTS without entity_id (#21927) 2019-03-11 12:31:36 +01:00
Finbarr Brady
85dc5fe4d5 Update enigma2 based on review comments (#21890)
* Updates based on review comments

* bump netdisco and remove enigma2 init code

* revert netdisco bump
2019-03-11 11:42:56 +01:00
Jc2k
b0d55d1946 HomeKit controller config flow fixes (#21898)
* HomeKit controller config flow fixes

* This does work if you have latest vol-serialize
2019-03-11 10:07:12 +01:00
Brad Dixon
9ab543ab3d Add as_timestamp() to Jinja filters. (#21910)
Add as_timestamp() to Jinja filters
2019-03-11 13:21:22 +05:30
Colby Rome
29f01fb14e Add 'ssl' parameter for FiOS Quantum Gateway and upgrade Pypi (#21669)
* bump pypi version and take 'use_https' parameter

* changed to use CONF_SSL
2019-03-11 12:26:19 +08:00
Paulus Schoutsen
429bbc05dc Add WS subscription command for MQTT (#21696)
* Add WS subscription command for MQTT

* Add test

* Add check for connected

* Rename event_listeners to subscriptions
2019-03-10 20:07:09 -07:00
emontnemery
fc85b3fc5f Don't hang forever if manually added cast is down (#21565)
* Don't hang forever if manually added cast is down

* Adapt to pychromecast

* Do not set available until connected

* Update __init__.py

* Update requirements

* Lint, tests

* Fix tests
2019-03-10 19:57:30 -07:00
Jason Hu
fe1840f901 Deprecate http.api_password (#21884)
* Deprecated http.api_password

* Deprecated ApiConfig.api_password

GitHub Drafted PR would trigger CI after changed it to normal PR.
I have to commit a comment change to trigger it

* Trigger CI

* Adjust if- elif chain in auth middleware
2019-03-10 19:55:36 -07:00
Finbarr Brady
7ec7e51f70 bump netdisco to 2.4.0 (#21914) 2019-03-11 09:49:40 +08:00
Thiago Oliveira
77dc7595ee Allow emulated hue to set climate component temperature (#19034) 2019-03-11 00:04:21 +01:00
Niall Donegan
5debc8828a Return time based attributes as datetime in Unifi module (#21146)
* Return time based data as datetime in Unifi module

* Fix missing space and pylint complaints about import order.
2019-03-10 19:22:28 +01:00
Peter Epley
c888e65f11 Add custom holidays to workday sensor (#21718)
* Add custom holidays to workday sensor

* correcting copy/paste errors

* resolve block comment and add default

* resolve line too long

* fixed handling of no custom holidays

* hound fixes

* rerun Travis

* @fabaff requested changes

* spaces v tabs

* Fix validation
2019-03-10 22:44:45 +05:30
gertdb
bab53a1c94 Modbus write_register accept single value and array (#21621)
* Update __init__.py

* Update services.yaml
2019-03-10 20:38:29 +05:30
Thibault Maekelbergh
65ff8b727a Add myself to CODEOWNERS for NMBS code (#21892)
* Add myself to CODEOWNERS for NMBS code

* Fix
2019-03-10 20:17:17 +05:30
Thibault Maekelbergh
6456f71a46 Fix icon for sensor.discogs_random_record (#21891)
* Fix icon for sensor.discogs_random_record

* Add myself to CODEOWNERS for Discogs code
2019-03-10 19:19:31 +05:30
Marco M
05333f60d7 Fix missing code_required check in async_alarm_arm_night (#21858)
* Fix missing code_required check in async_alarm_arm_night

* Remove double code validation
Test added
2019-03-10 14:25:01 +01:00
Julius Mittenzwei
6f77d9bc34 Don't wait until final position of Velux cover is reached (#21558)
## Description:

* Bump version to latest version of pyvlx: 0.2.10. Library more failure tolerant, when detecting an unsupported device.
* When calling API (e.g. run scene, change position) don't wait until device has reached target position (This caused  HASS to be flaky while the device was moving)
* Support for vertical and horizontal awnings.
2019-03-10 03:47:22 -07:00
Joakim Sørensen
7102e82113 Change lib for whois sensor (#21878)
* Change lib for whois sensor

* Change requirements.txt
2019-03-10 14:38:13 +05:30
Paulus Schoutsen
ad73b6eee9 Updated frontend to 20190309.0 2019-03-09 21:26:35 -08:00
Paulus Schoutsen
5fbe2d5477 Update translations 2019-03-09 21:26:26 -08:00
David F. Mulcahey
5ffb471198 Update ZHA state handling (#21866)
* make device available if it was seen within 2 hours

* more state restore

* cleanup init

* clean up storage stuff

* fix tests

* update state handling
2019-03-09 20:09:09 -08:00
Paulus Schoutsen
5b2c6648fb Add user group (#21832)
* Add user group

* Rename system group to plural
2019-03-09 20:07:29 -08:00
Paulus Schoutsen
14b05b0a91 Fix incorrect 2nd param 2019-03-09 19:52:50 -08:00
Andrew Sayre
5ace55ea8d Add SmartThings sensor support for Three Axis (#21841)
* Add support for Three Axis to sensor platform

* Changes per review feedback.

* Remove unnecessary KeyError except

* Fix lint issue in line wrapping
2019-03-09 18:45:15 -06:00
Andrew Sayre
c927cd9c14 Add SmartThings climate support for Air Conditioners (#21840)
* Add support for Samsung Air Conditioners to Climate

* Changes per review feedback.

* Fix py3.5 compat list sorting in test
2019-03-09 18:43:16 -06:00
Daniel Shokouhi
2d2abc7831 Fix botvac when no map exists (#21877) 2019-03-09 23:06:35 +01:00
Zak
896075fa1c Add ClearPass Policy Manger device tracker (#21673)
* Adding ClearPass Policy Manger device tracker. Amending author

* Cleaned redundant code

* Updated .coveragerc

* Updated requirements_all.txt

* Implemented suggested changes partially.

* Implemented more suggested changes.

* Hound was unhappy

* Implement further suggested changes.

* Make Hound happy.

* Satisfy Travic CI

* Satisfy Travis CI #2

* Hound barking

* pylint else: return

* Implemented suggested changes minus AccessToken

* Removed access token logging

* Removed throttle import

* Removed period from debug string

* Make travis happy :(

* Moved source to new component structure.

* Forgot to rename source.
2019-03-09 22:12:29 +01:00
Paulus Schoutsen
f4f0d363ca Better cloud check (#21875) 2019-03-09 12:15:16 -08:00
David F. Mulcahey
ac5ccd651c Bump quirks for ZHA and handle resulting battery % change (#21869)
* bump quirks and handle battery change

* move inside guard

* round battery
2019-03-09 12:14:58 -08:00
Jason Hu
226be65910 Only commit if need. (#21848) 2019-03-09 12:04:13 -08:00
Paul Bottein
4d9cf15c45 Fix authorization header in cors (#21662)
* Fix authorization headers in cors

* Use aiohttp authorization header instead of custom const
2019-03-09 10:00:10 -08:00
emontnemery
fc81826763 Introduce Entity.async_write_ha_state() to not miss state transition (#21590)
* Copy state in schedule_update_ha_state

* Lint

* Fix broken test

* Review comment, improve docstring

* Preserve order of state updates

* Rewrite

* Break up async_update_ha_state

* Update binary_sensor.py

* Review comments

* Update docstring

* hass -> ha

* Update entity.py

* Update entity.py
2019-03-09 09:52:22 -08:00
Willem Burgers
458548daec Fix TypeError (#21734)
* timediff is of type timedelta. Divide by timedelta does not work.

- convert a timedelta to int
- make sure the test inputs real timestamps

* Convert the total_seconds to decimal and round the result

readings are of type Decimal, so fix test to reflect that

* split line into multiple statements

Line too long

* use total_seconds instead of timediff

* Make both values float instead of Decimal
2019-03-09 17:51:15 +01:00
Hackashaq666
be989ebb7e Update honeywell.py to read current humidity for US Thermostats (#21728)
* Update honeywell.py

Add thermostat humidity reading available in somecomfort for US thermostats.

* Update honeywell.py

* Update honeywell.py
2019-03-09 21:47:28 +05:30
Jason Hu
bbd01968ba Override http.trusted_networks by auth_provider.trusted_networks (#21844) 2019-03-08 23:56:37 -08:00
Robbie Trencheny
9ab0753cf7 mobile_app improvements (#21607)
* First webhook commands for getting and deleting single registrations

* Keep a list of deleted webhook IDs so we can 410 if the webhook receives traffic in the future

* Return a empty JSON object instead of None

* Split up mobile_app bits into individual files

* Add typing

* Sort keys

* Remove unused async_setup_entry

* New decorator method of registering webhooks

* Add tests for cloud hook forwarding and improve error handling for cloud hooks

* Initial implementation of platform specific logic

* Add get registrations by user ID websocket call, minor style fixes

* Stop using resp dictionary during registration

* Move mobile_app/ios.py to ios/mobile_app.py

* Log any errors encountered during webhook

* Improve update registration call

* Split up mobile_app tests to match split up component

* Fix tests

* Remove integration_map in favor of component name in registration

* Add a few helper functions for custom logic components to use

* Load the app_component platform at device registration or component setup time

* Remove extraneous function

* Use guard function for checking if component is in device

* Inline websocket schemas

* Rename ATTR_s used in storage to DATA_ prefix

* squash flake8 and pylint issues

* Remove ios.mobile_app platform

* Dont mark websocket_api as a dependency

* Return standard empty_okay_response with 400 if no JSON sent

* Ensure deleted webhook IDs are registered at launch

* Remove the creation of cloudhooks during handle_webhook

* Rename device to registration everywhere applicable

* Dont check if cloud is logged in, just check if cloud is in components

* Dont ever use cloudhook_id

* Remove component loading logic for a later PR

* Cast exception to string

* Remove unused functions
2019-03-08 23:44:56 -08:00
Aaron Bach
49eaa34e03 Fixed a misspelling in a docstring (#21846) 2019-03-08 22:36:41 -07:00
Andrew Sayre
c5734eecc7 Update dependencies to receive data on webhook callbacks (#21838) 2019-03-08 21:20:07 -08:00
Aaron Bach
113db9afd4 Fix config entry exception in Ambient PWS (#21836) 2019-03-08 21:25:35 -06:00
William Scanlon
012c657a9c Updated to pyeconet 0.0.10 (#21837) 2019-03-08 21:24:17 -06:00
engrbm87
76d11e4b74 fix empty TOPIC_BASE issue (#21740)
* fix empty TOPIC_BASE issue

if the value of the TOPIC_BASE is empty then we need to remove "~" from the topic value if it exists. 
by doing `if base:` on line 239 the condition will be false if the value is empty so the '~' will not be stripped from the topic value.
I simply removed the `if base:` line and added `if TOPIC_BASE in payload:`

* Update homeassistant/components/mqtt/discovery.py

Co-Authored-By: engrbm87 <engrbm87@gmail.com>
2019-03-08 16:48:54 -08:00
Mike Megally
d8ac761bb6 Synology sensor quick return if attr is null (#21709)
* Quick return if attr is null

There are some case where attr is null. Returning null doesn't change anything (in my case this is mapped to a volume that doesn't exist, not sure what others are seeing). 

If you have confirmed you hass instance for C instead of F you do not see this error.

* update == to is

* whitespace
2019-03-08 16:35:38 -08:00
Finbarr Brady
0f189809a9 Add support for Cisco Mobility Express (#21531)
* Move cisco me to new layout

* Add docstring

* Move items out of init method and pass the controller instance to the scanner in get_scanner

* Update homeassistant/components/cisco_mobility_express/device_tracker.py

Co-Authored-By: fbradyirl <fbradyirl@users.noreply.github.com>

* Update homeassistant/components/cisco_mobility_express/device_tracker.py

Co-Authored-By: fbradyirl <fbradyirl@users.noreply.github.com>

* Update homeassistant/components/cisco_mobility_express/device_tracker.py

Co-Authored-By: fbradyirl <fbradyirl@users.noreply.github.com>

* Update homeassistant/components/cisco_mobility_express/device_tracker.py

Co-Authored-By: fbradyirl <fbradyirl@users.noreply.github.com>

* Fix build error

* Cleanup based on comments.
2019-03-09 00:47:06 +01:00
Robbie Trencheny
31a4187cc0 Log if aiohttp hits error during IndieAuth (#21780)
* Log if aiohttp hits error during IndieAuth

* Add content of redirect_url into error log

Co-Authored-By: awarecan <awarecan@users.noreply.github.com>
2019-03-08 14:51:13 -08:00
Jason Hu
3d8673dbf8 Resolve auth_store loading race condition (#21794)
* Add lock in auth_store._async_load()

* Python 3.5 does not like assert_called_once()
2019-03-08 14:50:24 -08:00
Jason Hu
3ff2d99cd6 Load logger and system_log components as soon as possible (#21799) 2019-03-08 14:47:10 -08:00
Paulus Schoutsen
22ab5a498f Change how we import config modules (#21824) 2019-03-08 14:09:18 -08:00
uchagani
ed6082eb2b change paths to be relative (#21827) 2019-03-08 14:08:19 -08:00
Paulus Schoutsen
4c9e5eef9c Remove stub from config component (#21822) 2019-03-08 14:07:49 -08:00
Paulus Schoutsen
3da0ed9cc7 Onboarding to generate auth code (#21777) 2019-03-08 13:51:42 -08:00
Toon Willems
a0e8543aed remove occupancy, as it is not available at this level in the iRail api (#21810) 2019-03-09 02:49:48 +05:30
Greg Dowling
7226e917ed Bump loopenergy to 0.1.0. Loop updated their socket.io server from 0.9 to 2.0 - which required a library update. (#21809) 2019-03-09 02:13:59 +05:30
Finbarr Brady
4571f1bf0d Adding enigma2 media player (#21271)
* Updated based on review comments

* fix hound

* Update homeassistant/components/media_player/enigma2.py

* Update homeassistant/components/media_player/enigma2.py

* Update homeassistant/components/media_player/enigma2.py

* Update enigma2.py

* Update enigma2.py

* Move file and update docsstring

* Fix path in coverage rc file

* requirements

* Update media_player.py

* Setup discovery for e2

* Handle discovered devices

* Add reqs

* Update for auth for openwebif

* Forget to set DEFAULT_PASSWORD

* Add source selection

* Fix get current source name

* Update pip version

* - adding some extra attributes
- support better recording playback integration

* bump pip version

* Bump pip

* Adding prefer_picon config option

* Updates to move logic into pypi module

* bump pip

* bump pip

* - remove http dependancy.

- rename prefer_picon to use_channel_icon

* Bump pypi to fix toggle bug.

also fix travis

also move setup out of init
2019-03-08 14:56:10 +01:00
Ville Skyttä
dfd9f7ccf3 Upgrade huawei-lte-api to 1.1.5 (#21791) 2019-03-08 09:28:53 +01:00
Jose Motta Lopes
f705ac6b43 Add Time of Flight Sensor using VL53L1X (#21230)
* Add Time of Flight Sensor using VL53L1X

* Fix issues found by bot

* Fix issues from bot

* Remove extra logs

* Keep removing logs dependencies not used

* Remove log from update

* Add logger info to async_update

* Fix over-indented line

* Fix pylint error

* Remove logger reporting successful operation

* Update requirements

* Update requirements_all.txt

* Update requirements_test_all.txt

* Used isort to keep imports and added STMicroelectronics to docstring

* Replace time.sleep by asyncio.sleep

* Add requirements to COMMENT_REQUIREMENTS and fix typo

* Using async_add_executor_job to schedule the call in the pool

* Fix typo

* Optimize async_update

* Updated requirements files

* Group and schedule calls that should be run sequentially

* Fix lint errors

* Revision showing development history

* Cleaning and typos

* Cleaning and typos

* Fix wrong-import-order

* Fix gen_requirements_all

* Schedule rpi_gpio I/O on the executor thread pool

* Fix partial parameters

* Fix bot error - add blank line

* Fix lint error

* Remove dependencies from requirements

* Review initial commits

* Move all device I/O to async_update

* Update requirements_all.txt

* Revised header with no url to the docs

* Use async_added_to_hass to add and initialize the sensor

* Add docstring to init()

* Move sensor.open() to async_setup_platform

* Remove logging and async

* Fix typo

* Move sensor.open to safe initialization

* Fix typo

* Fix typo

* Add the new tof module to .coveragerc

* Move the sensor platform under a tof package

* Update .coveragerc and requirements_all for tof package
2019-03-08 08:21:22 +01:00
Paulus Schoutsen
ac4d5d7c30 Merge pull request #21778 from home-assistant/rc
0.89.1
2019-03-07 23:16:17 -08:00
Ville Skyttä
2812483193 Upgrade pylint to 2.3.1 (#21789) 2019-03-08 09:13:35 +02:00
Paulus Schoutsen
f3e8e34089 Add workflow for tests 2019-03-07 17:03:23 -08:00
Paulus Schoutsen
eae6d1c7a6 Bumped version to 0.89.1 2019-03-07 16:48:53 -08:00
William Scanlon
a121c92f52 Updated to newest pyeconet (#21772) 2019-03-07 16:48:47 -08:00
David Thulke
4d6f21ecb2 adds missing SUPPORT_VOLUME_SET flag to webos media_player (#21766) 2019-03-07 16:48:46 -08:00
Sebastian Muszynski
1638d0a92f Bump PyXiaomiGateway version to 0.12.2 (Closes: #21731) (#21764) 2019-03-07 16:48:46 -08:00
Jason Hu
c031fd4164 Fix script load module issue (#21763)
* Fix script load depedency

* Revert #21754
2019-03-07 16:48:45 -08:00
Jason Hu
78a806bc5c Fix script load module issue (#21763)
* Fix script load depedency

* Revert #21754
2019-03-07 16:48:14 -08:00
David Thulke
2fb978393b adds missing SUPPORT_VOLUME_SET flag to webos media_player (#21766) 2019-03-07 16:46:50 -08:00
William Scanlon
a843da1bfc Updated to newest pyeconet (#21772) 2019-03-07 16:46:01 -08:00
Sebastian Muszynski
cfd94ecbbc Bump PyXiaomiGateway version to 0.12.2 (Closes: #21731) (#21764) 2019-03-07 22:55:11 +01:00
Marvin Wichmann
5112f8f6b5 Introduce target_temperature_state_address for climate device (#21541) 2019-03-07 21:53:42 +00:00
Jason Hu
5f0c37ccfc Fix colorlog import error (#21754)
* Fix colorlog import error

* Lint
2019-03-07 11:07:24 -08:00
Jason Hu
c91fb82807 Fix colorlog import error (#21754)
* Fix colorlog import error

* Lint
2019-03-07 11:07:07 -08:00
Daniel Shokouhi
e412317194 Fix botvac connected maps call as it is not a supported model (#21752) 2019-03-07 11:06:42 -08:00
Leonardo Merza
44341a958a automated commit 07/03/2019 10:47:38 (#21749) 2019-03-07 11:06:41 -08:00
Markus Jankowski
5a555102b9 Fix group-switch availability for Homematic IP (#21640)
* Add available=True to groups

* Added unreach to stateattributes

* Fixed comments

* added missing sabotage check

* added missing lowBat check

* fix typo

* apply suggestion

Co-Authored-By: SukramJ <markus@mm-jankowski.de>

* apply suggestion

Co-Authored-By: SukramJ <markus@mm-jankowski.de>

* applied suggiestions

* readded lost str()

* fix comment
2019-03-07 11:06:40 -08:00
Markus Jankowski
aebe6ab70c Fix Name of Homematic IP accesspoint in devices, if name is configured (#21617)
* Fix Name of Accesspoint if name is configured

* fix lint

* Simplyfied naming

* applied suggestion

Co-Authored-By: SukramJ <markus@mm-jankowski.de>

* update comment
2019-03-07 11:06:39 -08:00
Kevin Fronczak
48c9758cf5 Upgrade blinkpy==0.13.1 (Fixes #21559) (#21578)
* Upgrade blinkpy with new api endpoint

* Change wifi units to dBm
2019-03-07 11:06:39 -08:00
Leonardo Merza
e356b48fca automated commit 07/03/2019 10:47:38 (#21749) 2019-03-07 11:03:32 -08:00
Daniel Shokouhi
fc943dc4b6 Fix botvac connected maps call as it is not a supported model (#21752) 2019-03-07 11:03:02 -08:00
Paulus Schoutsen
279470613c Updated frontend to 20190305.1 2019-03-07 10:54:56 -08:00
zewelor
f2abc91c1e Allow light toggle service to accept all turn on params (#20912) 2019-03-07 22:33:30 +05:30
Pascal Vizeli
61786b79f7 Revert pull request to push 2019-03-07 15:33:13 +01:00
Pascal Vizeli
720b0c5334 Revert Travis until github actions work better for PR (#21746) 2019-03-07 15:30:48 +01:00
Pascal Vizeli
5c2d174d5f Change github trigger type 2019-03-07 15:25:27 +01:00
Pascal Vizeli
02bcf46053 Update .travis.yml (#21736)
* Update .travis.yml

* Update tox.ini

* Update main.workflow

* Update tox.ini
2019-03-07 14:40:18 +01:00
Jason Hu
ba70459e1e Remove pytest warning message (#21713) 2019-03-07 16:59:15 +05:30
Markus Jankowski
1891d5bf22 Fix group-switch availability for Homematic IP (#21640)
* Add available=True to groups

* Added unreach to stateattributes

* Fixed comments

* added missing sabotage check

* added missing lowBat check

* fix typo

* apply suggestion

Co-Authored-By: SukramJ <markus@mm-jankowski.de>

* apply suggestion

Co-Authored-By: SukramJ <markus@mm-jankowski.de>

* applied suggiestions

* readded lost str()

* fix comment
2019-03-07 11:12:03 +01:00
Markus Jankowski
a46458d04f Fix Name of Homematic IP accesspoint in devices, if name is configured (#21617)
* Fix Name of Accesspoint if name is configured

* fix lint

* Simplyfied naming

* applied suggestion

Co-Authored-By: SukramJ <markus@mm-jankowski.de>

* update comment
2019-03-07 11:07:32 +01:00
Leonardo Merza
9c70b00403 tplink - catch SmartDeviceException on is_dimmable call (#21726)
* automated commit 06/03/2019 20:49:50

* automated commit 06/03/2019 20:53:13

* automated commit 06/03/2019 20:53:48
2019-03-07 10:54:09 +01:00
Jason Hu
38a93afa66 Make pytest in tox quite (#21727) 2019-03-06 22:27:46 -08:00
Jason Hu
a85119ac09 Fix pylint warning on python 3.7 (#21714) 2019-03-07 06:47:56 +01:00
c-soft
f4a9ad0b2e Fix initialization and add "pending" status of Satel integra (#21194)
* Added updating alarm state after start of the HA. Still rough and dirty.

* Fixed initialization of the panel and binary sensor.  Before cleanup.

* Added alarm clearing, linting fixes.

* Removed dead code, added style changes.

* Updated requirements

* Fixed linting errors.

* Fixed linting errors

* Fixed linter errors.

* Fixed hopefully last linter errors.

* Fixes after code review, imports sorted.

* Removed init debugging
2019-03-06 19:47:47 -08:00
Sergio Oller
9f06be750f Support multiple keys in ifttt triggers (#21454)
* Support multiple keys in ifttt triggers

* Rename `to` to `target` in ifttt.

Follow PR code review suggestions
2019-03-06 19:47:13 -08:00
Jc2k
dbf129dfdd Start preparing for homekit_controller config entries (#21564)
* Start preparing for homekit_controller config entries

* Review feedback

* Review feedback

* Only use the vol.strip validator for pairing_code

* CV not required now

* Changes from review

* Changes after review
2019-03-06 19:44:52 -08:00
Phil Bruckner
5616505032 Change amcrest camera_image to async (#21720)
Change AmcrestCam method camera_image to async so asyncio lock can be used instead of a threading lock. Bump amcrest package to 1.2.5.
2019-03-06 19:42:59 -08:00
Paulus Schoutsen
88bc3033d3 Merge pull request #21712 from home-assistant/rc
0.89.0
2019-03-06 15:15:37 -08:00
Paulus Schoutsen
21de636e5b Bumped version to 0.89.0 2019-03-06 10:07:31 -08:00
Franck Nijhof
87b5faa244 Upgrade toonapilib to 3.2.1 (#21706) 2019-03-06 10:05:32 -08:00
Fredrik Erlandsson
c2f4293c6a resync hass that changes have occured (#21705) 2019-03-06 10:05:31 -08:00
Franck Nijhof
0e36b26770 Upgrade toonapilib to 3.2.1 (#21706) 2019-03-06 07:40:29 -08:00
Diogo Gomes
8e9a496002 Utility Meter offset defined by a time_period (#20926)
* change offset from int to Time period dictionary

* track according to offset

* left overs... tks @fabaff

* typo
2019-03-06 07:55:24 -05:00
Fredrik Erlandsson
54895fcb1e resync hass that changes have occured (#21705) 2019-03-06 07:52:25 -05:00
Alan Tse
b7b034c532 Update to teslajsonpy v0.0.25 (#21702) 2019-03-05 21:44:37 -08:00
Penny Wood
d1038ea79f Google Assistant: Create and pass context to service calls (#21551)
* Google Assistant: Create and pass context to service calls

* Refactor request data into separate object and pass to execute.
2019-03-05 20:00:53 -08:00
Paulus Schoutsen
fc1ee9be43 Use new style for built-in ws commmands (#21694)
* Use new style for built-in ws commmands

* Lint
2019-03-05 19:31:26 -08:00
Paulus Schoutsen
c9b173405b Fix Z-Wave relative imports (#21693) 2019-03-05 17:17:58 -08:00
Paulus Schoutsen
4c72f3c48b Bumped version to 0.89.0b3 2019-03-05 11:46:30 -08:00
carstenschroeder
cb613984df Fix ADS race condition (#21677) 2019-03-05 11:46:19 -08:00
Diogo Gomes
4978a1681e check we have a tb (#21670) 2019-03-05 11:46:18 -08:00
Paulus Schoutsen
2303e1684e Updated frontend to 20190305.0 2019-03-05 11:45:46 -08:00
Paulus Schoutsen
467d8d616e Updated frontend to 20190305.0 2019-03-05 11:45:31 -08:00
Alan Tse
dbb92048aa Bump teslajsonpy to 0.0.24 (#21675)
* Bump teslajsonpy to 0.0.24

* Update requirements_all.txt
2019-03-05 09:23:00 -08:00
Jonathan McDowell
401720085d Allow 202 status code as a successful REST notify response (#21678)
The REST notification component only allows 200 + 201 as a successful
response code to the submission. notify.me returns a 202 (Accepted)
response, which works fine but gets logged as a warning in the log.
Update the allowed statuses to treat the 202 as ok.
2019-03-05 09:22:21 -08:00
Nick Whyte
7d9c14541b Bump nessclient version to 0.9.14 (#21679) 2019-03-05 09:21:13 -08:00
Phil Bruckner
16d79b52c3 Serialize amcrest snapshot commands and bump PyPI package to 1.2.4 (#21664)
* Serialize snapshot commands and bump amcrest package to 1.2.4

Attempting to send a snapshot command when a previous one hasn't finished will result in warnings and/or errors. This can happen when the camera picture is clicked on in the frontend, resulting in the thread that updates the thumbnail in the background every 10 seconds to sometimes collide with the thread that updates the large picture in the foreground quickly. An automation that calls the camera.snapshot service in yet another thread can make the situation worse. Fix by adding a thread lock to serialize snapshot commands. Also bump the amcrest package to 1.2.4 which fixes error handling in the command method and improves performance by reusing requests sessions.

* Update amcrest package to 1.2.4
2019-03-05 17:03:19 +01:00
Steven Looman
3ffff887d8 Adds option in UPnP component to override callback url (#21583)
* Add option to override callback url

* Upgrade to async_upnp_client==0.14.5

* Fix requirements_all.txt
2019-03-05 15:48:44 +00:00
carstenschroeder
17c3c14833 Fix ADS race condition (#21677) 2019-03-05 11:07:40 +01:00
Colby Rome
0e78054195 Xfinity Gateway device_tracker platform (#21026)
* initial commit

* updated .coveragerc, CODEOWNERS, generated requirements_all.txt

* fixed lines exceeding 79 characters

* pylint fixes

* shorten docstring and simplify get_scanner

* extract initialization into get_scanner

* bump pypi version

* name change
2019-03-04 22:57:45 -08:00
Diogo Gomes
efe4ce9a05 check we have a tb (#21670) 2019-03-05 06:18:25 +01:00
ktnrg45
efa5d5dfe3 Add support for multiple devices for PS4 component (#21302)
* Support multiple devices.

* Revert "Support multiple devices."

This reverts commit 3f5d4462a98da13ebb1ab1c07d341dbd7020e6cc.

* Support multiple devices

* Bump to 0.3.3

* bump 0.3.4

* Add tests for multiple devices.

* Update Requirements

* Update config_flow.py

* Update config_flow.py

* fixed typo

* Reordered functions

* Added multiple flow implementation test.

* fix

* typo

* fix tests

* bump 0.4.0

* Bump 0.4.0

* 0.4.0

* bump version

* bump version

* bump version

* Add keep alive feature with multiple devices

* bump version

* bump version

* bump version

* bump 0.4.7

* bump 0.4.7

* bump 0.4.7

* Edited tests.

* bump/pylint

* pylint

* bump/pylint

* bump/pylint

* Change to add additional entry

* Changed to multiple entries

* pylint

* Corrections to manage multiple devices.

* lint

* comments

* Removed redundant for loop

* Shorthand correction

* Remove reference to private object

* Test fix

* Revert changes. Test failure.

* Test fix

* test fix

* unindent assertions

* pylint
2019-03-05 01:48:25 +01:00
Paulus Schoutsen
3135257c0d Bumped version to 0.89.0b2 2019-03-04 16:02:05 -08:00
Paulus Schoutsen
b20b811cb9 Avoid recorder thread crashing (#21668) 2019-03-04 16:01:59 -08:00
Paulus Schoutsen
df25128923 Avoid recorder thread crashing (#21668) 2019-03-04 16:01:31 -08:00
Franck Nijhof
a778cd117f Upgrade toonapilib to 3.1.0 (#21661) 2019-03-04 16:01:15 -08:00
Franck Nijhof
31b88197eb 🚑 Fixes Toon doing I/O in coroutines (#21657) 2019-03-04 16:01:14 -08:00
Paulus Schoutsen
81c252f917 Rename Google Assistant evenets (#21655) 2019-03-04 16:01:13 -08:00
Franck Nijhof
f5a0b5ab98 👕 Corrects unit of measurement symbol for Watt (#21654) 2019-03-04 16:01:12 -08:00
Gijs Reichert
a382ba731d Cast displaytime to int for JSON RPC (#21649) 2019-03-04 15:59:19 -08:00
Paulus Schoutsen
cca8d4c951 Fix calc next (#21630) 2019-03-04 15:59:18 -08:00
Anders Melchiorsen
932080656d Upgrade pysonos to 0.0.8 (#21624) 2019-03-04 15:59:18 -08:00
Jason Hu
d5bdfdb0b3 Resolve race condition when HA auth provider is loading (#21619)
* Resolve race condition when HA auth provider is loading

* Fix

* Add more tests

* Lint
2019-03-04 15:59:17 -08:00
Andrew Sayre
d9806f759b Handle when installed app has already been removed (#21595) 2019-03-04 15:59:16 -08:00
Anders Melchiorsen
e6debe09e8 Word the tplink deprecation warning more strongly (#21586) 2019-03-04 15:59:16 -08:00
Jason Hu
c5dad82211 Log exception occurred in WS service call command (#21584) 2019-03-04 15:59:15 -08:00
Daniel Høyer Iversen
ec9ccf6402 Upgrade PyXiaomiGateway library (#21582) 2019-03-04 15:59:15 -08:00
Jason Hu
a268aab2ec Re-thrown exception occurred in the blocking service call (#21573)
* Rethrown exception occurred in the actual service call

* Fix lint and test
2019-03-04 15:59:14 -08:00
damarco
996e0a6389 Bump zigpy-deconz (#21566) 2019-03-04 15:59:14 -08:00
emontnemery
e877983533 Make time trigger data trigger.now local (#21544)
* Make time trigger data trigger.now local

* Make time pattern trigger data trigger.now local

* Lint

* Rework according to review comment

* Lint
2019-03-04 15:59:13 -08:00
Robbie Trencheny
73675d5a48 mobile_app component (#21475)
* Initial pass of a mobile_app component

* Fully support encryption, validation for the webhook payloads, and other general improvements

* Return same format as original API calls

* Minor encryption fixes, logging improvements

* Migrate Owntracks to use the superior PyNaCl instead of libnacl, mark it as a requirement in mobile_app

* Add mobile_app to .coveragerc

* Dont manually b64decode on OT

* Initial requested changes

* Round two of fixes

* Initial mobile_app tests

* Dont allow making registration requests for same/existing device

* Test formatting fixes

* Add mobile_app to default_config

* Add some more keys allowed in registration payloads

* Add support for getting a single device, updating a device, getting all devices. Also change from /api/mobile_app/register to /api/mobile_app/devices

* Change device_id to fingerprint

* Next round of changes

* Add keyword args and pass context on all relevant calls

* Remove SingleDeviceView in favor of webhook type to update registration

* Only allow some properties to be updated on registrations, rename integration_data to app_data

* Add call service test, ensure events actually fire, only run the encryption tests if sodium is installed

* pylint

* Fix OwnTracks test

* Fix iteration of devices and remove device_for_webhook_id
2019-03-04 15:59:12 -08:00
roblandry
e10e27d809 Add SmartThingsAccelCluster to ZHA binary_sensor (#21609)
* Add SmartThingsAccelCluster to binary_sensor

* Make corrections per discussion with @dmulcahey

* Add missing const to gateway.py

* Remove Acceleration from no sensor
2019-03-04 15:56:05 -08:00
Jason Hu
4a3b4cf346 Resolve race condition when HA auth provider is loading (#21619)
* Resolve race condition when HA auth provider is loading

* Fix

* Add more tests

* Lint
2019-03-04 15:55:26 -08:00
Daniel Høyer Iversen
7a7080055e Netatmo, handle missing thermostat devices (#21651) 2019-03-04 15:54:21 -08:00
Franck Nijhof
955b71c44b 👕 Corrects unit of measurement symbol for Watt (#21654) 2019-03-04 15:53:16 -08:00
Franck Nijhof
73b100d3af 🚑 Fixes Toon doing I/O in coroutines (#21657) 2019-03-04 15:52:00 -08:00
Franck Nijhof
641138a986 Upgrade toonapilib to 3.1.0 (#21661) 2019-03-04 15:51:15 -08:00
Paulus Schoutsen
27e8a6ee80 Rename Google Assistant evenets (#21655) 2019-03-04 13:18:16 -08:00
Alok Saboo
5375510535 Add camera name to logs (#21653) 2019-03-04 12:06:28 -08:00
Paulus Schoutsen
8213016eaf Allow targeting areas in service calls (#21472)
* Allow targeting areas in service calls

* Lint + Type

* Address comments
2019-03-04 09:51:12 -08:00
Nate Clark
f62eb22ef8 Add support for DHT and DS18B20 sensors via Konnected firmware (#21189)
* mvp basic temperature sensor support

* support for DHT temperature & humidity

* add support for ds18b20 sensors

* improve resolution of device settings

* update requirements_all.txt

* re-organize new file

* don't use filter(lambda: syntax

* set unique_id on entities to allow renaming in the UI

* leverage base Entity module to do C to F conversion

* add option for setting poll_interval

* use handler pattern to handle updates from Konnected device

* cleanups from code review
2019-03-04 16:56:41 +01:00
Gijs Reichert
158e25562b Cast displaytime to int for JSON RPC (#21649) 2019-03-04 15:25:28 +01:00
Pascal Vizeli
72b6e80d02 Better output of workflow 2019-03-04 14:06:05 +01:00
Fabian Affolter
eb1d7be67c Upgrade youtube_dl to 2019.03.01 (#21647) 2019-03-04 14:00:10 +01:00
Pascal Vizeli
c60627c699 GitHub Workflow (#21643)
* Fix tox.ini

* Update main.workflow

* Update tox.ini

* Update main.workflow

* Update main.workflow

* Update tox.ini

* Try only with one

* Update main.workflow

* Update main.workflow

* Update main.workflow

* Update main.workflow

* Update main.workflow
2019-03-04 12:36:50 +01:00
Pascal Vizeli
5c9f266672 Fix actions with tox (#21642)
* Fix actions with tox

* Update main.workflow
2019-03-04 10:23:19 +01:00
Pascal Vizeli
5efcbc5043 Replace travis (#21641) 2019-03-04 09:59:35 +01:00
Nick Whyte
10e334cbf0 Allow configuration of update interval for ness_alarm (#21415)
* ness_alarm: Allow configuration of update_interval

* requirements

* update_interval -> scan_interval

* Consistent config validation

* requirements

* don't touch dependency version
2019-03-04 00:05:44 -08:00
Paulus Schoutsen
43f85f7053 Updated frontend to 20190303.0 2019-03-03 22:41:38 -08:00
Paulus Schoutsen
c03116291e Updated frontend to 20190303.0 2019-03-03 21:55:51 -08:00
Paulus Schoutsen
de9e6e8d1a Update translations 2019-03-03 21:53:45 -08:00
David F. Mulcahey
fc07d3a159 Add storage helper to ZHA and use it for the device node descriptor (#21500)
* node descriptor implementation

add info to device info

disable pylint rule

check for success

* review comments

* send manufacturer code for get attr value for mfg clusters

* ST report configs

* do zdo task first

* add guard

* use faster reporting config

* disable false positive pylint
2019-03-03 21:22:42 -08:00
Jason Hu
ee6f09dd29 Log exception occurred in WS service call command (#21584) 2019-03-03 21:22:22 -08:00
Paulus Schoutsen
48a2e50f84 Fix calc next (#21630) 2019-03-03 21:36:13 -07:00
Paulus Schoutsen
f5ed6432eb Expose create/delete cloudhook (#21606)
* Expose create/delete cloudhook

* Make sure we dont publish cloudhooks when not connected
2019-03-03 19:03:49 -08:00
shanbs
c25cbccca9 Return Netatmo climate operation_mode instead of boiler status (#21633)
* Merge the devices into one list and add into entries at once; Return operation_mode instead of boiler status.

* Removing property operation_mode
2019-03-04 02:42:29 +01:00
Aaron Bach
31bcf6c35f Bump pyflunearyou to 1.0.3 (#21634) 2019-03-03 18:39:13 -07:00
Willem Burgers
2017e45d78 fix derived rate, fixes #20097 (#21620)
* fix derived rate, fixes #20097

* fix derived rate, fixes #20097

* Fix typo

thnx @amelchio

* Make the test more realistic

Took values from my own smart meter for the test

* Update test to ignore rounding issues
2019-03-03 23:42:52 +01:00
srirams
818776d2b4 Add optional sender name for SendGrid (#21610)
* Set "Home Assistant" as email sender name for SendGrid

* make sender name configurable

* sendgrid tweaks

* fix config
2019-03-03 13:44:40 -08:00
Jeff Irion
fa938f5628 Add 'app_name' property and 'apps' config entry to Fire TV (#21601)
* Add 'app_name' property and 'apps' config entry to Fire TV

* Define 'CONF_APPS', don't import it

* Address reviewer comments
2019-03-03 12:39:39 -08:00
Markus Jankowski
3032283b99 Add device HMIP-eTRV-C to HomematicIP (#21612)
* Update dependencies

* Add additional device HMIP-eTRV-C

add valveActualTemperature to HeatingThermostats (HMIP-eTRV-C, HMIP-eTRV, HMIP-eTRV-2)

* Removed HomematicipThermostatTemperatureSensor

already in climate
2019-03-03 12:33:48 -08:00
kennedyshead
1308ead8d6 Bumping aioasuswrt (#21627) 2019-03-03 12:31:09 -08:00
Andrew Sayre
3e0459cef9 SmartThings remove SmartApp/Automation on integration removal (#21594)
* Add clean-up logic upon entry removal

* Removed unecessary app removal from migration

* Change log level and clarified code
2019-03-03 13:47:25 -06:00
Anders Melchiorsen
0f6e0aa355 Upgrade pysonos to 0.0.8 (#21624) 2019-03-03 18:49:29 +01:00
Maikel Punie
b985223603 Add the velbus sync clock service (#21308)
* Add the velbus sync clock service

* Fixed houndci-bot commants

* Fix lint and pylint

* fixed all comments

* Hound bot comments

* Fix for flake8
2019-03-03 06:37:36 -06:00
Andrew Sayre
1e60993aa7 Handle when installed app has already been removed (#21595) 2019-03-02 21:57:57 -06:00
shanbs
18372ad81b Added support for multiple Netatmo thermostats/valves (#19407)
* climate/netatmo: Added support for muletiple thermostats/valves

* Adjusted the update interval throttle to 10 seconds

* Avoid returning 'homes' without 'therm_schedules'

* Requires home to have 'modules' as well as 'therm_schedules'; Using pyatmo 1.7

* Support multiple homes

* Fix nest level too deep issue

* Fix crashing bug when discovery is true

* Fix crashing bug when discovery is true

* Modifications according to review comments

* Resolve format issue

* Fix mode name issue

* Revisions according to review's suggestions

* Revisions according to review's comments

* Revisions according to review's comments
2019-03-02 19:51:42 -08:00
Matt White
18491c515f Further Yale ZWave lock device mapping cleanup (#21128)
* Update device mapping for workarounds from zwave device db

* Update comment on old Yale vendor ID
2019-03-02 20:29:16 -06:00
Rohan Kapoor
9af8c95e83 Upgrade motorparts to 1.1.0 (#21602) 2019-03-02 20:23:17 -06:00
ehendrix23
833f17de04 Add parameter hold_secs for Harmony remote send command (#19650)
* Update requirements

Updated requirements

* Small bump for aioharmony

Small version bump increase for aioharmony

* Add attributes

Add firmware and config version attributes

* Add hold for button press on send_command

* Fix requirements file

For some reason aioharmony ended up in there as a duplicate. Fixed it.

* Revert rebase changes

Revert some changes that should have been reverted back as part of rebase.

* Updated based on review

Removed HOLD_SECS from platform schema (configuration)
Updated getting kwargs in async_send_command
Updated debug log to include delay_secs
2019-03-03 00:54:03 +01:00
Daniel Perna
b8eebda541 Update pyhomematic (#21600) 2019-03-02 17:42:51 -05:00
David F. Mulcahey
45316f6ed6 ZHA fixes (#21592)
* do not report on 0x1000 LightLink cluster
* don't flood Zigbee network during configuration or initialization
* add lifeline of 60 minutes to lights
* use ootb polling
2019-03-02 14:09:01 -05:00
Anders Melchiorsen
5eab86986e Word the tplink deprecation warning more strongly (#21586) 2019-03-02 12:32:18 +01:00
Joe Trabulsy
61e4a6be18 Update for new pyvesyncv_v2 library and vesync switch support (#21449)
* Change dependency to pyvesync-v2 for vesync switch

* Update requirements_all.txt

* Update Version - Wall Switch Support

Update required version for vesync outlets and switches.  Eliminate API call for energy usage for wall switches that do not have that feature

* fix name convention
2019-03-02 11:57:10 +01:00
Diogo Gomes
1ad4779443 Add network throughput statistics to systemmonitor sensor (#21575)
* add network throughput

* lint
2019-03-02 16:08:15 +05:30
Diogo Gomes
ed2b9e5483 Centrally define Watt (#21570)
* centralize Watt definition

* lint
2019-03-02 11:29:59 +01:00
Kevin Fronczak
e55ce61100 Upgrade blinkpy==0.13.1 (Fixes #21559) (#21578)
* Upgrade blinkpy with new api endpoint

* Change wifi units to dBm
2019-03-02 11:28:44 +01:00
Daniel Høyer Iversen
8e75bfb11e Upgrade PyXiaomiGateway library (#21582) 2019-03-02 11:27:36 +01:00
Penny Wood
f61f650495 Get room hints from areas (#21519)
* Get google room hint from area.

* Test case for area code.

* Updates as per code review.
2019-03-01 23:31:57 -08:00
Anders Melchiorsen
0c8a31b8ec Memory optimization for logbook (#21549) 2019-03-01 23:23:45 -08:00
Jason Hu
f1b867dccb Re-thrown exception occurred in the blocking service call (#21573)
* Rethrown exception occurred in the actual service call

* Fix lint and test
2019-03-01 23:09:31 -08:00
emontnemery
cd89809be5 Make time trigger data trigger.now local (#21544)
* Make time trigger data trigger.now local

* Make time pattern trigger data trigger.now local

* Lint

* Rework according to review comment

* Lint
2019-03-01 23:09:12 -08:00
Robbie Trencheny
655ada1374 mobile_app component (#21475)
* Initial pass of a mobile_app component

* Fully support encryption, validation for the webhook payloads, and other general improvements

* Return same format as original API calls

* Minor encryption fixes, logging improvements

* Migrate Owntracks to use the superior PyNaCl instead of libnacl, mark it as a requirement in mobile_app

* Add mobile_app to .coveragerc

* Dont manually b64decode on OT

* Initial requested changes

* Round two of fixes

* Initial mobile_app tests

* Dont allow making registration requests for same/existing device

* Test formatting fixes

* Add mobile_app to default_config

* Add some more keys allowed in registration payloads

* Add support for getting a single device, updating a device, getting all devices. Also change from /api/mobile_app/register to /api/mobile_app/devices

* Change device_id to fingerprint

* Next round of changes

* Add keyword args and pass context on all relevant calls

* Remove SingleDeviceView in favor of webhook type to update registration

* Only allow some properties to be updated on registrations, rename integration_data to app_data

* Add call service test, ensure events actually fire, only run the encryption tests if sodium is installed

* pylint

* Fix OwnTracks test

* Fix iteration of devices and remove device_for_webhook_id
2019-03-01 23:08:20 -08:00
Andrew Sayre
0903bd92f0 Add config entry remove callback (#21576) 2019-03-01 21:13:55 -08:00
David F. Mulcahey
cd6c923123 fix exception (#21571) 2019-03-01 20:15:36 -05:00
Wagner Sartori Junior
b8ec74cc15 bump pyxeoma to 1.4.1 to fix and close #19306 (#21568) 2019-03-01 20:11:32 -05:00
damarco
1a9dcaefd2 Bump zigpy-deconz (#21566) 2019-03-01 13:47:20 -05:00
Paulus Schoutsen
52f337ef00 Allow chaining contexts (#21028)
* Allow chaining contexts

* Add stubbed out migration
2019-03-01 10:08:38 -08:00
David F. Mulcahey
b39846fb6b add friendly name to devices in the device registry (#21499)
switch to name_by_user

review comments

add device reg info to zha device api
2019-03-01 08:11:24 -05:00
msvinth
0aba49adce Add separate on/off ids on manual configured IHC lights (#20253)
* Add support for separate on/off ids on manual configured IHC lights.
This makes it easier to support IHC code units thats relies on being
turned on and off through specific inputs.
Also adds a pulse service (ihc.pulse) that supports sending a short on/off pulse to an IHC input.

* Fix

* Lint fix

* Add on/off id support in switch

* Make pulse async

* Code review fixes
2019-03-01 08:17:59 +01:00
Paulus Schoutsen
ee4be13bda Allow config entry reloading (#21502)
* Allow config entry reloading

* Fix duplicate test name

* Add comment

* fix typing
2019-02-28 22:27:20 -06:00
David F. Mulcahey
aa30ac52ea prevent duplicate event channel registration (#21534) 2019-02-28 22:53:59 -05:00
Aaron Bach
326513af90 Add pause/unpause services to RainMachine (#21548)
* Add pause/unpause services to RainMachine

* Update requirements
2019-02-28 17:58:39 -08:00
Paulus Schoutsen
ed28482311 Bumped version to 0.89.0b1 2019-02-28 17:58:23 -08:00
Aaron Bach
0f09c02875 Fix incorrect pyairvisual call (#21542) 2019-02-28 17:46:32 -08:00
Jason Hu
97b93bcf7b Fix warning (#21538) 2019-02-28 17:46:31 -08:00
emontnemery
b05062e9d9 Add missing retain option to mqtt.climate configuration schema (#21536) 2019-02-28 17:46:31 -08:00
Victor Vostrikov
6f2dd21516 Updated variable name for readability (#21528) 2019-02-28 17:46:30 -08:00
Jason Hu
eda2290d47 Allow skip-pip applied to HA core (#21527) 2019-02-28 17:46:30 -08:00
Paulus Schoutsen
238c4247d9 Only use a single store instance (#21521) 2019-02-28 17:46:30 -08:00
Paulus Schoutsen
4fe9f966ad Fix lint (#21520) 2019-02-28 17:46:29 -08:00
Anders Melchiorsen
26a534a67c Improve new Sonos snapshot/restore (#21509)
* Fine-tune new Sonos snapshot/restore

* Move into class
2019-02-28 17:46:29 -08:00
Aaron Bach
aa546b5a1f Add watchdog to Ambient PWS (#21507)
* Add watchdog to Ambient PWS

* Better labeling

* Owner comments
2019-02-28 17:46:28 -08:00
Robert Svensson
9e140d27bf Fix deCONZ retry mechanism for setup 2019-02-28 17:45:41 -08:00
Ben Randall
e6cbdf0645 Add PLATFORM_SCHEMA_BASE to telegram_bot component (#21155) 2019-02-28 17:44:04 -08:00
Paulus Schoutsen
1c889cfcc3 Updated frontend to 20190228.0 2019-02-28 17:43:48 -08:00
Paulus Schoutsen
5e67054ee1 Updated frontend to 20190228.0 2019-02-28 17:43:36 -08:00
David F. Mulcahey
901b2b4ba3 new websocket api way (#21533) 2019-02-28 19:32:41 -05:00
Aaron Bach
b8a94c30e8 Add watchdog to Ambient PWS (#21507)
* Add watchdog to Ambient PWS

* Better labeling

* Owner comments
2019-02-28 14:28:20 -08:00
Martin Hjelmare
40d7fbcda4 Clean up gpslogger tests (#21543) 2019-02-28 14:17:53 -08:00
Aaron Bach
8ebe5c61e8 Fix incorrect pyairvisual call (#21542) 2019-02-28 14:17:10 -08:00
Diogo Gomes
81dd2acf3b Update CODEOWNERS (#21545)
add myself to camera.push
2019-02-28 14:16:51 -08:00
Anders Melchiorsen
193cab4f62 Improve new Sonos snapshot/restore (#21509)
* Fine-tune new Sonos snapshot/restore

* Move into class
2019-02-28 10:25:31 -08:00
Jason Hu
b18b1cffff Fix warning (#21538) 2019-02-28 10:10:21 -08:00
cpopp
84b84559a4 Add support for homekit controller sensors (#21535)
Adds support for homekit devices with temperature, humidity, and
light level characteristics (such as the iHome iSS50)
2019-02-28 10:09:04 -08:00
David F. Mulcahey
82bdd9568d Add direct binding for remotes and lights for ZHA (#21498)
* cluster matching and binding apis

implement binding

callback

fix loop

fix loops

* review comments

* use any because it is clearer
2019-02-28 10:04:35 -08:00
Jason Hu
5ce4fe65b2 Allow skip-pip applied to HA core (#21527) 2019-02-28 10:01:10 -08:00
Paulus Schoutsen
4f4a8a61d2 Only use a single store instance (#21521) 2019-02-28 10:00:17 -08:00
Ben Randall
e14c8c788e Add PLATFORM_SCHEMA_BASE to telegram_bot component (#21155) 2019-02-28 18:27:40 +01:00
emontnemery
c340083ba5 Add missing retain option to mqtt.climate configuration schema (#21536) 2019-02-28 18:26:54 +01:00
Marco M
c3d4738649 Mqtt alarm added value_template and code_arm_required (#19558)
* Added value_template config for parsing json value from state topic

Added arm_code_required to avoid code enter when arming

* Renamed config parameter to code_arm_required

* Fix for discovery update compatibility

* Fixed lint error

* Added test
2019-02-28 17:44:23 +01:00
Fabian Affolter
b0dd6e4093 Upgrade python-mystrom to 0.5.0 (#21523) 2019-02-28 17:46:38 +05:30
Fabian Affolter
3e8e998078 Upgrade numpy to 1.16.2 (#21525) 2019-02-28 17:46:21 +05:30
Victor Vostrikov
342ddbfe8c Updated variable name for readability (#21528) 2019-02-28 17:35:39 +05:30
koolsb
bfc6f51b25 Add arm night for alarm decoder (#21488) 2019-02-28 17:15:17 +05:30
Jeff Irion
27a780dcc9 Register 'firetv.adb_command' service (#21419)
* Register 'media_player.firetv_adb_cmd' service

* Wrap the 'firetv_adb_cmd' service with 'adb_decorator'

* Address reviewer comments

* Move firetv to its own platform

* Move 'adb_command' service description

* Rename DOMAIN to FIRETV_DOMAIN

* Import KEYS in __init__ method

* Change 'self.KEYS' to 'self.keys'

* Update firetv in .coveragerc

* 'homeassistant.components.media_player.firetv' -> 'homeassistant.components.firetv'

* 'homeassistant.components.firetv' -> 'homeassistant.components.firetv.media_player'
2019-02-28 12:29:56 +01:00
Fabian Affolter
6f2def06be Upgrade opensensemap-api to 0.1.5 (#21524) 2019-02-28 11:59:14 +01:00
Paulus Schoutsen
229d19bb20 Fix lint (#21520) 2019-02-27 21:35:14 -08:00
Adam Dullage
548d7bbeda Bump starlingbank version to 3.1 (#21501)
* Bump starlingbank version to 3.1

Resolves Python 3.5 compatibility issue.

* Remove syntax error.
2019-02-28 09:53:21 +05:30
Aaron Bach
aad15776c0 Upgrade pyflunearyou to 1.0.2 (#21514) 2019-02-27 17:52:50 -07:00
Aaron Bach
c1365de861 Upgraded py17track to 2.2.2 (#21515) 2019-02-27 17:52:31 -07:00
Aaron Bach
fd32910185 Upgrade pytile to 2.0.6 (#21516) 2019-02-27 17:52:05 -07:00
Aaron Bach
1369b0b583 Upgrade pypollencom to 2.2.3 (#21517) 2019-02-27 17:51:36 -07:00
Aaron Bach
4ca7273c58 Upgrade pyopenuv to 1.0.9 (#21513) 2019-02-27 17:51:09 -07:00
Paulus Schoutsen
45bbe75d29 Bumped version to 0.89.0b0 2019-02-27 16:45:14 -08:00
Victor Vostrikov
4a45510c88 Changed source priority for Person (#21479)
* Added gps accuracy to Person

* Corrected GPS accuracy for Person

* Added priority of sources to Person

* Fixed formatting

* Removed rounding of coordinates.

* Added test for source priority.
Changed test for rounding of coordinates.

* Improved code style

* Code style cleanup

* Code style cleanup

* Code style cleanup

* Code style cleanup

* Code style cleanup

* Lint

* Lint
2019-02-27 16:40:23 -08:00
msvinth
070320a24a Bump ihc to 2.3.0 (#21494) 2019-02-27 16:39:11 -08:00
Nick Whyte
1ef3e32d4a ness_alarm: Bump nessclient version to 0.9.13 (#21466) 2019-02-27 16:38:53 -08:00
Paulus Schoutsen
c9ade6ee85 Merge remote-tracking branch 'origin/master' into dev 2019-02-27 16:34:47 -08:00
Paulus Schoutsen
78217fa9b0 Update translations 2019-02-27 16:34:13 -08:00
Paulus Schoutsen
f3bb9e870e Updated frontend to 20190227.0 2019-02-27 16:33:56 -08:00
Daniel Høyer Iversen
732110b4c3 Upgrade tibber lib (#21486) 2019-02-27 16:33:26 -08:00
Aaron Bach
ab2be6df48 Upgrade aioambient to 0.1.3 (#21510) 2019-02-27 16:27:26 -08:00
Aaron Bach
e4b2aab1e9 Bump simplisafe-python to 3.4.1 (#21511) 2019-02-27 16:27:13 -08:00
Aaron Bach
3749321fa5 Upgrade pyairvisual to 3.0.1 (#21512) 2019-02-27 16:26:59 -08:00
Paulus Schoutsen
63fda29eaf Merge pull request #21508 from home-assistant/rc
0.88.2
2019-02-27 16:19:26 -08:00
Jeff Irion
0ebd12fa6c Avoid unnecessary commands in Vizio update function (#20867) 2019-02-27 16:08:02 -08:00
Paulus Schoutsen
14f912500e Pin isort (#21463) 2019-02-27 15:28:22 -08:00
Paulus Schoutsen
651b0d3506 Fix cherry-pick fail ST 2019-02-27 15:27:55 -08:00
Paulus Schoutsen
626f8a8b09 Bumped version to 0.88.2 2019-02-27 15:25:21 -08:00
Sebastian Muszynski
51eb6c7b4e Bump PyXiaomiGateway version to 0.11.2 (#21453) 2019-02-27 15:25:14 -08:00
Andrew Sayre
2c10327945 Improve tolerance of SmartThings Climate platform (#21383)
* Improve resilience of platform with buggy handlers

* Eliminate possibility of None in operation list

* Refactor variable name
2019-02-27 15:24:50 -08:00
yosilevy
d1349d4919 Scene validator fix (#21362) 2019-02-27 15:24:00 -08:00
Martin Hjelmare
0f4c2ccd1e Fix person update on create (#21355)
* Update tests to set correct hass running state

* Update person on adding person if hass is running

* Test creating person when hass is running
2019-02-27 15:23:59 -08:00
David Conley
f6811a85b6 Allow custom_effect to be absent from Flux configuration (#21317)
* Allow custom_effect to be absent from Flux configuration

* set custom effect to none during setup
2019-02-27 15:23:59 -08:00
Paulus Schoutsen
fbfa3d1a18 Make sure that device trackers is always a list during creation (#21193) 2019-02-27 15:23:58 -08:00
CV
8a026bf214 HomeMatic: Add error-attribute (#21009)
Error attribute has different meanings depending on device
2019-02-27 23:09:49 +01:00
Daniel Høyer Iversen
519315f9c8 pylint 2.3.0 (#21485)
* pylint 2.3.0

* remove const

*  disable=syntax-error
2019-02-27 16:10:40 -05:00
Robert Svensson
2482816a11 Fix deCONZ retry mechanism for setup 2019-02-27 21:04:55 +01:00
Penny Wood
b87eb9d79e Fire events when Google Assistant commands come in #15139 (#20204) 2019-02-27 11:33:34 -08:00
Markus Jankowski
9b3a3fc1ac Add device_info to enable HA-devices for Homematic IP (#21241)
* add device_info to device

* added checks

* Fixes based on feedback

* Fix spelling

* Simplified implementation

On homematicip devices and the ap are created

* small fix with device.id

* hub/ap device creation moved to __init__.py

* Fixed result handling

* fixes after review.

* Fix test
2019-02-27 11:25:11 -08:00
Alexei Chetroi
9066609d23 Refactor async_turn_on() for ZHA Light. (#21156)
* Refactor async_turn_on() for ZHA Light.

Use "move_to_level_with_on_off" if brightness or transition attributes
are present in the service call data, otherwise issue "On" Zigbee
command.
Allow brightness of 0 for service call -- effectively turning the light
off.
Send color commands only after the light was turned on.

* Fix zha.light tests.
2019-02-27 08:34:38 -05:00
Fabian Affolter
27e6c6665f Upgrade astral to 1.10.1 (#21474) 2019-02-27 14:07:51 +01:00
Fabian Affolter
0b68da2f88 Upgrade shodan to 1.11.1 (#21478) 2019-02-27 14:07:26 +01:00
Fabian Affolter
01ee92177f Upgrade bcrypt to 3.1.6 (#21476) 2019-02-27 14:07:02 +01:00
Tomas Hellström
33c9afd6e0 Added a digit for precipitation (#21439) 2019-02-27 11:07:35 +05:30
Kevin Tuhumury
28f9c7c2cd Add cpu_use_percent as a new resource to the Glances sensor. (#21455) 2019-02-27 10:54:09 +05:30
Petro31
51773f338e Add person support for Waze Travel Time (#21471)
Adds person to the list of TRACKABLE_DOMAINS domains.  _get_location_from_entity will handle the person domain without any changes.
2019-02-26 20:02:49 -08:00
dfournie
822b6328e1 Add Somfy IO Garage door (#21320)
* Add Somfy IO Garage door

* Fix code style
2019-02-26 22:22:29 -05:00
Paulus Schoutsen
e9f79c3d06 Lint 2019-02-26 18:50:34 -08:00
blackray12
be78265631 Add mitemp bt sensor device class (#20293)
* Fix HomeKit missing humidity issue

When using HomeKit components, MiTemp BT's humidity state will not display in Home.app.
After Added home-assistant device class into property, this problem is solved.

* Add Device_Class_Battery to property

* Break long lines.

* Lint
2019-02-26 15:10:25 -08:00
Thibault Maekelbergh
4d4cd2d752 Update sensor.nmbs to support vias better + show on map (#20063)
* Add the destination stations to the attributes

* Add support for showing station on map

* Add option to exclude via connections

* Cleanup the live sensor

* Perform better checking against false i/o None values

* Add support for excluding vias

* Add more details for via trains

* Lint file

* Update logger level
2019-02-26 15:08:25 -08:00
Daniel Høyer Iversen
efa48848a5 Comment out bluepy libraries from requirements_all.txt (#20856)
* Comment bluepy libraries from requirements_all.txt, fixes #20778

* Comment bluepy libraries from requirements_all.txt, fixes #20778

* Comment bluepy libraries from requirements_all.txt, fixes #20778
2019-02-26 14:50:48 -08:00
William Scanlon
9cff1dd4ba Added new econet states (#21420) 2019-02-26 14:49:15 -08:00
Mattias Welponer
42e691c194 Add HomematicIP HmIP-OC8 module (#21401)
* Add support for HmIP-OC8 module

* Fix line lenght
2019-02-26 14:48:19 -08:00
Jason Hu
7bae76843c Add config for trusted networks auth provider (#21111)
* Add config for trusted networks auth provider

* Lint

* Fix typing

* Fix pylint

* Fix lint

* Add some log information

* Add http.trusted_networks deprecated warning

* Remove log info

* Lint
2019-02-26 14:42:48 -08:00
Paulus Schoutsen
5c2f997394 Lint 2019-02-26 14:42:09 -08:00
Leonardo Merza
e739fd8a31 Reddit Sensor (#21344)
* init

automated commit 22/02/2019 22:55:49

cr comments

cr comments

automated commit 24/02/2019 14:41:08

automated commit 24/02/2019 14:41:59

automated commit 24/02/2019 14:54:16

automated commit 24/02/2019 14:54:49

automated commit 24/02/2019 19:46:15

automated commit 25/02/2019 10:10:46

automated commit 25/02/2019 10:10:52

automated commit 25/02/2019 10:12:16

automated commit 25/02/2019 10:15:59

* automated commit 25/02/2019 12:26:38

* automated commit 25/02/2019 13:55:52
2019-02-26 13:55:11 -08:00
René-Marc Simard
aa472d4f10 Adjust GTFS dates when crossing midnight (#20916) 2019-02-26 13:17:20 -08:00
Andrew Sayre
3b9db88065 Add SmartThings Scene platform (#21405)
* Add SmartThings Scene platform

* Fixed failing tests after rebase

* Update cover tests.
2019-02-26 13:12:24 -08:00
Paulus Schoutsen
344e839bec Remove launching a server in a test (#21445) 2019-02-26 13:06:27 -08:00
Sebastian Muszynski
e119deafe5 Bump PyXiaomiGateway version to 0.11.2 (#21453) 2019-02-26 12:37:21 -08:00
Patrick T.C
dc6fd780a9 Fix for Snips platform update that breaks hermes api. (#21443) 2019-02-26 12:37:01 -08:00
Otto Winter
29187795a8 Fix ESPHome nodes being auto-added without user confirmation (#21444) 2019-02-26 12:35:25 -08:00
Paulus Schoutsen
ab73b725e1 Pin isort (#21463) 2019-02-26 12:33:40 -08:00
David F. Mulcahey
c4400be62a Add friendly name to devices in the device registry (#21318)
* add friendly name to devices in the device registry

* switch to name_by_user

* review comments
2019-02-26 12:20:16 -08:00
David F. Mulcahey
a34524febe Clean up ZHA post rewrite (#21448)
* update async handling to reduce unnecessary coroutine creation

* lint

* cleanup
2019-02-26 10:48:10 -08:00
Ville Skyttä
beb86426e4 Upgrade flake8 to 3.7.7 (#21452) 2019-02-26 10:47:57 -08:00
Anders Melchiorsen
03fc81a434 Clean up codeowners file (#21442) 2019-02-26 10:47:08 -08:00
Giorgos Logiotatidis
5a5c97acb3 Add timeout option to sensor.rest and binary_sensor.rest. (#20065) 2019-02-26 10:23:46 -08:00
Johann Kellerman
90d3f517d8 Check if a script requirement is available before install (#20517)
* Check if a script requirement is available before install

* PackageLoadable

* hound

* req
2019-02-26 10:20:54 -08:00
Franck Nijhof
f3c9327ccf Rewrite of Toon component (#21186)
* 🚜 Rewrite of Toon component

* 🔥 Removed manual state from list

* 👕 Addresses code review comments

* 🔥 Removes a log line that should not have been left behind

* 👕 Addresses linting warnings

* 👕 Addresses Hound CI warning

* 👕 Fixes small code styling issues

*  Sets an appropriate SCAN_INTERVAL

*  Sets min/max temperature for climate platform

* 👕 Makes imports more consistent with codebase

* 🚑 Fixes incorrect SCAN_INTERVAL value in climate platform

* 🚑 Uses OrderedDict for config_flow schema

* 👕 Adds return types for min/max temp

* 🚜 Refactors entities into their actual devices

* ⬆️ Updates toonapilib to 3.0.7

* 🚜 Refactors binary sensor state inversion

* 🚑 Fixes states of OpenTherm connection and Hot Tap Water

*  Adds Boiler Preheat binary sensor

*  Adds Toon Thermostat Program binary sensor

*  Adds Boiler Modulation Level sensor

*  Adds Daily Power Cost sensor

* 🔥 Cleanup of Toon Thermostat climate attributes

* 🚜 Adjusts config_flow with Tenant selection

* 🙋 Adds myself to codeowners file as maintainer

* ⬆️ Gen requirements

* ⬆️ Updates toonapilib to 3.0.9

*  Adds config_flow tests
2019-02-26 10:18:09 -08:00
Andrew Sayre
f0268688be Increase travis timeout (#21447) 2019-02-25 18:59:02 -08:00
Anders Melchiorsen
095a0d19d1 Fix Sonos snapshot/restore (#21411) 2019-02-25 13:03:15 -08:00
koreth
4e9d0ebc63 Fix double events on Lutron Pico keypads (#21408)
* Fix double events on Lutron Pico keypads (#21235)

* Replace "else" with default value; remove explanatory comments
2019-02-25 12:09:58 -08:00
Paulus Schoutsen
6626e5c4a4 Handle GA Disconnect intent (#21387)
* Handle GA Disconnect intent

* Fixed lint error
2019-02-25 10:35:03 -08:00
Otto Winter
db4c06c8fe Add ESPHome User-Defined Services (#21409)
* Add ESPHome User-Defined Services

* Update requirements_all.txt
2019-02-25 10:34:06 -08:00
Andrew Sayre
d3f1ee4a89 Add SmartThings Cover platform and add cover device classes (#21192)
* Add additional device classes to Cover component; Add SmartThings cover platform; Improve lock test coverage

* Enhance cover platform to support position and battery level reporting.

* Add additional classes

* Removed device class descriptions

* Updates based on review feedback

* Add test case for closed
2019-02-25 10:13:34 -08:00
Andrew Sayre
0ccbf61aea Add power and energy attributes to SmartThings switch (#21375) 2019-02-25 15:50:16 +01:00
Joakim Plate
a50bcdff1a Mark water_heater as significant domain (#21390) 2019-02-25 07:45:40 +01:00
Baptiste Lecocq
f190b698c6 Update pylinky (#21416) 2019-02-25 07:44:33 +01:00
Ville Skyttä
619ea3ff98 Upgrade mypy to 0.670 (#20934) 2019-02-25 07:54:54 +02:00
Ville Skyttä
dd5fc0a1da Upgrade pytest to 4.3.0 (#21412) 2019-02-25 07:36:57 +02:00
Jeff Irion
ff93cdb0bc Add ADB server functionality to Fire TV (#21221)
* Bump firetv to 1.0.8

* Update the 'update' function for Fire TV

* Return None for properties when unavailable

* Remove 'self.adb_lock' attribute

* Remove threading import

* Update configuration for Fire TV component

* Clarify 'python-adb' vs. 'pure-python-adb'

* Rename '__adb_decorator' to '_adb_exception_catcher'

* Don't check 'self._available' in properties

* Bump firetv to 1.0.9
2019-02-25 00:16:49 +01:00
Joakim Plate
814e610b1d Philips js state (#21407)
* Switch to SCAN_INTERVAL instead of throttle

This allows forced update of state

* Don't change tv on/off state in services

* Drop unused variables

* Only send mute if different from current state

* No need to update variables, will behandled on update

* Drop unused import
2019-02-24 14:33:07 -06:00
Anders Melchiorsen
a4bb35142c Add Sonos discovery of multiple households (#21337)
* Remove confusing device naming

* Add discovery of multiple households

* Rename SonosDevice to SonosEntity
2019-02-24 18:45:08 +01:00
Martin Hjelmare
47220d71a1 Clean up locative tests (#21400) 2019-02-24 10:49:50 -06:00
Andrew Sayre
04fc951048 Improve tolerance of SmartThings Climate platform (#21383)
* Improve resilience of platform with buggy handlers

* Eliminate possibility of None in operation list

* Refactor variable name
2019-02-24 10:45:11 -06:00
Martin Hjelmare
7255fbdf3a Clean up geofency test (#21397) 2019-02-24 15:56:19 +01:00
Hmmbob
65bc7a6fbd Update WazeTravelSensor to 0.9 (#21130)
* Update WazeRouteCalculator to 0.8 and suppress logging

Fixes #20071 and #21051

* Update requirements_all.txt

* Update requirements_all.txt

* Update waze_travel_time.py

* Update waze_travel_time.py

* Update waze_travel_time.py

* Update waze_travel_time.py
2019-02-24 07:21:56 -06:00
koreth
3e9376c418 Handle capitalized HomeKit property names (#21382)
The Velux ACTIVE gateway uses `C#` rather than `c#` as the name of
the property that holds the count of accessories. Apple's HomeKit docs
suggest that properties should be case-insensitive, so update the
code to not assume the property names are lower case.
2019-02-24 13:56:52 +01:00
Nick Whyte
6e0186fd56 Bump nessclient version to 0.9.10 (#21388)
* ness_alarm: Bump nessclient version

* update requirements_all.txt
2019-02-24 10:26:02 +01:00
Fabian Affolter
3732d75633 Update ordering (#21377) 2019-02-24 10:22:17 +01:00
Fabian Affolter
2ada0ecfd9 Upgrade shodan to 1.11.0 (#21384) 2019-02-23 22:14:26 -06:00
Andrew Sayre
3d9f4bf2aa SmartThings Lock platform state attributes enhancement (#21379)
* Add additional lock metadata

* Fixed attribute name in test
2019-02-24 02:52:37 +01:00
Rohan Kapoor
ce86fe47e3 Remove the google travel time update service (#21153) 2019-02-23 19:24:38 -06:00
Martin Hjelmare
d44269981b Clean up owntracks tests (#21378) 2019-02-23 19:17:49 -06:00
Andre Lengwenus
fc13e37d8d Refactoring. Moved LCN constants to const.py (#21376) 2019-02-24 01:30:19 +01:00
Daniel Høyer Iversen
b588c1fe1c Handle connection issue for netatmo (#21346)
* Handle connection issue for netatmo

* reduce logging
2019-02-24 00:41:38 +01:00
Tony763
6743ef10ab Update panasonic_viera.py (#21365) 2019-02-23 23:39:51 +01:00
Thibault Maekelbergh
a1c3a38428 Generate new Discogs sensors + fix scan interval (#19443)
* Generate new sensors for discogs:
- Generate collection sensor
- Generate wantlist sensor
- Generate random record sensor
- Removes the option to set a name

* Make it so name can still be configured

* Fix invalid syntax

* Use shared data object + 1 sensor

* Linting

* Remove straying comment

* Dont use async for non-async stuff

* Don't use separate list for conf already in dict

* Use consts for keys

* Copy dict to list for sensors

* Fix syntax for computed keys in SENSORS dict
2019-02-23 15:58:30 -06:00
Teemu R
492c3b24de Check for attribute existence for HS220 support (#21309)
* Check for attribute existence as smartplug does not have them (for HS220 support)

* use getattr over hasattr and a separate check
2019-02-23 22:57:54 +01:00
Alistair Galbraith
1eba90d2a1 Add initial support for Sony SDCP projector control (#20269)
* Add initial support for Sony SDCP projector control

* Changes to reflect code review

* Added code per change requests

- Validation of connection during setup_platform
- Docs pending

* Removed blank lines per CI build

* Lint fix

* Update homeassistant/components/switch/sony_projector.py

Co-Authored-By: alistairg <alistair@alistairs.net>

* Updated .coveragerc, made requested logger changes

* Update docstring
2019-02-23 15:57:10 -06:00
Jérôme W
a8a2daeac5 Add custom and zone cleaning to Neato Vacuums (#20779)
* Adding custom and zone cleaning to Neato Vacuums

* Fixing line length and missing imports

* Line too long

* Adding details to the custom service

* Fix linting issues

* Reverting ACTION

* Code cleanup

* Typo

* Requested modifications

* Changing the custom service domain

* No service schema depency anymore

* Removing useless code

* Linting

* Requested changes

* Requested changes for domain

* Revert the service domain back to vacuum
2019-02-23 15:55:55 -06:00
Rohan Kapoor
dc5b8fd8c4 Split out iperf3 into a component with a sensor platform (#21138)
* Move iperf3 sensor to a standalone component

* Split out iperf3 into a component with a sensor platform

* Update coverage and requirements

* Add services.yaml

* Clean up a little bit

* Lint

* Lint
2019-02-23 15:55:08 -06:00
Martin Hjelmare
7143f4e621 Fix person update on create (#21355)
* Update tests to set correct hass running state

* Update person on adding person if hass is running

* Test creating person when hass is running
2019-02-23 15:38:21 -06:00
Adam Dullage
bfda923999 Update Starling Bank Integration to v2 API (#21358)
* Bump starlingbank to v2 API

* Fixed incorrect call
2019-02-23 20:54:42 +01:00
yosilevy
e8b67fc19f Scene validator fix (#21362) 2019-02-23 18:26:27 +01:00
Richard Mitchell
c595cf016f Support the person component in Prometheus (#21363) 2019-02-23 18:13:27 +01:00
Finbarr Brady
d027965304 Update luci device tracker (#21321)
* * bump pip module version.
* moved named tuple into the module.
* pass SSL bool into the object init.
* support get_extra_attributes

* Update homeassistant/components/device_tracker/luci.py
2019-02-23 16:28:41 +01:00
Andre Lengwenus
f20195ba75 Add conf_key check for LCN platform load (#21354) 2019-02-23 15:58:18 +01:00
Benny de Leeuw
197303b63e Add voltage per phase (#21319) 2019-02-23 15:57:54 +01:00
tmechen
2f7b4ed7f0 implementing freedaily mode (#21314)
adressing #15105 and add a freedaily mode for a 5 day forecast with free API key
2019-02-23 15:52:08 +01:00
Justin Bassett
02745be44d Allows the utility_meter to net meter rather than only allow increases. (#21204)
* Allow the utility_meter to net meter rather than only allow increases.

* Fix PR issues around CI.

* Fix line length fallout.

* Change rollover to net_consumption.  Add unit tests.

* Fix test style issues.

* Fix style in tests.
2019-02-23 14:02:39 +00:00
siberx
616c7628d7 Fixes the sensor.filter outlier filter (handle step-changes correctly) (#21332)
* Fix outlier filter median return, Add/update filter outlier tests

* Switch outlier filter to store raw vals (handles step-changes correctly)

* Filter store_raw as attribute instead of filter_state parameter

* Fix linting issues
2019-02-23 13:51:33 +00:00
Hmmbob
954bd4e13b Update buienradar.py (#21351)
Fixing warning about unsupported config key in Buienradar sensor, whilst it was actually supported (but not validated)
2019-02-23 14:43:37 +01:00
Julius Mittenzwei
48e44f4b5b Updated pyvlx from 0.2.8 to 0.2.9. This version has slightly improved logging (#21349) 2019-02-23 08:04:32 -05:00
Daniel Høyer Iversen
b7b4a6dcc8 Add location to Norway airquality (#21347) 2019-02-23 10:35:18 +01:00
Andre Lengwenus
8f70c16863 Add LCN cover platform (#20288)
* Add LCN cover platform

* Removed unused default value

* Moved cover component to lcn platform directory. Small changes due to change request

* Closed state is set before updating
2019-02-23 10:13:15 +01:00
Daniel Shokouhi
2aa7bdb1d5 Allow google home component device tracker to be optional (#21335) 2019-02-23 01:01:09 -08:00
Robbie Trencheny
111f882d78 Add note to issue template regarding iOS issues (#21342)
## Description:

Add an additional line to the issue template mentioning that iOS issues should be reported to the home-assistant-iOS repo.
2019-02-22 17:39:19 -08:00
David Conley
b437b87655 Allow custom_effect to be absent from Flux configuration (#21317)
* Allow custom_effect to be absent from Flux configuration

* set custom effect to none during setup
2019-02-23 00:13:40 +01:00
philipperequile
2b3c31cdb0 Add more ads plc types (#19801)
* Update __init__.py

Support for 2 new 4-byte PLC datatypes DINT and UDINT

* Update __init__.py

* Fix lint issue

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Support for 2 new PLC types

Sensor supports DINT and UDINT PLC types

* Update __init__.py

I removed unused TYPES = [ADSTYPE_INT, ADSTYPE_UINT, ADSTYPE_BYTE, ADSTYPE_DINT, ADSTYPE_UDINT]
2019-02-22 23:52:46 +01:00
Andrew Sayre
8b38b82e73 Enhance SmartThings component subscription (#21124)
* Move to config v2 to store SmartApp oauth keys

* Add migration functionality.

* Regenerate refresh token on periodic basis

* Fix regenerate and misc. optimizations

* Review feedback

* Subscription sync logic now performs a difference operation

* Removed config entry reloading.
2019-02-22 20:35:12 +01:00
Robert Svensson
d9712027e8 Config entry options (#18929)
Add support for options flow for config entries
2019-02-22 17:59:43 +01:00
Phil Cole
caa3b123ae Nissanleaf (#21145)
* Remove unneeded returns from handle_update()

* Start __init__() params with hass.

* Remove excess logging and downgrade remaining logging.

* Remove period from end of comment

* Decorate callback with @callback

* Use more descriptive variables than key and value.

* Inherit from BinarySensorDevice and overwrite is_on rather than state.

* Removed uncheckedreturn values.

* Use super() rather than explicit object.

* Use add_entities instead of add_devices.

* Don't use listener when calling immediately.

* Remove some excess logging.

* Switch to sync since pycarwings2 is sync.

* Remove RuntimeError exception matching.

* Add temporary reviewer comments.

* Add UI help descriptions for update service.

* Fix hound errors.

* Replaced time.sleep() with await asyncio.sleep()

* Removed location_updateon_on attribute since on device_tracker.

* Use async_added_to_hass() and async_dispatcher_connect().

* Use dict[key] because schema key is required.

* Clarify variable names.

* Remove icon for charging switch.

* Convert LeafChargeSwitch into service and sensor.

* Use async_dispatcher_send().

* Add guard checks for discovery_info. Consistent logs.

* Use async_schedul_update_ha_state().

* Device tracker should return true.

* Remove icon for climate control.

* Really remove icon for climate control.

* Use register() instead of async_register().

* Add guard on device tracker if discovery_info is None.
2019-02-22 17:34:23 +01:00
SNoof85
4102e24481 Adding myself as codeowner for Freebox component (#21288) 2019-02-22 09:58:48 -05:00
Fabian Affolter
3f29e91367 Remove index (#21304)
* Remove index

* Remove emnumerate
2019-02-22 14:11:07 +01:00
Paulus Schoutsen
3a3957aeed Merge pull request #21296 from home-assistant/rc
0.88.1
2019-02-21 20:16:44 -08:00
Paulus Schoutsen
e4a21011a3 Bumped version to 0.88.1 2019-02-21 17:06:30 -08:00
Paulus Schoutsen
07e04e5b84 Fix yeelight config validation (#21295) 2019-02-21 17:06:24 -08:00
Aaron Bach
df5b17d139 Fix unhandled exception in Ambient PWS config entry (#21278) 2019-02-21 17:06:24 -08:00
David F. Mulcahey
e3d29ad26a update services.yaml (#21276) 2019-02-21 17:06:23 -08:00
Paulus Schoutsen
e2a57add2c Add SamsungTV Mac validation (#21268) 2019-02-21 17:06:23 -08:00
Joakim Plate
e59776377b Add missing configation option (#21265)
Fixes https://github.com/home-assistant/home-assistant/issues/21254
2019-02-21 17:06:23 -08:00
Joakim Plate
b2482d8205 Add missing configuration option to plex (#21264)
Fixes part of: https://github.com/home-assistant/home-assistant/issues/21254
2019-02-21 17:06:22 -08:00
David F. Mulcahey
dc133fe9f2 Fix ZHA bugs (#21246)
* fix bugs

* add comment

* allow entities to be marked unavailable
2019-02-21 17:06:22 -08:00
Paulus Schoutsen
3fcbc36abe Update translations 2019-02-21 16:40:25 -08:00
Paulus Schoutsen
bd352b9950 Merge remote-tracking branch 'origin/master' into dev 2019-02-21 16:40:07 -08:00
Paulus Schoutsen
bf4fb36bb1 Fix yeelight config validation (#21295) 2019-02-21 16:39:17 -08:00
Paulus Schoutsen
ac502980a2 Do not warn for internally loaded components (#21287) 2019-02-21 14:57:38 -08:00
David McNett
d9a44f2a78 Version bump: python-anthemav to v1.1.9 (#21273) 2019-02-21 23:24:29 +01:00
Aaron Bach
d0e88d9628 Fix unhandled exception in Ambient PWS config entry (#21278) 2019-02-21 13:27:34 -07:00
David F. Mulcahey
a2877c4ea0 update services.yaml (#21276) 2019-02-21 14:39:55 -05:00
Teemu R
94be43e3e1 Add support for automatic discovery of TP-Link switches, bulbs and dimmers (#18091)
* {switch,light}.tplink: use deviceid as unique id, fetch name from the device during initialization

* raise PlatformNotReady when no device is available

* Use mac instead of deviceid

* remove name option as obsolete

* Add support for configuration flow / integration

Allows activating automatic discovery of supported devices from the configuration

* Fix linting, update requirements_all.txt

* start cleaning up tplink component based on feedback

* add device info, improve config handling

* Allow overriding detected devices via configuration file

* Update requirements.txt

* Remove debug logging

* make hound happy

* Avoid I/O during init and simplify the code, remove remains of leds_on

* Fix issues based on feedback, use consistent quotation marks for device info

* add async_setup_platform emiting a deprecation warning

* Avoid blocking the I/O, check for None on features

* handle some Martin's comments, schema-validation is still missing

* use async_create_task instead of async_add_job, let core validate the schema

* simplify configuration handling by storing the configuration data separately from initialized instances

* add default values to schema, make hound happy

* with defaults set by schema, simplify the checks. add async_unload_entry

* Use constant for data structure access

* REWORD add a short note about async_unload_entry

* handle feedback from Martin, config_data is checked against Noneness

* use pop to remove the domain on unload

* First steps to add tests for the new tplink component

* embed platforms under the component directory

* Fix tests by mocking the pyhs100 internals

* Fix linting

* Test against multiple instances of devices, tidy up

* (hopefully) final linting round

* Add pyHS100 to test requirements

* log always the warnings occured during an update to make them easy to see

* revert back the warning behavior (requirement for silver level in IQS)

* Unload only when an entry is being loaded and add tests for that

Thanks @MartinHjelmare for pointing this out!

* Fix linting

* Bump the upstream lib, fixes most prominently the HSV setting on bulbs

* Test unloading for all platforms, clear the data storage instead of popping it out, making it possible to reconfigure after removal without restarting hass first

* Use class variables instead of instance variables for bulb states, required for HS220

* Use new-style format string

* Fix indenting, uppercase the mock constant

* Run black on test_init, hopefully that will finally fix the weird formatting (pycharm, pylint and hound seems to have different opinions...)
2019-02-21 20:29:07 +01:00
Tobias Hoff
c637bad1eb account specific cookies file to enable multiple accounts (#19811) 2019-02-21 10:35:27 -08:00
Miroslav Ždrale
565f513b77 Added device tracker support for Ubee Router (#19586)
* Added Ubee Router Device Tracker.

* Updated code to meet requirements.

* Code clean-up.

* Code clean-up.

* Code clean-up.

* Minor error message update

* Ubee device tracker: Minor code clean-up

* Bump pyubee version

* Code clean-up
2019-02-21 09:24:37 -08:00
Paulus Schoutsen
4c4317fb37 Add SamsungTV Mac validation (#21268) 2019-02-21 08:52:45 -08:00
Joakim Plate
998b5f6d19 Add missing configation option (#21265)
Fixes https://github.com/home-assistant/home-assistant/issues/21254
2019-02-21 08:26:26 -08:00
Joakim Plate
6b7a5cfcad Add missing configuration option to plex (#21264)
Fixes part of: https://github.com/home-assistant/home-assistant/issues/21254
2019-02-21 08:26:09 -08:00
Gido
e764d9461a Update rova component with suffix for house number (#21182)
* Update rova component with release rova release 0.1.0
Add house_number_suffix to configuration

* Set default value for house_number_suffix
2019-02-21 09:51:36 -05:00
OleksandrBerchenko
09692143d0 Correctly detect devices, which went offline during HA restart (#20933)
* Correctly detect devices, which went offline during HA restart

* Update __init__.py
2019-02-21 14:48:17 +01:00
David F. Mulcahey
0f8575f939 Fix ZHA bugs (#21246)
* fix bugs

* add comment

* allow entities to be marked unavailable
2019-02-21 14:20:58 +01:00
Paulus Schoutsen
2435456248 Prevent partial custom component overlays (#21070)
* Prevent partial custom component overlays

* Fix tests
2019-02-21 09:41:36 +01:00
Fredrik Erlandsson
73099caede Alarm trigger support for Point (#21207) 2019-02-21 06:50:02 +01:00
Fabian Affolter
966fd1034d Upgrade opensensemap-api to 0.1.4 (#21240) 2019-02-20 17:46:37 -07:00
Paulus Schoutsen
ddd63c615f Remove constraint from regex (#21239) 2019-02-20 21:31:41 +01:00
Paulus Schoutsen
7bd5e60767 Merge pull request #21238 from home-assistant/rc
0.88.0
2019-02-20 11:13:27 -08:00
David F. Mulcahey
67008e0947 Fix bug in ZHA and tweak non sensor channel logic (#21234)
* fix race condition and prevent profiles from stealing channels

* fix battery voltage
2019-02-20 09:35:32 -08:00
David F. Mulcahey
9f99e173de Don't dispatch to components when there are no channels for ZHA sensors (#21223)
* don't dispatch when channels don't exist

* review comment
2019-02-20 09:35:31 -08:00
Paulus Schoutsen
7dd3fc7ca7 Bumped version to 0.88.0 2019-02-20 08:58:37 -08:00
Paulus Schoutsen
fd3bea177b Prevent invalid context from crashing (#21231)
* Prevent invalid context from crashing

* Lint
2019-02-20 08:57:51 -08:00
Aaron Bach
be26fc896d Fix an Ambient PWS exception when location info is missing (#21220) 2019-02-20 08:57:50 -08:00
David F. Mulcahey
9057da01bd Refactor ZHA listeners into channels (#21196)
* refactor listeners to channels

* update coveragerc
2019-02-20 08:57:50 -08:00
Paulus Schoutsen
d09cf8dd17 Updated frontend to 20190220.0 2019-02-20 08:55:56 -08:00
Paulus Schoutsen
03573781c7 Updated frontend to 20190220.0 2019-02-20 08:55:42 -08:00
Finbarr Brady
54949cff5a Support OpenWRT 18.06 in luci device tracker (#21236)
* Got it right this time i hope

* updates on comments
2019-02-20 16:55:00 +01:00
damarco
1518a80069 Bump zigpy (#21203)
* Bump zigpy

* Update requirements

* Update test requirements

* Bump zigpy-deconz
2019-02-20 16:34:59 +01:00
David F. Mulcahey
cece6454e4 Fix bug in ZHA and tweak non sensor channel logic (#21234)
* fix race condition and prevent profiles from stealing channels

* fix battery voltage
2019-02-20 16:33:29 +01:00
David F. Mulcahey
5b24b271cc Don't dispatch to components when there are no channels for ZHA sensors (#21223)
* don't dispatch when channels don't exist

* review comment
2019-02-20 16:27:03 +01:00
Marco Gazzola
5115dfada2 Add zone and reps for Xiaomi vacuum (#19777)
* xiaomi vacuum with zone and reps

* tail whitespace

* tail whitespaces

* new version

* fix params typs

* fix param type

* line length

* rytilahti tips

* houndci-bot

* fix trevis

* rytilahti tips

* service description

* syssi fix

* MartinHjelmare tips

* MartinHjelmare

* data_template schema

* line lenght

* line lenght

* line lenght

* data_template schema

* fix

* Update homeassistant/components/vacuum/xiaomi_miio.py

Co-Authored-By: marcogazzola <dev@marcogazzola.com>

* Update homeassistant/components/vacuum/xiaomi_miio.py

Co-Authored-By: marcogazzola <dev@marcogazzola.com>

* xiaomi vacuum with zone and reps

* tail whitespace

* new version

* fix param type

* rytilahti tips

* rytilahti tips

* MartinHjelmare

* data_template schema

* line lenght

* line lenght

* data_template schema

* fix

* Merge branch 'dev' of https://github.com/marcogazzola/home-assistant into dev

* Revert "Merge branch 'dev' of https://github.com/marcogazzola/home-assistant into dev"

This reverts commit e1f370b3b45d2541c8117146b0940d7c2b5bc8b0.

* log fixed

* Revert "log fixed"

This reverts commit 1f0e7b35e8.

* Revert "Revert "Merge branch 'dev' of https://github.com/marcogazzola/home-assistant into dev""

This reverts commit 1cf9e5ae1f.

* Revert "Merge branch 'dev' of https://github.com/marcogazzola/home-assistant into dev"

This reverts commit 0e8d53449a.

* log fixed
2019-02-20 15:44:04 +01:00
Aaron Bach
7e06d03b45 Fix an Ambient PWS exception when location info is missing (#21220) 2019-02-20 12:10:42 +01:00
Diogo Gomes
1ff299875b Add self to integration sensor and utility_meter (#21226) 2019-02-20 08:34:10 +01:00
Paulus Schoutsen
cf3a8b60ff Prevent invalid context from crashing (#21231)
* Prevent invalid context from crashing

* Lint
2019-02-20 08:02:56 +01:00
Daniel Perna
27d598fff8 Update pyhomematic to 0.1.56 (#21227) 2019-02-20 00:31:46 +01:00
Paulus Schoutsen
49995c2120 Fix the build (#21229) 2019-02-19 13:52:14 -08:00
Paulus Schoutsen
4cc90c437f Bumped version to 0.88.0b4 2019-02-19 10:31:47 -08:00
carstenschroeder
c0f83b4164 Push pyads to 3.0.7 (#21216)
* Push to pyads 3.0.7

* Correct too long line
2019-02-19 10:31:34 -08:00
ehendrix23
4500760b52 Set aioharmony version to 0.1.8 (#21213)
Update aioharmony version to support latest HUB firmware (4.15.250).
2019-02-19 10:31:34 -08:00
Diogo Gomes
620f23d433 ordered by last occurence (#21200) 2019-02-19 10:31:33 -08:00
Anders Melchiorsen
4562bdc69f Upgrade aioimaplib for Python 3.7 compatibility (#21197) 2019-02-19 10:31:33 -08:00
Paulus Schoutsen
dfb45c03e4 Updated frontend to 20190219.0 2019-02-19 10:31:03 -08:00
Paulus Schoutsen
f452409cfa Updated frontend to 20190219.0 2019-02-19 10:14:33 -08:00
zewelor
fb820975b5 Add yeelight flow action support (#21195) 2019-02-19 19:06:40 +01:00
David F. Mulcahey
3be8178035 Refactor ZHA listeners into channels (#21196)
* refactor listeners to channels

* update coveragerc
2019-02-19 09:58:22 -08:00
Johann Bauer
fe4a2b5b31 Fix Homematic IP Cloud configuration (#21202)
`homematicip.aio.auth.isRequestAcknowledged` returns false if the
request failed in stead of raising an error.

See coreGreenberet/homematicip-rest-api@0b61954f6a

Closes: #20428
2019-02-19 09:53:20 -08:00
carstenschroeder
df8589c36a Push pyads to 3.0.7 (#21216)
* Push to pyads 3.0.7

* Correct too long line
2019-02-19 18:42:00 +01:00
Diogo Gomes
b0f317743b ordered by last occurence (#21200) 2019-02-19 08:45:21 -08:00
ehendrix23
99eda385d1 Set aioharmony version to 0.1.8 (#21213)
Update aioharmony version to support latest HUB firmware (4.15.250).
2019-02-19 08:44:42 -08:00
Fabian Affolter
e3cfcbad69 Upgrade numpy to 1.16.1 (#21190) 2019-02-19 16:04:56 +01:00
Julien Brochet
98c3c02daa Bump Synology SRM dependency to version 0.0.6 (#21212)
* Bump Synology SRM dependency to version 0.0.6

* Add @aerialls to the Synology SRM code owners
2019-02-19 10:01:47 -05:00
Fabian Affolter
2d2c6cf4a1 Use constants from const.py (#21068)
* Use constants from const.py

* Fix lint issues
2019-02-19 14:09:06 +01:00
Daniel Perna
9d3eaada27 Netatmo, address comments from #20755 (#21157)
Netatmo component cleanup
2019-02-19 10:53:45 +01:00
Fabian Affolter
baaeaab61d Upgrade crimereports to 1.0.1 (#21187) 2019-02-19 10:04:14 +01:00
starkillerOG
921efbdfef Philips Hue: Add bridge update prompt (#21119)
* Add a prompt if bridge update is available.

* Change logger warning for light update

The self.light.swupdatestate only checks for updates of that specific light, it does not check for updates of the bridge.
Theirfore the warning message schould be updated.

* add space

* fix tests

* rename to swupdate2_bridge_state

* update aiohue to v1.9.1

* update aiohue to v1.9.1

* update aiohue to v1.9.1
2019-02-18 21:31:42 -08:00
Anders Melchiorsen
bc46e48d23 Upgrade aioimaplib for Python 3.7 compatibility (#21197) 2019-02-19 06:11:56 +01:00
OleksandrBerchenko
bdea222196 Expose effect_list attribute for turned off lights (#20750) 2019-02-18 21:01:26 -08:00
Paulus Schoutsen
5ad252bd3b Bumped version to 0.88.0b3 2019-02-18 13:31:21 -08:00
sjabby
1768c2b447 Fix for #19072 (#21175)
* Fix for #19072

PR #19072 introduced the custom_effect feature but it didnt make it optional as the documentation states.
This causes error on startup and the component does not work.
```
Error while setting up platform flux_led
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/flux_led.py", line 135, in setup_platform
    device[CONF_CUSTOM_EFFECT] = device_config[CONF_CUSTOM_EFFECT]
KeyError: 'custom_effect'
```

Changing this line to make the custom_effect optional as the original intention.

* Update flux_led.py
2019-02-18 13:30:59 -08:00
David F. Mulcahey
d1fa341a78 Add power source to device and clean up zha listeners (#21174)
check available and add comments

ensure order on API test
2019-02-18 13:30:59 -08:00
John Mihalic
8b5aff63ae Update pyEight for Python 3.7 Compatability (#21161) 2019-02-18 13:30:58 -08:00
Diogo Gomes
c544845e29 Fix track_change error in utility_meter (#21134)
* split validation

* remove any()
2019-02-18 13:30:58 -08:00
Andrew Sayre
d55693762e Fix SmartThings Translation Error (#21103) 2019-02-18 13:30:57 -08:00
Andrew Sayre
7ce18146d4 SmartThings Component Enhancements/Fixes (#21085)
* Improve component setup error logging/notification

* Prevent capabilities from being represented my multiple platforms

* Improved logging of received updates

* Updates based on review feedback
2019-02-18 13:29:03 -08:00
René-Marc Simard
834d8940a8 Return None if no GTFS departures found (#20919) 2019-02-18 13:26:26 -08:00
Paulus Schoutsen
933076560b Updated frontend to 20190218.0 2019-02-18 13:25:55 -08:00
Paulus Schoutsen
d1ebe2cbac Updated frontend to 20190218.0 2019-02-18 13:25:43 -08:00
Paulus Schoutsen
d2fea76fd7 Add context to service call event (#21181) 2019-02-18 13:07:44 -08:00
sjabby
463c4ae5c9 Fix for #19072 (#21175)
* Fix for #19072

PR #19072 introduced the custom_effect feature but it didnt make it optional as the documentation states.
This causes error on startup and the component does not work.
```
Error while setting up platform flux_led
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/flux_led.py", line 135, in setup_platform
    device[CONF_CUSTOM_EFFECT] = device_config[CONF_CUSTOM_EFFECT]
KeyError: 'custom_effect'
```

Changing this line to make the custom_effect optional as the original intention.

* Update flux_led.py
2019-02-18 13:05:46 -08:00
Paulus Schoutsen
600070af3a Make sure that device trackers is always a list during creation (#21193) 2019-02-18 13:04:04 -08:00
Robert Svensson
9ce8f4737d deCONZ thermostat support (#20586)
* Add support for thermostats in deCONZ by adding Climate platform
2019-02-18 17:43:22 +01:00
David F. Mulcahey
3f9e6a7064 Add power source to device and clean up zha listeners (#21174)
check available and add comments

ensure order on API test
2019-02-18 16:55:41 +01:00
Martin Hjelmare
0ab9b006f0 Clean up upc_connect tests (#21150) 2019-02-18 08:58:25 -06:00
Mattias Welponer
0b77a89a2f Fix HomematicIP Cloud fix cover position property (#21154) 2019-02-18 08:54:23 -06:00
Fabian Affolter
4d410bf5b9 Upgrade psutil to 5.5.1 (#21171) 2019-02-18 15:51:21 +01:00
John Mihalic
1afbc22ad5 Update pyEight for Python 3.7 Compatability (#21161) 2019-02-18 11:20:31 +01:00
Fabian Affolter
6cdc5a5c2d Upgrade sqlalchemy to 1.2.18 (#21162) 2019-02-18 11:19:40 +01:00
Fabian Affolter
7e855d5b48 Upgrade youtube_dl to 2019.02.18 (#21164) 2019-02-18 11:19:21 +01:00
Fabian Affolter
2b86fc3841 Upgrade voluptuous-serialize to 2.1.0 (#21166) 2019-02-18 11:18:40 +01:00
Diogo Gomes
3b5ed7a20f Fix track_change error in utility_meter (#21134)
* split validation

* remove any()
2019-02-17 20:40:51 -08:00
CV
ce7f678b9b RSSI_PEER and RSSI_DEVICE are different things (fixes #20900) (#20902)
* Fix #20900: RSSI_PEER and RSSI_DEVICE are different things

This change is fixing issue #20900.

Wireless actors are having two RSSI values. The way the component was programmed one of them was overwritten.

* Added deprecation comment

* Fixed long line

* Fix: pylint comment

* Lint

* flake8

* flake8 again

* Update __init__.py
2019-02-17 20:53:57 -06:00
lapy
425b9851fc Add traccar monitored_conditions option (#21149)
* Add traccar monitored_conditions option

User defined additional parameters to track from the traccar platform

* Version bump for pytraccar client

* Update traccar.py

* Remove default value

* Update homeassistant/components/device_tracker/traccar.py

Co-Authored-By: lapy <lapy@users.noreply.github.com>

* Update traccar.py
2019-02-17 23:38:04 +01:00
ktnrg45
72ef9670e6 Add component media player.ps4 (#21074)
* Added PS4/ __init__.py

* Create en.json

* Create config_flow.py

* Create const.py

* Create media_player.py

* Create services.yaml

* Create strings.json

* Create __init__.py

* Add test_config_flow.py/ Finished adding PS4 files

* Rewrote for loop into short-hand

* bumped pyps4 to 0.2.8

* Pass in helper()

* Rewrite func

* Fixed test

* Added import in init

* bump to 0.2.9

* bump to 0.3.0

* Removed line

* lint

* Add ps4 to flows list

* Added pyps4-homeassistant with script

* Added pyps4

* Added pypys4 to test

* removed list def

* reformatted service call dicts

* removed config from device class

* typo

* removed line

* reformatted .. format

* redefined property

* reformat load games func

* Add __init__ and media_player.py to coveragerc

* Fix for test

* remove init

* remove blank line

* remove mock_coro

* Revert "remove init"

This reverts commit b68996aa34699bf38781e153acdd597579e8131f.

* Correct permissions

* fixes

* fixes
2019-02-17 15:41:55 -05:00
lapy
4e7cfc923d Add traccar scan_interval configuration option (#21079)
* Added scan_interval configuration option

* Fixed trailing whitespace and indentation

* Update traccar.py

* Update homeassistant/components/device_tracker/traccar.py

Co-Authored-By: lapy <lapy@users.noreply.github.com>
2019-02-17 17:55:06 +01:00
Robert Svensson
9251860201 Logging to find what deCONZ events get created (#20551)
* Helpful logging to easily find what events get created
2019-02-17 16:58:46 +01:00
Daniel Perna
847711ddc9 Add webhook support for Netatmo Cameras (#20755)
Add webhook support for Netatmo Cameras
2019-02-17 12:31:47 +01:00
René-Marc Simard
33b8dbe73a Return None if no GTFS departures found (#20919) 2019-02-17 11:46:08 +01:00
msvinth
df598544d6 Make Netatmo able to discover both Weather station and Health Coach (#20274)
* Resolve conflicts and review comments

* Corretly handle HomeCoach in manual setup

* Fix code reivew comments

* Move import back int methods

* Formatting fix

* Lint fix
2019-02-17 11:45:58 +01:00
Ville Skyttä
816364bfd9 Upgrade pytest to 4.2.1 (#21112)
* Upgrade pytest to 4.2.0

* Upgrade pytest to 4.2.1

* Make litejet switch test work with pytest 4.2
2019-02-17 09:55:33 +01:00
Paulus Schoutsen
7d111c2b4e Bump pychromecast to 2.5.2 (#21127) 2019-02-16 23:52:26 -08:00
Paulus Schoutsen
30c8c689d8 Handle ValueError (#21126) 2019-02-16 23:52:25 -08:00
cdce8p
017f34770b Fix battery_level error - HomeKit (#21120) 2019-02-16 23:52:25 -08:00
Paulus Schoutsen
f881a3af82 Bumped version to 0.88.0b2 2019-02-16 23:52:04 -08:00
Otto Winter
6f0b853547 Update bootstrap.py 2019-02-16 23:51:59 -08:00
Otto Winter
9696a8b8a9 Add persistent notification 2019-02-16 23:51:59 -08:00
Otto Winter
219ca336a9 Lint 2019-02-16 23:51:59 -08:00
Otto Winter
26a79dff99 Fix tests 2019-02-16 23:51:59 -08:00
Otto Winter
0023da778a Add legacy PLATFORM_SCHEMA config validation 2019-02-16 23:51:59 -08:00
Rohan Kapoor
84053103f0 Deprecate conf_update_interval (#20924)
* Deprecate update_interval and replace with scan_interval

* Update tests

* Fix Darksky tests

* Fix Darksky tests correctly

This reverts commit a73384a223ba8a93c682042d9351cd5a7a399183.

* Provide the default for the non deprecated option

* Don't override default schema for sensors
2019-02-16 23:48:37 -08:00
Diogo Gomes
bc17adda8d Don't expose services in Utility_Meter unless tariffs are available (#20878)
* only expose services when tariffs configured

* don't register services multiple times
2019-02-16 23:48:37 -08:00
Jason Hu
2155a861cd Remove outdated url pattern match support for static file hosting (#21109) 2019-02-16 23:06:42 -08:00
Paulus Schoutsen
f1b84962ed Add legacy PLATFORM_SCHEMA config validation (#21072)
* Add legacy PLATFORM_SCHEMA config validation

* Fix tests

* Lint

* Add persistent notification

* Update bootstrap.py
2019-02-16 23:05:06 -08:00
cdce8p
9125e49628 Fix battery_level error - HomeKit (#21120) 2019-02-16 23:04:29 -08:00
Markus Jankowski
8c5763624c Add Groups to Homematic IP (#21076)
* Added HmIP-Groups

* Fix imports

* Removed config options from conflig_flow

* fix tests

* Removed config options

* reverted smaller code changes

* changes after review

* minor fix

* Fixed comments
2019-02-17 06:24:13 +01:00
Rohan Kapoor
481439d387 Deprecate conf_update_interval (#20924)
* Deprecate update_interval and replace with scan_interval

* Update tests

* Fix Darksky tests

* Fix Darksky tests correctly

This reverts commit a73384a223ba8a93c682042d9351cd5a7a399183.

* Provide the default for the non deprecated option

* Don't override default schema for sensors
2019-02-17 06:23:09 +01:00
Matthew Garrett
ad9ec2190c Merge pull request #21133 from mjg59/eufy
Update Lakeside dependency in Eufy component
2019-02-16 20:59:20 -08:00
Diogo Gomes
9cab597bc4 Don't expose services in Utility_Meter unless tariffs are available (#20878)
* only expose services when tariffs configured

* don't register services multiple times
2019-02-16 20:04:56 -08:00
Paulus Schoutsen
9c92880b5a Handle ValueError (#21126) 2019-02-16 19:38:52 -08:00
Paulus Schoutsen
ea592a003b Bump pychromecast to 2.5.2 (#21127) 2019-02-16 20:48:43 -05:00
Matthew Garrett
451241b481 Update Lakeside dependency in Eufy component
This should fix #16834
2019-02-16 15:43:30 -08:00
Nick Horvath
c91512d55d Bump thermoworks_smoke version to get new pyrebase version (#21100) 2019-02-16 12:15:15 -08:00
Paulus Schoutsen
d34fe106e4 Updated frontend to 20190216.0 2019-02-16 12:15:04 -08:00
Paulus Schoutsen
66267474dc Updated frontend to 20190216.0 2019-02-16 12:00:04 -08:00
Fabian Affolter
1a6c79d5e2 Order imports (#21117) 2019-02-16 17:03:08 +01:00
Otto Winter
a49686879d Update bootstrap.py 2019-02-16 14:51:30 +01:00
Nick Horvath
f7d9031486 Bump thermoworks_smoke version to get new pyrebase version (#21100) 2019-02-16 11:18:13 +01:00
Andrew Sayre
b39b66ef65 Fix SmartThings Translation Error (#21103) 2019-02-16 10:49:24 +01:00
Matt Snyder
4c23ccad98 Owlet baby monitor component (#21108) 2019-02-16 10:12:16 +01:00
David Barrera
4509caefde Add index parameter to scrape sensor (#21084)
* Add index parameter to scrape sensor

The scrape sensor selects the first element of the list returned by
BeautifulSoup. This commit adds an optional index parameter to allow the
selection of a different element from the list of results. To make this
a non-breaking change, if no index value is configured, the sensor
defaults to the previous behaviour of returning the first element.

* Set default value for index to avoid later checks
2019-02-16 09:29:24 +01:00
Paulus Schoutsen
5cf936c777 Bumped version to 0.88.0b1 2019-02-15 10:32:28 -08:00
Aaron Bach
91a2c73a2c Bump aioambient to 0.1.2 (#21098) 2019-02-15 10:32:23 -08:00
Paulus Schoutsen
90da9120e8 Update pychromecast (#21097) 2019-02-15 10:32:23 -08:00
Paulus Schoutsen
da672c6593 Fix hue retry crash (#21083)
* Fix Hue retry crash

* Fix hue retry crash

* Fix tests
2019-02-15 10:32:22 -08:00
Paulus Schoutsen
2de65af3fa Check against unlinked user (#21081) 2019-02-15 10:32:22 -08:00
Phil Hawthorne
dc606b40ac Set uvloop version consistent with hass.io (#21080)
This sets the uvloop version in Docker containers to 0.11.3, which is the
same version that hass.io uses.

uvloop might be causing issues with some Docker containers on some host
systems, as reported in #20829
2019-02-15 10:32:21 -08:00
Paulus Schoutsen
8973852a2e Fix pushover schema 2019-02-15 10:32:05 -08:00
David F. Mulcahey
2b6b922e3f Set ZHA device availability on new join (#21066)
* set availability on device join

* fix new join test
2019-02-15 10:30:43 -08:00
Aaron Bach
539d24dd60 Bump aioambient to 0.1.2 (#21098) 2019-02-15 10:28:23 -08:00
Phil Hawthorne
9203ae201f Set uvloop version consistent with hass.io (#21080)
This sets the uvloop version in Docker containers to 0.11.3, which is the
same version that hass.io uses.

uvloop might be causing issues with some Docker containers on some host
systems, as reported in #20829
2019-02-15 10:25:03 -08:00
David F. Mulcahey
3a6a246746 Set ZHA device availability on new join (#21066)
* set availability on device join

* fix new join test
2019-02-15 13:14:58 -05:00
Paulus Schoutsen
6c574a4eb4 Updated frontend to 20190215.0 2019-02-15 10:09:24 -08:00
Paulus Schoutsen
f7a6027466 Updated frontend to 20190215.0 2019-02-15 10:09:09 -08:00
Paulus Schoutsen
05808afe75 Update pychromecast (#21097) 2019-02-15 09:46:03 -08:00
Otto Winter
06f2aa93a4 Add persistent notification 2019-02-15 18:40:46 +01:00
Jason Hu
46efc0eafb Refactor http CachingStaticResource (#21062)
* Simplify http.CachingStaticResource implementation

* Sync up CachingStaticResource._handle() implementation from aiohttp

* Ignore pylint duplicate-base warning

* Try to disable pylint for http/static.py

Caused by https://github.com/PyCQA/astroid/issues/633#issuecomment-463879288

* Remove pylint ignore

* Ignore pylint duplicate-base warning
2019-02-15 09:31:54 -08:00
Andrew Sayre
383813bfe6 Config Entry migrations (#20888)
* Updated per review feedback.

* Fixed line length

* Review comments and lint error

* Fixed mypy typeing error

* Moved migration logic to setup

* Use new migration error state

* Fix bug and ignore mypy type error

* Removed SmartThings example and added unit tests.

* Fixed test comments.
2019-02-15 09:30:47 -08:00
Paulus Schoutsen
1130ccb325 Fix hue retry crash (#21083)
* Fix Hue retry crash

* Fix hue retry crash

* Fix tests
2019-02-15 08:43:30 -08:00
Andrew Sayre
93f84a5cd1 SmartThings Component Enhancements/Fixes (#21085)
* Improve component setup error logging/notification

* Prevent capabilities from being represented my multiple platforms

* Improved logging of received updates

* Updates based on review feedback
2019-02-15 17:40:54 +01:00
Jonas Pedersen
7d0f847f83 Add switch platform for Danfoss Air and additional sensors. (#21046)
* Add switch platform for Danfoss Air and additional sensors.

* Solve lint issues.

* Correct style.

* Minor changes

* Minor changes

* Minor changes

* Update file header

* Remove space

* Remove space
2019-02-15 14:54:25 +01:00
Phil Cole
656d39e3ec Nissan Leaf Integration (Carwings / NissanConnect EV) (#19786)
* Added work so far.

* Change interval so nobody drains their battery when I put this online

* Added the warning notice.

* Async setup

* Still broken, but we're getting there.

* Back to synchronous, moved refresh stuff into DataStore

* Functional sensors!

* Added working switches, tweaked intervals a bit

* Fixed turn off result

* Moved plug status to binary_sensor, added smart intervals

* Documentation and car nickname stuff

* Syntax fixes and coveragerc additions

* Style fixes

* Fixing the final line length

* Fixed an issue with newer models and bad climate data

* Forgot to check my line endings.

* New icons for most of the components

* Hotfix for handling Nissan's awful servers

* Merge in fixes made by Phil Cole

Remove invalid FIXMEs and update TODOs
Fixes for pylint and test for CarwingsError exception rather than Exception
Flake8 fixes
Add pycarwings2 to requirements_all.txt
Add extra configuration documentation.
Use pycarwings2 from pip. Check server dates between requests.
Add sensor device class for battery.
Async conversion fixes
flake8 fixes and docstrings
Non-async charging is OK
Handle multiple cars in the configuration
Convert to async. Better imports for platforms
Fix scanning interval & prevent extra refreshes.  async switchover
Check discovery_info to prevent load of platforms
Ensure update frequency is always above a minimum interval (1 min).
Platforms don't have return values
Use values() instead of items() when not using key
Use snake_case (LeafCore becomes leaf_core)

commit 418b6bbcc49cf2909aac85869440435410abf3fd

* Add pycarwings2 to requirements_all.txt

* Make stopping charge error an 'info'. Remove TODO.

* Request update from car after sending start charging command.

* Delay initial (slow) update for 15 seconds and make async

* Flake8 line length fixes

* Try to fix D401 'imperative mood' git diff tox errors

* Try to fix more D401 'imperative mood' tox errors

* Default interval of an hour in code, to match comments.

* Update to pycarwings2 2.3

* Update to pycarwings2 2.3 in requirements_all.txt

* Remove documentation, instead refering to home-assistant.io

* Remove unneeded dispatcher_send()

* Remove unneeded requirements comments

* Combine excess debugging.

* Remove single line method signal_components()

* Bump to version 2.4 of pycarwings2

* Remove unused dispatcher_send

* Simplify logging of LeafEntity registration

* Update requirements_all.txt

* Multiple changes

Increase timeout to 30 seconds
Only consider battery_status
Fix plugged in status
Better attempts at try/exception handling

* Fix line length

* Use pycarwings 2.5

* Remove pointless 'is True'

* Remove unnecessary 'is True/False'

* Remove unnecessary 'is True/False'

* Use LENGTH_MILES and LENGTH_KILOMETERS

* Remove excess logging in setup_platform()

* Remove unnecessary 'is True'

* Use pycarwings2 version 2.6

* Require pycarwings2 version 2.7.

* Increase sleep delay for climate and location reponses.

* Remove unnecessary 'is True'

* Increase frequent polling warning to _LOGGER.warning()

* Use DEVICE_CLASS_BATTERY

* Remove extraneous 'is True'.

* Move icon strings to constants.

* Remove unneeded key.

* LeafRangeSensor ac_on property is internal.

* Flake8 missing line

* Remove homebridge attributes.

* Remove round battery % and range to whole numbers

* Use pycarwings2 2.8

* Move to embedded component model

* Reduce maximum attempts to 10 (5 mins)

* Include attempt count in 'waiting' log message

* Use await instead of yield. Remove @asyncio.coroutine decorators.

* Add @filcole as nissan_leaf codeowner

* Fix checking for if not data returned from vehicle. Don't double send signal on location update.

* Exposed updated_on, update_in_progress and next_update attributes.

* Add nissan_leaf.update service that triggers an update.

* Flake8 line fixes

* Remove excess and double logging.

* Add updated_on attribute for device tracker.

* Fix crash if pycarwings2 doesn't provide cruising ranges.

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes
2019-02-15 14:35:25 +01:00
Klaudiusz Staniek
7b19428279 Times of The Day Binary Sensor (#20068)
* First commit

* Times of the Day binary sensor added

* Python 3.5 fixes and logging removed

* Code refactored according to reviewer's suggestions

* Fixed config template with friendly name support

* Finall pep8 fixes

* Removed async_generate_entity_id and moved initial calculation to async_added_to_hass

* Change the configuration schema to follow the current requirements

* Update according latest suggestsion

* Fix typos and minor changes

* Fix lint issue
2019-02-15 14:13:44 +01:00
Fredrik Erlandsson
f3786e2f2b Point alarm control (#20972)
* initial working example of alarm_control

* fixes for alarm_control

* arm home is the same as arm away

* updated documentation

* final fixes

* pypoint version up

* fixes for Martin
2019-02-15 12:19:42 +01:00
Eliran Turgeman
b44ff38f5a Fix "Unable to find entity" at Waze component (#21087)
Should fix https://github.com/home-assistant/home-assistant/issues/20953 
(Unable to create this issue on my HA platform)
2019-02-15 11:48:27 +01:00
Fabian Affolter
eb573c2701 Meteo france (#21065)
* Move files

* Move file

* Update .coveragerc

* Sort import and update file header

* Minor changes
2019-02-15 10:57:47 +01:00
Otto Winter
f6ae054e9f Lint 2019-02-15 10:57:02 +01:00
Otto Winter
b7607ff472 Fix tests 2019-02-15 10:51:52 +01:00
John Mihalic
c115c89afd Bump pyHik library to 0.2.2, improve connections, add sensors (#21086) 2019-02-15 07:18:12 +01:00
Paulus Schoutsen
12c18d63fd Fix pushover schema (#21073) 2019-02-14 15:54:48 -08:00
Paulus Schoutsen
ab7fda4286 Check against unlinked user (#21081) 2019-02-14 15:54:38 -08:00
Fabian Affolter
cdc4dc3f11 Rename CONF_ATTRIBUTION to ATTRIBUTION (#21069)
* Rename CONF_ATTRIBUTION to ATTRIBUTION

* Update homeassistant/components/sensor/irish_rail_transport.py

Co-Authored-By: fabaff <mail@fabian-affolter.ch>
2019-02-14 22:09:22 +01:00
Paulus Schoutsen
d60934c028 Fix pushover schema 2019-02-14 12:06:25 -08:00
Otto Winter
9c09a98c9e Add legacy PLATFORM_SCHEMA config validation 2019-02-14 20:55:51 +01:00
Fabian Affolter
03ec3ac16e Update file header (#21067) 2019-02-14 20:35:47 +01:00
Joakim Plate
c5de32e7b1 Climate const.py move (#20945)
* Move constants to const.py

* Import from const instead of climate
2019-02-14 20:34:43 +01:00
Fabian Affolter
dc62cb6a88 Update file header 2019-02-14 16:42:03 +01:00
Fabian Affolter
3736120c6a Update file header (#21061)
* Update file header

* Fix lint issue

* Fix lint issue
2019-02-14 16:01:46 +01:00
Victor Cerutti
f4b2573c4b Météo-France platform for the weather component (#18404)
* new weather component for meteofrance

* linting

* upgrade meteofrance package version

* Update .coveragerc

* Remove updates to the weather component architecture

* Rewrite Météo-France as a component

* Update .coveragerc

* Update requirements_all.txt

* remove Weather Card option

* Update conf name

Changing conf name to something more universal for worldwide weather forecast (postal code was only relevent for France)

* Update meteofrance pypi package

* fix line too long

* Update requirements_all.txt

* prevent from calling an API endpoint if not in monitored conditions

* fix stale url and remove blank line

* Insure that all cities are unique

* rename CONF_ATTRIBUTION

* Updating data from component setup

* fix missing extra lines
2019-02-14 14:40:27 +01:00
Paulus Schoutsen
801401e9cb Bumped version to 0.89.0.dev0 2019-02-13 20:47:04 -08:00
Paulus Schoutsen
e404afc0d0 Bumped version to 0.88.0b0 2019-02-13 20:37:46 -08:00
Paulus Schoutsen
3c8c6688be Merge remote-tracking branch 'origin/master' into dev 2019-02-13 20:37:22 -08:00
Paulus Schoutsen
882f5ed079 Don't directly update config entries (#20877)
* Don't directly update config entries

* Use ConfigEntryNotReady

* Fix tests

* Remove old test

* Lint
2019-02-13 20:36:06 -08:00
Fabian Affolter
161c368c9d Update file header (#21054)
* Update file header

* Update __init__.py
2019-02-13 20:35:12 -08:00
Fabian Affolter
3a386e627e Upgrade ruamel.yaml to 0.15.88 (#21055) 2019-02-13 20:29:11 -08:00
Fredrik Erlandsson
1faf2f49d0 fix webhook update (#21048) 2019-02-13 20:27:17 -08:00
Diogo Gomes
f1f3074612 Add integration method to sensor.integration (#21050)
* add integration method and respective new methods

* ack @ottowinter tip

* align const name with value
2019-02-13 20:26:27 -08:00
Paulus Schoutsen
81d2ec9618 Person: Ignore unavailable states (#21058)
* Ignore unavailable states

* Revert validation
2019-02-13 20:10:31 -08:00
Paulus Schoutsen
4d3790e2d4 Person checks (#21056)
* Do not allow creating/updating persons with invalid user IDs

* Unset user_id from person when user deleted

* Lint

* Lint

* Lint
2019-02-13 20:04:08 -08:00
Paulus Schoutsen
50ba3d0427 Create a person during onboarding (#21057) 2019-02-13 20:00:08 -08:00
Alok Saboo
bf0a50cdb2 Add template support to Bayesian sensor (#20757)
* Add template support to Bayesian sensor

* Removed unused import
2019-02-13 17:39:53 -07:00
Ben Dews
c20e0b985a Add Lock capability to SmartThings platform (#20977)
* Bumped pysmartthings version to 0.6.1

* Added Lock to supported platforms

* Added SmartThings Lock component

* Updated lock to eagerly set state

* Updated requirements_all.txt & requirements_test_all.txt with pysmartthings==0.6.1

* Added SmartThings Lock tests

* Removed inapplicable comment

* Removed unused import (STATE_UNLOCKED)

* Populated device_state_attributes with values provided by SmartThings

* Condensed if_lock assertion function

* Updated gathered attributes

* Fixed typo

* Updated tests to use new setup_platform

* Updated assignment of device state attributes

* Updated tests to utilise the LOCK_DOMAIN constant where suitable

* Fixed false positive for Switch test: (test_unload_config_entry)

* Implemented constant to contain expected SmartThings state for is_locked check

* Improved allocation of State Attributes

* Improved allocation of state attributes

* Fixed lint error (was running lint checks against the wrong file, whoops)

* Added test for unloading lock config

* Use isinstance instead of type()

* Updated device state to explicitly check for is not None instead of a truthy value
2019-02-13 18:36:49 -06:00
Paulus Schoutsen
02f207ea8e Update translations 2019-02-13 15:44:18 -08:00
Paulus Schoutsen
c2579d1d8a Updated frontend to 20190213.0 2019-02-13 15:43:55 -08:00
Otto Winter
faeb6295b6 Fix updated file header (#21049) 2019-02-13 22:52:48 +01:00
Ryan Wagoner
62b2b23d0b Add night arm mode to MQTT alarm control panel (#20961)
* Add night arm mode to MQTT alarm control panel

* Add unit test for MQTT alarm night mode
2019-02-13 22:52:32 +01:00
Fabian Affolter
127c55e0c1 Update file header (#21023)
* Update file header

* Update file header

* Update file header

* Update file header

* Update file header

* Fix lint issues
2019-02-13 21:21:14 +01:00
emontnemery
22af9707ad Add support for device_class to MQTT cover (#21044) 2019-02-13 19:58:46 +00:00
Kevin Fronczak
67780dfb4e Update scan interval to 5 minutes. (#21041) 2019-02-13 17:47:38 +01:00
Colby Rome
136b1e1f6c Fix broken links to code examples (#21039) 2019-02-13 17:14:59 +01:00
David F. Mulcahey
d692251e62 Run tasks when ZHA devices become available (#20998)
* use tasks for message interception

* update available handling

* review comments and cleaned up check

* review comments
2019-02-13 08:52:29 -05:00
Fabian Affolter
8db8a58763 Upgrade sqlalchemy to 1.2.17 (#21020)
* Upgrade sqlalchemy to 1.2.17

* Update requirements_all.txt

* Update requirements_test_all.txt

* Run script again
2019-02-13 12:30:37 +01:00
Aaron Bach
8a6235fdac Bump aioambient to 0.1.1 (#21024)
* Bump aioambient to 0.1.1

* Requirements
2019-02-12 22:57:53 -07:00
Andrew Sayre
d037359bda Add lock config entry unload support. (#21025) 2019-02-12 22:35:20 -06:00
Fabian Affolter
6bbc663d0b Add missing helpers (#21021) 2019-02-12 20:52:02 -06:00
Jef D
d1950cd75c Update co2signal==0.4.2 to fix #20805 (#21022)
Update co2signal==0.4.2 to fix #20805
2019-02-12 20:51:10 -06:00
David F. Mulcahey
561ff33641 Update entity state when ZHA device becomes available (#20993)
* correctly update device entity state

* update state when device becomes available

* constants

* review comments
2019-02-12 20:37:39 -05:00
emontnemery
888345e4ff Fix discovery of audio groups (#20947)
* Fix discovery of audio groups

* Fix tests

* Re-discover

* Review comments

* Remove failing tests

* Update dependencies

* Fix test
2019-02-12 15:00:54 -08:00
Paulus Schoutsen
6fad9e1a0a RFC: Embed platforms without component for remote component. (#20809)
* Embed platforms for remote component.

* Update reqs
2019-02-12 14:57:13 -08:00
rbflurry
f1a00cc0f9 Allow target all timer services using 'entity_id: all' (#21008) 2019-02-12 23:18:45 +01:00
Paulus Schoutsen
4d1d22070c Bump frontend to 20190212.0 2019-02-12 13:48:11 -08:00
Daniel Høyer Iversen
7b7720d0ea Norway air, minor fix (#21016) 2019-02-12 13:45:12 -08:00
Fabian Affolter
b6854a82cf Upgrade restrictedpython to 4.0b8 (#21015) 2019-02-12 13:44:32 -08:00
Otto Winter
fe9800e784 Prevent OverflowError in ESPHome integration (#21014) 2019-02-12 22:34:06 +01:00
Fabian Affolter
d795410b27 Update ordering (#21013) 2019-02-12 21:44:30 +01:00
David F. Mulcahey
80442e655d Update ZHA API to be device oriented (#20990)
* update cluster API

* swap to device focused API

* update test
2019-02-12 15:05:02 -05:00
Jason Hu
6b46ed850b Upgrade cryptography to 2.5 (#21011) 2019-02-12 19:52:24 +01:00
carstenschroeder
d1c8d39107 Add unique id to ADS platforms (#20511)
* Add friendly_name option

* Correct hound findings

* correct hound findings 2

* add unique id

* add unique id to all ads platforms
2019-02-12 18:42:09 +01:00
Fredrik Erlandsson
d89c56829c Fix Point does I/O in event loop (#20939)
* call I/O operations via hass.async_add_executor_job

* asyncio fixes

* Fixes from @amelchio

* async _update_callback
2019-02-12 17:15:02 +01:00
Daniel Høyer Iversen
2702c75fb0 Norway air quality (#20683)
* Add norway air quality sensor

* style

* library

* Refacotr to air_quality

* fix norway air comments
2019-02-12 16:40:22 +01:00
Paulus Schoutsen
00b8d57cd0 Add frontend storage (#20880)
* Add frontend storage

* Update storage.py
2019-02-12 16:38:19 +01:00
carstenschroeder
1e69848af4 Updates pyatmo to 1.8 and adds exception handling (#20938)
* switch to pyatmo 1.7 & add exception handling

* STATE_UNKNOWN => None

* correct too long line

* delete whitespace

* remove fancy update logic
2019-02-12 11:12:44 +00:00
Paulus Schoutsen
5dfaec5967 Update to Python 3.7 (#20988) 2019-02-12 10:33:03 +01:00
Paulus Schoutsen
9cbb26bee2 Bump feedparser version to py3.7 compat (#20987)
* Bump feedparser version to py3.7 compat

* Update requirements_test_all.txt

* Update gen_requirements_all.py
2019-02-12 10:30:09 +01:00
Thomas Passer Jensen
69df620ad6 Add Rejseplanen danish public transport sensor component (#19885)
* Add Rejseplanen danish public transport sensor component

* Removed commented out code and fixed style errors

* Use rjpl pypi package for API calls.

* Fix platform schema config and code cleanup.

* Use updated rjpl library with specific exceptions

* API error message is now logged, unknown state attributes excluded
2019-02-12 09:26:46 +01:00
Andrew Sayre
e8ed56ca52 Add SmartThings Climate platform (#20963)
* Add SmartThings Climate platform

* Add SmartThings Climate platform
2019-02-12 08:11:36 +01:00
arigilder
0d98f9783f Add lagging hdate for sensors that should lag to update (#20655)
* Add lagging hdate for sensors that should lag to update

* Fix indentation

* Lint fix
2019-02-11 23:34:48 +01:00
Aaron Bach
b5b03f5b7f Fix bug with monitored_conditions in Ambient PWS (#20837)
* Make monitored_conditions more specific in Ambient PWS

* Revert messing around with storing monitored_conditions elsewhere

* Come on, Aaron

* Fix bug with monitored_conditions in Ambient PWS
2019-02-11 23:31:49 +01:00
Otto Winter
55f9db6992 Bump aioesphomeapi to 1.5.0 (#20986)
* Bump aioesphomeapi to 1.5.0

* Update requirements_all.txt

* Fix editor line length setting
2019-02-11 21:57:17 +01:00
Fabian Affolter
277f37423e Sort imports (#20985) 2019-02-11 15:22:12 -05:00
Brian Towles
c3c92232da Unique Ids for August entities to allow renames (#20887)
* working unique ids for august

* cleanup blank lines

* cleanup blank lines

* cleanup blank lines

* rebase

* get the oneline back in

* blank line stuff

* whitespace cleanup

* Blank Line .

* blank line again
2019-02-11 14:48:02 -05:00
Fabian Affolter
4cb408f8f9 Sort imports (#20984) 2019-02-11 14:46:21 -05:00
David F. Mulcahey
868820c424 add device info API (#20950) 2019-02-11 14:38:04 -05:00
Ben Van Mechelen
861d58f58f Support for Multiple modbus hubs (#19726)
* modbus: support multiple modbus hub

* update data after entities added

* pass hub object to each entity. and save hub to hass.data but not in module level

* add hub_client setup log

* don't update when adding device, because hub_client is not ready right now

* support restore last state

* remove useless func

* compatible with python35

* removed unrelated style changes

* Update flexit for multi-device modbus

* change how hubs are referenced in the configuration

* Also update climate/modbus.py

* Remove unwanted whitescapce

* Defined common constants centrally

* Update DOMAIN in climate and switch components

* Removed unnecessary vol.schema

* Make hub name optional

* Add name property to ModbusHub
2019-02-11 14:00:37 -05:00
Patrick T.C
49ecca9cb9 Set cover level using emulated_hue (#19594)
* set cover level using emulated_hue

* changed mapping for service turn_on/off for cover.

* removed whitespace for the sake of hound

* using const for domains instead of hardcoded strings.

* change length of lines for the sake of hound

* fixed under-intended line

* changed intent for the sake of hound
2019-02-11 13:59:34 -05:00
Fabian Affolter
788f7988e7 Upgrade ruamel.yaml to 0.15.87 (#20955) 2019-02-11 17:18:25 +01:00
Fabian Affolter
0425c8195f Upgrade slixmpp to 1.4.2 (#20971) 2019-02-11 08:33:57 -05:00
Stefan Burke
de2892caa8 Update pyHS100 to 0.3.4 (#20979) 2019-02-11 08:32:43 -05:00
Mattias Welponer
e538320901 HomematicIP fix cover direction (#20901)
* Fix cover direction

* Update for better readability

* Fix lint
2019-02-11 10:20:00 +01:00
Aaron Bach
a55c2514d1 Add missing data fields to Ambient PWS (#20808)
* Fix binary sensor in Ambient PWS

* Add missing data points for Ambient PWS

* Member comments

* Binary sensor doesn't need state property
2019-02-11 09:54:29 +01:00
Oliver
88d0aa14ee Update denonavr to 0.7.8 (add various sound modes) (#20951) 2019-02-10 19:13:03 -06:00
CrazYoshi
fd991bd1a4 Ebusd integration (#19607)
* ebusd component and sensor splitted

ebusd component and sensor splitted and tested

* houndci-bot fixes

* pep8 validated

* Update requirements_all.txt

* travis fixes

* Fix __init__.py for travis

* translation updated

* proposed changed

* move logic from component to ebusdpy lib

* hound fixes

* Update requirements_all.txt

* update pypi library to V0.0.11

* error management in command_result

Avoid sensor status change in case an error in reading occurs

* add opMode translations

add opMode translations

* send type to read ebusdpy API

* timeframe as attribute for time schedule type sensors

* hound fix

* bugfix on library

* ebusd sensor moved to ebusd component directory

* update ebusdpy dependency

* improvement proposed

* travis fix

* update error managing

* insert log debug start setup

* changes requested

* exception tuple on init

* cla-bot stucked pull

* added bai circuit support

* merged coveragerc from dev

* configuration get change
2019-02-10 13:04:18 -08:00
Rohan Kapoor
8f249f9149 Use CONF_RECIPIENT for default recipient in config (#20925)
* Use CONF_RECIPIENT for default recipient in config

* Fix typo
2019-02-10 21:52:35 +01:00
Rudolf Offereins
203a6fd349 Fixed Thethingsnetwork sensor issue so that it takes the most recent (last) item from the TTN data storage query result instead of the first. (#20790)
* Fixed Thethingsnetwork sensor issue so that it takes the most recent (last) item from the TTN data storage query result instead of the first.

* Update sensor.py

More pythonic way to get the last item of the sensor value list.
2019-02-10 21:49:45 +01:00
Fredrik Erlandsson
5df02f3a78 fix missing sensor values for Point (#20937) 2019-02-10 21:48:33 +01:00
Tim van Cann
d049b521b2 Add Google pubsub component (#20049)
* Add google pubsub component

* Add tests and requirements

* Make python3.5 compatible

* Fix linting

* Fix pubsub test

* Code review comments

* Add missing docstrings

* Update requirements_all

* Code review comment

- Remove pylint ignores
- Don't modify global environment
2019-02-10 21:45:46 +01:00
Markus Jankowski
1ebdc2e2c2 Add device HmIP-BSL to Homematic IP (#20865)
* Added support from HmIP-BSL

* Fixed setup of initial on

* Minor changes

Removed Black from Dictionary
added extra case to turn_on
added comments

* moved 3rd party libraries inside methods

* Fixed comment

* Removed code block to keep component behavior consisten to other dimmers

Minimum brightness is 10, otherwise the led is not visible anymore

* moved 3rd party libraries inside methods 2nd

* corrected spelling and variable assignment

* implemented feedback

* removed own state implementation

it is  the same as in parent class

* reduced device_state_attributes

brightness is alread in parent class

* On/Off is only determined by brightness now

turn_off sets brightness to 0.
turn_on now uses the previous used color an sets the brightness to 255

* Fixed string sorting of unique_id

* improved usage of base class

* Update code after review by MartinHjelmare

* Fix for the hound
2019-02-10 19:49:16 +01:00
On Freund
d8993af548 CoolMasterNet Climate platform (#20787)
* CoolMasterNet Climate platform

* Address Coolmaster PR comments

* Fix docstrings on climate demo platform

* Additional CoolMaster PR review fixes
2019-02-10 19:34:39 +01:00
Paulus Schoutsen
4a559cd4df Merge pull request #20930 from home-assistant/rc
0.87.1
2019-02-10 10:06:50 -08:00
David F. Mulcahey
16154ab445 Update ZHA helpers (#20898)
* update helpers

* review comments

* remove ternary

* use correct timeout
2019-02-10 19:01:07 +01:00
Aaron Godfrey
9f7443ba97 Reverts 2105724. (#20915)
This change broke functionality for existing users using hdmi grabbers.
2019-02-10 09:41:29 -06:00
Martin Gross
852d67b95c Fix #19990: Alexa-support for climate in manual-mode (#20910) 2019-02-10 09:02:53 -06:00
Matt White
44d7c3584d Added IDs and enabled workarounds for Yale YRD220, YRL220, YRD120 (#20929) 2019-02-10 09:00:03 -06:00
David F. Mulcahey
898b699311 Add quirks info to ZHA device (#20923)
* add quirks info to zha device

* move import

* remove device entity part
2019-02-10 08:56:27 -06:00
Peter Nijssen
ace1ae85dd add fan support for spider thermostats (#20897)
* add fan support for spider thermostats

* resolved feedback on pull request
2019-02-10 07:54:30 -06:00
javicalle
13421b326b Fix RFLink restore state (#20588)
* some minor tests refactor

* unused import

* async/await refactor

* Correct tests failures

* Restore state bug
added call to super().async_added_to_hass()

* Show brightness attribute if device supports it

* Fix light/test_rflink 

Dimmable devices defaults to 255 brightness

* delete super().device_state_attributes call
2019-02-10 12:50:40 +01:00
emontnemery
5f7f7777a0 Fix encoding for MQTT camera (#20932) 2019-02-10 12:35:54 +01:00
CV
5def64156f Missing Binary Sensor (#20921)
TiltIP Binary Sensor is missing in the discover list.
2019-02-10 12:34:54 +01:00
David F. Mulcahey
326010629c Add some api tests for ZHA (#20909)
* start API tests

* blank lines
2019-02-10 06:29:36 -05:00
Paulus Schoutsen
3a4b3a2f81 Bumped version to 0.87.1 2019-02-09 22:48:17 -08:00
Matt N
f601e9f774 Upgrade zm-py to 0.3.3 (#20886)
Fixes #20833
2019-02-09 22:48:11 -08:00
Paulus Schoutsen
c66ec87b69 Use text= instead of body= for creating web responses (#20879) 2019-02-09 22:48:09 -08:00
Daniel Høyer Iversen
81cad8cd52 Fix STATE_UNLOCKED for verisure (#20858) 2019-02-09 22:48:08 -08:00
Jc2k
5a762c74f4 Fix homekit_controller non-standard hk characteristics (#20824) 2019-02-09 22:48:07 -08:00
jonudewux
21583d25e2 Add Transmission component 'scan_interval' option (#20575)
* Transmission component fix 'scan_interval' option

* Fix dict[key] comments

* Fix latest mess
2019-02-09 22:48:06 -08:00
Eliran Turgeman
b5e40669c9 Fix waze_travel_time component ERROR on startup (#20316)
* Fix waze_travel_time component ERROR on startup

Fix the unhandled exception with Waze Travel Time sensor upon startup,
by adding Throttle before update_interval are starting.

* add missing whitespace after ','

* fix line too long (80 > 79 characters)

* lint

* fix interval to use const

* Change to Throttle as a decorator to update

Change to Throttle as a decorator to update instead of self.update = Throttle(interval)(self.update)
remove unnecessary code.

* fix  indentations

* Update waze_travel_time.py

* Update waze_travel_time.py

* Update waze_travel_time.py
2019-02-09 22:48:05 -08:00
Jason Hu
8137b0bb9e Fix coroutine never awaited warning in test (#20892) 2019-02-09 15:13:12 -06:00
Paulus Schoutsen
987b5cd905 Person component: add storage and WS commands (#20852)
* Forbid duplicate IDs

* Allow loading persons from storage

* Convert to PersonManager

* Add storage support and WS commands to Person component

* Convert list command to differentiate types

* Allow loading person component without defining persons

* Fix cleanups after update/delete

* Address comments

* Start tracking when HA started
2019-02-09 10:41:40 -08:00
Eliran Turgeman
cfd1563bc8 Added more language options (#20890)
This is a Small PR, Just Added 3 more language : 
* he: Hebrew
* ko: Korean
* lv: Latvian
2019-02-09 09:47:35 -06:00
Brian Towles
24914aade5 Set August doorbell availability state from online state (#20883)
The available state for the August Doorbell is currently set based on the state of the binary ding sensor.  This means that if there is no door bell rings in a while on startup the doorbell is shown as Unavailable (#20421) . This ties the availability of the doorbell to the  actual online state thats in the device information retrieved from august so that even if there has not been a doorbell ring activity on a while the device shows as online when it is.
2019-02-09 09:01:02 -06:00
Paulus Schoutsen
33dcb071da Use text= instead of body= for creating web responses (#20879) 2019-02-08 23:10:04 -08:00
Ville Skyttä
876e2a0a11 Upgrade mypy to 0.660 (#20873) 2019-02-09 08:32:14 +02:00
Matt N
33d607bb22 Upgrade zm-py to 0.3.3 (#20886)
Fixes #20833
2019-02-09 06:44:33 +01:00
René-Marc Simard
a014c2be59 Cleanup GTFS query (#20874) 2019-02-08 21:47:02 -06:00
René-Marc Simard
9db9a81793 Set GTFS icon by route type (#20876) 2019-02-08 21:38:39 -06:00
Joakim Plate
d16d14b648 Media player const.py move (#20822)
* Move more constants to const.py

* Import constants directly from const

* ATTR_ENTITY_ID is not defined in media_player

* MEDIA_PLAYER_PLAY_MEDIA_SCHEMA is still in __init__.py

* Correct imports in tts

* PLATFORM_SCHEMA, SCHEMA is still defined in __init__.py

* Pandora imports several services

* Some additional fixes for move of const in media_player

* Fix hound lengths
2019-02-08 14:18:18 -08:00
MatteGary
faf7ae29b1 Fix init of TransmissionData (#20817)
* Fix init of TransmissionData

 Fix in order to avoid null object on first update of Turtle Mode Switch

* Using async functionality

* Various fix

* HoundBot fix

* Removed some async calls

* Fix compilation Error

* Fix

* PEP fix
2019-02-08 18:15:14 +01:00
Daniel Høyer Iversen
6a78ad8ab6 Fix STATE_UNLOCKED for verisure (#20858) 2019-02-08 14:35:38 +01:00
Fabian Affolter
c99d140651 Upgrade youtube_dl to 2019.02.08 (#20859) 2019-02-08 07:44:08 -05:00
Markus Jankowski
ca0e5a75ec Add additional devices and features to Homematic IP (#20747)
* Homematic IP: updated dependency homematicip to 0.10.5

* Homematic IP: Added LightSensor

* Homematic IP: Added power measure for XXXSwitchMeasuring

* reverted unnessessary change

* reverted unnessessary change

* removed device_class from core

* Removed optional property device_class

* Added description for property

* Changed comment to fix travis build

* Changed comment to fix travis build
2019-02-08 12:43:48 +01:00
Rohan Kapoor
d5fad33599 Add better handling of deprecated configs (#20565)
* Add better handling of deprecated configs

* Embed the call to has_at_most_one_key in deprecated

* Add tests for checking the deprecated logs

* Add thoroughly documented tests

* Always check has_at_most_one_key

* Fix typing

* Move logging helpers to homea new logging helper

* Lint

* Rename to KeywordMessage instead of BraceMessage

* Remove unneeded KeywordStyleAdapter

* Lint

* Use dict directly rather than dict.keys() when creating set

* Patch the version in unit tests, update logging and use parse_version

* Re-add KeywordStyleAdapter and fix tests

* Lint

* Lint
2019-02-08 11:14:50 +01:00
Jc2k
ee3631e93e Fix homekit_controller non-standard hk characteristics (#20824) 2019-02-08 11:00:51 +01:00
Diogo Gomes
55d1d3d8ae Move weather.ipma into a component (#20706)
* initial version

* works

* lint

* move

* hound

* fix formatting

* update

* add extra features

* houmd

* docstring

* fix tests

* lint

* update requirements_all.txt

* new tests

* lint

* update CODEOWNERS

* MockDependency pyipma

* hound

* bump pyipma version

* add config_flow tests

* lint

* improve test coverage

* fix test

* address comments by @MartinHjelmare

* remove device_info

* hound

* stale comment

* Add deprecation warning

* address comments

* lint
2019-02-08 10:55:58 +01:00
Marvin Wichmann
1e95719436 Support knx tunable white and color temperature lights (#19699)
* KNX: Bumped version to 0.9.4 and added support for tunable white and color temperature for lights.

* Updated to the latest changes

* return None when ct value is unknown

- return None instead of default value when ct is unknown
- remove DEFAULT_COLOR_TEMPERATURE

* use Kelvin as base for relative color temperature

use Kelvin as base for relative color temperature instead of Mireds

* moved fallback value tests for clarity

* Update request from oliverblaha

Co-Authored-By: marvin-w <marvin@fam-wichmann.de>

* Address suggested changes

* Update homeassistant/components/knx/light.py

Co-Authored-By: marvin-w <marvin@fam-wichmann.de>

* Update homeassistant/components/knx/light.py

Co-Authored-By: marvin-w <marvin@fam-wichmann.de>
2019-02-08 08:28:52 +01:00
Andrew Sayre
706810bbce Add SmartThings Sensor platform (#20848)
* Add Sensor platform and update pysmartthings 0.6.0

* Add tests for Sensor platform

* Redesigned capability subscription process

* Removed redundant Entity inheritance

* Updated per review feedback.
2019-02-07 21:51:17 -07:00
Aaron Bach
c7df4cf092 Make monitored_conditions more specific in Ambient PWS (#20803)
* Make monitored_conditions more specific in Ambient PWS

* Revert messing around with storing monitored_conditions elsewhere

* Come on, Aaron
2019-02-07 21:39:30 -07:00
Paulus Schoutsen
e59240fa00 Add default_config component (#20799)
* Add default config component

* Add default_config to default config

* Fix comments
2019-02-07 20:07:15 -08:00
Aaron Bach
222c4ea6f3 Added Ambient PWS to device registry (#20841) 2019-02-07 21:12:58 -06:00
Paulus Schoutsen
49bab574b9 Clean up Z-Wave pt2 (#20842) 2019-02-07 17:27:31 -08:00
Martin Hjelmare
5f76628665 Add MVP person component (#20290)
* Add person component

* Required first name.
* Optional last name and user id.
* Optionally track device trackers. Last device tracker state change will
  set state.
* Set device tracker state entity_id as source attribute.
* Set coordinates of device tracker state as state attributes.
* Restore state.

* Parse restored state too

* Clean up

* Add missing property decorator

* Validate source entities as device trackers

* Only use name instead of first and last name

* Add user_id validation

* Add unique_id

* Remove not needed properties

* Uniform docstrings

* Fail component setup if no valid entities

* Add tests

* Add id and use that for unique_id

* Clean up
2019-02-07 15:25:30 -08:00
David F. Mulcahey
32f2221b22 Fix zha light bugs (#20825) 2019-02-08 00:09:47 +01:00
Markus Ressel
542f024356 XS1 component (#19115)
* added xs1 main component
added implementations for switch, sensor, climate and binary_sensor

* updated code
fixed styling
added comments
removed binary_sensor (wasn't working)

* ran "gen_requirements_all.py" script

* fixed linting issues

* added config options for port and ssl
small fixes

* use already defined config constants instead of defining new ones

* avoid passing in hass to the entity

* use async keyword and proper asyncio calls
limit updates with a global lock to prevent overwhelming the gateway with concurrent requests
change info logger calls to debug

* update dependency

* removed unneeded constant

* fix lint issues

* updated requirements

* removed unused imports

* fixed some flake8 errors

* fixed some flake8 errors

* changed imports to absolute paths

* fixed some lint errors

* fixed some lint errors

* fix update of attached sensor

* reordered imports
added config defaults
check if platform is available
changed docstring

* lint fix

* review fixes

* isort

* import fix

* review fix

* review fix

* review fix

* removed unused imports

* lint fix

* lint fix

* climate fix
exclude sensors that will be used in climate component from default sensor category

* .coveragerc fix

* lint fix

* moved platform to it's own package
2019-02-07 23:21:41 +01:00
Paulus Schoutsen
a9672b0d52 Load as many components in parallel as possible (#20806)
* Load as many components in parallel as possible

* Lint
2019-02-07 22:56:40 +01:00
Paulus Schoutsen
f3b20d138e Embed Z-Wave platforms (#20810) 2019-02-07 22:50:59 +01:00
Aaron Bach
d24ccbd1e6 Fix binary sensor in Ambient PWS (#20801)
* Fix binary sensor in Ambient PWS

* Correctly load entities

* Corrected what on and off means for existing sensor

* Make sure to return a boolean

* Member comments

* Binary sensor doesn't need state property
2019-02-07 14:35:23 -07:00
Ville Skyttä
d45f25ce2c Add more type hints to helpers (#20811)
* Add type hints to helpers.aiohttp_client

* Add type hints to helpers.area_registry
2019-02-07 13:34:14 -08:00
Paulus Schoutsen
16159cc3d0 Update platform loading path (#20807)
* Warn when platform loaded from an entity component folder

* Fix tests
2019-02-07 13:33:12 -08:00
Diogo Gomes
e0f63132e8 Deduplication of log entries in system_log (#20493)
* Deduplication of log entries

* fix
2019-02-07 13:32:37 -08:00
Timmo
968f98706e GitHub Sensor (#19561)
*  Add GitHub sensor

* 👕 fix tox lint warning

* 🔨 Add GitHub to .coveragerc

* 👕 Fix pylint warning

* 🔨 Use config.get

* 🔥 Tighten validation

* 👕 fix linter error

* 🔨 Add path for context in errors

*  Add releases

*  Add GitHub Enterprise server support

* 🔨 remove unused constant

* 🔨 Requested changes

* 🔨 Reorder imports

* 🔨 Change to CONF_URL

* 🔨 Add docstring

* 🔨 Add validation for repo list

* ⬆️ Update PyGithub to 1.43.5

* 🔨 Sort attributes

* 🔥 Fix validation

* 👕 Fix linting issue

* 🔨 Fail platform setup when data init fails with bad credentials etc

* 👕 Fix whitespace lint error

* 🔨 Fix requirements_all version

* 👕 Linter fix attempt

* 🔥 Missing bracket

* 🔥 Another attempt to at a linter fix

* 🔥 Fix indentation

* 🔨 Reduce exception down to main one

* 🔥 Remove update throttle logic

* 🔨 Reduce calls

* 👕 Remove unused imports

* 🔥 🔨 Reduce attribute data

* 👕 Remove unused json import

* 🔨 Remove username and password

* 🔥 Fix counts

* 🔨 Update attrs and add any missing

* 🔨 Add unique_id

* 🔥 Convert uuid to string

* 🔥 Replace UUID with repository path

* 🔨 Cleanup

* 🔨 Cleanup

* 🔥 Remove unused variable

* 🔨 Change to update instead of _update

* 🔨 Improved consistency

* 🔨 Improve consistency

* 👕 Fix line lengths

* 🔨 Fix length

* 🔨 Fix syntax
2019-02-07 18:34:27 +01:00
David F. Mulcahey
d177e1324c Add device ieee to zha events (#20791) 2019-02-07 16:31:24 +01:00
David F. Mulcahey
d4c34c6b02 Cleanup zha listener lifecycle (#20789) 2019-02-07 09:23:01 +01:00
David F. Mulcahey
03ab152c82 Enable the available property for zha entities (#20788) 2019-02-07 09:14:19 +01:00
Fabian Affolter
1715a2070b Upgrade astral to 1.9.2 (#20796) 2019-02-06 22:00:39 -08:00
William Scanlon
ff84c01d41 Remove wink sensor log calls (#20798)
* Removed log calls

* pass during exception
2019-02-07 06:22:44 +01:00
Daniel Høyer Iversen
850556d6c3 upgrade switchmate lib (#20792) 2019-02-06 21:41:38 -05:00
Fabian Affolter
a611fb1664 Upgrade distro to 1.4.0 (#20797) 2019-02-06 21:40:38 -05:00
Robert Schindler
06f3e8137a Added command_line auth provider that validates credentials by calling a command (#19985)
* Added external auth provider that calls a configurable program

Closes #19975

* Raise proper InvalidAuth exception on OSError during program execution

* Changed name of external auth provider to command_line

* Renamed program config option to command in command_line auth provider

* Made meta variable parsing in command_line auth provider optional

* Added tests for command_line auth provider

* Fixed indentation

* Suppressed wrong pylint warning

* Fixed linting

* Added test for command line auth provider login flow

* Log error when user fails authentication

* Use %r formatter instead of explicit repr()

* Mix all used names of typing module into module namespace

I consider this nasty and bad coding style, but was requested by
@awarecan for consistency with the remaining codebase.

* Small code style change

* Strip usernames with command_line auth provider
2019-02-06 16:36:41 -08:00
Paulus Schoutsen
c366fa00d8 Merge pull request #20794 from home-assistant/rc
0.87.0
2019-02-06 14:57:53 -08:00
Paulus Schoutsen
180689fb04 Bumped version to 0.87.0 2019-02-06 11:49:56 -08:00
Paulus Schoutsen
9912e0fc48 Make sure Locative doesn't submit invalid device IDs (#20784) 2019-02-06 11:49:08 -08:00
Erik Hendrix
58b7905276 Update version for pymyq to 1.1.0
Update version of pymyq to 1.1.0; this version brings improved functionality, reducing errors for retrieving current state for the MyQ covers.
2019-02-06 11:48:20 -08:00
Fredrik Erlandsson
a6bcb515f9 Fix tellduslive responsiveness (#20603)
* use async_call_later for update

* no need to timeout

* fixes

* move init tasks to hass.loop

* version bump of tellduslive

* fixes for @MartinHjelmare

* fixes task cancel

* don't return from new client
2019-02-06 11:47:32 -08:00
Greg Johnson
fb1da53568 Allow both VOLUME_STEP and VOLUME_SET (#20732)
* Allow both VOLUME_STEP and VOLUME_SET

Seems like it should be possible to support both at the same time.

* Update test to allow VOLUME_SET and VOLUME_STEP
2019-02-06 11:16:21 -08:00
Paulus Schoutsen
59393ab085 Prevent template changing options (#20775)
* Prevent complex template validation changing input value

* Remove deprecation warnings
2019-02-06 11:15:27 -08:00
David F. Mulcahey
e6cd04d711 ZHA component rewrite (#20434)
* rebase reorg

* update coveragerc for now

* sensor cleanup

* remove availability tracking for entities

* finish removing changes from tests

* review comments pass 1

* use asyncio.gather - review comments

* review comments

* cleanup - review comments

* review comments

* review comments

* cleanup

* cleanup - review comments

* review comments

* review comments

* use signal for removal

* correct comment

* remove entities from gateway

* remove dead module

* remove accidently committed file

* use named tuple - review comments

* squash bugs

* squash bugs

* add light and sensor back to coveragerc until % is higher
2019-02-06 13:33:21 -05:00
Paulus Schoutsen
65a225da75 Make sure Locative doesn't submit invalid device IDs (#20784) 2019-02-06 09:50:48 -08:00
Pawel
208f1a4a47 Allow pausing xiaomi vacuum in all states (#20620)
* fix state update when no cleaning is yet performed
allow pause vacuum when returning to base

* revert checking of atttribute updates. Will be fixed in upstream lib.

* remove unnecesarry if on pause_commadn
2019-02-06 13:04:01 +01:00
Eliran Turgeman
3de21d3fda Fix waze_travel_time component ERROR on startup (#20316)
* Fix waze_travel_time component ERROR on startup

Fix the unhandled exception with Waze Travel Time sensor upon startup,
by adding Throttle before update_interval are starting.

* add missing whitespace after ','

* fix line too long (80 > 79 characters)

* lint

* fix interval to use const

* Change to Throttle as a decorator to update

Change to Throttle as a decorator to update instead of self.update = Throttle(interval)(self.update)
remove unnecessary code.

* fix  indentations

* Update waze_travel_time.py

* Update waze_travel_time.py

* Update waze_travel_time.py
2019-02-06 11:42:11 +01:00
Oleksii Serdiuk
574823fcbb Flux Led: Add support for defining custom effect (#19072)
Flux Led controllers support defining a custom effect. User may define
up to 16 colors, speed of switching between them, and transition type.

Additional changes:

 - add support for reporting currently running effect on the controller.

 - make effects list sorted, so it's easier to find specific effect in
   the list.
2019-02-06 11:40:57 +01:00
OleksandrBerchenko
a1477fa156 Fix error handling in switch.broadlink module (#20772)
* Fix error handling in switch.broadlink module

* Improve error messages
2019-02-06 11:39:56 +01:00
Paulus Schoutsen
b8cc547fa3 Move components to folders (#20774)
* Move all components into folders

* Move component tests into folders

* Fix init moving

* Move tests

* Lint

* Update coverage

* Fix service descriptions

* Update CODEOWNERS
2019-02-05 19:31:15 -08:00
William Scanlon
d13b2ca6ef Added egg age to the eggminder sensor (#20758)
* Added egg age to the eggminder sensor
2019-02-05 21:26:54 -05:00
Joakim Plate
3bb5caabe2 Reproduce states by letting each component opt in on handling state recovery itself (#18700)
* Move group to it's own setup

* Let each component to handle restore of state

* Move constants for climate into const.py

For now import all into __init__.py to keep backword compat

* Move media plyaer constants to const.py file

For now import all constants into __init__.py to keep
backword compatibility

* Move media player to it's own file

* Move climate to it's own file

* Remove ecobee service from common components

BREAKING CHANGE

* Add tests for climate

* Add test for media_player

* Make sure we clone timestamps of state

* Add tests for groups

* Remove old tests for media player, it's handled by other tests

* Add tests for calls to component functions

* Add docstring for climate const

* Add docstring for media_player const

* Explicitly import constants in climate

* Explicitly import constants in media_player

* Add period to climate const

* Add period to media_player const

* Fix some lint errors in climate

* Fix some lint errors in media_player

* Fix lint warnings on climate tests

* Fix lint warnings on group tests

* Fix lint warnings on media_player tests

* Fix lint warnings on state tests

* Adjust indent for state tests
2019-02-05 17:25:27 -08:00
Fredrik Erlandsson
c76a61ad16 Fix tellduslive responsiveness (#20603)
* use async_call_later for update

* no need to timeout

* fixes

* move init tasks to hass.loop

* version bump of tellduslive

* fixes for @MartinHjelmare

* fixes task cancel

* don't return from new client
2019-02-05 15:20:23 -08:00
Daniel Høyer Iversen
ca17d4395a Merge pull request #20766 from home-assistant/Danielhiversen-patch-1
Fix opensensemap doc url
2019-02-05 19:57:31 +01:00
Paulus Schoutsen
e8dfc326d3 Bumped version to 0.87.0b6 2019-02-05 08:04:49 -08:00
Paulus Schoutsen
3d75e1c299 Keep cloud tokens always valid (#20762)
* Keep auth token always valid

* Remove unused refresh_auth message

* Capture EndpointConnectionError

* Lint
2019-02-05 08:04:41 -08:00
Daniel Høyer Iversen
5b4cc20ce4 opensensemap doc url 2019-02-05 16:15:41 +01:00
Andreas Hartl
a94a24f6f8 Added HomeKit fan speed based on speed_list (#19767)
Speed_list needs to be in ascending order.
2019-02-05 16:11:19 +01:00
Tomas Hellström
208ea6eae4 SMHI component: Bugfix - calc precipitation (#20745)
* Bugfix - calc precipitation

* Feedback: better way to skip first forecast

* Even less messy way

* lint error
2019-02-05 07:43:04 -05:00
Eliseo Martelli
e581d41ded Fix googlehome alarm sensor platform (#20742)
* fixed googlehome alarm sensor platform

* removed info and moved info discovery out of loop

* moved device info up
2019-02-05 07:42:14 -05:00
Jean Gauthier
aa4a3d8b96 Modifying MTUs acquisition (#20654)
**Description:**

I modified the file because it should not disable a MTU based on voltage or power. If one has programmed a certain amount of MTUs in his Gateway, they should be all visible and show 0W or 0V. 
The problem arises when you have a device that shuts off at night (e.g.: pool pump). It pulls 0W for a while, I don't want my interface to show a big yellow error during that time because the sensor no longer exists. Even the 0V is not a good idea because we can use it to indicate the breaker has tripped.

Hopefully it would be accepted :-)
2019-02-05 11:26:28 +01:00
Daniel Høyer Iversen
ef6b0b8e0b Update flake8 to 3.7.5 (#20761)
* Upgrade flake8

* Upgrade flake8

* Add noqa for hound
2019-02-05 11:12:09 +01:00
Paulus Schoutsen
2733919cd8 Keep cloud tokens always valid (#20762)
* Keep auth token always valid

* Remove unused refresh_auth message

* Capture EndpointConnectionError

* Lint
2019-02-05 10:45:03 +01:00
Steven Looman
7f76210549 Upgrade to async_upnp_client==0.14.4 (#20751) 2019-02-04 22:01:51 -08:00
Jason Hu
a8b4467763 Fix the line reference in config error message (#20743)
* Fix the line reference in config error message

* Fix platform config validation

* Fix test

* Handle error in error handling routine
2019-02-04 22:01:50 -08:00
Pascal Vizeli
cfa03a408e Fix cloud webhook body (#20739)
* Bugfix cloud webhooks text response

* address comments

* Fix lint
2019-02-04 22:01:49 -08:00
Paulus Schoutsen
94ab5dca7f Improve cloud error handling (#20729)
* Improve cloud error handling

* Lint
2019-02-04 22:01:48 -08:00
Jason Hu
207a050dba Fix ffmpeg v4 stream issue (#20314)
* Add ffmpeg version

* Add ffmpeg stream content type

* Change ffmpeg camera stream content type

* Change ffmpeg stream content type

* Lint

* Add a none guard

* Fix

* Fix

* Update onvif.py

* Fix version match regrex

* Fix regrex

* Upgrade ha-ffmpeg to 1.11

* Lint

* Get ffmpeg version in ffmpeg component setup
2019-02-04 22:01:47 -08:00
emontnemery
b1faad0a50 Use PLATFORM_SCHEMA_BASE as base schema for additional components. (#20578)
* Disable extra=vol.ALLOW_EXTRA for additional platforms.

* Remove PLATFORM_SCHEMA_2

* Add entity_namespace to base platform schema
2019-02-04 21:52:19 -08:00
Daniel Høyer Iversen
154b401d0a Update version for pymyq to 1.1.0 (#20756)
Update version of pymyq to 1.1.0; this version brings improved functionality, reducing errors for retrieving current state for the MyQ covers.
2019-02-05 06:42:39 +01:00
Andrew Sayre
f84317e325 Update pysmartthings to 0.5.0 (#20759) 2019-02-05 06:42:30 +01:00
Steven Looman
e0d534c3fb Upgrade to async_upnp_client==0.14.4 (#20751) 2019-02-05 00:36:25 +00:00
Erik Hendrix
3880a70965 Update version for pymyq to 1.1.0
Update version of pymyq to 1.1.0; this version brings improved functionality, reducing errors for retrieving current state for the MyQ covers.
2019-02-04 16:48:35 -07:00
jonudewux
cd04661101 Add Transmission component 'scan_interval' option (#20575)
* Transmission component fix 'scan_interval' option

* Fix dict[key] comments

* Fix latest mess
2019-02-04 20:08:38 +00:00
Pascal Vizeli
29b64d56be Fix cloud webhook body (#20739)
* Bugfix cloud webhooks text response

* address comments

* Fix lint
2019-02-04 10:58:38 -08:00
Jason Hu
c812176e94 Fix the line reference in config error message (#20743)
* Fix the line reference in config error message

* Fix platform config validation

* Fix test

* Handle error in error handling routine
2019-02-04 10:58:06 -08:00
emontnemery
79d3f533a9 Add missing abbreviations (#20741) 2019-02-04 10:54:40 -08:00
Jason Hu
7455d950b1 Fix ffmpeg v4 stream issue (#20314)
* Add ffmpeg version

* Add ffmpeg stream content type

* Change ffmpeg camera stream content type

* Change ffmpeg stream content type

* Lint

* Add a none guard

* Fix

* Fix

* Update onvif.py

* Fix version match regrex

* Fix regrex

* Upgrade ha-ffmpeg to 1.11

* Lint

* Get ffmpeg version in ffmpeg component setup
2019-02-04 09:57:22 -08:00
Eliseo Martelli
a40c5bf70e Add google home alarm sensor (#20709)
* added googlehome alarm sensor

* splitted update method

* fix linting

* remove whitespace

* removed whitespace in line

* changed accordingly to the review

* removed redundant method

* Update homeassistant/components/googlehome/__init__.py

Co-Authored-By: eliseomartelli <martely98@gmail.com>
2019-02-04 07:44:23 -08:00
David F. Mulcahey
0cf71d5bcb Add ZHA light tests (#20713)
* add sensor tests

* add light test

* update comments

* fix coveragerc after rebase
2019-02-04 06:51:47 -05:00
David F. Mulcahey
ff9a33ba36 Add ZHA fan tests (#20712)
* add sensor tests

* add fan tests

* hound

* fix coveragerc

* update comments
2019-02-04 06:51:32 -05:00
David F. Mulcahey
b9d108284b Add ZHA binary sensor tests (#20711)
* add sensor tests

* add binary sensor tests

* add comments

* fix coveragerc after rebase
2019-02-04 06:51:13 -05:00
Paulus Schoutsen
07b5b68a51 Improve cloud error handling (#20729)
* Improve cloud error handling

* Lint
2019-02-04 10:14:30 +01:00
Rohan Kapoor
a3c8439ce2 Split out speedtest into a component and a sensor platform (#20527)
* Move sensor.speedtest to the new speedtestdotnet component.

* Split out speedtest.net into a component and sensor platform

* Remove the throttle and add async_track_time_interval

* Add should_poll and cleanup

* Update requirements_all.txt

* Move time interval tracking out of the data class and into the setup method

* Add now=None argument to update
2019-02-04 00:47:04 -08:00
Rohan Kapoor
ec625f02fc Clean up fastdotcom by doing time tracking outside of the data object (#20725) 2019-02-03 22:43:59 -08:00
Paulus Schoutsen
7d334783de Bumped version to 0.87.0b5 2019-02-03 15:27:14 -08:00
David Lie
027fcf269b Revert pyfoscam back to libpyfoscam (#20727)
* Change foscam python library to pyfoscam, which is more up to date and has several critical bug fixes.

* Update requirements_all.txt to match.

* Inserting automatically generated requirements.txt

* Revert changes until pyfoscam captures recent bug fixes. The pyfoscam version pulled by pip is currently broken.

* Updated requirements_all.txt based on changing pyfoscam back to libpyfoscam.
2019-02-03 15:26:19 -08:00
Aaron Bach
e1509bcc0c Fix temperature unit conversion in Ambient PWS (#20723) 2019-02-03 15:26:18 -08:00
Andrew Sayre
9a13aafeea Add SmartThings button support via events (#20707)
* Add event support for buttons

* binary_sensor test clean-up
2019-02-03 15:26:17 -08:00
Paulus Schoutsen
1fe67fb1b0 Updated frontend to 20190203.0 2019-02-03 15:24:46 -08:00
Aaron Bach
a05031c22e Fix temperature unit conversion in Ambient PWS (#20723) 2019-02-03 15:23:30 -08:00
David Lie
ce05af2720 Revert pyfoscam back to libpyfoscam (#20727)
* Change foscam python library to pyfoscam, which is more up to date and has several critical bug fixes.

* Update requirements_all.txt to match.

* Inserting automatically generated requirements.txt

* Revert changes until pyfoscam captures recent bug fixes. The pyfoscam version pulled by pip is currently broken.

* Updated requirements_all.txt based on changing pyfoscam back to libpyfoscam.
2019-02-03 14:47:38 -08:00
Aaron Bach
e90011fd88 Remove SUPPORT_VOLUME_SET from Fire TV component (#20718)
Volume control isn't actually implemented, so it shouldn't show as being supported.
2019-02-03 14:58:00 -07:00
Jeff Irion
5c4dc3a54f Add app_id property to Fire TV component (#20719) 2019-02-03 14:57:17 -07:00
Dane
5506569c3a Change log level for 'loading devices' message (#20721)
The 'Loading [wireless] devices from Mikrotik ([ip address])' message
is incredibly spammy at the info log level, such that in the last 24
hours on my installation, that log message has appeared 6732 times,
versus 70 for every other log message. I've moved this message to the
debug log level as I don't believe it adds anything at the info level,
and makes it harder to diagnose other problems.
2019-02-03 13:06:39 -08:00
David F. Mulcahey
9c11602674 Add ZHA sensor tests (#20710)
* add sensor tests

* update switch test

* add sensor back to coveragerc

* review comments

* added comments
2019-02-03 22:03:35 +01:00
Paulus Schoutsen
5f2d209dec Updated frontend to 20190203.0 2019-02-03 11:32:26 -08:00
Jeff Irion
0e5aa5801a Remove SUPPORT_VOLUME_SET from Fire TV component
Volume control isn't actually implemented, so it shouldn't show as being supported.
2019-02-03 09:27:49 -08:00
David F. Mulcahey
74cdf7c347 Add tests for ZHA switch (#20691)
* start test setup

test cleanup

test deps

update switch test

actually update test deps

cleanup and remove switch from coveragerc

comment

refactor to use fixtures and shared components

lint

* remove availability part that isn't in zha yet

* review comments and cleanup

* review comments

* add switch back unil post reorg merge
2019-02-03 07:03:31 -05:00
Andrew Sayre
38ea43b678 Add SmartThings button support via events (#20707)
* Add event support for buttons

* binary_sensor test clean-up
2019-02-02 22:08:37 -08:00
Paulus Schoutsen
b0200cdbfe Bumped version to 0.87.0b4 2019-02-02 20:28:03 -08:00
Diogo Gomes
c9f64af85a fix test commented in #20678 (#20680) 2019-02-02 17:05:40 -08:00
Paulus Schoutsen
e4d45bf53a Test is broken 2019-02-02 17:04:48 -08:00
Paulus Schoutsen
e984868762 Bumped version to 0.87.0b3 2019-02-02 16:32:26 -08:00
Paulus Schoutsen
e5835eb7c8 Remove fingerprint middleware (#20682)
* Remove fingerprint middleware

* Lint
2019-02-02 16:32:20 -08:00
Paulus Schoutsen
3553d26f6b Updated frontend to 20190202.0 2019-02-02 14:12:23 -08:00
Paulus Schoutsen
c2eec16721 Update translations 2019-02-02 14:12:23 -08:00
Paulus Schoutsen
f73cb0eba5 Bumped version to 0.87.0b2 2019-02-02 14:09:55 -08:00
Andrew Sayre
d3e011ff50 Add SmartThings Binary Sensor platform (#20699)
* Add SmartThings binary_sensor platform

* Fixed comment typo.
2019-02-02 14:09:44 -08:00
emontnemery
4255f2c62f Add entity_namespace to PLATFORM_SCHEMA (#20693)
* Add entity_namespace to base platform schema

* Add test

* Fix
2019-02-02 14:09:43 -08:00
Andrew Sayre
b669e1498a Add SmartThings Fan platform (#20681)
* Add SmartThings fan

* Removed unnecessary update method

* Corrected usage of async_schedule_update_ha_state

* Clean-up/optimization
2019-02-02 14:09:42 -08:00
Rohan Kapoor
c0fd22c285 Fix allow extra in locative webhook schema validation (#20657)
* Allow extra in locative webhook schema validation (fixes #20566)

* Remove extra attribute
2019-02-02 14:09:41 -08:00
Andrew Sayre
785b42ecde Add SmartThings Light platform (#20652)
* Add SmartThings Light platform and tests

* Cleaned a few awk comments

* Updates per review feedback

* Switched to super

* Changes per review feedback
2019-02-02 14:09:40 -08:00
Andrew Sayre
6458abca2e Add SmartThings Binary Sensor platform (#20699)
* Add SmartThings binary_sensor platform

* Fixed comment typo.
2019-02-02 14:06:30 -08:00
Andrew Sayre
acf5b04231 Add SmartThings Fan platform (#20681)
* Add SmartThings fan

* Removed unnecessary update method

* Corrected usage of async_schedule_update_ha_state

* Clean-up/optimization
2019-02-02 14:04:29 -08:00
Paulus Schoutsen
8988ee5b34 Updated frontend to 20190202.0 2019-02-02 14:03:37 -08:00
Paulus Schoutsen
61b2f1bff0 Update translations 2019-02-02 14:03:37 -08:00
emontnemery
bada9b5e0b Add entity_namespace to PLATFORM_SCHEMA (#20693)
* Add entity_namespace to base platform schema

* Add test

* Fix
2019-02-02 18:31:28 +01:00
Peter Nijssen
fee3468b7a add peternijssen as codeowner of spider component (#20695) 2019-02-02 09:23:20 -08:00
Paulus Schoutsen
e2d3c27e85 Embed all platforms into components (#20677)
* Consolidate all components with platforms

* Organize tests

* Fix more tests

* Fix Verisure tests

* one final test fix

* Add change

* Fix coverage
2019-02-02 07:13:16 -08:00
Andrew Sayre
a24da611c5 Add SmartThings Light platform (#20652)
* Add SmartThings Light platform and tests

* Cleaned a few awk comments

* Updates per review feedback

* Switched to super

* Changes per review feedback
2019-02-02 07:12:24 -08:00
Diogo Gomes
ca143f8a35 print() left behind (#20689) 2019-02-02 14:54:46 +01:00
Paulus Schoutsen
47f60e6cf2 Remove fingerprint middleware (#20682)
* Remove fingerprint middleware

* Lint
2019-02-02 11:52:34 +01:00
Diogo Gomes
384a9625c9 fix test commented in #20678 (#20680) 2019-02-01 22:11:50 -08:00
Rohan Kapoor
fcccf133ba Split out fastdotcom into a component and a sensor platform (#20341)
* Split out fastdotcom into a component and a sensor platform

* Update .coveragerc

* Switching to async and using a Throttle

* Add the async_track_time_interval call

* Remove the throttle

* Reorder sensor methods and add should_poll property
2019-02-01 21:50:22 -08:00
Paulus Schoutsen
9e765fb05d Merge pull request #20678 from home-assistant/skip-broken-test
Test is broken
2019-02-01 16:33:02 -08:00
Paulus Schoutsen
c9671f8205 Test is broken 2019-02-01 16:31:53 -08:00
Paulus Schoutsen
ec57db78b5 Consolidate config flow components (#20635)
* Consolidate config flow components

* Fix tests

* Fix tests

* Put unifi back

* Fix reqs

* Update coveragerc
2019-02-01 15:45:44 -08:00
Paulus Schoutsen
224c258876 Bumped version to 0.87.0b1 2019-02-01 14:35:23 -08:00
Oliver Völker
e4d76d5c44 InfluxDB - change connection test method (#20666) 2019-02-01 14:10:39 -08:00
emontnemery
c702e1e3c6 Add PLATFORM_SCHEMA_BASE support to check_config.py (#20663) 2019-02-01 14:10:39 -08:00
zewelor
47660f9312 Fix parsing yeelight custom effects, when not present in config (#20658) 2019-02-01 14:10:38 -08:00
Kevin Fronczak
1a5028f56f Upgrade blinkpy to re-enable motion detection (#20651) 2019-02-01 14:10:38 -08:00
Paulus Schoutsen
ca729b178b Fix geofency requiring a configuration.yaml entry (#20631) 2019-02-01 14:10:37 -08:00
emkay82
557b745053 Fix pjlink issue (#20510)
* Fix issue #16606

Some projectors do not respond to pjlink requests during a short period after the status changes or when its in standby, resulting in pypjlink2 throwing an error. This fix catches these errors. Furthermore, only the status 'on' and 'warm-up' is interpreted as switched on, because 'cooling' is actually a switched off status.

* Update pjlink.py

Improved error handling

* Update pjlink.py

Improved error handling

* Update pjlink.py

Clean up
2019-02-01 14:10:37 -08:00
Paulus Schoutsen
57ef8c271e Fix geofency requiring a configuration.yaml entry (#20631) 2019-02-01 14:09:23 -08:00
Till
495524ecc0 Update miflora.py to have relevant sensor icons (#20650)
* Update miflora.py to have relevant sensor icons

Adds relevant default icons for the sensors of the Mi Flora plant sensor component.

* Clean up code
2019-02-01 14:08:03 -08:00
Paulus Schoutsen
0400e29f7a Updated frontend to 20190201.0 2019-02-01 12:51:17 -08:00
Paulus Schoutsen
da807b20a0 Updated frontend to 20190201.0 2019-02-01 12:50:58 -08:00
Fabian Affolter
198dc2b7a9 Upgrade rxv to 0.6.0 (#20669) 2019-02-01 21:37:00 +01:00
Ville Skyttä
3f997aefc1 Add huawei_lte notify component (#19544)
* Add huawei_lte notify component

* Use CONF_RECIPIENT instead of ATTR_TARGET in config
2019-02-01 18:42:45 +01:00
Oliver Völker
aec8ad2188 InfluxDB - change connection test method (#20666) 2019-02-01 18:35:49 +01:00
Akın Ömeroğlu
f19bbaec08 Update deconz integration text for PWA (#20634)
Text should reflect the GUI it describes
2019-02-01 18:28:30 +01:00
emontnemery
44c2a83105 Add PLATFORM_SCHEMA_BASE support to check_config.py (#20663) 2019-02-01 08:14:02 -08:00
emkay82
47d24759f2 Fix pjlink issue (#20510)
* Fix issue #16606

Some projectors do not respond to pjlink requests during a short period after the status changes or when its in standby, resulting in pypjlink2 throwing an error. This fix catches these errors. Furthermore, only the status 'on' and 'warm-up' is interpreted as switched on, because 'cooling' is actually a switched off status.

* Update pjlink.py

Improved error handling

* Update pjlink.py

Improved error handling

* Update pjlink.py

Clean up
2019-02-01 14:53:40 +01:00
zewelor
7429b9d87e Fix parsing yeelight custom effects, when not present in config (#20658) 2019-02-01 10:59:05 +01:00
Kevin Fronczak
25e1639050 Upgrade blinkpy to re-enable motion detection (#20651) 2019-02-01 00:52:30 -08:00
Rohan Kapoor
3e2dae62c0 Fix allow extra in locative webhook schema validation (#20657)
* Allow extra in locative webhook schema validation (fixes #20566)

* Remove extra attribute
2019-02-01 00:40:27 -08:00
Rohan Kapoor
9e7d7354ed Fix sensor.cpuspeed inside docker container (#20614) (#20656) 2019-02-01 08:58:29 +01:00
Thomas Hervé
5f930debd4 Fix xiaomi default gateway in services (#20623)
When xiaomi_aqara services with one gateway, the default should be set
to the sid of the gateway, not the python object itself, otherwise the
call fails.
2019-02-01 06:59:31 +01:00
Julius Mittenzwei
74794102c8 Support for new velux api, added cover.velux (#18738)
* Support for new velux api, added cover.velux

* More steps on new velux covers.

* correct position handling of velux windows

* Following suggestion from hound.

* bumped version

* added cover stop

* bumped version of pyvlx

* Bumped version to 0.2.8

* removed log_frames parameter
2019-02-01 02:13:47 +01:00
Alok Saboo
c63a37d0ad Revert #20611: code in Abode alarm panel (#20629) 2019-01-31 21:24:52 +01:00
Jason Hu
d7b61f7ff6 Move mqtt_mock to tests/components/mqtt/conftest.py (#20621)
* Move mqtt_mock to tests/components/mqtt/conftest.py

* Move mqtt room presence sensor test to tests/components/mqtt

* Revert "Move mqtt room presence sensor test to tests/components/mqtt"

This reverts commit e08bc143

* Decouple mqtt room presence sensor test and mqtt_mock
2019-01-31 21:22:29 +01:00
Joakim Sørensen
632b2042e4 Split googlehome to a component with device tracker platform (#19971)
* Add component for googlehome

* Add missing name in CODEOWNERS

* Linting issues

* googledevices version bump

* Use NAME from component instead of DOMAIN

* Cleaner handling of accepted devices in for loop

* Fixes one linting issue

* Validate device_types

* Fixes one linting issue

* Fixes linting issue

* Revert 0abb642 and import DOMAIN as GOOGLEHOME_DOMAIN

* Return false if discovery_info is None

* Combine if's in for loop

* Use async_load_platfrom

* Fix line length

* Add error message to user

* Shorter log message

* error -> warning, remove period

* Update .coveragerc

* Move to correct place
2019-01-31 21:16:31 +01:00
Sander Zumbrink
e20c2aa113 Add precision parameter to dsmr sensor (#19873)
* Added precision parameter to dsmr sensor

* Added precision parameter to dsmr sensor, added whitespace after comma

* Added precision parameter to dsmr sensor

* Added precision parameter to dsmr sensor, fixed test

* Changed try except as requested
2019-01-31 16:46:54 +01:00
Julien Brochet
c9971673da Update synology-srm dependency to 0.0.4 (#20625) 2019-01-31 15:26:42 +01:00
Thomas Hervé
511e35e8fd Fix typo in config entries doc (#20619)
This fixes a typo in the docstring of config_entries which was
propagated in the point component.
2019-01-31 10:52:42 +01:00
Paulus Schoutsen
7151c4bcd7 Bumped version to 0.88.0.dev0 2019-01-30 17:38:17 -08:00
Paulus Schoutsen
8db2152230 Bumped version to 0.87.0b0 2019-01-30 17:37:56 -08:00
Paulus Schoutsen
47848e26f9 Merge remote-tracking branch 'origin/master' into dev 2019-01-30 17:37:38 -08:00
Diogo Gomes
c7ff8d4996 fix #20571 (#20589) 2019-01-30 17:33:52 -08:00
Andrew Sayre
69ec7980ad Add SmartThings component and switch platform (#20148)
* Added SmartThings component and switch platform

* Corrected comment typos.

* Embedded switch platform.

* Replaced custom view usage with webhook component.

* Replaced urls with tokens in strings.

* Fixed line length.

* Use generated webhook id instead of static one.

* Reuse core constant instead of defining again.

* Optimizations in anticipation of future platforms.

* Use async_generate_path instead of hard-coded path.

* Fixed line length.

* Updates per review feedback.

* Updates per latest review feedback.
2019-01-30 17:31:59 -08:00
Jasper van der Neut - Stulen
5a0c707a37 Fix duplicate luftdaten entities (#20226)
* Use same data schema for configflow, make sensor_id a positive integer.

* Change sensor_id to int and remove duplicate Luftdaten config entries.

This fixes #18838, and also fixes the root cause
of #19981 and #19622.

* Use pure type for boolean.
2019-01-30 17:12:59 -08:00
Paulus Schoutsen
473bf93973 Updated frontend to 20190130.1 2019-01-30 17:00:36 -08:00
David F. Mulcahey
ed75549123 ZHA component rewrite part 4 - add device module (#20469)
* add device module

* spelling

* review comments

* filter out endpoint id 0 (ZDO)

* review comments

* change name

* remove return
2019-01-30 16:44:22 -05:00
Alok Saboo
3e98aad8a2 Added code to Abode Alarm control panel (#20611) 2019-01-30 13:02:23 -08:00
Gido
542160fc56 Add sensor platform for Rova Garbage Collection (#18868)
* Adding sensor for SolarEdge Monitoring API support

* Adding support for Rova garbage calendar

* Added Rova platform to retrieve garbage pickup times

* Update async to new syntax
Added async_update to sensor class
Added Throttle to Rova update function
Minor code style changes

* Small style fixes

* Removed domain

* Update debug to error messages
Change CONF_MONITORED_VARIABLES to CONF_MONITORED_CONDITIONS
Update async update call to normal update

* Update requirements to rova v0.0.2
Add address check to see if ROVA collects in the given area

* Rename entity names to English
Add json_key to Sensor entities

* Add device_class to the RovaSensor

* Fix pylint and flake8 messages

* Add check for None in case collection date is unknown

* Return device class constant
2019-01-30 21:58:41 +01:00
Paulus Schoutsen
e2cc1564a0 Add lovelace systeam health (#20592) 2019-01-30 12:57:56 -08:00
William Scanlon
2836ff86fe Update to the newest python-wink and fix push updates! (#20594)
* Update to the newest python-wink and make post session call to Wink to keep pubnub working.

* Update __init__.py
2019-01-30 11:35:47 -08:00
Paulus Schoutsen
cb07ea0d60 RFC: Add system health component (#20436)
* Add system health component

* Remove stale comment

* Fix confusing syntax

* Update test_init.py

* Address comments

* Lint

* Move distro check to updater

* Convert to websocket

* Lint

* Make info callback async

* Fix tests

* Fix tests

* Lint

* Catch exceptions
2019-01-30 10:57:53 -08:00
Anders Melchiorsen
91aa874c0c Fix LIFX for single-zone strip extensions (#20604) 2019-01-30 10:47:28 -08:00
Paulus Schoutsen
ca0ee509e7 Fix map icons (#20602) 2019-01-30 09:50:58 -08:00
Paulus Schoutsen
8062f48973 Add remove commmand to entity registry (#20597) 2019-01-30 09:50:32 -08:00
choss
ed299a9137 Add support for FRITZ DECT 100 (temp sensor) (#20308) 2019-01-30 18:44:36 +01:00
starkillerOG
349de19316 Philips Hue: add prompt to update bridge/bulb (#20590)
* Philips Hue: add prompt to update bridge/bulb

* bump aiohue to v1.9.0

* bump aiohue to v1.9.0

* bump aiohue to v1.9.0
2019-01-30 09:42:18 -08:00
Paulus Schoutsen
7c9597f824 Fix area registry config being loaded (#20598)
* Fi area registry config being loaded

* Mark area_id optional
2019-01-30 09:41:55 -08:00
Alok Saboo
a011048a4e Change Unifi timeout (#20606) 2019-01-30 18:40:40 +01:00
Bram Kragten
0ef9882e2e Fix map icons 2019-01-30 17:09:56 +01:00
mindakas
ec4495bd0c Bump pymodbus to 1.5.2 (#20582) 2019-01-30 11:57:14 +00:00
Tommy Jonsson
c5c64e738e html5 notifications add VAPID support (#20415)
* html5 notifications add VAPID support

* fix lint errors

* replace httpapi with websocketapi

* Address my own comment
2019-01-29 14:49:33 -08:00
emontnemery
89fc3b2a1b Disable extra=vol.ALLOW_EXTRA for MQTT platforms. (#20562) 2019-01-29 09:29:02 -08:00
merc1031
48f0e8311b add empy all groups view. Makes Brilliant Lightpad work (#20564) 2019-01-29 09:26:07 -08:00
Jc2k
e0e5b860e4 Homekit Motion Sensor Review feedback (#20568) 2019-01-29 11:25:18 -05:00
kennedyshead
988bcf9399 Fixing the openssl issue (#20570) 2019-01-29 07:42:38 -08:00
MatteGary
e95c50c742 New Transmission component (#19230)
* New Transmission component and interaction

First commit for New Transmission component and interaction

* Fix commit

* Fix commit

* Fix + Switch checkin

Fix according to failed build and request, first checkin for Turtle Mode Switch in Transmission, still have to figure it out why it's not working.

* Bugfixing

* Fix commit

Multiple fix

* Fix

* fix for missing config

* Update on requirements_all.txt

* Fix in requirements_all.txt

* Fix

* Fix for build

* fix

* Fix

* Fix (again)

* Fix

* Fix indentation

* Fix indentation

* Fix Throttle

* Update .coveragerc

* Fix import and coveragerc
2019-01-29 10:27:26 +01:00
Stealth Hacker
6ff4ea1126 Add Recollect Waste (#20121)
* Added Recollect Waste Curbside Collection sensor for tracking next collection date and for which types of waste.

* Added missing schema attributes.

* Adding requirements and coverage entries for Recollect Waste platform.

* Added exception handling, some other fixes and suggestions from code review.

* Fixed reference to incorrect exception type.

* Updated requirements_all.txt with new version of recollect-waste.

* Added true to add_entities. Created constant for default time interval. Used different pylint exclusion comment.

* Using HA's CONF_SCAN_INTERVAL now. Unique_id is now set in @property.

* Changed parameter of timedelta from seconds to days.

* Added test run of recollect client during setup_platform. Using built in SCAN_INTERVAL now.

* Return nothing in setup_platform if there is an exception.
2019-01-29 09:38:01 +01:00
Richard Mitchell
a7c74151bc Treat each player as a 'device' for non-client devices. (#20074) 2019-01-29 09:15:42 +01:00
Julien Brochet
6859d5216e Add Synology SRM device tracker (#20320) 2019-01-29 09:12:10 +01:00
Paulus Schoutsen
73a0c664b8 Allow usernames to be case-insensitive (#20558)
* Allow usernames to be case-insensitive

* Fix typing

* FLAKE*
2019-01-29 08:28:52 +01:00
Diogo Gomes
b0ff51b0ef Add an Integration sensor (#19703)
* initial version

* Tested

* set state added

* lint

* lint

* remove artifacts

* Use Decimal instead of float

* simplify

* travis lint fix

* addres comments by @ottowinter

* remove job

* better sanity check

* lower error -> warning

* hound

* fix state validation

* refactor energy -> integration

* address @MartinHjelmare comments

* new style string format

* remove async_set_state

* patching the source function
2019-01-29 08:25:36 +01:00
Jc2k
e22802a4d4 Add support for HomeKit motion sensor devices (#20555) 2019-01-28 20:30:56 -08:00
Paulus Schoutsen
aa29eeba04 Merge pull request #20559 from home-assistant/rc
0.86.4
2019-01-28 20:28:08 -08:00
Rohan Kapoor
cc74035c3b Move CONF_UPDATE_INTERVAL to homeassistant.const (#20526) 2019-01-28 20:26:31 -08:00
Rohan Kapoor
fe47253f68 Fix linting error (#20488) 2019-01-28 20:26:02 -08:00
emontnemery
3ee3acd550 Update device registry of MQTT light (#20441)
* Update device registry of MQTT light

* Move config_entry to constructor
2019-01-28 19:45:34 -08:00
Paulus Schoutsen
234c759b45 Bumped version to 0.86.4 2019-01-28 17:52:42 -08:00
Fredrik Erlandsson
ba4d4bcd29 fix #20387 devices without model/protocol (#20530) 2019-01-28 17:52:36 -08:00
starkillerOG
d7bbdb033d Add check to validate gamut (#20518)
* color.util - Add check to validate gamut

* fix indents

* fix typo

* Add check to validate gamut

* Add tests for gamut checker

* fix test

* fix pylint issues

* fix hue light gamut tests

* add check to validate gamut

* move None check

* Move None check

* Include prompt to update bridge/bulb on error

* fix wrong commit

* fix error message

* Update light.py
2019-01-28 17:52:35 -08:00
kennedyshead
63fd5f2d31 Bumps aioasuswrt (#20432) 2019-01-28 17:52:35 -08:00
starkillerOG
f353d51ab1 Add check to validate gamut (#20518)
* color.util - Add check to validate gamut

* fix indents

* fix typo

* Add check to validate gamut

* Add tests for gamut checker

* fix test

* fix pylint issues

* fix hue light gamut tests

* add check to validate gamut

* move None check

* Move None check

* Include prompt to update bridge/bulb on error

* fix wrong commit

* fix error message

* Update light.py
2019-01-28 17:52:00 -08:00
Per Osbäck
3f484228cb Add missing switch for motion_detect (#20540) 2019-01-28 16:48:55 -08:00
Fredrik Erlandsson
717a0c2b2d fix #20387 devices without model/protocol (#20530) 2019-01-28 16:46:37 -08:00
David F. Mulcahey
34090bd021 ZHA component rewrite part 3 - update helpers (#20463)
* update helpers

* address comments

* remove ieee

* cluster id as hex too
2019-01-28 16:40:00 -08:00
emontnemery
bb1583c453 Add discovery update support to MQTT camera (#20529) 2019-01-28 16:21:38 -08:00
emontnemery
d7ba2aad1d Add COMPONENT_SCHEMA and use it in alarm_control_panel (#20224)
* Add COMPONENT_SCHEMA and use in alarm and mqtt

* Revert MQTT changes

* Lint

* Small tweak

* Add tests

* Rename COMPONENT_SCHEMA to PLATFORM_SCHEMA_BASE

* Fix tests

* Improve tests
2019-01-28 16:14:55 -08:00
emontnemery
bb4ca1f525 Cleanup if discovered mqtt vacuum can't be added (#20549) 2019-01-28 15:56:47 -08:00
Robert Svensson
bd335e1ac1 Area registry (#20435)
* First draft of area registry

* Refactor based on input

* Add tests for areas
Add tests for updating device

* Updating a device shouldn't require area

* Fix Martins comment

* Require admin

* Save after deleting

* Rename read to list_areas
Fix device entry_dict
Remove area id from device when deleting area

* Fix tests
2019-01-28 15:52:42 -08:00
Aaron Bach
2c7060896b Make Ambient PWS async and cloud-push (#20332)
* Moving existing sensor file

* Initial functionality in place

* Added test for config flow

* Updated coverage and CODEOWNERS

* Linting

* Linting

* Member comments

* Hound

* Moving socket disconnect on HASS stop

* Member comments

* Removed unnecessary dispatcher call

* Config entry fix

* Added support in config flow for good accounts with no devices

* Hound

* Updated comment

* Member comments

* Stale docstrings

* Stale docstring
2019-01-28 15:35:39 -08:00
Jc2k
abeb875c61 Homekit controller BLE groundwork (part 2) (#20548)
* Only fetch values of characteristics we are tracking.

* Use callbacks on subclasses to update individual values

* Update alarm_control_panel to use update callbacks

* Update climate to use update callbacks

* Update cover to use update callbacks

* Update light to use update callbacks

* Update lock to use update callbacks

* Update switch to use update callbacks

* Remove compatibility code as all entities migrated

* pylint by name rather than code
2019-01-28 21:27:26 +01:00
Jc2k
41c1997b88 Homekit controller BLE groundwork (#20538)
* Define the characteristics to poll (or subscribe to) up front

* Configure characteristics immediately instead of during first poll

* Do as much cover configuration upfront as possible

* Remove test workaround as no longer needed

* Remove switch code that is already handled by HomeKitEntity

* Remove lock code already handled by HomeKitEntity

* Remove light code already handled by HomeKitEntity

* Remove alarm code already handled by HomeKitEntity

* Remove climate code already handled by HomeKitEntity
2019-01-28 17:21:20 +01:00
Jc2k
995758b8ac Add more HomeKit controller tests (#20515)
* homekit_controller tests: automatically find entity ids in tests

Some entities use dynamic ids because of the nature of the test fakes it is
hard to predict the name of the entity that will be created. This inspects the
EntityComponent of the domain to find the freshly created entity.

* homekit_controller: Tests can now define their own Service models.

All existing tests use models as defined upstream. But upstream only defines a
few service models. This adds a generic model helper for creating test
service/characteristic models.

* homekit_controller: Add cover tests

* homekit_controller: Add lock tests

* homekit_controller: Add alarm_control_panel tests

* homekit_controller: Update light tests for color_temp.

* Revert "homekit_controller tests: automatically find entity ids in tests"

This reverts commit 506caa4c3e.

* homekit_controller: Mock entity name so entity_id is consistent.

Also remove spurious subclass overrides that are identical to parent class.

* homekit_controler: Make tests less awkward as allowed top level imports
2019-01-28 13:20:32 +01:00
Christian Biamont
f33e432cab Reset Brottsplatskartan incident types every day (#20117)
* Reset the incident types count every day

* Remove functionality that was never implemented

We don't need to keep track of previous incidents because it's not used
anywhere.

* Create empty dictionary with a pair of braces: {}
2019-01-28 12:30:15 +01:00
David Lie
29984efd8c Use more up-to-date version of pyfoscam library (#20419)
* Change foscam python library to pyfoscam, which is more up to date and has several critical bug fixes.

* Update requirements_all.txt to match.

* Inserting automatically generated requirements.txt
2019-01-28 08:07:39 +01:00
Rohan Kapoor
d179686edf Load/unload gpslogger entities correctly between component and platform (#20448)
* Embed device_tracker in gpslogger

* Load/unload gpslogger entities correctly between component and platform

* Await the coroutine directly
2019-01-27 15:37:19 -08:00
Rohan Kapoor
0c87fb421e Load/unload locative entities correctly between component and platform (#20498)
* Embed device_tracker in locative

* Load/unload locative entities correctly between component and platform

* Await the coroutine directly

* Await the correct coroutine
2019-01-27 23:43:16 +01:00
Rohan Kapoor
f575d1d3a6 Load/unload geofency entities correctly between component and platform (#20497)
* Load/unload geofency entities correctly between component and platform

* Lint

* Await the coroutine directly
2019-01-27 13:18:20 -08:00
Eliseo Martelli
3d4f2926e9 Add Iliad Italy (Mobile Telephony Provider) Sensor (#19645)
* working state

* Attrs

* > requirements generated

* linting

* fixes

* coveragerc

* ordered imports and fixed auth

* Added Throttle

* moved throttle to decorator

* remove scan interval

* lower throttle

* moved to scan interval

* Add attribution
2019-01-27 21:44:19 +01:00
Heine Furubotten
7412d0f97c Add nilu air_quality platform (#19674)
* Add nilu air_pollutants platform

* Code Review - validation, DRYs, rm state override, new attr
- Repeated code moved to own method.
- Removed override of state property.
- New attr for showing nilu pollution recommendations.
- More validation of stations input.
- Minor fixes and typos.

* Removed unused prop

* Check for none result from client before entity add

* Moved platform to air_quality component

* Updated outdated docstrings

* Minor changes
2019-01-27 21:32:23 +01:00
Daniel Høyer Iversen
f91ff76b95 Upgrade mill library (#20514) 2019-01-27 19:20:43 +01:00
emontnemery
648adcc708 Small cleanup of MQTT platforms (#20503)
* Move CONF_UNIQUE_ID to init

* Sort imports

* Update ordering
2019-01-27 18:54:52 +01:00
emontnemery
8804f55fcc Update device registry of MQTT Vacuum (#20500) 2019-01-27 17:43:16 +01:00
emontnemery
1f93984fd5 Update device registry of MQTT Lock (#20501) 2019-01-27 17:42:45 +01:00
Daniel Høyer Iversen
ae84a91ea8 Upgrade tibber library (#20504)
* Upgrade tibber library

* Upgrade tibber library
2019-01-27 17:39:56 +01:00
Steven Looman
2aab646be2 Upgrade to async-upnp-client==0.14.3 (#20502) 2019-01-27 13:52:51 +01:00
Jc2k
10e3698fd7 Add homekit_controller tests (#20457)
* Add a test for a homekit_controller switch

* Add a test for a homekit_controller lightbulb

* Add a test for homekit_controller thermostat

* Changes from review

* Patch utcnow to known time in HK tests

* Neater fixture use per review
2019-01-27 12:34:49 +01:00
Rohan Kapoor
7368c623d4 Split out dovado to a component and sensor platform (#20339)
* Split out dovado to a component and sensor platform

* Lint

* Address code review comments (#20339)

* Switch to using a notify platform for dovado SMS (#20339)

* Optimizing imports

* Remove return on `setup_platform`.

* Clean up unneeded constants
2019-01-27 10:36:10 +01:00
Rohan Kapoor
d82e5ecbb0 Upgrade zm-py to 0.3.1 (#20489) 2019-01-27 10:28:20 +01:00
Aaron Bach
239c60c09f Use HASS latitude/longitude as defaults for Lyft (#20491) 2019-01-26 23:21:51 -07:00
Rohan Kapoor
38c33bd01e Fix linting error (#20488) 2019-01-26 17:11:09 -08:00
Paulus Schoutsen
86f5f0226c Bumped version to 0.87.0.dev0 2019-01-26 14:15:36 -08:00
Paulus Schoutsen
c78d3b6154 Merge pull request #20485 from home-assistant/rc
0.86.3
2019-01-26 14:14:06 -08:00
Paulus Schoutsen
dcfe7b2280 Bumped version to 0.86.3 2019-01-26 14:11:44 -08:00
Shantanu Tushar
a368db9ad4 Include exception details in the error log (#20461)
* Include exception details in the error log

I see this error quite often in my HA logs and this will be helpful for anyone who is attempting to debug this.

* Minor change

* Remove line break
2019-01-26 14:11:16 -08:00
Paulus Schoutsen
6330bb1004 Warn for old slugs/entity ids (#20478)
* Warn for old slugs/entity ids

* add comments

* Lint

* LInt

* Lint

* Lint
2019-01-26 14:10:05 -08:00
starkillerOG
672a896124 Philips Hue, include debug message for color gamut (#20455) 2019-01-26 14:10:04 -08:00
Paulus Schoutsen
87316c4e83 Warn for old slugs/entity ids (#20478)
* Warn for old slugs/entity ids

* add comments

* Lint

* LInt

* Lint

* Lint
2019-01-26 14:09:41 -08:00
Fabian Affolter
38b1ce3fe0 Upgrade psutil to 5.5.0 (#20462) 2019-01-26 22:11:36 +01:00
Fabian Affolter
9920699bb8 Upgrade sqlalchemy to 1.2.16 (#20474) 2019-01-26 22:11:00 +01:00
starkillerOG
b9bf6963fd Philips Hue, include debug message for color gamut (#20455) 2019-01-26 12:50:34 -08:00
emontnemery
60dc337f3f Update device registry of MQTT cover (#20443)
* Update device registry of MQTT cover

* Move config_entry to constructor
2019-01-26 10:52:41 -08:00
emontnemery
85c72fbca6 Update device registry of MQTT alarm (#20439) 2019-01-26 10:48:35 -08:00
emontnemery
85ccd71d39 Update device registry of MQTT sensor (#20440) 2019-01-26 10:48:18 -08:00
Paulus Schoutsen
09cbcb74bc Merge pull request #20442 from emontnemery/mqtt_binary_sensor_update_device_info
Update device registry of MQTT binary_sensor
2019-01-26 10:47:57 -08:00
Paulus Schoutsen
0e453fe492 Update device registry of MQTT climate (#20444) 2019-01-26 10:47:29 -08:00
emontnemery
1d16bb2cd4 Update device registry of MQTT fan (#20445) 2019-01-26 10:46:41 -08:00
David F. Mulcahey
05d41bc0ee introduce gateway (#20460) 2019-01-26 13:28:13 -05:00
Jef D
f3285f96bb Add Co2signal sensor (#19204)
* Initial commit for the co2signal sensor

* Clean code

* Run script gen_requirements_all.py

* remove unintended character

* Remove redundancy

* Remove unused imports

* Code style

* Code style fixes

* Code style

* Fix comments PR

Comments by @fabaff
* Remove redundant comments and variables
* Follow the latest home-assistant guidelines

* Bump CO2Signal version

* Round API result

* Improve default latitude/longitude handling

* Improve friendly name

* Improve config handling

* Make lines shorter

* Style

* Convert default to variable

None does not pass cv.string

* Message if not inclusive

* Shorten line

* Update requirements

* Update co2signal.py

Group imports;  remove empty lines; refactor use of location_type; remove logging messages; remove unused functions; add global variables

* Update co2signal.py

Import platform schema from sensor

* Small fix

* Update co2signal.py

Remove last mentions of location_type

* Review changes

Add attribution
Formatting

* Missing whitespace

* Update co2signal.py

Fix pylint

* Update co2signal.py

Change blank lines

* Update co2signal.py

Initialise _data
2019-01-26 19:02:46 +01:00
Diogo Gomes
1d5ffe9ad5 Utility meter (#19718)
* initial commit

* test service calls

* lint

* float -> Decimal

* extra tests

* lint

* lint

* lint

* lint

* fix self reset

* clean

* add services

* improve service example description

* add optional paused initialization

* fix

* travis fix

* fix YEARLY

* add tests for previous bug

* address comments and suggestions from @ottowinter

* lint

* remove debug

* add discoverability capabilities

* no need for _hass

* Update homeassistant/components/sensor/utility_meter.py

Co-Authored-By: dgomes <diogogomes@gmail.com>

* Update homeassistant/components/sensor/utility_meter.py

Co-Authored-By: dgomes <diogogomes@gmail.com>

* correct comment

* improve error handling

* address @MartinHjelmare comments

* address @MartinHjelmare comments

* one patch is enought

* follow @ballob suggestion in https://github.com/home-assistant/architecture/issues/131

* fix tests

* review fixes

* major refactor

* lint

* lint

* address comments by @MartinHjelmare

* rename variable
2019-01-26 16:33:11 +01:00
Jonas Pedersen
ed6e349515 Correct minor comments from PR#20138. (#20454) 2019-01-26 15:55:25 +01:00
Fabian Affolter
a85e018bc4 Upgrade astral to 1.8 (#20459) 2019-01-26 15:54:35 +01:00
David F. Mulcahey
a0b93c2add ZHA component rewrite part 1 (#20456)
* rearrange files

* add init to module

* update imports

* update coveragerc

* put blank line back... git raw view be damned
2019-01-26 08:54:49 -05:00
Anders Melchiorsen
e593383b4d Error handling for recorder purge (#20424) 2019-01-26 11:02:16 +01:00
Austin Drummond
b3c3721a79 Add alarm type workaround zwave lock Yale YRD240 (#20438) 2019-01-26 11:01:04 +01:00
Adam Belebczuk
310c073c64 WeMo - Fix device discovery issues (#20446) 2019-01-26 11:00:06 +01:00
Louis Matthijssen
d39784906b Fix HTTP login attempts check triggering too late (#20431) 2019-01-26 03:13:44 +01:00
emontnemery
6d2e7db123 Update device registry of MQTT climate 2019-01-26 09:04:02 +08:00
emontnemery
d8e43978b7 Update device registry of MQTT binary_sensor 2019-01-26 08:58:08 +08:00
kennedyshead
76c0295403 Bumps aioasuswrt (#20432) 2019-01-25 23:27:44 +01:00
coreGreenberet
2bc7444427 Fix homematicip cloud alarm_arm_home (#20321) 2019-01-25 19:45:42 +01:00
coreGreenberet
4518e6bdf7 Fix minor homematicip cloud binary sensor issues (#20398)
* fix for smoke detection

* a tilted window is now considered as "open"/on

* changed comparison to enum

* line length

* insert brackets for line length and comparison

* indentation should now be ok for hound
changed api version to 0.10.4

* indentation should now be ok for hound
changed api version to 0.10.4

* updating requirement files

* satisfy lint
2019-01-25 19:00:37 +01:00
zewelor
d6c12e47f4 Fix cast platform album name property (#20411) 2019-01-25 18:49:50 +01:00
Jc2k
cea2bf94bd Move homekit_controller entity types under homekit_controller platform (#20376)
* Move homekit_controller entity types under homekit_controller platform

* Update coveragerc as homekit_controller moved
2019-01-25 07:43:01 -08:00
jonudewux
1fcaaf93ad Upgrade youtube_dl to 2019.01.24 (#20408) 2019-01-25 11:57:13 +01:00
Andrey Kupreychik
d4c7515681 Add time_throttle filter to sensor.filter (#20334)
* Added time_throttle filter

* Added time_throttle filter test

* Updated comments for time_throttle filter
2019-01-25 10:07:45 +00:00
Anders Melchiorsen
c94834d8f6 Add LIFX listen port advanced configuration (#20299) 2019-01-24 22:50:26 -08:00
emontnemery
ec5da05804 Add character encoding to MQTT automation. (#20292) 2019-01-24 22:43:56 -08:00
emontnemery
d84cd01cbf Cleanup if discovered mqtt light can't be added (#19740)
* Cleanup if discovered mqtt light can't be added

* No bare except

* Clear ALREADY_DISCOVERED list with helper

* Use constant instead of string literal
2019-01-24 22:40:52 -08:00
emontnemery
a1da6a677a Update device registry of MQTT Switch (#19540)
* MQTT Switch: Update device registry

* Move config_entry to constructor

* Remove duplicated code

* Fix merge error
2019-01-24 22:39:16 -08:00
Jasper van der Neut - Stulen
55943cfac0 Return windspeed and windgust in km/h instead of m/s. (#20340)
Darksky dev docs state (https://darksky/dev/docs):
`ca: same as si, except that windSpeed and windGust are in kilometers per
hour`
2019-01-24 22:36:25 -08:00
Paulus Schoutsen
567e3e6e50 Merge pull request #20402 from home-assistant/rc
0.86.2
2019-01-24 21:01:22 -08:00
Paulus Schoutsen
259915eee9 Bumped version to 0.86.2 2019-01-24 19:34:10 -08:00
Paulus Schoutsen
d7859b5900 history allowed to load states with invalid entity IDs (#20399) 2019-01-24 19:34:02 -08:00
starkillerOG
ebcae2503c Philips Hue - Remove unnessesary warning (#20394)
for white hue bulbs and bulbs from other brands like Ikea and Innr, this warning will be issued while this is not really a problem.
So just remove the warning.
2019-01-24 19:34:01 -08:00
Daniel Perna
400aaf8a3a Update pyhomematic to 0.1.55 (#20397) 2019-01-24 17:53:31 -08:00
Fabian Affolter
046683ee3f Upgrade numpy to 1.16.0 (#20396) 2019-01-24 17:53:17 -08:00
Paulus Schoutsen
c7f5beb794 history allowed to load states with invalid entity IDs (#20399) 2019-01-24 17:53:01 -08:00
starkillerOG
c508ba166c Philips Hue - Remove unnessesary warning (#20394)
for white hue bulbs and bulbs from other brands like Ikea and Innr, this warning will be issued while this is not really a problem.
So just remove the warning.
2019-01-24 23:46:55 +01:00
mindigmarton
68bd5f5df8 Upgrade emulated_roku to 0.1.8 to fix invalid encodings, fixes #20388 (#20390) 2019-01-24 22:51:15 +01:00
Anders Melchiorsen
70c5807976 Improve deprecation warnings (#20391) 2019-01-24 13:37:30 -08:00
Daniel Høyer Iversen
3b1534c126 Remove logging from tibber (#20382)
* Remove logging from tibber

* keep guard
2019-01-24 21:56:44 +01:00
zewelor
2559bc4226 Add yeelight start_flow service and ability to declare custom effects (#20107) 2019-01-24 17:41:07 +01:00
Fréderic Kinnaer
0be922dc9c SongPal: do not crash if active_source is not (yet) available - fixes #20343 (#20344)
* SongPal: error handling if active_source can't be detected

* sonpal: Add comment to the use of getattr() for property source

* songpal: make comment single-line
2019-01-24 12:55:39 +01:00
Fabian Affolter
7038dd484a Upgrade TwitterAPI to 2.5.9 (#20372) 2019-01-24 09:37:25 +01:00
Daniel Høyer Iversen
1bd31e3459 Change STATE_UNKOWN to None (#20337)
* Change STATE_UNKOWN to None

* Change STATE_UNKOWN to None

* tests

* tests

* tests

* tests

* tests

* style

* fix comments

* fix comments

* update fan test
2019-01-24 08:20:20 +01:00
Paulus Schoutsen
77ee2f1f3e Merge pull request #20369 from home-assistant/rc
0.86.1
2019-01-23 21:16:46 -08:00
Paulus Schoutsen
761385dea1 Bumped version to 0.86.1 2019-01-23 21:14:52 -08:00
Paulus Schoutsen
2b2809a4c6 Calling save before load would crash Lovelace storage (#20368) 2019-01-23 21:14:47 -08:00
Paulus Schoutsen
3c32bfda95 Fix restore state crashing invalid entity ID (#20367) 2019-01-23 21:14:47 -08:00
Diogo Gomes
65d9460e09 Fix error when API doesn't return a forecast. (#20365)
* add guard

* wrong logic
2019-01-23 21:14:46 -08:00
Eliseo Martelli
2b542b7789 [FIX] Time reporting incorrect in sensor.gtt (#20362)
* quick fix

* remove print statement

* fixes

* remove lambda

* added pylint disable

* should be fine now
2019-01-23 21:14:46 -08:00
Kevin Fronczak
bbdb7a6f4c Hotfix for blink initialization failure. Fixes #20335 (#20351) 2019-01-23 21:14:45 -08:00
Diogo Gomes
074fcd96ed Fix error when API doesn't return a forecast. (#20365)
* add guard

* wrong logic
2019-01-23 21:14:21 -08:00
Paulus Schoutsen
5580bec1d3 Calling save before load would crash Lovelace storage (#20368) 2019-01-23 21:13:55 -08:00
Paulus Schoutsen
af3afb673a Fix restore state crashing invalid entity ID (#20367) 2019-01-23 21:12:38 -08:00
Daniel Høyer Iversen
697c331903 Clean up concord232 (#20353)
* Clean up concord232

* concord cleanup

* clean up

* fix import
2019-01-23 17:05:56 -08:00
Eliseo Martelli
971d933140 [FIX] Time reporting incorrect in sensor.gtt (#20362)
* quick fix

* remove print statement

* fixes

* remove lambda

* added pylint disable

* should be fine now
2019-01-23 17:05:16 -08:00
Paulus Schoutsen
0300ef2040 Fix entity registry comments (#20357) 2019-01-23 16:33:21 -08:00
Paulus Schoutsen
e049b35413 Merge pull request #20354 from home-assistant/rc
0.86.0
2019-01-23 12:49:23 -08:00
Jc2k
a396ee2cb5 Bump homekit==0.12.2 + improve controller reliability (#20325)
Sessions were timing out and requiring a HA restart in order to restore
functionality. Network disconnects are now handled and sessions will be
automatically recovered after they fail.
2019-01-23 20:44:21 +01:00
Kevin Fronczak
7ca7951526 Hotfix for blink initialization failure. Fixes #20335 (#20351) 2019-01-23 20:37:21 +01:00
Daniel Høyer Iversen
5bf3b2dd9f clean up of islamic_prayer_times (#20352)
update_sensors was not awaited in async_track_point_in_time()
2019-01-23 20:17:45 +01:00
Paulus Schoutsen
cdcc535ae1 Version bump to 0.86.0 2019-01-23 10:48:55 -08:00
Paulus Schoutsen
4662ab215c Fix invalid entity ID in entity registry (#20328) 2019-01-23 10:48:15 -08:00
rolfberkenbosch
80aa2075c6 Update locationsharinglib to version 3.0.11 (#20322)
* Update google_maps.py

There are known bug in locationsharinglib version 3.0.9, the developer has fixed this in 3.0.11. (https://github.com/costastf/locationsharinglib/issues/42)

* Update requirements_all.txt
2019-01-23 10:48:14 -08:00
Sebastian Muszynski
4b7d944a74 Fix xiaomi speed attribute name clash (#20312) 2019-01-23 10:48:14 -08:00
Richard Mitchell
b7218e6a1d Should require the 'GATTOOL' setup extras which includes pexpect. (#20263)
* Should require the 'GATTOOL' setup extras which includes pexpect.

* Also fix skybeacon's requirement and requirements_all.
2019-01-23 10:48:13 -08:00
Jonas Pedersen
c6cee1ccd3 Add Danfoss Air HRV support (#20138)
* Add support for Danfoss Air HRV systems.

* Correct lint errors after initial commit of Danfoss Air HRV support.

* A couple of lint fixes for danfoss_air.

* Refactor to comply with HA standards.

* Style fix.

* Use wildcard for danfoss_air in .coveragerc.

* Remove config example from header documentation.
Correct import name for platforms.
2019-01-23 11:58:45 -05:00
Corey Edwards
16a4180fab Fix mpd logging format string field (#20333)
* Fix format string field

* Remove str.format and let _LOGGER handle formatting

* Remove trailing period from log message
2019-01-23 11:50:04 -05:00
shbatm
e8f0e534f9 Update Requirement for PyISY Package in isy994 Component to v1.1.1 (#20349) 2019-01-23 11:48:35 -05:00
Fabien Piuzzi
07f1e2ce75 Add Octoprint custom path (#20302)
* Added custom path config option to octoprint component

* Added some debug logging

* removed debug logging for base url

* Fixed single/double quotes style
2019-01-23 12:50:17 +01:00
Malte Franken
eaa9c4d437 Remove creation of geolocation default group (#20338) 2019-01-23 10:04:41 +01:00
Frank
db277ad023 Add data/data_template/title to alert component (#17616)
* Add data/data_template/title to alert component

* Fix line length

* Fix tests

* Fix lint

* fix line length

* Fix tests, make title templatable

* Fix test

* Fix test

* Optimize data, make title templated

* Fix line length

* Add title template

* typo

* Fix tests
2019-01-23 08:47:37 +01:00
Sebastian Muszynski
3484e506e8 Fix xiaomi speed attribute name clash (#20312) 2019-01-23 05:04:13 +01:00
Paulus Schoutsen
e964750ac1 Fix invalid entity ID in entity registry (#20328) 2019-01-22 14:07:17 -08:00
Paulus Schoutsen
c87c5797db Updated frontend to 20190121.1 2019-01-22 12:58:53 -08:00
Richard Mitchell
5b25188474 Should require the 'GATTOOL' setup extras which includes pexpect. (#20263)
* Should require the 'GATTOOL' setup extras which includes pexpect.

* Also fix skybeacon's requirement and requirements_all.
2019-01-22 18:50:21 +01:00
Fabian Affolter
91ef78adc5 Upgrade youtube_dl to 2019.01.17 (#20318) 2019-01-22 18:45:16 +01:00
rolfberkenbosch
e2a4fdeadf Update locationsharinglib to version 3.0.11 (#20322)
* Update google_maps.py

There are known bug in locationsharinglib version 3.0.9, the developer has fixed this in 3.0.11. (https://github.com/costastf/locationsharinglib/issues/42)

* Update requirements_all.txt
2019-01-22 08:24:40 -08:00
Mateusz Korniak
9b7780edf0 Ecoal (esterownik.pl) static fuel boiler and pump controller (#18480) - matkor
* Starting work on ecoal boiler controller iface.

* Sending some values/states to controller.

* Basic status parsing, and simple settings.

* Platform configuration.

* Temp sensors seems be working.

* Switch from separate h/m/s to datetime.

* Vocabulary updates.

* secondary_central_heating_pump -> central_heating_pump2

* Pumps as switches.

* Optional enabling pumps via config.

* requests==2.20.1 added to REQUIREMENTS.

* Optional enabling temp sensors from configuration yaml.

* autopep8, black, pylint.

* flake8.

* pydocstyle

* All style checkers again.

* requests==2.20.1 required by  homeassistant.components.sensor.ecoal_boiler.

* Verify / set switches in update().
Code cleanup.

* script/lint + travis issues.

* Cleanup, imperative mood.

* pylint, travis.

* Updated .coveragerc.

* Using configuration consts from homeassistant.const

* typo.

* Replace global ECOAL_CONTR with hass.data[DATA_ECOAL_BOILER].
Remove requests from REQUIREMENTS.

* Killed .update()/reread_update() in Entities __init__()s.
Removed debug/comments.

* Removed debug/comments.

* script/lint fixes.

* script/gen_requirements_all.py run.

* Travis fixes.

* Configuration now validated.

* Split controller code to separate package.

* Replace in module docs with link to https://home-assistant.io .

* Correct component module path in .coveragerc.
More vals from  const.py.
Use dict[key] for required config keys.
Check if credentials are correct during component setup.
Renamed add_devices to add_entities.

* Sensor/switch depends on ecoal_boiler component.
EcoalSwitch inherits from SwitchDevice.
Killed same as default should_poll().
Remove not neede schedule_update_ha_state() calls from turn_on/off.

* lint fixes.

* Move sensors/switches configuration to component setup.

* Lint fixes.

* Invalidating ecoal iface cache instead of force read in turn_on/off().

* Fail component setup before adding any platform entities.
Kill NOTE.

* Disallow setting entity names from config file, use code defined default names.

* Rework configuration file to use monitored_conditions like in rainmachine component.

* Killed pylint exception.
Log error when connection to controller fails.

* A few fixes.

* Linted.
2019-01-22 08:14:27 -05:00
Jason Hu
f84c0ee473 Upgrade python-nest to 4.1.0 (#20313) 2019-01-22 13:23:33 +01:00
Mattias Welponer
89ba374d51 HomematicIP add cover FROLL and BROLL devices (#19794)
* Add cover FROLL and BROLL devices

* Fix import

* Fix async calls

* Update cover functions and async fixes

* Update test

* Cleanup code

* Update header

* Merge imports

* Update

* Remove init

* Update coveragerc file

* Update coveragerc
2019-01-22 09:22:45 +01:00
krygal
a8ef7a2774 Add device tracker support for EE Brightbox 2 router (#19611)
* Added device tracker support for EE Brightbox 2

* removed timeago dependency

* get scanner checks and improved tests

* fixed lint issues

* removed redundant timeago from test requirements

* fixed variable naming in test

* removed unecessary blank line
2019-01-22 09:16:35 +01:00
Johann Kellerman
5a30b0507d Add git to the development Dockerfile (#20276)
* git_on_dev

* feedback
2019-01-22 08:21:43 +01:00
Paulus Schoutsen
6d0ac30687 Bumped version to 0.86.0b3 2019-01-21 21:23:00 -08:00
Fabien Piuzzi
d419471372 Fix typo C02 to CO2 (#20306)
* Fix type C02 to CO2 and added VOC to air quality platform

* singularized volatile_organic_compound

* Remove VOC prop

* Update __init__.py

* Update __init__.py
2019-01-21 21:22:38 -08:00
Fabien Piuzzi
0ceace96e7 Bugfix: prevent error notification when octoprint server auto detected but no configuration present. (#20303) 2019-01-21 21:22:20 -08:00
Fabien Piuzzi
3e056a24dd Bugfix: prevent error notification when octoprint server auto detected but no configuration present. (#20303) 2019-01-21 21:21:59 -08:00
Johann Kellerman
ec7f2657cd Config Validator: schema_with_slug_keys (#20298)
* schema_with_slug_keys

* Update config_validation.py

* Update config_validation.py
2019-01-21 21:21:00 -08:00
Paulus Schoutsen
5945929e7e Updated frontend to 20190121.1 2019-01-21 21:20:23 -08:00
Johann Kellerman
6511e11ec9 Config Validator: schema_with_slug_keys (#20298)
* schema_with_slug_keys

* Update config_validation.py

* Update config_validation.py
2019-01-21 16:36:04 -08:00
Ted Drain
4b3cdb9f4e Add radiotherm is_on method to return on/off (#20283)
* Added state method to return current operating state to fix #18244 for radiotherm component.

* Changed to set the is_on property when actively heating or cooling.
2019-01-21 12:05:42 -08:00
Andrew Sayre
bb21cb6c89 Remove trailing slash from base_url and added ability to generate webhook path. (#20295) 2019-01-21 20:50:41 +01:00
Paulus Schoutsen
9667c8057f Bumped version to 0.86.0b2 2019-01-21 09:45:42 -08:00
Johann Kellerman
028cc8d24f Align valid_entity_id with new slugify (#20231)
* slug

* ensure a dot

* fix

* schema_with_slug_keys

* lint

* test
2019-01-21 09:45:37 -08:00
Johann Kellerman
c36c708068 Align valid_entity_id with new slugify (#20231)
* slug

* ensure a dot

* fix

* schema_with_slug_keys

* lint

* test
2019-01-21 09:45:11 -08:00
Paulus Schoutsen
df47a8c58c Updated frontend to 20190121.0 2019-01-21 09:38:16 -08:00
Paulus Schoutsen
6ca0da5c52 Updated frontend to 20190121.0 2019-01-21 09:21:11 -08:00
Daniel Høyer Iversen
e4f42d1282 Update Tibber lib (#20289) 2019-01-21 16:12:03 +01:00
Andrey Kupreychik
ec9575a86f Added Xiaomi AirPurifier 2S profile (#20285) 2019-01-21 09:22:44 +01:00
Andrew Sayre
5c208da82e Added recursive detection of functools.partial. (#20284) 2019-01-20 22:27:32 -08:00
Jon Caruana
9482a6303d Add EverLights light component (#19817)
* EverLights light integration. Supports single color (with color and brightness parameters) or saved pattern (with effect parameter).

* Fix pylint parameter name warning.

* Code review feedback.

* Add tests for the two helper functions of EverLights component.

* Fixes for review feedback.

* Change test style.

* Style fixes for hound.
2019-01-21 04:23:36 +01:00
Paulus Schoutsen
657544a381 Clean up build artifacts correctly 2019-01-20 17:31:22 -08:00
Paulus Schoutsen
5999df1953 Clean up build artifacts correctly 2019-01-20 17:31:09 -08:00
Paulus Schoutsen
143eb4e8f4 Bumped version to 0.86.0b1 2019-01-20 17:02:44 -08:00
Anders Melchiorsen
41d2321756 Fix 'all' entity_id in service call extraction (#20281) 2019-01-20 17:02:36 -08:00
Anders Melchiorsen
f02e887fcc Allow 'all' entity_id in service schema (#20278) 2019-01-20 17:02:36 -08:00
Anders Melchiorsen
97e8e20bcc Remove double logging of automation action (#20264) 2019-01-20 17:02:36 -08:00
Otto Winter
33ed113211 Bump aioesphomeapi to 1.4.2 (#20247)
* Bump aioesphomeapi to 1.4.2

* Update requirements_all.txt
2019-01-20 17:02:35 -08:00
Phil Bruckner
ba2b28cd4d Handle non-string values in JSON renderer (#20233)
Handle the case of async_render_with_possible_json_value's value argument
being something other than a string. This can happen, e.g., when using the
SQL sensor to extract a datetime column such as last_changed and also using
its value_template to convert that datetime to another format. This was
causing a TypeError from json.loads, but async_render_with_possible_json_value
was only catching ValueError's.
2019-01-20 17:02:35 -08:00
Anders Melchiorsen
d843bf9c58 Improve Sonos discovery (#20196) 2019-01-20 17:02:34 -08:00
Paulus Schoutsen
84d6453a97 Add command to refresh auth (#20183) 2019-01-20 17:02:34 -08:00
Paulus Schoutsen
1f54edfbc4 Distribute reconnect (#20181) 2019-01-20 17:02:33 -08:00
Paulus Schoutsen
27be95e597 Sensibo to use HA operation modes (#20180) 2019-01-20 17:02:33 -08:00
Phil Bruckner
935e5c67a3 Handle non-string values in JSON renderer (#20233)
Handle the case of async_render_with_possible_json_value's value argument
being something other than a string. This can happen, e.g., when using the
SQL sensor to extract a datetime column such as last_changed and also using
its value_template to convert that datetime to another format. This was
causing a TypeError from json.loads, but async_render_with_possible_json_value
was only catching ValueError's.
2019-01-20 16:46:14 -08:00
emontnemery
3fcbcd5a38 Add JSON attribute topic to MQTT alarm (#20238) 2019-01-20 16:42:56 -08:00
emontnemery
dbba3eb0d4 Add JSON attribute topic to MQTT climate (#20239) 2019-01-20 16:42:35 -08:00
emontnemery
89e9d827a2 Add JSON attribute topic to MQTT fan (#20240) 2019-01-20 16:42:17 -08:00
emontnemery
ab4e4787e3 Add JSON attribute topic to MQTT lock (#20241) 2019-01-20 16:41:50 -08:00
Paulus Schoutsen
b6e1675c46 Add JSON attribute topic to MQTT vacuum (#20242) 2019-01-20 16:36:24 -08:00
Teemu R
e69ca810e4 Print a message when reconnected after a connection failure, requirement for IQS silver (#20261) 2019-01-20 16:36:01 -08:00
Anders Melchiorsen
62844e237c Allow 'all' entity_id in service schema (#20278) 2019-01-20 16:33:39 -08:00
Anders Melchiorsen
1218127d83 Fix 'all' entity_id in service call extraction (#20281) 2019-01-20 16:33:11 -08:00
koreth
08a57959b9 Reduce log noise from Envisalink component (#20282) 2019-01-20 16:32:01 -08:00
Paulus Schoutsen
d2dec44b18 Updated frontend to 20190120.0 2019-01-20 16:22:57 -08:00
Paulus Schoutsen
f771667c14 Updated frontend to 20190120.0 2019-01-20 16:22:42 -08:00
Andre Lengwenus
d5dcb8f140 Add discovery_info check to LCN light platform (#20280)
* Added discovery_info check to LCN light platform

* Removed whitespaces
2019-01-20 15:49:28 -08:00
Anders Melchiorsen
362ac725bf Remove double logging of automation action (#20264) 2019-01-21 00:10:12 +01:00
Ville Skyttä
58bb6f2e99 Add type hints to helpers.condition (#20266) 2019-01-21 00:03:12 +01:00
NotoriousBDG
5b8cb10ad7 Make Netatmo battery_percent icon dynamic (#20275) 2019-01-20 22:30:17 +01:00
Daniel Høyer Iversen
2eb5ce9dfe Update Tibber library (#20273) 2019-01-20 21:37:02 +01:00
koreth
fd2cff6b1c Fire events for Lutron RadioRA2 keypad buttons (#20090)
* Add binary sensor for Lutron RadioRA2 keypad buttons

Allow automations to be triggered from RadioRA2 keypads by exposing
each button as a binary sensor.

* Remove binary sensor component; fire events directly instead.

* Address comments from code review
2019-01-20 21:16:48 +01:00
kbickar
0e5fa010a7 Updated sense library to 0.6.0 (#20271) 2019-01-20 21:02:36 +01:00
Andre Lengwenus
7c25389f0d Add LCN switch platform (#20267)
* Add LCN switch platform

* Added guard clause for discovery_info check and removed unnecessary parathesis
2019-01-20 20:49:30 +01:00
Andre Lengwenus
a8d3a904e7 Support for relay ports for LCN light platform (#19632)
* Added relay ports to LCN lights platform

* Exchanged validation for ports with uppercase validator. Makes interfacing with pypck enums much more simple.

* Removed supported_features property as it is correctly inherited from parent

* Removed type annotations.
2019-01-20 14:50:29 +01:00
Matthew Wegner
6bf42ad43d Added Search Configuration to IMAP Sensor (#19749)
* Added Search Configuration to IMAP Sensor

The IMAP sensor currently only counts unread emails in a folder.  By exposing the IMAP search parameter, the sensor can be used to count other results:

- All emails in an inbox
- Emails sent from an address
- Emails matching a subject
- Other advanced searches, especially with vendor-specific extensions.  Gmail in particular supports X-GM-RAW, which lets you use any Gmail search directly ("emails with X label older than 14 days with", etc)

For my use case, I just wanted total emails in a folder, to show an "X/Y" counter for total/unread.  I started work on a one-off script to throw the data in, but figured I'd try to extend Home Assistant more directly, especially since this IMAP sensor correctly handles servers that push data.  This is my first Home Assistant contribution, so apologies in advance if something is out of place!  It's a pretty minimal modification.

* Added Server Response Checking

Looks like no library exception is thrown, so check for response text before parsing out results (previous code just counts spaces, so an error actually returns a state value of 4).

* IMAP Warning -> Error, Count Initializes to None

IMAP search response parsing throws an error instead of a warning.

Email count initializes as None instead 0.

Email count is untouched in case of failure to parse response (i.e. if server is temporarily down or throwing errors, or maybe due to user updating their authentication/login/etc).

Fixed line length on error so it fits under 80 characters.

* Fixed Indent on Logger Error

Sorry about the churn!  Python is pretty far from my daily-use language.  (I did run this one through pep8, at least)
2019-01-19 21:37:02 +01:00
Daniel Høyer Iversen
0987219b28 Tibber Pulse for homes without subscriptions (#20246) 2019-01-19 10:23:22 -08:00
Victor Vostrikov
fb52f66da0 Use local IP to discover IGD device (#20035)
* Use local_ip from config to discover IGD device

In case of multi-homed server UPNP discovery finds IGD device on some "default" interface. WIth this modification discovery will be performed from 'local_ip'.

* Update device.py

* Changed version of async_upnp_client in requirements

* Used aysnc_upnp_client==0.14.0

* Changed requirement to async_upnp_client==0.14.0.dev0

* Changed requirement to async_upnp_client==0.14.0.dev0

* Changed requirement to async_upnp_client==0.14.0.dev0

* Fixed code style

* Fixed code style

* Changed version of async_upnp_client in requerements

* Changed version of async_upnp_client in requirements

* Regenerated requirements (new async_upnp_client)

* Regenerated requirements (new async_upnp_client)

* Changed requirement to async_upnp_client=0.14.1

* Changed requirement to async_upnp_client=0.14.1

* Updated requirements

* Updated requirements.txt

* Corrected requirements

* Corrected import of DeviceState

* Constants changed according new async_upnp_client

* Upgraded for async_upnp_client==0.14.2
2019-01-19 17:08:53 +00:00
Otto Winter
8000b97180 Bump aioesphomeapi to 1.4.2 (#20247)
* Bump aioesphomeapi to 1.4.2

* Update requirements_all.txt
2019-01-19 17:13:32 +01:00
Erik
5b8f64093b Add JSON attribute topic to MQTT vacuum 2019-01-19 11:58:21 +01:00
Joakim Lindbom
440d479be8 Fix for issue #19086 (#20225) 2019-01-18 22:12:56 -08:00
Louis Matthijssen
e80702a45c Fix unused friendly name for SolarEdge sensor (#20109) 2019-01-18 15:02:27 +01:00
Anders Melchiorsen
63b19094c1 Improve Sonos discovery (#20196) 2019-01-18 13:43:48 +01:00
Rohan Kapoor
84b1fcbc36 Add verify_ssl to restful_command and switch.rest (#20199) (#20207) 2019-01-18 13:42:52 +01:00
zhujisheng
81a5208762 Add platform image_processing.qrcode (#20215)
* Add platform image_processing.qrcode

* Update qrcode.py
2019-01-18 13:40:49 +01:00
ehendrix23
afa019ae47 Set ehendrix23 as owner for harmony platform (#20203)
Put myself (ehendrix23) as code owner for remote.harmony platform
2019-01-17 19:35:45 -07:00
emontnemery
6800871c13 Log exceptions thrown by signal callbacks (#20015)
* Log exceptions thrown by signal callbacks

* Fix unsub

* Simplify traceback print

* Typing

* Add test

* lint

* Review comments

* Rework MQTT test case

* Fix bad merge

* Fix bad merge
2019-01-17 14:44:57 -08:00
emontnemery
f094a7369d Add JSON attribute topic to MQTT switch (#20192) 2019-01-17 10:55:22 -08:00
emontnemery
234f348ba1 Add JSON attribute topic to MQTT light (#20191) 2019-01-17 10:54:22 -08:00
emontnemery
d1c6eb4f3e Add JSON attribute topic to MQTT cover (#20190)
* Add JSON attribute topic to MQTT cover

* Lint
2019-01-17 10:53:52 -08:00
Rohan Kapoor
5232df34cb Add a Zoneminder availability sensor (#20184)
* Embed zoneminder platforms into component

* Add a binary sensor for ZoneMinder availability

* Lint

* Add missing docstrings
2019-01-17 10:52:53 -08:00
Paulus Schoutsen
0fe5d567a2 Add command to refresh auth (#20183) 2019-01-17 19:33:01 +01:00
Paulus Schoutsen
136364f5db Distribute reconnect (#20181) 2019-01-17 19:30:47 +01:00
Rohan Kapoor
2de6a94506 Embed zoneminder platforms into component (#20182) 2019-01-17 11:13:15 +01:00
Paulus Schoutsen
e1b63d9706 Sensibo to use HA operation modes (#20180) 2019-01-16 23:12:18 -08:00
Aaron Godfrey
27a8171a8b Remove color call to set lights to black. (#20176)
Calling clear all is enough to turn off the light.  Calling the color
command makes the light no longer function until clear all is called
again.  The component calls clear all beforing turning it on which is
why it works through home assistant.  However if you try to control the
light via the hyperion app or through kodi after it has been turned off
via home assistant it will not function until you call clear all again.
2019-01-16 21:19:52 -08:00
Paulus Schoutsen
722d285904 Bumped version to 0.86.0b0 2019-01-16 16:27:15 -08:00
Paulus Schoutsen
bc8aa73448 Updated frontend to 20190116.0 2019-01-16 16:14:55 -08:00
damarco
b557157ea1 Add support for deconz radios to zha component (#20167)
* Add support for deconz radios

* Update check_zigpy_connection()
2019-01-16 16:09:09 -08:00
Sebastian Muszynski
85404783d6 Add Xiaomi Airpurifier Pro V7 support (#20093)
* Add Xiaomi Air Purifier Pro V7 support

* Reorder the model list

* Improve the list of supported attributes/properties

* Fix lint
2019-01-16 16:08:41 -08:00
damarco
06440bf076 Bump pynuki to 1.3.2 (#20173) 2019-01-16 16:07:40 -08:00
Paulus Schoutsen
84a2e5d8fb Strip login username in backend (#20150)
* Add modern mode to HA auth provider that strips usernames

* Add tests for async_get_or_create_credentials

* Fix test
2019-01-16 15:03:05 -08:00
Fabian Affolter
9bb7e40ee3 Upgrade aiohttp to 3.5.3 (#19957)
* Upgrade aiohttp to 3.5.3

* Upgrade aiohttp to 3.5.4

* Remove test for webhook component from camera.push

* Lint
2019-01-16 14:23:46 -08:00
emontnemery
368682647d Log exceptions thrown by MQTT message callbacks (#19977)
* Log exceptions thrown by MQTT message callbacks

* Fix tests

* Correct method for skipping wrapper in traceback

* Lint

* Simplify traceback print

* Add test

* Move wrapper to common helper function

* Typing

* Lint
2019-01-16 13:50:21 -08:00
Paulus Schoutsen
1d86905d5b Switch locative to use the webhook component (#20043)
* Switch locative to use the webhook component

* Lint

* Remove dead test code

* Use voluptuous to validate the webhook schema

* Validate test mode schema as well

* Lint

* Remove allow_extra

* Return web.Response correctly

* #20043: Remove superfluous dict in WEBHOOK_SCHEMA validation
2019-01-16 11:08:42 -08:00
David F. Mulcahey
8748ace244 Make imports relative in ZHA component (#20020)
* make imports relative

* remove cyclic import
2019-01-16 11:06:22 -08:00
cvwillegen
5e73846bcc imap_email_content: allow configuring folder to read. (#20160)
* Update imap_email_content.py

Add configuration for selection of IMAP folder to track

* Update imap_email_content.py
2019-01-16 10:59:54 -08:00
Rohan Kapoor
b5bfc759ec Migrate gpslogger to the automatically generated webhook (#20079)
* Migrate gpslogger to the automatically generated webhook

* Lint

* Lint and return error code
2019-01-16 10:56:25 -08:00
Nikolay Vasilchuk
075b575bde Support device_class for rest sensor (#20132)
* Ready

* Tests fixed
2019-01-16 10:03:53 -08:00
Paulus Schoutsen
29c6584fe2 Enable setting alarm mode night for arlo platform (#20143)
* Enable setting alarm mode night for arlo platform

* Missed one small comment
2019-01-16 10:02:30 -08:00
Rohan Kapoor
48127cade0 Embed mailgun platform into component (#20147)
* Embed mailgun platform into component

* #20147: Update .coveragerc

* #20147 update requirements.txt
2019-01-16 10:01:08 -08:00
cvwillegen
c8efbb2cdc Fix link to documentation link, select read-only (#20155)
- Fixed link to documentation page at the top of the sensor
- Select the IMAP4 Inbox read-only so that reading e-mail does not mark messages as Read
2019-01-16 09:56:53 -08:00
Pascal Vizeli
9d112dc3f0 Remove .isort because we use the config from setup.cfg (#20158) 2019-01-16 09:54:11 -08:00
Rohan Kapoor
11c78d5de8 Embed geofency platform into component (#20083)
* Embded geofency platform into component

* #20083: Change docstring for geofency device tracker platform
2019-01-16 10:33:25 +01:00
Rohan Kapoor
bc30491dc0 Add support for connecting to multiple zoneminder instances (#19955)
* Add support for connecting to multiple zoneminder instances

* Lint

* Lint

* Clean up and better error handling

* Fix config validation

* Lint
2019-01-16 10:15:13 +01:00
Tim Gerla
fe93ea9bdf Use the correct Unicode degree symbol (#20058)
The previous symbol used for degrees was U+00BA, the "Masculine Ordinal Indicator". This patch changes the symbol to U+00B0, "Degree Sign", to match the rest of the Home Assistant system.
2019-01-16 09:08:23 +01:00
Paulus Schoutsen
75fa9b2fba Fix TTS say config validation (#20145) 2019-01-16 09:07:32 +01:00
ehendrix23
78da6828f0 Reconnect and device name fix for harmony platform (#20108)
* Update requirements

Updated requirements

* Add attributes

Add firmware and config version attributes

* Small bump for aioharmony

Small version bump increase for aioharmony

* Fix requirements file

For some reason aioharmony ended up in there as a duplicate. Fixed it.

* Fix for send command with named device

* Update requirements to get reconnect fix

* Set aioharmony version to 0.1.4

Version 0.1.4 has additional small fixes.

* Keep trying to connect on startup

Keep trying to connect to the HUB on startup

* Revert rebase changes

Revert some changes that should have been reverted back as part of rebase.

* PlatformNotReady if unable to connect on startup

Will call PlatformNotReady if unable to connect to Hub on startup

* Increase aioharmony requirement to 0.1.5

Increase aioharmony requirement to 0.1.5

* Register callbacks when entity added to HASS

Register the callbacks only once the entity has been added to HASS instead of during setup of platform.

* Removed debug log in __init__

Removed debug log in __init__
2019-01-16 08:35:29 +01:00
Robert Svensson
19e19009cc Make all deCONZ platforms use a common base (#20137)
* Make all deconz platforms use a common base

* Fix one cover to device replacement too much...
2019-01-16 08:33:04 +01:00
Rohan Kapoor
1e784b4d7a #20043: Remove superfluous dict in WEBHOOK_SCHEMA validation 2019-01-15 22:26:42 -08:00
Anders Melchiorsen
c218757336 Accept both domains and entities in influxdb include (#19927)
* Accept both domains and entities in influxdb include

* Explicit test

* Remove lint
2019-01-15 16:20:51 -08:00
Fabian Affolter
25f6302813 Switch to ipapi.co (fixes #19846) (#19886)
* Switch to ipapi.co (fixes #19846)

* Fix name

* Update name
2019-01-15 16:18:57 -08:00
Alexei Chetroi
4b3d4b275e Zha light.turn_on service fixes. (#20085)
Set color only if light supports color mode.
Set color temp only light supports color temp.
Update entity's brightness only if Zigbee command to set the brightness
was sent successfuly.
2019-01-15 16:12:22 -08:00
Rohan Kapoor
f36755e447 Switch geofency tests to using an unauthenticated HTTP client (#20080) 2019-01-15 16:11:30 -08:00
Paulus Schoutsen
9fd21d20ae Fix loading translations for embedded platforms (#20122)
* Fix loading translations for embedded platforms

* Update doc string

* Lint
2019-01-15 16:06:04 -08:00
Paulus Schoutsen
cd6679eb5b Updated frontend to 20190115.0 2019-01-15 15:35:18 -08:00
Tommy Jonsson
1b79872dd6 Add notify.html5_dismiss service (#19912)
* Add notify.html5_dismiss service

* fix test

* add can_dismiss

* fix service data payload

* fix hasattr -> getattr

* fixes

* move dismiss service to html5

* fix services.yaml

* fix line to long
2019-01-15 15:31:57 -08:00
Morgan Kesler
732743aeb5 Missed one small comment 2019-01-15 17:27:56 -05:00
emontnemery
0ec1401be7 Minor refactoring of MQTT availability (#20136)
* Small refactor of MQTT availability

* Use dict[key] for required config keys and keys with default values.
2019-01-15 14:26:37 -08:00
Morgan Kesler
cc166bf6a7 Enable setting alarm mode night for arlo platform 2019-01-15 17:19:04 -05:00
starkillerOG
11602c1da0 Improve Philips Hue color conversion 2 (#20118)
* Add gamut capability to color util

* Include gamut in hue_test

* Improve Philips Hue color conversion

* correct import for new location hue.light

* include file changes between PR's

* update aiohue version

* update aiohue version

* update aiohue version

* fix hue_test

Now Idea why it failed compared to the previous time

* Include gamut in hue_test

* fix hue_test

* Try to test hue gamut conversion

supply a color that is well outside the color gamut of the light, and see if the response is correctly converted to within the reach of the light.

* switch from gamut A to gamut B for the tests.

* remove white space in blanck line

* Fix gamut hue test

* Add Gamut tests for the util.color

* fix hue gamut test

* fix hue gamut test

* Improve Philips Hue color conversion
2019-01-15 11:30:50 -08:00
Robert Svensson
a3f0d55737 Change deCONZ to embedded platforms (#20113)
Move all platforms into components/deconz
2019-01-15 19:29:56 +01:00
Adam Mills
336b6adc88 Split time_pattern triggers from time trigger (#19825)
* Split interval triggers from time trigger

* Default smaller interval units to zero

* Rename interval to schedule

* Rename schedule to time_pattern
2019-01-15 09:33:34 -08:00
emontnemery
5b53bd6aa0 Move MQTT platforms under the component (#20050)
* Move MQTT platforms under the component
2019-01-15 17:31:06 +01:00
Eliseo Martelli
5fd1053a38 fixed gtt to report isotime (#20128) 2019-01-15 13:39:43 +01:00
Rohan Kapoor
80bc42af4f Use voluptuous to perform validation for the geofency webhook (#20067)
* Use voluptuous to perform validation for the geofency webhook

* Add missing attribute to schema

* Lint
2019-01-15 12:50:09 +01:00
Fredrik Erlandsson
c8d885fb78 Fix tellduslive discovery and auth issues (#20023)
* fix for #19954, discovered tellsticks shows up to be configured

* fix for #19954, authentication issues

* updated tests

* move I/O to executer thread pool

* Apply suggestions from code review

Co-Authored-By: fredrike <fredrik.e@gmail.com>
2019-01-15 06:36:17 +01:00
Andrew Sayre
e73569c203 Added partial detection to async_add_job (#20119) 2019-01-14 15:08:44 -08:00
emontnemery
0f3b6f1739 Reconfigure MQTT lock component if discovery info is changed (#19468)
* Reconfigure MQTT lock component if discovery info is changed

* Use dict[key] for required config keys and keys with default config schema values.
2019-01-14 21:01:42 +01:00
Aaron Bach
af2949f85f Embed OpenUV platforms into the component (#20072)
* Embed OpenUV platforms into the component

* Updated CODEOWNERS

* Updated .coveragerc
2019-01-14 11:44:00 -07:00
Aaron Bach
b3886820b4 Embed SimpliSafe platforms into the component (#20069)
* Embed SimpliSafe platforms into the component

* Updated CODEOWNERS

* Updated .coveragerc
2019-01-14 11:42:48 -07:00
Aaron Bach
d717d9f6be Embed RainMachine platforms into the component (#20066)
* Embed RainMachine platforms into the component

* Updated CODEOWNERS

* Updated .coveragerc
2019-01-14 11:42:21 -07:00
Otto Winter
f225570980 Move ESPHome Source Files (#20092)
* Move ESPHome source files

* Update .coveragerc

* Update CODEOWNERS
2019-01-14 09:00:48 -07:00
Morten Lüneborg
e505a9b7b4 Fix ihc issues caused by update to defusedxml (#20091)
* Update __init__.py

* Update __init__.py
2019-01-14 13:12:57 +01:00
Aaron Bach
ef79566864 Adjust OpenUV integration for upcoming API limit changes (#19949)
* Adjust OpenUV integration for upcoming API limit changes

* Added fix for "Invalid API Key"

* Bugfix

* Add initial nighttime check

* Move from polling to a service-based model

* Fixed test

* Removed unnecessary scan interval

* Fixed test

* Moving test imports

* Member comments

* Hound

* Removed unused import
2019-01-14 13:12:06 +01:00
Alok Saboo
fff3cb0b46 Change return text code for alarm control panels (#20055)
* Change return text code for alarmdotcom

* Change return text code for ialarm

* Change return text code for IFTTT

* Change return text code for manual alarm panel

* Change return text code for manual MQTT alarm

* Change return text code for MQTT

* Change return text code for Simplisafe
2019-01-14 13:02:30 +01:00
shred86
5652a4a58b Bump abode to 0.15.0 (#20064)
Fix for motion sensor states
2019-01-14 13:01:59 +01:00
Thom Troy
cb9e0c03d5 fix logic error in dubln bus (#20075) 2019-01-14 10:51:37 +01:00
Paulus Schoutsen
d6d28dd3e9 Lowercase code format (#20077) 2019-01-14 10:49:38 +01:00
Ville Skyttä
eb610e6093 Upgrade pytest to 4.1.1 (#20088) 2019-01-14 10:05:24 +02:00
Spencer Oberstadt
7db28d3d91 Add Roku hub and remote (#17548)
* add roku remote component

* remove name config (for now)

* update coveragerc and requirements_all

* fix linting errors

* remove extra requirements entry

* fix flake8 errors

* remove some references to apple tv

* remove redundant REQUIREMENTS

* Update requirements_all.txt

* Pass hass_config to load_platform

* don't expose registry constant

* remove unnecessary registry list

* use await instead of add_job

* use ensure_list

* fix code style

* some review fixes

* code style fixes

* stop using async

* use add with update

* fix whitespace

* remove I/O from init loop

* move import
2019-01-14 08:44:30 +01:00
Rohan Kapoor
452d7cfd61 Return web.Response correctly 2019-01-13 17:07:45 -08:00
Rohan Kapoor
7f3871028d Split out gpslogger into a separate component and platform (#20044)
* Split out gpslogger into a separate component and platform

* Lint

* Lint

* Increase test coverage
2019-01-14 01:09:47 +01:00
Rohan Kapoor
e476949c3e Remove allow_extra 2019-01-13 13:35:13 -08:00
Rohan Kapoor
9036aafc81 Lint 2019-01-13 13:26:51 -08:00
Teemu R
2a2318b7f6 warning -> debug, this should not have been visible to users (#20061) 2019-01-13 21:31:08 +01:00
Rohan Kapoor
b75356d532 Validate test mode schema as well 2019-01-13 12:12:04 -08:00
Rohan Kapoor
0f92d061c4 Use voluptuous to validate the webhook schema 2019-01-13 11:49:20 -08:00
Austin Drummond
3b83a64f7c Add support for HomeKit Controller covers (#19866)
* Added support for HomeKit Controller covers

* removed copied code

* more linting fixes

* added device type to service info

* added checks for value in characteristics

* added state stopped parsing

* removed logger

* removed unused args

* fixed inits

* removed unused imports

* fixed lint issues

* fixed lint issues

* remove state_unknown

* remove validation of kwargs in homekit controller covers

* guarantee tilt position is not none before setting
2019-01-13 19:09:47 +01:00
Matt Snyder
db87842335 Show persistent notification on Doorbird schedule failure (#20033)
* Remove unnecessary return.
Add persistent notification on failure to configure doorbird schedule.

* Update doorbirdpy to 2.0.5

* Fix bare except

* Bump version again

* Lint

* Return false
2019-01-13 18:47:50 +01:00
Paulus Schoutsen
798f630029 Updated frontend to 20190113.0 2019-01-13 09:38:35 -08:00
Paulus Schoutsen
96b8c517f0 Update translations 2019-01-13 09:38:22 -08:00
Anders Melchiorsen
4af4b2d10e Fix remote.harmony_change_channel services.yaml indentation (#20051) 2019-01-13 16:39:50 +01:00
Otto Winter
2339cb05ad Fix errors in ESPHome integration (#20048)
* Fix Home Assistant State Import

* Fix cover state

* Fix fan supported features

* Fix typo
2019-01-13 15:52:23 +01:00
carstenschroeder
aae6ff830a ADS service: Enable use of templates for value (#20024) 2019-01-13 14:23:22 +01:00
Alok Saboo
1c11394f5f Change alarm panel code format (#20037)
* Change code format

* Update elkm1 code format

* Update alarmdecodes code_format

* Update alarmdotcom code_format

* Update concord232 code_format

* Update envisalink code_format

* Update ialarm code_format

* Update ifttt code_format

* Update manual alarm code_format

* Update manual mqtt code_format

* Update mqtt code_format

* Update ness code_format

* Update nx584 code_format

* Update satel_integra code_format

* Update simplisafe code_format

* Update verisure code_format

* Change text to be consistent with the Polymer PR
2019-01-13 11:59:12 +01:00
Ville Skyttä
162e2b8385 Upgrade pytest to 4.1.0 (#20013) 2019-01-13 08:56:26 +01:00
Caleb Dunn
e295ca7b8e update to pyunifi 2.16 (#20042)
* update to pyunifi 2.16

* update requirements to version 2.16
2019-01-13 08:56:05 +01:00
Rohan Kapoor
3e325a4ef9 Remove dead test code 2019-01-12 20:24:55 -08:00
Rohan Kapoor
0007f35f96 Lint 2019-01-12 19:23:19 -08:00
Rohan Kapoor
4e020b90e1 Switch locative to use the webhook component 2019-01-12 19:18:33 -08:00
ehendrix23
04636e9ba7 Add harmony service to remote services.yaml (#20031)
Added the harmony_change_channel service to services.yaml for remote component.
2019-01-12 20:15:27 +01:00
Sean Dague
218c82eaf3 mychevy: Fix wrong attribute on battery level selector (#20016)
The battery level sensor is broken because the logic for determining
if the battery is charged accessed the wrong variable. This one
character fix makes it work again.
2019-01-12 13:51:01 -05:00
ehendrix23
22c0733d8e Add service change_channel to Harmony component (#19649)
* Update requirements

Updated requirements

* Add attributes

Add firmware and config version attributes

* Small bump for aioharmony

Small version bump increase for aioharmony

* Order ATTR constants

* Add the service

Add service change_channel

* Fix requirements file

For some reason aioharmony ended up in there as a duplicate. Fixed it.

* Updates based on review
2019-01-12 19:02:00 +01:00
Robert Svensson
d3f2854c89 UniFi - Fix issue with POE switch reset switch config (#20021)
* Fix issue when controlling POE would reset configuration for all other ports on same device
2019-01-12 17:59:44 +01:00
carstenschroeder
eabc7b22cd Enable bool type for ADS service (#20011) 2019-01-12 16:36:50 +01:00
David F. Mulcahey
012e91f9b1 version bump for zha-quirks (#20019) 2019-01-12 15:21:30 +01:00
Jonathan Keljo
6395087a40 Upgrade greeneye_monitor to 1.0 (#19631)
* Upgrade greeneye_monitor to 1.0

This is a breaking change; it causes the `serial_number` field in
configuration to be treated as the full 8-digit serial number rather
than the last 5 digits as was previously done, which results in the unique
identifiers for the sensors being different. (Fixing them up in
`config/.storage/core.entity_registry` before rebooting into the updated
version seems to prevent any weirdness.)

The last-5-digits behavior was a result of me misunderstanding the packet
format docs and not realizing that the true serial number was split across
two fields. In addition to being confusing (see
https://community.home-assistant.io/t/brultech-greeneye-issues/86852), it
was technically incorrect. The `greeneye_monitor` platform was just introduced
in 0.82, so it seems like the kind of thing that's best to fix now while
adoption is relatively low rather than later when somebody runs into it
as more than just a point of confusion.

* Switch to 8-character string

* Coerce to int

* Remove now-unnecessary cast
2019-01-11 20:54:22 -08:00
Matt Snyder
b3580f46b9 Update doorbird events to include URLs on event_data (#19262)
* Update doorbird events to include URLs on event_data as shown in documentation.

(cherry picked from commit 2405bc96fe)

* Format timestamp

* Update timestamp

* Lint
2019-01-11 20:45:03 -08:00
Tommy Jonsson
3bdee57066 Support for html5 notifications to suggest their names (#19965)
* support for devices to suggest their names

* houndci fixes

* Lint
2019-01-11 20:44:29 -08:00
Thomas Delaet
2208563de4 catch TypeError's in addition to ValueError's for unifi direct device tracker (#19994)
* catch TypeError's in addition to ValueError's in response from unifi access point

sometimes unifi's access point returns incomplete json which results in a TypeError because ssid_table is None

* fix syntax error
2019-01-11 20:44:16 -08:00
Sriram Vaidyanathan
418fa226e6 'latest_dir' referenced before assignment (#19952)
* 'latest_dir' referenced before assignment

local variable 'latest_dir' referenced before assignment

* Better fix
2019-01-11 20:44:01 -08:00
David F. Mulcahey
ba21608042 Repackage ZHA component (#19989)
* move files

* rename files

* rename files

* move files

* relative import

* update coveragerc
2019-01-11 20:34:48 -08:00
Austin Drummond
7676b3fbe8 Add support for HomeKit Controller Locks (#19867)
* Added HomeKit Controller Lock

* cleaned up code according to standards

* fixed lint issues

* added private constant for jammed state

* removed state_unknown
2019-01-12 03:48:28 +01:00
Alexei Chetroi
5ab3c7b765 Don't set friendly_name in Zha entity. (#19991)
Use @property name instead of setting friendly_name device state attr.
2019-01-11 21:41:27 -05:00
Paulus Schoutsen
6cba51fd0e Lint 2019-01-11 16:31:16 -08:00
Louis-Etienne
fe148606b8 Wink: Update pubnubsub-handler version to make it compatible with python 3.7 (#19625) 2019-01-11 16:30:31 -08:00
Ville Skyttä
574669bd20 Upgrade pytest-cov to 2.6.1 (#19988) 2019-01-11 16:24:59 -08:00
Ville Skyttä
83c5dc67f7 Upgrade huawei-lte-api to 1.1.3 (#19987) 2019-01-11 16:24:31 -08:00
Paulus Schoutsen
2ffadde0a3 Add Hass.io user headers to supervisor proxy (#19395)
* Add Hass.io user headers to supervisor proxy

* Update test_http.py

* Fix tests

* Update test_auth.py
2019-01-11 15:30:40 -08:00
pbalogh77
7dac7b9e5e Support for multiple Fibaro gateways (#19705)
* Preparing for transition to config flow

Added multiple gateway support
Reworked parameter flow to platforms to enable multiple controllers
Breaking change to config, now a list of gateways is expected instead of a single config

* Updated coveragerc

Added new location of fibaro component

* Fixes based on code review and extended logging

Addressed issues raised by code review
Added extended debug logging to get better reports from users if the device type mapping is not perfect

* Changhes based on code review

Changes to how configuration is read and schemas
Fix to device type mapping logic

* simplified reading config

* oops

oops

* grr

grr

* change based on code review

* changes based on code review

changes based on code review
2019-01-11 15:29:54 -08:00
Rohan Kapoor
d820efc4e3 Split locative to a separate component (#19964)
* Split locative to a separate component

* Switch tests to use constants for http codes

* Fix tests
2019-01-11 15:14:11 -08:00
Paulus Schoutsen
8755389c49 Bumped version to 0.86.0.dev0 2019-01-11 15:10:01 -08:00
Paulus Schoutsen
11647f9fab Merge remote-tracking branch 'origin/master' into dev 2019-01-11 15:09:48 -08:00
Paulus Schoutsen
578bfe9798 Fix fail2ban tests 2019-01-11 15:01:24 -08:00
Bas
8c27bf8c7c Expose more information about shipments by PostNL (#18334)
* Expose more information about shipments by PostNL

* Update postnl.py
2019-01-11 14:59:31 -08:00
Andrew Chatham
ab4e1fddd5 Fix the anthemav component by removing a debugging line. (#19979)
This lane ended up calling vars(transport) on an asyncio Transport
object. In a standard setup, that's a python object provided by syncio,
and it works. Home Assistant injects uvloop into asyncio, which makes this
a Python C object, and those don't support vars().
2019-01-11 23:34:32 +01:00
Fredrik Erlandsson
b9a488912a Add support for 'via_hub' for device_info (#19454)
* Add support for 'via_hub'

* Update config schema

* add domain to via_hub

* add tests for via_hub
2019-01-11 13:11:13 -08:00
Matt Snyder
199db7219e Add ability to monitor relay events (#18730)
* Add ability to monitor relay events

* Account for empty events array instead of none.
2019-01-11 13:07:12 -08:00
Martin Hjelmare
937688f7a6 Add mysensors state update delay (#18891)
* Add mysensors state update delay

* Schedule state update after delay to avoid updating state multiple
  times during the same short timespan.

* Code review
2019-01-11 13:06:06 -08:00
Oliver
25408bd483 Include Scripts/ directory to .gitignore - this is created by virtualenv on Windows (#18918) 2019-01-11 13:04:56 -08:00
Mike Miller
a65d14c0cd Always use datetime and timedelta in camera.proxy instead of int/float (#19571) 2019-01-11 12:58:14 -08:00
Paulus Schoutsen
12d16d9bdc Update test_auth.py 2019-01-11 12:55:23 -08:00
Antoine GRÉA
14dd8791ec Adding IPv6 to fail2ban sensor (#19457)
* Fixing fail2ban regex for ipv6

* Adding IPv6 tests for fail2ban

* Formating code for hound

* Formating again

* Formating again 2
2019-01-11 12:54:47 -08:00
Paulus Schoutsen
088584b66d Merge pull request #19986 from home-assistant/rc
0.85.1
2019-01-11 12:41:00 -08:00
Paulus Schoutsen
963ffa1ccc Bumped version to 0.85.1 2019-01-11 12:06:12 -08:00
Paulus Schoutsen
990e7c57f2 Fix warning (#19946)
* Fix warning

* Update service.py
2019-01-11 12:05:56 -08:00
Daniel Shokouhi
0979ce476a Fix botvac connected alert retrieval 2019-01-11 12:05:07 -08:00
Alexei Chetroi
ded37d971d Don't map LevelControl to light for single cluster devices. (#19929) 2019-01-11 11:58:41 -08:00
David F. Mulcahey
7a83b86ebd check config instead of config_entry for quirks flag (#19730) 2019-01-11 11:58:40 -08:00
Paulus Schoutsen
8ef2f1f67b Fix warning (#19946)
* Fix warning

* Update service.py
2019-01-11 11:58:14 -08:00
Paulus Schoutsen
99c2e4ac44 Fix warning (#19946)
* Fix warning

* Update service.py
2019-01-11 11:52:07 -08:00
Paulus Schoutsen
fe92cf1e72 Updated frontend to 20190109.1 2019-01-11 11:48:49 -08:00
Paulus Schoutsen
7dbbea2238 Updated frontend to 20190109.1 2019-01-11 11:48:32 -08:00
David F. Mulcahey
7be015fcc6 Add services and helper functions to support a config panel for ZHA (#19664)
* reconfigure zha device service

add log line to reconfigure service for consistency

* add entity functions to support new services

* added new services and web socket api and split them into their own module

* support manufacturer code

logging to debug

get safe value for manufacturer

* update services.yaml

* add comma back

* update coveragerc

* remove blank line

* fix type

* api cleanup - review comments

* move static method to helpers - review comment

* convert reconfigure service to websocket command - review comment

* change path

* fix attribute
2019-01-11 11:34:29 -08:00
Paulus Schoutsen
a8f22287ca Allow embedded platforms (#19948)
* Allow embedded platforms

* Fix test
2019-01-11 11:30:22 -08:00
Jarle B. Hjortand
b3a08d5876 When tradfri experience communication errors make the lights/devices unavailable. (#19288) 2019-01-11 10:55:55 -08:00
Sebastian Muszynski
e2f55a959f Support next generation of the Xiaomi Mi Smart Plug (chuangmi.plug.m3) (#19972)
* Support next generation of the Xiaomi Mi Smart Plug (chuangmi.plug.m3)

* Fix indent
2019-01-11 19:44:55 +01:00
Paulus Schoutsen
b81260e912 Fix tests 2019-01-11 10:10:36 -08:00
Paulus Schoutsen
7be197b845 Update test_http.py 2019-01-11 10:00:38 -08:00
Paulus Schoutsen
fd21d6cc9d Add Hass.io user headers to supervisor proxy 2019-01-11 10:00:38 -08:00
Paulus Schoutsen
3f65a03024 Merge pull request #19959 from home-assistant/awarecan-trusted-network-auth-must-have-user
Trusted Network Auth: only authenticate request when owner can be found
2019-01-11 09:53:35 -08:00
Paulus Schoutsen
82c6d3d8c2 Add support for spot cleaning that was introduced in pybotvac 0.12 (#19857)
* Added support for spot cleaning that was introduced in pybotvac 0.12.

* Corrected formating.

* Added missing operator.
2019-01-11 09:52:06 -08:00
Eliseo Martelli
71eaef8da4 add service type in name (#19980) 2019-01-11 09:51:41 -08:00
Paulus Schoutsen
d812f23f6b min_max sensor support for STATE_UNAVAILABLE (#19914) 2019-01-11 09:27:48 -08:00
Sören Oldag
17dce6697f Add support for restoring state to rpi_gpio_pwm (#19944) 2019-01-11 09:25:14 -08:00
Fabian Affolter
49cfebd903 Upgrade keyring to 17.1.1 (#19962) 2019-01-11 10:48:07 -05:00
Fabian Affolter
2228f2ef66 Upgrade pysnmp to 4.4.8 (#19961) 2019-01-11 10:47:53 -05:00
Fabian Affolter
734d8c52e9 Upgrade ruamel.yaml to 0.15.85 (#19960) 2019-01-11 07:44:11 -08:00
Fabian Affolter
caf0751be8 Upgrade pillow to 5.4.1 (#19958) 2019-01-11 12:37:15 +01:00
Fabian Affolter
7b81727c69 Upgrade mutagen to 1.42.0 (#19956) 2019-01-11 10:38:39 +01:00
Jason Hu
97394df0b9 Only authenticate request when owner can be found 2019-01-11 00:26:25 -08:00
Tyler Page
c3e9bd1444 Change state() to try/except to catch KeyError (#19935)
* Change state() to try/except to catch KeyError

When Tautulli is up but Plex is down, the API doesn't return a 'stream_count' key. This causes calls to state() to raise KeyError exceptions. The new code includes a try/except to catch the KeyError and return -1 signifying that the Tautulli API cannot talk to Plex

* Update tautulli.py
2019-01-11 08:48:36 +01:00
mindigmarton
31d92683f7 Add emulated_roku component (#17596)
* Add emulated_roku component

* Add emulated_roku config tests

* Fix emulated_roku test dependencies

* Remove emulated_roku yaml support, add tests

* Add yaml support, simplify config flow

* Improve emulated_roku code quality

* Fix emulated_roku translation, improve code quality

* Fix emulated_roku translation

* Bump emulated_roku to 0.1.6 to fix SSDP discovery

* Bump emulated roku to 0.1.7, refactor component start/stop methods
2019-01-11 03:20:35 +01:00
Thomas Hervé
cee51ecb2b Remove spurious libzwave error (#19928)
If a network_key is not configuired, the following error is logged:
TypeError: expected bytes, NoneType found
Exception ignored in: 'libopenzwave.str_to_cppstr'
TypeError: expected bytes, NoneType found

We don't need to set the key if it's None, let's skip in that case.
2019-01-10 17:45:50 -08:00
Paulus Schoutsen
646aaab936 Fix botvac connected alert retrieval (#19937) 2019-01-10 17:43:50 -08:00
Fabian Affolter
4c1eeb9e96 Upgrade pylast to 3.0.0 (#19938) 2019-01-10 17:43:31 -08:00
Abílio Costa
ca460ace5d Small refactoring for the alexa component (#19782)
* small refactoring

* fix tests
2019-01-10 17:39:49 -08:00
Kevin Fronczak
2be0d1b096 Upgrade blinkpy and use calibrated temperature for sensor (#19723) 2019-01-10 17:24:35 -08:00
Sergey Rymsha
47f64b472d Add nad telnet (#19704)
* fix cla-bot

* fix bug introduced after linter complaint

* merge two components into one
support telnet port configuration

* remove obsolete nadtcp component. nad component must be used instead.

* back to correct nad_receiver version
2019-01-10 17:21:57 -08:00
SNoof85
96d20a64d5 add_entities -> async_add_entities (#19943)
Better state handling at HA startup
2019-01-10 17:13:29 -08:00
arigilder
4d187e08d4 Add sensors to jewish_calendar for upcoming Shabbat times (#19278)
* Initial pass of cleanup for shabbat_times

* Switch to async defs

* First pass of unit tests + fixture data

* Completion of first round of unit tests, 100% passing

* Unit tests for state restoring

* Style fixes

* More style fixes

* Lint fix

* Add upcoming candelighting and havdalah sensors

* Add unit tests, remove havdalah offset

* More unit tests + small bugfix for weekly_portion

* Add issur melacha sensor

* Remove old shabbat_times work-in-progress files

* Bump required version of hdate

* Add havdalah offset config parameter

* Bump hdate version required

* Pin hdate requirement

* Lint fixes

* Changes based on review + API changes for hdate 0.8.7

* Add three-day holiday unit tests

* Remove debugging line

* Add missing docstring

* Fix doc lint comment
2019-01-10 16:27:34 -08:00
so3n
4d52adb008 Remove Discovery dependency from konnected.py (#19910) 2019-01-10 15:53:12 -08:00
Abílio Costa
6c29315088 Add Alexa's EndpointHealth reporting (#19784)
* add Health reports

* add health report for all devices

* update tests

* Update homeassistant/components/alexa/smart_home.py

Co-Authored-By: abmantis <abmantis@users.noreply.github.com>

* lint

* add tests
2019-01-10 15:52:21 -08:00
Daniel Shokouhi
6403a13ea3 Fix botvac connected alert retrieval 2019-01-10 13:56:10 -08:00
Fabian Affolter
de76b59d0b Upgrade youtube_dl to 2019.01.10 2019-01-10 22:50:39 +01:00
Clifford W. Hansen
616f23ae1d Add btle_name attribute to devices (#19915)
* Update googlehome.py

Added name from bluetooth device to attributes

* Update homeassistant/components/device_tracker/googlehome.py

Check if key exists before assigning name

Co-Authored-By: cliffordwhansen <clifford@nighthawk.co.za>
2019-01-10 21:55:17 +01:00
Alexei Chetroi
d859c3fa86 Don't map LevelControl to light for single cluster devices. (#19929) 2019-01-10 14:43:24 -05:00
Richard Mitchell
e753ffca94 Correctly map Nest hvac_state to Home Assistant states. (#19895) 2019-01-10 09:28:01 -08:00
Roy Duineveld
c44f5d31ef Plant monitor defaults (#19891)
* Plant monitor defaults

* houndci-bot fixes
2019-01-10 15:49:13 +01:00
Jérôme Wiedemann
e6a2c18430 min_max sensor support for STATE_UNAVAILABLE 2019-01-10 13:48:24 +01:00
Artem Tokarev
8b49ecbe7d Removed mkdir, If the WORKDIR doesn’t exist, it will be created. (#19892) 2019-01-10 07:18:59 +01:00
Aaron Bach
01eee52990 Bump pyflunearyou to 1.0.1 (#19899) 2019-01-09 19:38:19 -07:00
Paulus Schoutsen
70a8cac19d Merge pull request #19897 from home-assistant/rc
0.85.0
2019-01-09 16:51:11 -08:00
Paulus Schoutsen
9aed40a88d Update translations 2019-01-09 15:29:31 -08:00
Paulus Schoutsen
7641658e38 Bumped version to 0.85.0 2019-01-09 15:13:29 -08:00
Florian Ludwig
8cf595dd3e assign user to websocket connection when using legacy_api_password (#19797) 2019-01-09 15:13:13 -08:00
Paulus Schoutsen
f17d6c0593 Updated frontend to 20190109.0 2019-01-09 15:12:52 -08:00
Paulus Schoutsen
5cab319798 Updated frontend to 20190109.0 2019-01-09 15:12:29 -08:00
Rendili
4394e37df9 Bug fix with getting a device battery level when API unavailable for Hive (#19841)
* hive updates - bug fix and add entity registration

* remove hive entity registration code
2019-01-09 11:21:03 +01:00
Paulus Schoutsen
64b4c8f43a Fix deprecation warning (#19882) 2019-01-08 21:09:47 -08:00
Paulus Schoutsen
a3d05328ec Refactor motion sensor of the xiaomi_aqara platform (#19805)
* Refactor motion sensor

* Improve debug output
2019-01-08 20:48:09 -08:00
Rohan Kapoor
2bdbf6955d Migrate geofency over to the Webhook component (#18951)
* Migrate geofency over to the Webhook component

* Return web.Response correctly

* Fix test

* Lint

* Fix error that tests caught
2019-01-08 20:47:05 -08:00
Florian Ludwig
23382ab199 assign user to websocket connection when using legacy_api_password (#19797) 2019-01-08 20:45:24 -08:00
Paulus Schoutsen
8a3d43745d Bumped version to 0.85.0b1 2019-01-08 20:23:59 -08:00
Pascal Vizeli
6b56985e01 Update OZW to 0.1.2 (#19878)
* Update ozw 0.1.2

* Update requirements_all.txt
2019-01-08 20:23:49 -08:00
Steven Looman
ed41421a3d Fix error when trying to log used UPnP device, if multiple found (#19875) 2019-01-08 20:23:49 -08:00
Alistair Galbraith
f019131352 Resolves #17196, Resolves #18739 - Hue Beyond light fixture errors (#19874)
* Resolves #17196, Resolves #18739 - Hue Beyond light fixtures being incorrectly recognized

* Removed long code lines that were failing code review

* Removed trailing whitespace
2019-01-08 20:23:48 -08:00
Otto Winter
4ec313cb3b Bump aioesphomeapi (#19838) 2019-01-08 20:23:47 -08:00
Fredrik Erlandsson
68e33fdbf5 fixes #19814, Daikin config setting (#19823) 2019-01-08 20:23:47 -08:00
cdheiser
312ad7057d Fix a bug in Lutron RadioRA2 Scene support (#19819) 2019-01-08 20:23:46 -08:00
cdce8p
0d49b19624 Update HAP-python to 2.4.2 (#19776)
* Bugfixes for connection issues
2019-01-08 20:23:46 -08:00
Otto Winter
6d9c37d636 Fix some ESPHome race conditions (#19772)
* Fix some ESPHome race conditions

* Remove debug

* Update requirements_all.txt

* 🚑 Fix IDE line length settings
2019-01-08 20:23:45 -08:00
Sebastian Muszynski
ed881f399f Don't slugify unique id (#19770) 2019-01-08 20:23:45 -08:00
Sebastian Muszynski
3a466195b9 Simplify data_key for a stable unique_id because the order of the dict will not be preserved (Closes: #13522) (#19766) 2019-01-08 20:23:44 -08:00
Alexei Chetroi
3453d31f01 Use manufacturer id only for configure_reporting only when specified. (#19729) 2019-01-08 20:23:44 -08:00
Eliseo Martelli
afa0d37ff0 Rename air pollutants to air quality (#19448)
* mv component folder

* moved in airquality

* changed names in files

* renamed test init

* renamed test air quality

* renamed in tests

* renamed coverage

* fixed naming

* corrected attr names

* changed attr names
2019-01-08 20:23:43 -08:00
Otto Winter
57c96a5489 Add ESPHome native API discovery (#19399)
* ESPHome discovery

* Add note about netdisco

* 🔡

* Address comments

* Bump netdisco to 2.3.0

* Update requirements_all.txt
2019-01-08 20:21:31 -08:00
Rendili
6d9fda04ac add entity support to hive (#19879) 2019-01-08 20:15:12 -08:00
Pascal Vizeli
b4c657a39c Update OZW to 0.1.2 (#19878)
* Update ozw 0.1.2

* Update requirements_all.txt
2019-01-08 20:14:27 -08:00
Alistair Galbraith
35cb0458fa Resolves #17196, Resolves #18739 - Hue Beyond light fixture errors (#19874)
* Resolves #17196, Resolves #18739 - Hue Beyond light fixtures being incorrectly recognized

* Removed long code lines that were failing code review

* Removed trailing whitespace
2019-01-08 20:13:47 -08:00
Malte Franken
6d3343e4d1 Geo Location -> Geolocation (class names and unit test comments) (#19877)
* fixed geolocation naming in class names

* fixed geolocation naming in comments in unit test
2019-01-08 20:11:51 -08:00
Thomas Lovén
f73bda1218 Allow other icon prefixes than mdi: (#19872) 2019-01-08 20:08:20 -08:00
Pierre
c29bffc8d8 Replace influxdb query by another query that is more lightweight (#19880)
same as #6289
2019-01-08 23:31:39 +00:00
Steven Looman
cc6e70a270 Fix error when trying to log used UPnP device, if multiple found (#19875) 2019-01-08 21:05:36 +00:00
Lars Lydersen
42821b5f64 Added missing operator. 2019-01-08 21:12:35 +01:00
Lars Lydersen
c164533404 Corrected formating. 2019-01-08 20:36:57 +01:00
David F. Mulcahey
acdf9c7ce2 Relay events for onoff and levelcontrol output clusters in ZHA (#19863)
* auto relay events for onoff and levelcontrol output clusters

* fix docstring

* correct copy/paste failure - review comment

* add space - review comment
2019-01-08 17:20:50 +01:00
emontnemery
0cea54cea1 Cleanup if discovered mqtt climate can't be added (#19739)
* Cleanup if discovered mqtt climate can't be added
2019-01-08 16:53:02 +01:00
emontnemery
203701bc7c Cleanup if discovered mqtt fan can't be added (#19741)
* Cleanup if discovered mqtt fan can't be added
2019-01-08 16:51:03 +01:00
emontnemery
44f6151548 Cleanup if discovered mqtt alarm can't be added (#19742)
* Cleanup if discovered mqtt alarm can't be added
2019-01-08 16:49:47 +01:00
emontnemery
1a5fe3d880 Cleanup if discovered mqtt cover can't be added (#19743)
* Cleanup if discovered mqtt cover can't be added
2019-01-08 16:48:42 +01:00
emontnemery
a62e514d8f Merge pull request #19744 from emontnemery/mqtt_discovery_cleanup_binary_sensor
Cleanup if discovered mqtt binary_sensor can't be added
2019-01-08 16:47:36 +01:00
emontnemery
f0f386e314 Cleanup if discovered mqtt sensor can't be added (#19745)
* Cleanup if discovered mqtt sensor can't be added

* No bare except

* Clear ALREADY_DISCOVERED list with helper
2019-01-08 16:46:26 +01:00
emontnemery
bb37cf906c Cleanup if discovered mqtt lock can't be added (#19746)
* Cleanup if discovered mqtt lock can't be added
2019-01-08 16:45:38 +01:00
Fabian Affolter
406b45c6e7 Upgrade bcrypt to 3.1.5 (#19854) 2019-01-08 09:22:45 -05:00
kennedyshead
377b129c9c Make asuswrt sensor optional (#19736) @kennedyshead
* Dont load if not in config

* Adding config options for sensors

* Fixed mistake with iterating over wrong things

* lint

* lint

* Setting None state

* Using .get when fetching optional config
2019-01-08 09:14:16 -05:00
Rene Nulsch
410f19c777 Replace MyChevy persistant_notification with error log entry (#19804)
The mychevy service is notoriously unreliable, often only having 50% uptime. 
Previously a persistent notification was emitted when the platform errored out. 
Users have found that is happening too often, so instead log an error when
this happens instead.
2019-01-08 08:06:08 -05:00
Malte Franken
4bbfc04f5e Geo Location -> Geolocation (comments and default group name) (#19865)
* fixed geolocation naming in comments

* fixed geolocation naming in default group name

* fixed link to documentation (after https://github.com/home-assistant/home-assistant.io/pull/8086)
2019-01-08 11:24:57 +01:00
kennedyshead
c7a32e59b7 Fix state and attribute fetching in vasttrafik (#19856)
* Fixing state and attribute fetching

* Fixing state and attribute fetching

* Setting None state

* Need to brreak loop
2019-01-08 09:54:22 +01:00
emontnemery
fb9aad8791 Small cleanup of MQTT light (#19816)
* Small refactor of MQTT light removing unused variable
2019-01-08 07:21:26 +01:00
Fabian Affolter
493d2743ba Merge pull request #19853 from home-assistant/upgrade-beautifulsoup4
Upgrade beautifulsoup4 to 4.7.1
2019-01-08 00:13:50 +01:00
Fabian Affolter
f259c5724b Upgrade holidays to 0.9.9 (#19851) 2019-01-08 00:13:33 +01:00
Vincent KHERBACHE
ea8bb28d21 Fix french Amazon Polly voice 'Léa'. (#19852)
The accent must be removed (Léa -> Lea) just like the other voices (eg. Celine, Peneloppe) to match with Amazon voices ID. 
Fun fact: there is no alternative name for "Léa" on Amazon Polly documentation: https://docs.aws.amazon.com/en_us/polly/latest/dg/voicelist.html, probably just omitted.
Mitigation: alternative voices (with and without accents) can be put into `SUPPORTED_VOICES`, both `voice.get('Id')` and `voice.get('Name')` must be then checked for a match.
This fixes #19802.
2019-01-08 00:13:09 +01:00
Lars Lydersen
8aa136f7ed Added support for spot cleaning that was introduced in pybotvac 0.12. 2019-01-07 20:03:22 +01:00
Fabian Affolter
4905f4dd97 Upgrade beautifulsoup4 to 4.7.1 2019-01-07 19:16:04 +01:00
koomik
45fae5a50e Upgrade tahoma-api to 0.0.14 (#19840)
* Update requirements_all.txt

Change to tahoma-api 0.0.14 to solve #19542 
https://github.com/home-assistant/home-assistant/issues/19542

* Update tahoma.py
2019-01-07 19:02:42 +01:00
Fabian Affolter
2eec2cc656 Upgrade holidays to 0.9.9 2019-01-07 19:00:03 +01:00
Mickaël Schoentgen
a57aae9891 Fix 2 ResourceWarning: unclosed file in test_ruamel_yaml.py (#19780)
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
2019-01-07 11:53:31 -05:00
Sean Dague
9cdfa77a21 bump watefurnace version to 1.1.0 (#19847)
There is better retry logic in the new library to handle login faults.
2019-01-07 11:36:02 -05:00
sander76
0af635e8d7 adding more dimmer components (#19843)
* adding more dimmer components

* updated library version

* updated requirements_test_all
2019-01-07 11:32:28 -05:00
emontnemery
08ac6da8a6 Clear ALREADY_DISCOVERED list with helper 2019-01-07 17:03:10 +01:00
emontnemery
8701be095b No bare except 2019-01-07 17:03:10 +01:00
emontnemery
0b57cfb004 Cleanup if discovered mqtt sensor can't be added 2019-01-07 17:03:10 +01:00
emontnemery
ddeb7f3bea Clear ALREADY_DISCOVERED list with helper 2019-01-07 17:00:03 +01:00
emontnemery
44c619a853 No bare except 2019-01-07 17:00:03 +01:00
emontnemery
d8370f44cb Cleanup if discovered mqtt binary_sensor can't be added 2019-01-07 17:00:03 +01:00
emontnemery
dd75c49796 Cleanup if discovered mqtt switch can't be added (#19721)
* Cleanup if discovered mqtt switch can't be added
2019-01-07 16:57:51 +01:00
Sebastian Muszynski
8b232e7ce6 Simplify data_key for a stable unique_id because the order of the dict will not be preserved (Closes: #13522) (#19766) 2019-01-07 13:36:16 +01:00
Fredrik Erlandsson
3c465434cd fixes #19814, Daikin config setting (#19823) 2019-01-07 13:04:53 +01:00
Otto Winter
e30c324b32 Bump aioesphomeapi (#19838) 2019-01-07 11:58:10 +01:00
Daniel Shokouhi
903c86a116 Bump pybotvac (#19831)
* Bump pybotvac to support No Go lines

* Update requirements
2019-01-06 23:58:36 +01:00
kennedyshead
c96778c82a This makes the vasttrafik platform stop spamming the logs with warnings (#19792)
* This makes the vasttrafik platform stop spamming the logs with warrnings

* Forcing build
2019-01-06 21:06:20 +01:00
Rene Nulsch
1e18a2c679 Remove temperature from the list of available forecast sensors (#19818) 2019-01-06 20:52:55 +01:00
Tommy Jonsson
5b35317e1e [3/3] mqtt-vacuum device-registry (#19479)
* add device registry to mqtt-vacuum
2019-01-06 19:23:33 +01:00
cdheiser
bf4830bc07 Fix a bug in Lutron RadioRA2 Scene support (#19819) 2019-01-06 19:25:09 +02:00
Johann Kellerman
3ffa0176cc SMA sensor - updated library (#19753) 2019-01-06 19:20:19 +02:00
Tommy Jonsson
ccbc231d3a [2/3] vacuum mqtt-discovery (#19478)
* add discoverability to mqtt-vacuum
2019-01-06 17:05:04 +01:00
Tommy Jonsson
dee229152f [1/3] Refactor mqtt-vacuum in preparation for discovery and device registry (#19462)
* Refactor mqtt-vacuum in preparation for discovery and device registry
2019-01-06 14:16:46 +01:00
emontnemery
76c30aca38 Remove duplicated MQTT switch test case (#19799) 2019-01-06 06:27:57 +01:00
Mattias Welponer
3d0c3ab746 HomematicIP update version to 0.10.1 (#19788)
* Update version to 0.10.1

* Update of requirements files
2019-01-05 16:25:36 -07:00
Sebastian Muszynski
32faf5b709 Improve debug output 2019-01-05 22:39:02 +01:00
Sebastian Muszynski
09ff272290 Refactor motion sensor 2019-01-05 22:31:41 +01:00
Eliseo Martelli
3a5ba77e04 Rename air pollutants to air quality (#19448)
* mv component folder

* moved in airquality

* changed names in files

* renamed test init

* renamed test air quality

* renamed in tests

* renamed coverage

* fixed naming

* corrected attr names

* changed attr names
2019-01-05 11:42:36 -05:00
Otto Winter
68723730a7 Add ESPHome native API discovery (#19399)
* ESPHome discovery

* Add note about netdisco

* 🔡

* Address comments

* Bump netdisco to 2.3.0

* Update requirements_all.txt
2019-01-05 16:00:07 +01:00
Sören Oldag
0125b3fd80 Upgrade pwmled to 1.4.0 (#19783) 2019-01-05 08:05:37 -05:00
Austin Drummond
fb5b5223fb Added zwave lock state from alarm type workaround (#18996)
Thank you 👍 

* added zwave lock state from alarm type workaround

* fixed test indents

* more linting fixes

* one more linting fix

* simplified logic

* fixed lint new lines

* fixed merge conflict issue

* fixed definition of _alarm_type_workaround in zwave lock
2019-01-05 09:59:43 +01:00
keesak
aacf7ba9aa Add support for Kwikset 914 Convert - lock.zwave id0446 (#19710) (#19722)
Thank you 👍
2019-01-05 09:48:40 +01:00
cdce8p
bf29824dac Update HAP-python to 2.4.2 (#19776)
* Bugfixes for connection issues
2019-01-04 22:37:42 +01:00
sander76
a1cb4018a1 update powerview scene component to latest api. (#19717) 2019-01-04 22:19:06 +01:00
Otto Winter
c7700ad11c Fix some ESPHome race conditions (#19772)
* Fix some ESPHome race conditions

* Remove debug

* Update requirements_all.txt

* 🚑 Fix IDE line length settings
2019-01-04 22:10:52 +01:00
Alexei Chetroi
ed8f89df74 Use manufacturer id only for configure_reporting only when specified. (#19729) 2019-01-04 16:05:37 -05:00
Sebastian Muszynski
65c7bdc1ad Don't slugify unique id (#19770) 2019-01-04 16:02:42 -05:00
Austin Drummond
bf40bea965 Support for Homekit controller/alarm control panel (#19612)
* added support for homekit security systems

* fixed linting issues

* fixed indentation issues

* simplifired logic on homekit_controller alarm controller panel

* cleaned up battery level const on homekit controller alarm control panel
2019-01-04 12:54:37 -07:00
David F. Mulcahey
ef180c489a check config instead of config_entry for quirks flag (#19730) 2019-01-04 14:00:26 -05:00
Paulus Schoutsen
6fb8378b45 Bumped version to 0.85.0b0 2019-01-04 13:47:02 -05:00
Maciej Bieniek
27a9f5a05c Round illumination and lux value to one (#19747) 2019-01-04 18:25:37 +01:00
Daniel Høyer Iversen
16ab799798 Upgrade tibber library (#19768) 2019-01-04 17:59:46 +01:00
Sean Dague
03488af3fb Add mychevy optional country parameter (#19727)
* Add optional country parameter

mychevy 1.2.0 provides the ability to work in canada as well as the us
(there are different service urls for each region). This creates a new
config option to enable it.

* Update mychevy.py
2019-01-04 10:01:47 -05:00
Dan Cinnamon
dbb3802b4e Move envisalink component to package and add services.yaml (#19731)
* Moved component to a package and added a services.yaml file.

* Fixing coverage issue and grammar issue on the services.yaml file.

* Fixed typo in the services.yaml file.
2019-01-04 09:57:32 -05:00
Abílio Costa
ead38f6005 Proactive Alexa ChangeReport messages (#18114)
* Alexa: implement auth and proactive ChangeReport messages

* refactor after rebase from dev to use the new AlexaDirective and Response classes

* move to aiohttp; cleanup

* better function name

* move endpoint to config

* allow passing token function

* remove uneeded state get

* use iterable directly

Co-Authored-By: abmantis <abmantis@users.noreply.github.com>

* missing delete from previous commit

* checks for when user has no auth config

* update cloud component

* PR suggestions

* string lint

* Revert "string lint"

This reverts commit a05a1f134c9ebc7a6e67c093009744f142256365.

* linters are now happier

* more happy linters

* use internal date parser; improve json response handling

* remove unused import

* use await instead of async_add_job

* protect access token update method

* add test_report_state

* line too long

* add docstring

* Update test_smart_home.py

* test accept grant api

* init prefs if None

* add tests for auth and token requests

* replace global with hass.data

* doc lint
2019-01-03 22:28:43 +01:00
Rohan Kapoor
c2525bede2 Filter urllib3.connectionpool warnings in camera.axis and camera.zoneminder (#19641)
* Filter urllib3.connectionpool warnings in camera.axis and camera.zoneminder

* Lint
2019-01-03 11:56:36 -07:00
carstenschroeder
b79057348d Add exception handling to ADS shutdown (#19682)
* Added exception handling to ADS shutdown

* corrected whitespaces

* deleted blank line
2019-01-03 11:47:16 -07:00
ctborg
6b18b92bdd Drop bme680 os_lookup for temp_offset (#19733)
Drops os_lookup, as it isn't needed to set the temperature offset.
2019-01-03 11:35:13 -07:00
Adam Belebczuk
ada0f7cf65 Fix WeMo incorrect mapping of device type during discovery (#19691) 2019-01-03 11:28:40 -07:00
Andrew Hayworth
87a0118082 Do not choke on no awair data (#19708)
* awair: do not choke on no data

The awair API returns an empty response for various air data queries
when a device is offline. The underlying library (python_awair) does
not directly inform us that a device is offline, since we really can
only infer it from an empty response - there is no online/offline
indicator in the graphql API.

So - we should just ensure that we do not attempt to update device state
from an empty response. This ensures that the platform does not crash
when starting up with offline devices, and also ensures that the
platform is marked unavailable once devices go offline.

* Fix typo

Further proof that coding after 10pm is rolling the dice.
2019-01-03 14:41:18 +01:00
ctborg
688bdc6532 Adds ability to calibrate temperature for BME680 (#19684)
* Adds temperature calibration

* Add deps.  Lint fix
2019-01-02 13:02:29 -05:00
kennedyshead
bba9ef7d7d Bumping aioasuswrt version to 1.1.17 (#19714) 2019-01-02 07:55:09 -05:00
mvn23
635252ec8e Bump pyotgw to 0.4b1 (#19715) 2019-01-02 07:54:23 -05:00
Dan Cinnamon
a10ca95c01 Envisalink pgm (#19499)
* Added a new service for calling custom PGM functions.

* Fixed lint issues

* Fixed lint issues reported by travis-CI

* Fixed style issue.

* Complete rename of attribute.
2019-01-02 05:46:33 -07:00
Daniel Perna
4244ea78d0 Update pyhomematic 0.1.54 + small fixes (#19667)
* Update pyhomematic + small fix

* Add casting for ILLUMINATION

* Revert suggested fix
2019-01-01 16:25:57 +01:00
Nick Whyte
5aa2bd81cf Add ness alarm control panel using nessclient (#18463)
* Add ness alarm control panel using nessclient

* indenting

* .

* Remove availability functionality, will improve and add back in another PR

* Use call_count

* lint

* lint

* Review changes

* Lint

* Bump nessclient to 0.9.8

* Bump nessclient to 0.9.9

* Remove from .coveragerc
2019-01-01 08:08:13 -07:00
Daniel Chesterton
61d5b3028d Add support for color_temp_command_template in MQTT light component (#19675)
* Add support for color_temp_command_template in MQTT light component
2019-01-01 15:42:41 +01:00
javicalle
b9f4a7220e Improve rflink coverage (#19596)
* some minor tests refactor
* async/await refactor
* toggle have not brightness
* test for race condition in unknown device
* test for 'no_command' and 'not_connected'
* test for race condition in unknown device
* sensor events are handled in sensor devices, RflinkDevice handle
command events
* test race conditions & bogus entity remove
* two more tests
* Test race condition for unknown components
* Test cleanup for `commands events` and `sensor events`
2019-01-01 15:35:31 +01:00
Fabian Affolter
2ea53e0787 Suppress traceback if network is not available (#19651) 2019-01-01 14:21:46 +01:00
Fabian Affolter
7c302bfd7e Luftdaten traceback (#19666)
* Suppress traceback if there is not connection available

* Remove line break
2019-01-01 14:21:02 +01:00
Robin
ff80fc347b Fix london_underground issue (#19642)
* Update london_underground.py

* Update test

* Update london_underground.py

* Update london_underground.py

* Update london_underground.py

* Fix lint

* Use london-tube-status==0.2
2018-12-31 06:24:52 -08:00
Michael Dubno
4b541f4058 Add IDTECK proximity card component (#18309)
* Added IDTECK proximity card sensor component.

* Moved from sensor to platform

* Made requested standards changes
2018-12-30 20:15:45 -08:00
Jc2k
855274e354 Fix homekit_controller pairing regression (#19654)
* Fix homekit_controller pairing regression

* Use constant for pairing file name
2018-12-30 14:44:26 -05:00
ehendrix23
43eaa960e8 Fix error in got_connected for remote.harmony (#19662)
* Fix config call in connected

* Change aioharmony version for fixes
2018-12-30 13:35:08 -05:00
Thom Troy
81a0ce621e Fix exception checking for next dublin bus (#19663) 2018-12-30 18:35:12 +01:00
Pär Svanström
18d36e011a Added regexp validation allowing Twilio notifications to use Sender ID instead of phone number (#19644)
* Added regexp validation allowing Twilio notifications to use Sender ID instead of phone number

* Fix line length
2018-12-30 18:34:29 +01:00
Joakim Sørensen
6d44245456 pytraccar version bump (#19659) 2018-12-30 14:59:43 +01:00
carstenschroeder
4b90ed6b22 Fix ADS light when parameter adsvar_brightness is not set (#19636)
* ADS light breaks if optional parameter adsvar_brightness is not set

Just a small change to prevent exception if optional parameter adsvar_brightness is not set

* corrected blank lines
2018-12-30 02:39:00 -08:00
John Mihalic
cc8b811572 Bump pyHik library to 0.1.9 to improve device support. (#19656) 2018-12-30 10:13:49 +01:00
ehendrix23
faeee4f7ad Use aioharmony for remote.harmony platform (#19595)
* Use aioharmony for async

Use aioharmony to interact with Harmony hub. Due to this following improvements:
-) Setting of available state for entity
-) Automatic config update if configuration changes (including updating file containing config)
-) Allow using of device name instead of number
-) When sending command with repeat, nothing else will be able to put a IR command in between

* Requirements updated

* Version update for fix

* Mainly cleanup

* Update requirements

Updated requirements

* Fixed lint issue

* Small bump for aioharmony

Small version bump increase for aioharmony

* Updated based on review
2018-12-29 17:22:27 -08:00
Markus Ressel
9aa6037219 Add RaspyRFM switch platform (#19130)
* added components and requirement

* change config to allow the definition of multiple switches without redefining the gateway

* dont assume false state
fix default value

* added exclude to coveragerc

* sorted imports

* review fixes

* review fixes

* bugfix
review fixes

* review fix
2018-12-29 16:40:03 -08:00
David F. Mulcahey
d0742cb332 Only bind clusters in ZHA remote entity (#19577)
* split bind and configure reporting helpers

* only bind remote clusters

* update comments - review comment
2018-12-29 16:17:17 -08:00
Alexei Chetroi
e096532cf1 Use async_configure for ZHA IAS binary sensor (#19629)
* Update Zha IAS binary sensor to use async_configure().

* Make less debug logging noise.
2018-12-29 16:13:52 -08:00
Adam Belebczuk
25e5864a22 Improve Wemo setup speed (#19563)
* Wemo - Improve setup speed

Move WeMo device discovery to an async context so it won't block initial component setup from completing quickly.

* WeMo - Fix too long lines

* WeMo - Update subscription shutdown log message

* WeMo - Fix flake8 issues

* WeMo - Code review fixes

* WeMo - Fix long lines

* WeMo - More code review fixes

* WeMo - Code review fixes
2018-12-29 16:05:21 -08:00
Marvin Wichmann
338077f557 Support knx operation types (#19546)
* Updated version to 0.9.3

Adjusted climate component due to changes in the underlying library.

* Climate.KNX: fix updating view when operation mode is changed due to refactoring

* Addressed review comments

* Added validation for config.
2018-12-29 15:18:55 -08:00
Ville Skyttä
f925d9ca6b Use xml.etree through defusedxml (#19640) 2018-12-30 00:07:48 +01:00
Fabian Affolter
b1c9f8d55d Suppress traceback if network is not available 2018-12-29 23:55:43 +01:00
Marius Retegan
32eb4e518b Fix cpu_temp issue on Vero 4K (#19638) 2018-12-29 21:01:47 +01:00
Robbert Müller
9928b977fd Added events STARTED, RESTARTED AND PAUSED (#19516)
Rewrote the tests a bit
the 'wait for the timer to finish' part of the test is now it's own test.
The rest is a sequence of fire/assert. Which i rewrote to a loop to
reduce the amount of duplicate code
2018-12-29 16:40:17 +01:00
mvn23
dc9da79a1c Revert "Bump pyotgw to 0.4b0 (#19618)" (#19635)
This reverts commit dae4543e54.
There's a bug in the new version of the library that may cause 100% CPU usage, rendering Home Assistant unresponsive.
2018-12-29 16:38:55 +01:00
Steven Looman
2ba86310f0 Upgrade to async_upnp_client==0.13.8 (#19634) 2018-12-29 14:09:29 +00:00
Marcelo Moreira de Mello
457708cbda Upgraded pyarlo to 0.2.3 (#19626) 2018-12-28 16:51:59 -05:00
Andrei
82d6fe5bd5 Fix cpu_temp issue on Odroid (#19620) 2018-12-28 21:36:00 +01:00
mvn23
dae4543e54 Bump pyotgw to 0.4b0 (#19618) 2018-12-28 10:12:10 -05:00
Daniel Shokouhi
33c5e09ac2 Add additional neato alerts and errors (#19608) 2018-12-28 09:53:54 -05:00
Andre Lengwenus
f09cea1499 LCN component and light platform (#18621)
* Initial commit of LCN component and light platform

* Corrected pre-review comments

* Fixed dimming behaviour in combination with transitions for lcn lights

* Removed unused logger

* Combined __init__.py and core.py into lcn.py component. Bumped to pypck==0.5.6

* Fixed .coveragerc

* Bumped to pypck==0.5.7

* Bump to pypck==0.5.8

* Fixed requirements_all.txt

* Moved unique generation of connection names to config schema's validator

* Minor changes due to review comments.
Bump to pypck==0.5.9.

* Address_connection is passed into LcnDevice

* Set should_poll property on LcnDevice to return False

* Moved platform config validation to component. Load platform using discovery helper

* Furtehr changes due to the review

* Light configuration is set required as there are no other platforms up to now
2018-12-28 03:39:06 -08:00
Rene Nulsch
14c39f7c24 Systemmonitor - add device_class property (#19614) 2018-12-28 10:28:40 +01:00
Ville Skyttä
b83a405b14 Upgrade huawei-lte-api to 1.1.1 (#19615) 2018-12-28 11:10:34 +02:00
SNoof85
699a38de52 Add Freebox component with sensors and device tracker (#18472)
* Add freebox component with sensor and device tracker

* script/gen_requirements_all passed and pylint fixes

* Fix docstring in wrong place

* Fix indentation

* Lint fixes

* More lint fixes

* Lint fixes again

* Pylint fixes

* Bump aiopyfreebox version

* Close freebox connection on HA Stop

* Fixed docstring

* Fixed ident

* Lint fixes

* Fix cloing session when HA stop

* Fix URL

* Fix URL

* Fix double look up in discovery datas

* Fix logging level

* Fix get_device_name

Thx for the hint Martin

* Fix async_update_info

* Update requirements_all.txt
2018-12-27 15:26:09 -08:00
Fabian Affolter
fe14be53e3 Upgrade aiohttp to 3.5.1 (#19584) 2018-12-27 21:56:08 +01:00
Max Rydahl Andersen
b32e6fe0d5 Add AfterShip sensor for packages (#18034)
* Add AfterShip sensor for packages

Why:

 * I receive a lot of packages from many different shipping companies.
 * I would like to see in haas how many packages are being delivered.

This change addreses the need by:

 * Adding a sensor for AfterShip (aftership.com)
 * AfterShip supports ~490 couriers world wide thus should cover
   almost any sensible tracking.

Notes:
  - For now this sensor assumes you somehow have added trackings to
    aftership manually.
  - Future idea is to expose service that allows adding a tracking
    based on incoming mails.
  - Other improvments would be to add map markers for package locations.

Related:
- https://community.home-assistant.io/t/package-tracking/858
- https://community.home-assistant.io/t/aftership-package-tracking/24068
- https://community.home-assistant.io/t/aftership-shipment-tracking-platform/14074
- https://community.home-assistant.io/t/aftership-state-card/57912

* Fix typo and update ordering
2018-12-27 10:01:57 -08:00
Daniel Shokouhi
d05450487c Improve how neato displays alerts and add alerts for persistent maps (#19593)
* Improve how neato displays alerts and add alerts for persistent maps

* Review comments
2018-12-27 09:57:38 -08:00
emontnemery
f9aa364b6d Don't truncate brightness and white_value of MQTT light (#19502)
* MQTT light: Don't truncate brightness

* Clamp after rounding
2018-12-27 18:18:12 +01:00
Ioan Loosley
5eab4f1dcc Version Bump for aioftp (#19510)
* Version Bump for aioftp

* Version Bump
2018-12-27 18:17:12 +01:00
Andrei
4c59a6522a Updated set of available voices for Yandex TTS (#19603) 2018-12-27 17:54:12 +01:00
Simon Nørager Sørensen
40bb4266c9 Update pymitv dependency (#19601)
* Security update, fixed fatal error when TV could become unresponsive

* Dependency update
2018-12-27 17:38:07 +01:00
FieldofClay
bf8b201bb3 Add verify_ssl option to Splunk component (#19112)
* added verify_ssl option to Splunk component

* update Splunk tests

* fix typo in Splunk tests

* Update test
2018-12-27 14:23:04 +01:00
apetrycki
cd0da4ed0e Fix mpd shuffle/random status (#19308)
* Fix shuffle/random status

MPD always shows true for shuffle.  For some reason casting the 0 or 1 as a boolean does not work.  Now returns 'true' or 'false' based on the value of 'random'.

* Update homeassistant/components/media_player/mpd.py

Change to correct way of returning shuffle boolean. 'random' needs to be cast as an integer before being cast as a boolean.

Co-Authored-By: apetrycki <34962392+apetrycki@users.noreply.github.com>

* Remove incorrect string code

Original fix method returns a string instead of a boolean.  Removed in favor of MartinHjelmare's method.
2018-12-27 00:04:40 -08:00
Fabian Affolter
22acc03fb8 Upgrade Sphinx to 1.8.3 (#19580) 2018-12-27 08:26:37 +01:00
Fabian Affolter
10831a0889 Upgrade rpi-rf to 0.9.7 (#19394) 2018-12-26 14:50:45 -05:00
Fabian Affolter
5de4f546f9 Upgrade keyring to 17.1.0 (#19583) 2018-12-26 14:47:38 -05:00
Fabian Affolter
2efa297df1 Upgrade pyowm to 2.10.0 (#19582) 2018-12-26 14:46:59 -05:00
Fabian Affolter
98229899dc Upgrade TwitterAPI to 2.5.8 (#19581) 2018-12-26 14:46:18 -05:00
Fabian Affolter
0a792620f8 Upgrade sphinx-autodoc-typehints to 1.6.0 (#19579) 2018-12-26 14:44:44 -05:00
Ted Sluis
54f6cfd569 Add a new click_type double_both to improve the support of the new Xiaomi aqara remote.b286acn01 dual switch. (#19578) 2018-12-26 17:48:58 +01:00
javicalle
70fff26383 Clean up remaining rflink tests (#19551)
* some minor tests refactor

* unused import

* async/await refactor

* Correct tests failures
2018-12-26 15:25:16 +01:00
Sebastian Muszynski
dc11e41cf0 Add a new click_type "long_both" to improve the support of the new Xiaomi Wireless Wall Switch (remote.b286acn01) (#19573) 2018-12-26 14:16:53 +01:00
Ville Skyttä
a6e091f60f Link to dicttoxml excessive INFO logging issue (#19575) 2018-12-26 14:16:08 +01:00
Daniel Høyer Iversen
1428919f98 Tibber, improve server reconnection (#19574) 2018-12-26 13:03:06 +01:00
Michael Dubno
6f9943787a Pencom (#19369)
* Added Pencom relay switch.

* Added Pencom relay switch.

* Cleaned up for submission.

* Fixed attribute keys. Switched to add_entities.
2018-12-26 08:49:34 +01:00
DoloresHA
796b195c73 Update pylaunches dependency to 0.2.0 (#19570)
* Update pylaunches dependency to 0.2.0

Update launch library to use pylaunches 0.2.0 as a dependency. launch_time sensor attribute will now be passed in ISO format, allowing for templating/easier automating with this attribute.

* Update pylaunches to 0.2.0
2018-12-25 23:47:19 +01:00
Heine Furubotten
47f8d248f7 Whitelisting of lines on entur sensor (#19539) 2018-12-25 23:43:46 +01:00
Igor Motov
b9a0f40827 Add device_id configuration option to Bluetooth tracker (#18539)
* Bluetooth tracker: add device_id configuration option

Makes the device id that bluetooth tracker is using configurable instead 
of using the first available device.

* Remove unncessary default in config.get

It is already handled in the configuration validation.
2018-12-25 18:29:44 +01:00
sander76
6b204941cf Add homematicip cloud full flush measuring switch (#19247) 2018-12-25 16:43:28 +01:00
mreiling
4d62e77049 Added support for triggered state on NX584 alarm. (#19524)
* Added support for triggered state on NX584 alarm.

* Minor update
2018-12-25 16:29:53 +01:00
Mattias Welponer
b80bed64f5 Add HomematicIP SMI55 device (#19400) 2018-12-25 10:40:21 +01:00
sander76
18b7f74ad7 Clean up homematicip cloud (#19481)
* Better logging, remove unused method, re-try handling fix. Other minor fixes.

* fix test

* typo fix
2018-12-25 09:40:36 +01:00
cdheiser
b2081c579b Improve Lutron RadioRA2 support, adding switches and scenes (#18330)
* Improve Lutron RadioRA2 support, adding switch and scene support.

- Update the version of pylutron to 0.2 which has various bug fixes.
- Switch to pylutron's per-device subscribe
- Add switch support, and configure any non-dimmable output as a switch.
- Add scene support, using any configured keypad button with a corresponding LED as a scene.

* Fixes for comments in pull request home-assistant/home-assistant#18330

* More fixes for comments in pull request #18330

* Remove unused imports

* Cleanup in docstrings for Lutron scene support.
2018-12-25 09:33:03 +01:00
David F. Mulcahey
bef85ecd2e Remove global from ZHA application controller (#19557)
* remove global from application controller per request

* remove unneeded line

* don't store controller application in hass.data - review comment
2018-12-25 09:20:09 +01:00
Jc2k
e0f50a9e54 Update homekit controller to homekit==0.12.0 (#19549) 2018-12-24 22:13:17 +01:00
emontnemery
a8797a08c6 Improve handling of MQTT light discovery (#19436) 2018-12-24 14:28:26 +01:00
emontnemery
edb7ec78f9 Fix support for base topic for empty values in MQTT discovery msg (#19501)
* Fix topic expansion for short strings

* Lint
2018-12-24 14:21:58 +01:00
Alexei Chetroi
4a1da0b041 Configure ZHA entity on new ZHA device join (#19470)
* Address PR#19177 comments.

* Make 'new_join' part of ZhaEntity.

Call async_configure() automatically when new device ZHA device joins.
2018-12-23 20:47:06 +01:00
Fredrik Erlandsson
0b84eefa2e Add hub- and device-info for tellduslive (#19180)
* add hub- and device-info

* attempt to make I/O outside event loop

* add_executer_job

* coroutines

* async_get_hubs

Co-Authored-By: fredrike <fredrik.e@gmail.com>

* asyncio fixes

* do device_info IO when device is discovered

* it's called async_add_executor_job

* nicer unique_id

* add comment

* it's called `async_add_executor_job`

* hub always contains 'name'

* await each new device

* add comment to why gather is bad
2018-12-23 13:13:49 -05:00
David F. Mulcahey
50888ae339 Fix issues in ZHA light (#19368)
* make light report on/off and level

* refactoring and review comments

* refactor

* use boolean for set_state - review comment

* async_schedule_update_ha_state() on level change - review comment

* fix docstring - review comment
2018-12-23 16:16:21 +01:00
kdvlr
a9f796a97c Updated to support per device find iphone sound. (#19535)
Added additional log statements to help debug
2018-12-23 13:35:39 +01:00
Steve9F
10ff169c76 Change ISY binary_sensor subnode to hex (#19471)
The subnode id for the motion enable node of Insteon 2844-222 motion sensor II on the ISY is 'D'. The binary_sensory/isy994.py assumed this value will be an integer rather than hex and fails. Changing line 55 to subnode_id = int(node.nid[-1], 16) fixes the issue.
2018-12-23 13:31:16 +01:00
Diogo Gomes
0b22880f22 increase robustness, when something upstream fails (#19493) 2018-12-23 13:29:02 +01:00
Alexei Chetroi
5a4e6bbb07 Support ZHA light turn_off transition (#19531) 2018-12-23 12:15:54 +01:00
Adam Belebczuk
0776456b59 Pywemo version bump (#19538)
* Bump pywemo version

* Bump pywemo version
2018-12-23 11:40:34 +01:00
Alexei Chetroi
01fc322488 Make ZHA entities non-polled by default (#19536) 2018-12-23 11:11:24 +01:00
David F. Mulcahey
2a2af80309 Add ZHA occupancy sensor (#19365)
* occupancy sensor

* lint

* map occupancy cluster to binary_sensor

* update to use reporting configuration and async_configure

* refactor

* fix typo - review comment

* handle restore entity functionality
2018-12-22 20:53:15 +01:00
William Comartin
2765440aa5 Implement path in the config to fix issues for some users (#19491)
* Update Tautulli sensor dependency pytautulli

Implement path in the config to fix issues for some users

* Add requirement
2018-12-22 14:36:06 -05:00
Andrew Loe
43e174899d Add additional Z-Wave Bulbs to ZW098 Workaround (#19480) 2018-12-22 14:33:28 -05:00
Panagiotis Panagiotopoulos
07b6aaec63 Add long click at new Aqara Wireless Remote Switch (#19518)
New Aqara Wireless Remote Switch Single supports long click.
2018-12-22 19:35:25 +01:00
Daniel Høyer Iversen
ef53a2d118 Fix Mill connection problem (#19519)
* Update mill library, improve connection

* Mill connection

* revert print

* Mill connection
2018-12-22 19:01:52 +01:00
Antoine GRÉA
1099018a5e Fix fail2ban by removal of internal timer logic (#19456)
* Remove timer logic from sensor class

Proposed fix for issue #10500

* Updating the tests to remove timer logic

* Removing unecessary dependancy

* Fixing requested changes

* Commit to try to fix the CLA ?
2018-12-22 18:25:02 +01:00
David F. Mulcahey
4bdb21a871 Update ZHA entity state on ZigBee zdo device announce (#19208)
* call async_update if defined on device_announce

* lint

* change update method

* remove unneeded listener
2018-12-22 18:18:48 +01:00
Fabian Affolter
6880be5aeb Add sunrise and sunset to Darksky weather sensor (#19492)
* Add sunrise and sunset to Darksky weather sensor

* Fix lint issue
2018-12-22 08:52:36 -05:00
Dom
f0e187e306 Update yale smart alarm client to v0.1.6 (#19495) 2018-12-22 08:50:03 -05:00
Joakim Sørensen
7c5ac88aae Add deprecation warning (#19515)
* Update ruter.py

* formating
2018-12-22 14:01:31 +01:00
Alexei Chetroi
54c57fe5db Restore state for zha binary_sensors on restart. (#19314)
Poll zha devices for current status, if not available restore state.
2018-12-22 09:34:47 +01:00
David F. Mulcahey
b444dfe8a6 Add ZHA battery sensor (#19363)
* add batery sensor

* add additional battery sizes

* remove blank line

* lint

* fix attribute report configuration

* return None - review comments
2018-12-22 09:11:33 +01:00
javicalle
fb226e3e3b Clean up RFLink tests and add two tests (#19511)
* some minor tests refactor

* unused import
2018-12-22 08:53:02 +01:00
uchagani
3a3d488de3 Allow scrape sensor to retry setting up platform if initial setup fails (#19498) 2018-12-22 08:40:30 +01:00
Michael Dubno
30841ef4da Add Lutron Homeworks component (#18311)
* Added Lutron Homeworks components.

* Made all requested changes other than config.

* Removed commented out code.

* Removed binary_sensor.
Implemented new signal/events for button presses.
Cleaned up some data passing.

* Fixed minor formatting.

* Got rid of unused config stuff.
Reordered imports.

* Missed removing vol, and forgot an extra line.

* More requested changes
Removed HomeworksController, it wasn't needed.

* Removed stale code.

* Imperative doc change.
2018-12-21 18:11:00 -05:00
Steven Looman
501b3f9927 Disable creating port mappings from UI, add discovery from component (#18565)
* Disable creating port mappings from UI, add discovery from component

* Remove unused constant

* Upgrade to async_upnp_client==0.13.6 and use manufacturer from device

* Upgrade to async_upnp_client==0.13.7
2018-12-21 17:25:23 +00:00
Paulus Schoutsen
5efc61feaf Merge branch 'master' into dev 2018-12-21 15:34:40 +01:00
Paulus Schoutsen
28abc30b4d Merge pull request #19505 from home-assistant/rc
0.84.6
2018-12-21 15:33:17 +01:00
Paulus Schoutsen
0471e15c28 Bumped version to 0.84.6 2018-12-21 14:04:54 +01:00
Paulus Schoutsen
ec28ee3c42 Remove check if base url is local (#19494) 2018-12-21 14:04:46 +01:00
Paulus Schoutsen
1281da024c Remove check if base url is local (#19494) 2018-12-21 11:23:05 +01:00
Diogo Gomes
c789f11ef8 Fixed the range filter unknown argument precision (#19428)
In HomeAssistant 0.84.3, the range filter would not work due to the unexpected precision filter parameter. 
The default range scheme has been edited to remove the unexpected precision parameter.

Verified and tested.
2018-12-20 22:30:06 +00:00
Otto Winter
dbd5396dc7 Add native ESPHome Home Assistant state feature (#19429)
* Add native ESPHome Home Assistant state feature

* Update aioesphomeapi
2018-12-20 23:29:57 +01:00
uchagani
71900ca719 Add new sensor platform to expose Islamic prayer times (#19444)
* added new sensor platform to expose Islamic prayer times

* added new sensor platform to expose Islamic prayer times

* updated tests according to feedback

* make prayer_times_info a public attribute

* remove stale comments
2018-12-20 22:52:43 +01:00
Aaron Bach
c15445159d Add timeout to RainMachine login (#19476)
* Add timeout to RainMachine login

* Moved timeout logic to regenmaschine

* Moving logic back into try/except

* Bumped requirements
2018-12-20 22:51:10 +01:00
Tom French
dd885a456e Reorder FLOW entries in config_entries.py (#19475) 2018-12-20 21:54:42 +01:00
Mathieu Velten
b5c9eca654 Update pynetgear to 0.5.2 (#19490) 2018-12-20 21:16:50 +01:00
jumpkick
dcf925a67f Rename ocr.png to ssocr-(entity_name).png to allow multiple instances (#18634)
* * Rename ocr.png to ssocr-(entity_name).png to allow multiple seven_segments instances to run without overwrting each other's data.

* Update seven_segments.py

* Update seven_segments.py

* Use string formatting
2018-12-20 11:31:58 -05:00
Bob Clough
d42d8543c8 Add Mythic Beasts DNSAPI Component (#18333)
* Add Mythic Beasts DNSAPI Component

* Added timeout, and tests for exceptions while updating

* Move API to external module

* Move mbddns import into function

* Updated tests to mock out mbddns library
2018-12-20 11:33:47 +01:00
Jens
fa0185a481 Adds battery_percent which had been introduced with pyatmo 1.4 and resolves unknown var warning. (#19309) 2018-12-19 23:42:16 +01:00
Daniel Shokouhi
28d2f9bd87 Bump Pybotvac To Support D7 On Latest Firmware (#19463)
* Bump pybotvac to support D7 on latest firmware

* Update requirements
2018-12-19 22:37:20 +01:00
emontnemery
27ea59f6c3 Add device registry to MQTT climate (#19332)
* Add device registry to MQTT climate

* Add testcase test_entity_id_update
2018-12-19 19:27:44 +01:00
emontnemery
ae776e2d28 Add device registry to MQTT alarm control panel (#19331)
* Add device registry to MQTT alarm control panel

* Add testcase test_entity_id_update
2018-12-19 19:27:23 +01:00
emontnemery
fed5d0f5be Add device registry to MQTT lock (#19333) 2018-12-19 19:26:07 +01:00
Paulus Schoutsen
4f134f339c Merge pull request #19461 from home-assistant/rc
0.84.5
2018-12-19 16:49:21 +01:00
Paulus Schoutsen
264d18bc83 Bumped version to 0.84.5 2018-12-19 15:42:02 +01:00
Paulus Schoutsen
4c1d978aa4 Bump pyharmony (#19460) 2018-12-19 15:41:25 +01:00
Paulus Schoutsen
196fe4b927 Bump pyharmony (#19460) 2018-12-19 15:41:14 +01:00
Erik
a9de9aa58d Add testcase test_entity_id_update 2018-12-19 15:28:25 +01:00
Erik
e874093818 Add device registry to MQTT climate 2018-12-19 15:28:25 +01:00
Paulus Schoutsen
b10149c2a0 Merge pull request #19459 from home-assistant/rc
0.84.4
2018-12-19 15:13:42 +01:00
Paulus Schoutsen
c71a6ee562 Updated frontend to 20181219.0 2018-12-19 15:01:02 +01:00
Paulus Schoutsen
57ee514d70 Update translations 2018-12-19 15:01:02 +01:00
Alexei Chetroi
4692605974 ZHA entity ZCL reporting configuration (#19177)
* Implement async_configure() method for ZHA entities.

Allow attribute reporting configuration to be stored as dict of zha
entity.

* Update ZHA platform to use new attribute reporting configuration.

* Use const declaration instead of magic numbers.

* Add support for manufacturer_id in ZCL attribute reporting configuration.

* Refactor async_configure() method.

Rename attribute reporting dict to zcl_reporting_config.
2018-12-19 14:52:20 +01:00
Paulus Schoutsen
2b82830eb1 Bumped version to 0.84.4 2018-12-19 14:23:07 +01:00
ehendrix23
ff1dba3529 Use web sockets for Harmony HUB (#19440)
* Updates to Harmony for web sockets

Updates to harmony to use web sockets with async

* Lint

* Small fixes

* Fix send_command

Continued improvements:
-) Fixed send_command
-) Get HUB configuration during update in case it was not retrieved earlier (i.e. HUB unavailable)

* Further improvements

Completely removed dependency on __main__ for pyharmony, instead everything is now done from the HarmonyClient class.
Writing out Harmony configuration file as a JSON file.
Using same functionality to determine if activity provided is an ID or name for device, allowing send_command to receive a device ID or device name.

* Point requirements to updated pyharmony repo

Updated REQUIREMENTS to point to repository containing the updates for pyharmony.

* lint

lint

* Small fix for device and activity ID

Small fix in checking if provided device or activity ID is valid.

* Pin package version

* No I/O in event loop

* Point at HA fork with correct version bump

* Fix req
2018-12-19 14:23:00 +01:00
Morten Lüneborg
257a91d929 Fix IHC config schema (#19415)
* Update __init__.py

Update "unit" -> "unit_of_measurement" and configuration (from plural to singular)

* Update __init__.py

* Removing vol.ALLOW_EXTRA arguments

* Update __init__.py
2018-12-19 14:22:59 +01:00
ehendrix23
23a579421d Use web sockets for Harmony HUB (#19440)
* Updates to Harmony for web sockets

Updates to harmony to use web sockets with async

* Lint

* Small fixes

* Fix send_command

Continued improvements:
-) Fixed send_command
-) Get HUB configuration during update in case it was not retrieved earlier (i.e. HUB unavailable)

* Further improvements

Completely removed dependency on __main__ for pyharmony, instead everything is now done from the HarmonyClient class.
Writing out Harmony configuration file as a JSON file.
Using same functionality to determine if activity provided is an ID or name for device, allowing send_command to receive a device ID or device name.

* Point requirements to updated pyharmony repo

Updated REQUIREMENTS to point to repository containing the updates for pyharmony.

* lint

lint

* Small fix for device and activity ID

Small fix in checking if provided device or activity ID is valid.

* Pin package version

* No I/O in event loop

* Point at HA fork with correct version bump

* Fix req
2018-12-19 14:21:40 +01:00
emontnemery
1568de62df Correct calls to subscription.async_unsubscribe_topics (#19414)
* Correct calls to subscription.async_unsubscribe_topics

* Review comments

* Add testcases
2018-12-19 14:05:24 +01:00
Paulus Schoutsen
a7e98f12f4 Updated frontend to 20181211.2 2018-12-19 14:04:08 +01:00
Fabian Affolter
8cec559103 Various updates (#19449)
* Various updates

* Fix lint issues
2018-12-19 12:39:16 +01:00
Gido
258fe1f09b Add sensor platform for SolarEdge Monitoring API (#18846)
* Adding sensor for SolarEdge Monitoring API support

* Adding support for Rova garbage calendar

* Update solaredge to pass lint and flake8

* Added solaredge.py to .coveragerc

* Added extend for Voluptuous schema

* Fixed styling issues

* Removed rova.py for later feature

* Replaced API requests with python pip package

* Fixed styling issues

* Updated to new async syntax
Added async_update to sensor class
Added Throttle to SolarEdge data update
Added CONF_NAME to platform settings
Added credentials check for api
Minor code style changes

* Remove unnecessary debug logging

* Updated dict keys

* Added SCAN_INTERVAL
Updated platform setup

* Remove DOMAIN variable
Correct import for PLATFORM_SCHEMA

* Change some debug to error messages
Correct return statements
Remove initial update call

* Fix pylint and flake8 errors
2018-12-19 09:56:45 +01:00
Fredrik Erlandsson
e5487722a8 Add device_info to Daikin (#19372)
* add device_info to Daikin

* Use the constant CONNECTION_NETWORK_MAC from the device registry helper.
2018-12-19 08:18:40 +01:00
Adam Belebczuk
7f0dd442fd Various enhancements for WeMo component/platforms (#19419)
* WeMo - Various fixes and improvements

Various fixes & improvements to the WeMo components, including:
-- Fixes to rediscovery
-- New reset filter service for the WeMo Humidifier
-- Switched the remainder of the WeMo components to async IO
-- Removed any remaining IO in entity properties and moved them to the polling/subscription update process

* WeMo - Fix pywemo version and remove test code from WeMo fan component

* WeMo Humidifier - Add services.yaml entry for reset filter life service

* WeMo - Update binary_sensor component to use asyncio

* WeMo - Add available property to binary_sensor component

* WeMo - Fixed line length issue

* WeMo - Fix issue with discovering the same device multiple times

* WeMo - Fix for the fix for discovering devices multiple times

* WeMo - Fix long lines

* WeMo - Fixes from code review

* WeMo - Breaking Change - entity_ids is now required on wemo_set_humidity

* WeMo - Code review fixes

* WeMo - Code review fixes

* WeMo - Code review fixes
2018-12-19 08:12:32 +01:00
Fabian Affolter
ef6c39f911 Fix typo (#19433) 2018-12-18 19:32:42 +01:00
Otto Winter
7317b1bb8b Miscellaneous ESPHome cleanups (#19425) 2018-12-18 19:04:50 +01:00
Fabian Affolter
c0ae7b1a49 Upgrade requests to 2.21.0 (#19385) 2018-12-18 17:29:38 +01:00
Fabian Affolter
686a856a17 Upgrade sqlalchemy to 1.2.15 (#19383) 2018-12-18 15:48:06 +01:00
Eliseo Martelli
51e6371991 Add Prezzibenzina (Italian Fuel Price) Sensor (#19297)
* complete(?)

* fixed linting

* update requirements

* added to coveragerc

* fixed linting

* added ability to set custom name

* fixed linting

* added filter

* spacing

* Added list of possible fuels

* Minor updates
2018-12-18 15:47:38 +01:00
Fabian Affolter
96c233d4b9 Use string foratting (#19427) 2018-12-18 15:23:53 +01:00
timkoers
17fbeb6245 Fixed the range filter unknown argument precision
In HomeAssistant 0.84.3, the range filter would not work due to the unexpected precision filter parameter. 
The default range scheme has been edited to remove the unexpected precision parameter.

Verified and tested.
2018-12-18 13:21:08 +01:00
Morten Lüneborg
c59e049050 Fix IHC config schema (#19415)
* Update __init__.py

Update "unit" -> "unit_of_measurement" and configuration (from plural to singular)

* Update __init__.py

* Removing vol.ALLOW_EXTRA arguments

* Update __init__.py
2018-12-18 12:40:03 +01:00
Rohan Kapoor
6c64b315db Optionally disable ssl verification for mjpeg (#19277) 2018-12-18 11:22:47 +01:00
Paulus Schoutsen
2f6ef08959 Remove reviewed by hound. That's not worth a badge. 2018-12-18 11:06:30 +01:00
Fabian Affolter
9c8e10936b Add openSenseMap air pollutants platform (#19357)
* Add openSenseMap air pollutants platform

* Fix issues (Docstring, log entries and check)

* Use SCAN_INTERVAL and name handling
2018-12-18 09:15:07 +01:00
John Mihalic
f2c7e3fed4 Bump pyEmby to 1.6, add channel media type mapping (#19318) 2018-12-17 19:16:32 -05:00
Nick Horvath
6adbf3ba84 Add camera selection config to skybell camera (#19310)
* add camera selection config to skybell camera

* code review changes.
2018-12-17 18:31:10 -05:00
Marius Retegan
da10598fa1 Fix cpu_temp issue on Raspberry Pi (#19404) 2018-12-17 18:30:17 -05:00
c-soft
6c8ed86f3e Satel integra monitor outputs (#19149)
* Adjusted api for new library version.

* Added support for output monitoring. Added initial status check for the alarm.

* Added default values to the configuration as per review notes.
2018-12-17 18:28:41 -05:00
jumpkick
f1005d37a7 Cast lametric cycles parameter to int (#19370) 2018-12-18 00:14:55 +01:00
Erik Eriksson
d270d52cb5 Upgrade volvooncall to 0.8.7 (#19398) 2018-12-18 00:08:57 +01:00
Eliseo Martelli
6e26713184 Add GTT Sensor (#18449)
* added gtt sensor

* removed trailing space

* updated requirements_all

* fixed two errors in the code style

* fixed imperative in docstring

* disabled pylint false positive

* fixed description on top of the file

* added files to .coveragerc

* fixes

* linting

* fixed linting 👍

* left a trailing space, now it's gone.

* fix
2018-12-17 18:03:34 -05:00
Sean Dague
e9c19462d6 Provide charging indicator for mychevy (#19348)
* Provide charging indicator for mychevy

This expands the mychevy sensor for the battery level to also know if
the system is currently charging to get the correct icon.

* address review feedback
2018-12-17 17:56:49 -05:00
Fabian Affolter
57ccd8283d Upgade colorlog to 4.0.2 (#19390) 2018-12-17 17:54:07 -05:00
Otto Winter
4ffacec4be Add native ESPHome API service call feature (#19401)
* Add native ESPHome API service call feature

* 🚑 Fix
2018-12-17 21:18:54 +01:00
Otto Winter
44bf5ba001 Add native ESPHome API device registry feature (#19381)
* Add native ESPHome API device registry feature

* 😅 Actually call method

* Run script/gen_requirements_all

* Don't prefix sw_version
2018-12-17 20:54:39 +01:00
Otto Winter
77e4f69af0 ESPHome Native API Restore Entities on startup (#19379)
* Update __init__.py

* Use attr.fields_dict
2018-12-17 20:53:51 +01:00
Otto Winter
8861909ea4 Add native ESPHome API text sensor (#19377)
* Update

* 🚑 Lint
2018-12-17 20:51:59 +01:00
Otto Winter
4b124e4c25 Add native ESPHome API switch (#19376)
* Add esphomelib native API switch

* Update

* 🚑 Lint
2018-12-17 20:50:56 +01:00
Otto Winter
c45beeef6d Add native ESPHome API light (#19375)
* Add esphomelib native API light

* Update

* 🚑 Lint
2018-12-17 20:49:03 +01:00
Otto Winter
a158397b6d Add native ESPHome API fan (#19374)
* Add esphomelib native API fan

* Update

* 🚑 Lint
2018-12-17 20:46:57 +01:00
Otto Winter
a1fb6ae38f Add native ESPHome API cover (#19373)
* Add esphomelib native API cover

* Update

* 🚑 Lint
2018-12-17 20:44:47 +01:00
Otto Winter
8c67ebc143 Add native ESPHome API binary sensor (#19371)
* Add esphomelib native API binary sensor

* Fixes

* 🚑 Lint
2018-12-17 20:40:57 +01:00
Fredrik Erlandsson
40d8bd43a1 fix unique_id for Tellduslive sensors (#19389) 2018-12-17 20:33:01 +01:00
Fabian Affolter
c7ea1d07be Add air pollutants PROP_TO_ATTR (#19336)
* Add PROP_TO_ATTR

* Change condition
2018-12-17 19:38:36 +01:00
Fabian Affolter
e60de53404 Upgrade RPi.GPIO to 0.6.5 (#19392) 2018-12-17 12:31:03 -05:00
Fabian Affolter
3a1dc16c0d Set pytz to >=2018.07 (#19387) 2018-12-17 11:35:13 -05:00
Fabian Affolter
a6568fba7a Upgrade keyrings.alt==3.1.1 (#19386) 2018-12-17 11:34:19 -05:00
Fredrik Erlandsson
0ab9e33110 Version bump pydaikin (#19388)
* version bump pydaikin

* remove requirements from platform
2018-12-17 11:32:10 -05:00
Fabian Affolter
8483850729 Upgrade ruamel.yaml to 0.15.81 (#19384) 2018-12-17 08:28:35 -05:00
Fabian Affolter
90608da5c2 Upgrade TwitterAPI to 2.5.7 (#19382) 2018-12-17 13:52:09 +01:00
Fabian Affolter
6b8835b196 Upgrade youtube_dl to 2018.12.17 (#19378) 2018-12-17 13:28:20 +01:00
Paulus Schoutsen
f55ab9d4ea Merge pull request #19391 from home-assistant/rc
0.84.3
2018-12-17 12:44:50 +01:00
Paulus Schoutsen
23cc4d1453 Bumped version to 0.84.3 2018-12-17 10:46:39 +01:00
Glen Takahashi
f613cd38fc Fix not being able to update entities (#19344)
When editing an entity in the frontend dialog, pressing save causes a "save failed: Entity is already registered" error. This is because the frontend always sets `name` and `new_entity_id` in the websocket command even if they haven't been changed. This adds a check that the `new_entity_id` is actually different from `entity_id` before erroring that the `new_entity_id` is already registered.
2018-12-17 10:46:31 +01:00
liaanvdm
45238295df Fix restore state for manual alarm control panel (#19284)
* Fixed manual alarm control panel restore state

* Revert "Fixed manual alarm control panel restore state"

This reverts commit 61c9faf434.

* Fixed manual alarm control panel's state restore
2018-12-17 10:46:31 +01:00
Andrew Hayworth
65bd308491 Set lock status correctly for Schlage BE469 Z-Wave locks (#18737)
* Set lock status correctly for Schlage BE469 Z-Wave locks

PR #17386 attempted to improve the state of z-wave lock tracking for
some problematic models. However, it operated under a flawed
assumptions. Namely, that we can always trust `self.values` to have
fresh data, and that the Schlage BE469 sends alarm reports after every
lock event. We can't trust `self.values`, and the Schlage is very
broken. :)

When we receive a notification from the driver about a state change,
we call `update_properties` - but we can (and do!) have _stale_
properties left over from previous updates. #17386 really works best
if you start from a clean slate each time. However, `update_properties`
is called on every value update, and we don't get a reason why.
Moreover, values that weren't just refreshed are not removed. So blindly
looking at something like `self.values.access_control` when deciding to
apply a workaround is not going to always be correct - it may or may not
be, depending on what happened in the past.

For the sad case of the BE469, here are the Z-Wave events that happen
under various circumstances:

RF Lock / Unlock:
- Send: door lock command set
- Receive: door lock report
- Send: door lock command get
- Receive: door lock report

Manual lock / Unlock:
- Receive: alarm
- Send: door lock command get
- Receive: door lock report

Keypad lock / Unlock:
- Receive: alarm
- Send: door lock command get
- Receive: door lock report

Thus, this PR introduces yet another work around - we track the current
and last z-wave command that the driver saw, and make assumptions based
on the sequence of events. This seems to be the most reliable way to go
- simply asking the driver to refresh various states doesn't clear out
alarms the way you would expect; this model doesn't support the access
control logging commands; and trying to manually clear out alarm state
when calling RF lock/unlock was tricky.

The lock state, when the z-wave network restarts, may look out of sync
for a few minutes. However, after the full network restart is complete,
everything looks good in my testing.

* Fix linter
2018-12-17 10:46:30 +01:00
Paulus Schoutsen
30345489e6 Updated frontend to 20181211.1 2018-12-17 10:21:24 +01:00
Pascal Vizeli
2bf36bb1db Use unicode slugify (#19192)
* Update __init__.py

* Update setup.py

* Update requirements_all.txt

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* remove `-`

* fix packages

* Update package_constraints.txt

* Update __init__.py

* Update package_constraints.txt

* Update requirements_all.txt

* Update setup.py

* Fix tests

* Fix line issue

* fix all test

* fix type

* Fix lint
2018-12-17 07:51:13 +01:00
Aaron Bach
cc90cba78a Add support for statewide data for Flu Near You (#19341)
* Initial changes

* Add support for state-wide data for Flu Near You

* Bumped requirements

* Member comments
2018-12-16 18:51:56 -07:00
Otto Winter
a08bab7b18 Add native ESPHome API component (#19334)
* Create esphomelib component

* Update requirements

* Remove python 2 string literals

* MVP

* Remove config flow

* Remove config flow translations

* Use dispatcher more

* Use data classes

* Type Hints

* Cleanup on remove

* Use helper and cleanup

* Fix HA stop listener cleanup

* Add config flow

* Fix SyntaxError for Py3.5

* Update

* Lint

* Re-do tests

*  Rename to ESPHome

* Better error message for resolve errors

* Fix tests when aioesphomeapi not installed

* Refactor mock

* Update requirements

* Add strings.json

* 🍵 100% config flow  test coverage
2018-12-17 01:29:32 +01:00
Anders Melchiorsen
f9c02889b2 Remove recorder purge protection (#19358) 2018-12-16 23:31:50 +01:00
PeteBa
9d4de2a722 Initialise plant attributes at startup (#19315)
* Initialise plant attributes at startup

* Pvizeli review comments

* Martin review change
2018-12-16 21:54:33 +01:00
Joakim Sørensen
92c5249746 Add traccar motion, speed and battery_level attributes (#19090)
* Added motion, speed and battery attributes.

* Use dict[key] when we know there is a value there.

Co-Authored-By: ludeeus <joasoe@gmail.com>

* Use dict[key] when we know there is a value there.

Co-Authored-By: ludeeus <joasoe@gmail.com>

* Use dict[key] when we know there is a value there.

Co-Authored-By: ludeeus <joasoe@gmail.com>

* Use dict[key] when we know there is a value there.

Co-Authored-By: ludeeus <joasoe@gmail.com>

* Use dict[key] when we know there is a value there.

Co-Authored-By: ludeeus <joasoe@gmail.com>

* Use dict[key] when we know there is a value there.

Co-Authored-By: ludeeus <joasoe@gmail.com>
2018-12-16 20:09:45 +01:00
Glen Takahashi
b031ded671 Fix not being able to update entities (#19344)
When editing an entity in the frontend dialog, pressing save causes a "save failed: Entity is already registered" error. This is because the frontend always sets `name` and `new_entity_id` in the websocket command even if they haven't been changed. This adds a check that the `new_entity_id` is actually different from `entity_id` before erroring that the `new_entity_id` is already registered.
2018-12-16 13:06:27 -05:00
Fredrik Erlandsson
5a295ad42b Add config flow for Daikin (#19182)
* config flow for daikin

* tox test

* return fixes

* tox test fixes

* tox formatting
2018-12-16 16:19:18 +01:00
Jens
266477a4f5 Adds io:OnOffIOComponent as switch to tahoma.py (#19338) 2018-12-16 16:05:21 +01:00
emontnemery
07e3843918 Fix broken sensor.mqtt json_attributes deprecation message (#19349) 2018-12-16 15:44:25 +01:00
Christian Biamont
c26c8affc7 Add Brottsplatskartan sensor (#19018)
* Added brottsplatskartan sensor

* Update brottsplatskartan sensor

* Remove redundant configuration checks.
* Set attributes during initialization.
* Setup brottsplatskartan module in setup_platform().
* Just do a simple return, no need for returning false.

* Remove file that was used during testing

* Better variable name and remove excessive newline.

* More updates to brottsplatskartan

* Import uuid at the top of the module.
* Use sensor as domain.
* Don't fire custom events.
* Remove period from logging message.

* Adding validation for area parameter

* Validate empty area configuration

* Fixing indentation.

* Fixing the config schema
2018-12-16 12:21:07 +01:00
Malte Franken
629dd24ff3 bump georss_client to 0.5 (#19337) 2018-12-16 11:14:36 +01:00
Ville Skyttä
c545d2e22e Upgrade pydocstyle to 3.0.0 (#19328) 2018-12-15 21:11:28 +02:00
Ville Skyttä
06383a4383 Upgrade pytest to 4.0.2 (#19327) 2018-12-15 21:10:55 +02:00
emontnemery
3a7083900c Merge pull request #19223 from emontnemery/mqtt_sensor_json_attributes_topic
Add JSON attribute topic to MQTT sensor
2018-12-15 16:28:34 +01:00
John Mihalic
e2d3beca22 Bump pyEight to fix Single Sleeper (#19316) 2018-12-14 23:25:12 -05:00
Charles Garwood
70dbbbd974 Add note to issue template regarding frontend issues (#19295) 2018-12-14 19:06:20 -05:00
tmd224
d60b7d46b7 Add Ambient Weather PWS Sensor component (#18551)
* Adding ambient_station.py sensor and updating requirements file

* Cleaning up code and fixing flake8 warnings

* Fixing flake8 and pylint warnings

* Adding ambient_station.py sensor and updating requirements file

* Cleaning up code and fixing flake8 warnings

* Fixing flake8 and pylint warnings

* Fixing bug, things are working well now

* removing nosetests file

* Adding changes as requested in pull request #18551

* Updating with more change requests from PR code review

* Removing SCAN_INTERVAL from PLATFORM_SCHEMA

* Removing unused import

* Adding platform schema validation for monitored_conditions and conf_units

* Updating link to documentation in doc-string.  File already named in doc repo

* Only setup platform if component can successfully communicate with API

* Inverting check for platform setup success
2018-12-14 23:53:49 +01:00
Paulus Schoutsen
d83f20f743 Fix tests 2018-12-14 17:58:45 +01:00
Ville Skyttä
1c147b5c5f huawei_lte: Fetch only required data (#17618)
When debug logging is enabled, still fetch everything in order to
provide indication of available/supported data to users, as instructed
in docs.
2018-12-14 14:51:13 +01:00
Colin Harrington
9c62149b00 Adding support for Plum Lightpad (#16576)
* Adding basic Plum Lightpad support - https://plumlife.com/

* Used Const values
is_on is a bool

* Added LightpadPowerMeter Sensor to the plum_lightpad platform

* Moved to async setup, Introduced a PlumManager, events, subscription, Light and Power meter working

* Added PlumMotionSensor

* Added Glow Ring support

* Updated plum library and re-normalized

* set the glow-ring's icon

* Naming the glow ring

* Formatting and linting

* Cleaned up a number of linting issues.  Left a number of documentation warnings

* setup_platform migrated to async_setup_platform Plum discovery run as a job

* bumped plumlightpad version

* On shutdown disconnect the telnet session from each plum lightpad

* Cleanup & formatting. Worked on parallell cloud update

* Moved setup from async to non-async

* Utilize async_call_later from the helpers

* Cleanedup and linted, down to documentation & one #TODO

* Remove commented out debug lines

* Fixed Linting issues

* Remove TODO

* Updated comments & fixed Linting issues

* Added plumlightpad to requirements_all.txt

* Fixing imports with isort

* Added components to .coveragerc

* Added PLUM_DATA constant for accessing hass.data[PLUM_DATA]

* used dictionary syntax vs get(...) for config

* Linting needed an additonal line

* Fully async_setup now. removed @callback utilize bus events for detecting new devices found.

* Upgraded to plumlightpad 0.0.10

* Removed extra unused PLATFORM_SCHEMA declarations

* Moved listener attachment to `async_added_to_hass` and removed unused properties & device_state_attributes

* Utilized Discovery when devices were located

* Linting and cleanup

* used `hass.async_create_task` instead of `hass.async_add_job` per Martin

* Removed redundant criteria in if block

* Without discovery info, there is no need to setup

* Better state management and async on/off for Glow Ring

* renamed async_set_config back to set_config, fixed cleanup callback and Plum Initialization

* Fixed flake8 linting issues

* plumlightpad package update

* Add 'motion' device_class to Motion Sensor

* Fixed last known Linting issue

* let homeassistant handle setting the brightness state

* String formatting vs concatenation

* use shared aiohttp session from homeassistant

* Updating to use new formatting style

* looks like @cleanup isn't neccesary

* ditch the serial awaits

* Ensure async_add_entities is only called once per async_setup_platform

* Creating tasks to wait for vs coroutines

* Remove unused white component in the GlowRing

* Used local variables for GlowRing colors & added a setter for the hs_color property to keep the values in sync

* Linted and added docstring

* Update the documentation path to point to the component page

* Removed the extra sensor and binary_sensor platforms as requested. (To be added in later PRs)

* Update plum_lightpad.py

* Update plum_lightpad.py
2018-12-14 14:42:04 +01:00
liaanvdm
027920ff52 Fix restore state for manual alarm control panel (#19284)
* Fixed manual alarm control panel restore state

* Revert "Fixed manual alarm control panel restore state"

This reverts commit 61c9faf434.

* Fixed manual alarm control panel's state restore
2018-12-14 14:04:04 +01:00
Brian Towles
a30921e67d Set InsteonEntity name to be combo of description and address. (#17262)
* Set InsteonEntity name to be combo of description and address.

ie "LampLinc Dimmer 26453a" or "Keypad Dimmer 291abb_2"

Using a centralized network name

* Updated the name to have a more contextual references for device
functions then just the group id.

* Cleanup for hound

* Removed the _generate_network_address function.  Not used anymore

* Cleanup for lint

* clean for hound

* Moved descriptor mapper to be a class variable of the InsteonEntity in order to fix lib loading issue for lint

* Well, moved DescriptorMapper instance to a function variable now...

* fix hound

* Lint Cleanup

* Clean up docstrings

* Simplify Label lookup based on state name
2018-12-14 14:02:06 +01:00
pbalogh77
7f9cc10447 Device config for Fibaro hub integration (#19171) 2018-12-14 13:35:12 +01:00
Fabian Affolter
b88cf64850 Add air pollutants component (#18707)
* Add air pollutants component

* Fix lint issue

* Update docstrings

* Revert change

* Remove entries

* Remove imports

* Fix variable and other fixes

* Change tests

* Set SCAN_INTERVAL
2018-12-14 13:32:58 +01:00
Erik Eriksson
004179775c Updated ELIQ Online sensor to async API (#19248)
* Updated ELIQ Online sensor to async API

* Remove use of STATE_UNKNOWN
2018-12-14 13:25:28 +01:00
MaxG88
f95bd9c78f Set unavailable when unreachable (#19012)
* Turn GPMDP Off When Unavailable

* Update requirements_all.txt

* Specified Exception Type

* Update gpmdp.py
2018-12-14 13:14:32 +01:00
emontnemery
b97f0c0261 Make variable entity_id available to value_template for MQTT binary sensor (#19195)
* MQTT binary_sensor: Make variable `entity_id` available to value_template

* Review comments

* Add testcase
2018-12-14 13:00:37 +01:00
Eric Nagley
e886576a64 home-assistant/home-assistant#17333: update to use DOMAIN constants and standards. (#19242) 2018-12-14 12:41:09 +01:00
Paulus Schoutsen
bb11b0f067 Merge branch 'master' into dev 2018-12-14 11:22:05 +01:00
Paulus Schoutsen
1135446de4 Merge pull request #19281 from home-assistant/rc
0.84.2
2018-12-14 11:19:41 +01:00
emontnemery
a262d0f9e4 Fix race in entity_platform.async_add_entities (#19222) 2018-12-14 10:34:02 +01:00
emontnemery
7a7c2ad416 Fix race in entity_platform.async_add_entities (#19222) 2018-12-14 10:33:37 +01:00
Paulus Schoutsen
d425aabae3 Bumped version to 0.84.2 2018-12-14 10:27:45 +01:00
Eric Nagley
8d44b721c6 Fix call to super() (#19279)
* home-assistant/home-assistant#19273: fix call to super()

* home-assistant/home-assistant#19273: adjust to python3 standards.

* home-assistant/home-assistant#19273: remove bad test.
2018-12-14 10:27:37 +01:00
Paulus Schoutsen
baa1801e13 Fix OwnTracks deadlocking (#19260)
* Fix OwnTracks deadlocking

* Fix deadlock
2018-12-14 10:27:36 +01:00
Fabian Affolter
965e47eb6a Fix list (fixes #19235) (#19258) 2018-12-14 10:27:35 +01:00
Luca Angemi
16c0301227 Add automation and script events to logbook filter events (#19253)
* Add automation and script events to logbook filter events

* Update logbook.py

* Update logbook.py

* Update logbook tests

* Update test_logbook.py

* Update test_logbook.py

* Update test_logbook.py

* Update test_logbook.py
2018-12-14 10:27:35 +01:00
kennedyshead
37096a2b65 Bump aioasuswrt (#19229)
* bump aioasuswrt version

* run gen_requirements
2018-12-14 10:27:34 +01:00
Erik
bead08840e Review comments 2018-12-14 10:27:13 +01:00
Erik
b7b55f941c Move check to websocket 2018-12-14 10:27:13 +01:00
Erik
4231775e04 Fail if new entity_id is in hass.states 2018-12-14 10:27:13 +01:00
damarco
14d90b5484 Always add friendly name attribute to ZHA entities (#19141)
* Always add friendly name attribute

* Only change device_info name
2018-12-14 10:25:41 +01:00
Sebastian Muszynski
afa48c54e9 Don't avoid async_schedule_update_ha_state by returning false (#19102) 2018-12-14 10:25:40 +01:00
Luca Angemi
fb680bc1e4 Add automation and script events to logbook filter events (#19253)
* Add automation and script events to logbook filter events

* Update logbook.py

* Update logbook.py

* Update logbook tests

* Update test_logbook.py

* Update test_logbook.py

* Update test_logbook.py

* Update test_logbook.py
2018-12-14 10:25:02 +01:00
Paulus Schoutsen
4f98818258 Rename is_owner decorator to is_admin (#19266)
* Rename is_owner decorator to is_admin

* Update test_auth.py
2018-12-14 10:19:27 +01:00
Paulus Schoutsen
a5a896b519 Check admin permission before able to manage config entries (#19265)
* Check admin permission before able to manage config entries

* Lint
2018-12-14 10:19:04 +01:00
Paulus Schoutsen
0eb0faff03 Add permission check to light service (#19259) 2018-12-14 10:18:36 +01:00
Thibault Maekelbergh
4a23d4c7d3 Add NMBS (Belgian railway) sensor platform (#18610)
* Add custom component to core

* Add pyrail to reqs

* Format & lint

* Sort nmbs.py into place on coveragerc

* Only set up station live if provided

* Only set up sensor if config is provided

* Fix line too long linting error

* PR Remarks

* Add docstrings

* Fix hound line to long error

* Fix quotes

* Rebase coveragerc

* PR Review

* Init empty attrs

* Dont include delay if there is none

* PR review

* Safer check

* Rebase reqs

* Generate req

* Update homeassistant/components/sensor/nmbs.py

Co-Authored-By: thibmaek <thibault.maekelbergh@iCloud.com>

* PR remarks
2018-12-14 09:52:34 +01:00
Eric Nagley
377c61203d Fix call to super() (#19279)
* home-assistant/home-assistant#19273: fix call to super()

* home-assistant/home-assistant#19273: adjust to python3 standards.

* home-assistant/home-assistant#19273: remove bad test.
2018-12-14 08:52:29 +01:00
bremor
74a93fe764 Synology chat add verify ssl (#19276)
* Update synology_chat.py

* Added verify_ssl option to notify.synology_chat

Python requests will verify ssl by default, this configuration options allows the user to specify if they want to verify ssl or not. Non breaking change, default is True - do verify ssl.
2018-12-14 08:42:01 +01:00
Heine Furubotten
ddbfdf14e9 Upgraded enturclient to 0.1.2 (#19267) 2018-12-14 08:33:46 +01:00
Rohan Kapoor
e8ec74b944 Expose ZoneMinder availability to Home Assistant (#18946)
* Expose ZoneMinder availability to Home Assistant

* Bump zm-py to 0.2.0 with the availability changes published
2018-12-14 08:10:54 +01:00
damarco
f60f9bae00 Always add friendly name attribute to ZHA entities (#19141)
* Always add friendly name attribute

* Only change device_info name
2018-12-13 23:08:35 +01:00
Paulus Schoutsen
eada1a184c Improve check for duplicated entity_id (#19194)
* Fail if new entity_id is in hass.states

* Move check to websocket

* Review comments
2018-12-13 20:57:33 +01:00
Paulus Schoutsen
34cfdb4e35 Fix OwnTracks deadlocking (#19260)
* Fix OwnTracks deadlocking

* Fix deadlock
2018-12-13 20:56:48 +01:00
Paulus Schoutsen
85e6f92c5a Lint 2018-12-13 20:08:31 +01:00
Tom Harris
9efb90d23c Resolve IOLinc sensor name (#19050) 2018-12-13 16:52:12 +01:00
Fabian Affolter
66aa7d0e68 Fix list (fixes #19235) (#19258) 2018-12-13 16:43:59 +01:00
Fredrik Erlandsson
9f790325bb Fix point sensor discovery (#19245) 2018-12-13 16:40:56 +01:00
Sander Geerts
0fa7186296 Support for the Harman Kardon AVR (#18471)
* Feature: support for the HK AVR

* Remove testcode

* Feature: support for the HK AVR

* Remove testcode

* Added checklist

* Review fixes whitespaces

* Lint fixes

* Review fixes, add current source

* Remove unused imports

* Review fixes; State constants, dict[key]

* More review fixes, Unknown state and Sources

* Review fix; rename devices to entities
2018-12-13 16:31:14 +01:00
Paulus Schoutsen
90df932fe1 Check admin permission before able to manage config entries 2018-12-13 16:13:43 +01:00
emontnemery
7436c0fe42 Add device registry to MQTT light (#19013) 2018-12-13 15:51:50 +01:00
Erik Eriksson
6766d25e62 Re-use connection-pool (#19249)
Re-use connection-pool of VOC
2018-12-13 12:25:39 +01:00
Paulus Schoutsen
9d9e11372b Make automations log errors (#18965) 2018-12-13 12:21:16 +01:00
Paulus Schoutsen
8ea0a8d40b RFC: Deprecate auto target all for services and introduce entity_id: * (#19006)
* Deprecate auto target all

* Match on word 'all'
2018-12-13 10:07:59 +01:00
Andrey Kupreychik
56c7e78cf2 Bumped NDMS2 client to 0.0.6 (#19244) 2018-12-13 10:01:41 +01:00
Teemu R
2fc0dfecb1 Convert songpal to use asynchronous websocket for state updates (#19129)
* Add websocket-based non-polling variant for songpal

* linting fixes

* changes based on Martin's feedback

* Fix linting

* add backoff timer for reconnects, fix variable naming (I thought that this wouldn't matter for internals..)

* Remove poll configuration variable

* bump the version just to be sure, the previous release lacked a version file (required for setup.py)
2018-12-12 23:05:55 +01:00
kennedyshead
8c6b9b57cd Bump aioasuswrt (#19229)
* bump aioasuswrt version

* run gen_requirements
2018-12-12 20:24:44 +01:00
Aaron Bach
f8438e96d1 Add package data attribute to 17track.net summary sensors (#19213)
* 17track.net: Add package data attribute to summary sensors

* Member comments
2018-12-12 19:07:06 +01:00
Paulus Schoutsen
2926989ec3 Merge remote-tracking branch 'origin/master' into dev 2018-12-12 18:47:41 +01:00
Paulus Schoutsen
6603b3eccd Merge pull request #19228 from home-assistant/rc
0.84.1
2018-12-12 17:54:37 +01:00
Paulus Schoutsen
e2bf3ac095 Bumped version to 0.84.1 2018-12-12 17:18:47 +01:00
Paulus Schoutsen
ced96775fe Fix owntracks topic in encrypted ios (#19220)
* Fix owntracks topic

* Warn if per-topic secret and using HTTP
2018-12-12 17:18:38 +01:00
Jason Hunter
f65e57bf7b Add automation and script events to logbook event types (#19219) 2018-12-12 17:18:37 +01:00
Paulus Schoutsen
7d9e257713 Fix owntracks topic in encrypted ios (#19220)
* Fix owntracks topic

* Warn if per-topic secret and using HTTP
2018-12-12 17:17:27 +01:00
David F. Mulcahey
031ee71adf Add ZHA device handler library (#19099)
* event foundation

* implement quirks

* lock zha-quirks version

* allow quirks handling to be toggled on and off

* revert event commit

* disable warning

* update requirements_all

* Remove fix in favor of #19141

#19141 should be what ultimately corrects this issue.

* review comment
2018-12-12 17:06:22 +01:00
Erik
d03dfd985b Review comments 2018-12-12 16:30:42 +01:00
Erik
0e868deedd Add JSON attribute topic to MQTT sensor 2018-12-12 16:26:44 +01:00
Lukas Barth
4984030871 Fix geizhals crash if no price found (#19197)
* Fix geizhals crash if no price found

* Return None on unknown price.

* Linting

* Linting the linting
2018-12-12 16:11:18 +01:00
Jason Hunter
7de509dc76 Add automation and script events to logbook event types (#19219) 2018-12-12 15:54:25 +01:00
Paulus Schoutsen
88cda043ac Merge pull request #19215 from home-assistant/rc
0.84
2018-12-12 14:17:53 +01:00
Paulus Schoutsen
404fbe388c Bumped version to 0.84.0 2018-12-12 11:45:42 +01:00
Paulus Schoutsen
a0bc96c20d Revert PR #18602 (#19188) 2018-12-12 11:45:20 +01:00
Paulus Schoutsen
6f4657fe02 Revert PR #18602 (#19188) 2018-12-12 11:44:50 +01:00
Fredrik Erlandsson
c0cd2d48ec add unique_id to SMHI (#19183) 2018-12-12 09:29:45 +01:00
Daniel Høyer Iversen
d1eb5da5f4 Update switchbot library (#19202) 2018-12-12 09:16:20 +01:00
Erik
c7492b0feb Move check to websocket 2018-12-11 20:20:57 +01:00
Fredrik Erlandsson
c20322232a Move daikin to package (#19187) 2018-12-11 18:17:45 +01:00
javicalle
61ca9bb8e4 Restore states for RFLink devices (#18816)
* Merge branch 'master' of https://github.com/home-assistant/home-assistant into dev

# Conflicts:
#	homeassistant/components/binary_sensor/point.py
#	homeassistant/components/cloud/__init__.py
#	homeassistant/components/cloud/prefs.py
#	homeassistant/components/frontend/__init__.py
#	homeassistant/components/light/fibaro.py
#	homeassistant/components/logbook.py
#	homeassistant/components/point/__init__.py
#	homeassistant/config_entries.py
#	homeassistant/const.py
#	homeassistant/helpers/service.py
#	requirements_all.txt
#	requirements_test_all.txt

* one 'async_get_last_state' refactor left behind

* Remove RestoreEntity inheritance (already in parent class)

* # pylint: disable=too-many-ancestors

* code predictor can be a bitch

* lint corrections

* # pylint: disable=too-many-ancestors

* recover from dict[key]

* Remove all 'coroutine' decorator, replace for 'async def'
Replace all 'yield from' for 'await'
Replace 'hass.async_add_job' for 'hass.async_create_task'
2018-12-11 17:20:30 +01:00
Erik
1f8156e26c Fail if new entity_id is in hass.states 2018-12-11 17:17:42 +01:00
Fabian Affolter
3e7b908a61 Add SCAN_INTERVAL (#19186)
* Add SCAN_INTERVAL

* More clean-up
2018-12-11 14:12:27 +01:00
Jonathan Keljo
eb4a44535c Enable alarmdecoder to see open/close state of bypassed RF zones when armed (#18477)
* Enable alarmdecoder to see open/close state of bypassed zones when armed

The alarmdecoder component already reported RF state bits as attributes. If the user knows which loop is set up for the zone in the alarm panel, they can use that information to tell whether the zone is open or closed even when the system is armed by monitoring the appropriate attribute. That’s awkward, so this commit enables the user to simply configure which loop is used and the component will update the state itself.

* Simplify, also it's more correct to treat it as a state change rather than a
permanent state, since it's possible the decoder might miss some events.

* Remove relative import
2018-12-11 11:34:03 +01:00
Paulus Schoutsen
e98476e026 Bumped version to 0.84.0b4 2018-12-11 10:33:58 +01:00
Paulus Schoutsen
aa45ff83bd Fix cloud defaults (#19172) 2018-12-11 10:33:21 +01:00
Paulus Schoutsen
029d006beb Updated frontend to 20181211.0 2018-12-11 10:30:35 +01:00
Paulus Schoutsen
ab8cf4f1e4 Updated frontend to 20181211.0 2018-12-11 10:30:24 +01:00
Paulus Schoutsen
557720b094 Fix cloud defaults (#19172) 2018-12-11 06:50:54 +01:00
Fredrik Erlandsson
92e19f6001 TelldusLive config flow (#18758)
* update TelldusLive to use config flow

* fixes from Martin

* Update homeassistant/components/tellduslive/config_flow.py

Co-Authored-By: fredrike <fredrik.e@gmail.com>

* revert changes in entry.py

* tox tests

* tox fixes

* woof woof (fix for hound)

* lint ignore

* unload entry

* coverall toxtests

* fix some toxtests
2018-12-10 18:44:45 +01:00
David F. Mulcahey
f4f42176bd ZHA - Event foundation (#19095)
* event foundation

* add missing periods to comments

* reworked so that entities don't fire events

* lint

* review comments
2018-12-10 10:59:50 -05:00
Paulus Schoutsen
e94eb686a6 Bumped version to 0.84.0b3 2018-12-10 13:00:41 +01:00
Paulus Schoutsen
2da5a02285 Add raw service data to event (#19163) 2018-12-10 13:00:35 +01:00
Paulus Schoutsen
e3b1008511 Fix lovelace save (#19162) 2018-12-10 13:00:34 +01:00
Paulus Schoutsen
cb874fefbb Drop OwnTracks bad packets (#19161) 2018-12-10 13:00:34 +01:00
phnx
0454a5fa3f home-assistant/home-assistant#18645: revert heat-cool -> auto change 2018-12-10 13:00:09 +01:00
phnx
d8f6331318 home-assistant/home-assistant#18645: Remove un-used constants. 2018-12-10 13:00:09 +01:00
phnx
d7459c73e0 home-assistant/home-assistant#18645: Fix climate mode mapping. 2018-12-10 13:00:09 +01:00
Eric Nagley
fa9fe4067a Google assistant fix target temp for *F values. (#19083)
* home-assistant/home-assistant#18524 : Add rounding to *F temps

* home-assistant/home-assistant#18524 : Linting

* simplify round behavior

* fix trailing whitespace

(thanks github editor)
2018-12-10 12:59:16 +01:00
Paulus Schoutsen
59581786d3 Add raw service data to event (#19163) 2018-12-10 12:58:51 +01:00
Paulus Schoutsen
55aaa894c3 Updated frontend to 20181210.1 2018-12-10 12:50:42 +01:00
Paulus Schoutsen
3cf8610cb3 Updated frontend to 20181210.1 2018-12-10 12:50:30 +01:00
Paulus Schoutsen
802497b05c Google_assistant: fix climate modes (#19084)
* home-assistant/home-assistant#18645: Fix climate mode mapping.

* home-assistant/home-assistant#18645: Remove un-used constants.

* home-assistant/home-assistant#18645: revert heat-cool -> auto change
2018-12-10 12:32:24 +01:00
Eric Nagley
df2f476c67 Google assistant fix target temp for *F values. (#19083)
* home-assistant/home-assistant#18524 : Add rounding to *F temps

* home-assistant/home-assistant#18524 : Linting

* simplify round behavior

* fix trailing whitespace

(thanks github editor)
2018-12-10 12:31:52 +01:00
Paulus Schoutsen
da338f2c1a Fix lovelace save (#19162) 2018-12-10 12:25:08 +01:00
Paulus Schoutsen
fdea9cb426 Drop OwnTracks bad packets (#19161) 2018-12-10 12:24:56 +01:00
Paulus Schoutsen
18bc772cbb Bumped version to 0.84.0b2 2018-12-10 09:55:19 +01:00
arigilder
a5072f0fe4 Remove marking device tracker stale if state is stale (#19133) 2018-12-10 09:54:37 +01:00
Paulus Schoutsen
76c26da4cb Lovelace using storage (#19101)
* Add MVP

* Remove unused code

* Fix

* Add force back

* Fix tests

* Storage keyed

* Error out when storage doesnt find config

* Use old load_yaml

* Set config for panel correct

* Use instance cache var

* Make config option
2018-12-10 09:54:36 +01:00
Nick Horvath
3528d865b7 Bump skybellpy version to fix api issue (#19100) 2018-12-10 09:54:36 +01:00
Daniel Høyer Iversen
e6c224fa40 Upgrade Tibber lib (#19098) 2018-12-10 09:54:35 +01:00
Pierre Ståhl
048f219a7f Upgrade pyatv to 0.3.12 (#19085) 2018-12-10 09:54:35 +01:00
Paulus Schoutsen
945b84a7df Updated frontend to 20181210.0 2018-12-10 09:54:20 +01:00
Paulus Schoutsen
fe2d24c240 Update translations 2018-12-10 09:54:12 +01:00
Paulus Schoutsen
faab0aa9df Updated frontend to 20181210.0 2018-12-10 09:53:53 +01:00
Paulus Schoutsen
a521b885bf Lovelace using storage (#19101)
* Add MVP

* Remove unused code

* Fix

* Add force back

* Fix tests

* Storage keyed

* Error out when storage doesnt find config

* Use old load_yaml

* Set config for panel correct

* Use instance cache var

* Make config option
2018-12-10 08:57:17 +01:00
Yaron de Leeuw
a744dc270b Update pygtfs to upstream's 0.1.5 (#19151)
This works by adding `?check_same_thread=False` to the sqlite
connection string, as suggested by robbiet480@.
It upgrades pygtfs from homeassitant's forked 0.1.3 version to 0.1.5.

Fixes #15725
2018-12-09 23:32:48 +01:00
clayton craft
866c2ca994 Update radiotherm to 2.0.0 and handle change in tstat error detection (#19107)
* radiotherm: bump version to 2.0.0

* radiotherm: change handling of transient errors from tstat

Radiotherm 2.0.0 now throws an exception when a transient error is
detected, instead of returning -1 for the field where the error was
detected. This change supports handling the exception.
2018-12-09 23:27:31 +01:00
Fabian Affolter
bc8414a6f8 Merge pull request #19148 from scop/upgrade-upcloud
Upgrade upcloud-api to 0.4.3
2018-12-09 23:23:50 +01:00
Fabian Affolter
527f9cdfb2 Upgrade slacker to 0.12.0 (#19142) 2018-12-09 23:23:07 +01:00
Fabian Affolter
4c04fe652c Upgrade sphinx-autodoc-typehints to 1.5.2 (#19140) 2018-12-09 23:22:56 +01:00
Lukas Barth
5e65e27bda Update geizhals dependency (#19152) 2018-12-09 23:22:33 +01:00
Ville Skyttä
7d3a962f73 Upgrade mypy to 0.650 (#19150)
* Upgrade to 0.650

* Remove no longer needed type: ignore
2018-12-09 21:22:08 +02:00
Ville Skyttä
ce998cdc87 Upgrade upcloud-api to 0.4.3 2018-12-09 19:19:13 +02:00
Fabian Affolter
dbbbfaa869 Upgrade youtube_dl to 2018.12.03 (#19139) 2018-12-09 12:38:42 +01:00
Fabian Affolter
863edfd660 Upgrade slacker to 0.12.0 2018-12-09 11:34:53 +01:00
Ludovico de Nittis
4d4967d0dd Add code support for iAlarm (#19124) 2018-12-09 11:08:39 +01:00
Bas Schipper
4b4f51fb6f Fixed doorbird config without events (empty list) (#19121) 2018-12-09 10:33:39 +01:00
arigilder
30064655c2 Remove marking device tracker stale if state is stale (#19133) 2018-12-08 21:27:01 -07:00
edif30
fd5b92b2fb Update Google Assistant services description and request sync timeout (#19113)
* Fix google assistant request sync service call

* More descriptive services.yaml

* Update services.yaml

* Update __init__.py

* Update request sync service call timeout

Change from 5s to 15s to allow Google to respond.  5s was too short.  The service would sync but the service call would time out and throw the error.
2018-12-08 20:39:51 -05:00
Abílio Costa
6e55c2a345 update edp_redy version (#19078)
* update edp_redy version

* update requirements_all.txt
2018-12-08 21:16:16 +01:00
Sebastian Muszynski
2134331e2b Add Philips Moonlight Bedside Lamp support (#18496)
* Add Philips Moonlight Bedside Lamp support

* Update comment

* Make hound happy

* Wrap the call that could raise the exception only

* Remote blank line

* Use updated python-miio API
2018-12-08 14:49:14 +01:00
Daniel Høyer Iversen
ffe83d9ab1 Upgrade Mill library (#19117) 2018-12-08 11:38:42 +01:00
Sebastian Muszynski
f2f649680f Don't avoid async_schedule_update_ha_state by returning false (#19102) 2018-12-08 08:45:03 +01:00
Sebastian Muszynski
ece7b498ed Fix the Xiaomi Aqara Cube rotate event of the LAN protocol 2.0 (Closes: #18199) (#19104) 2018-12-08 08:28:39 +01:00
Sebastian Muszynski
65c2a25736 Support next generation of the Xiaomi Mi Smart Plug (chuangmi.plug.hmi205) (#19071)
* Add next generation of the Xiaomi Mi Smart Plug (chuangmi.plug.hmi205)

* Fix linting
2018-12-07 23:40:48 +01:00
Andrew Hayworth
05586de51f Set lock status correctly for Schlage BE469 Z-Wave locks (#18737)
* Set lock status correctly for Schlage BE469 Z-Wave locks

PR #17386 attempted to improve the state of z-wave lock tracking for
some problematic models. However, it operated under a flawed
assumptions. Namely, that we can always trust `self.values` to have
fresh data, and that the Schlage BE469 sends alarm reports after every
lock event. We can't trust `self.values`, and the Schlage is very
broken. :)

When we receive a notification from the driver about a state change,
we call `update_properties` - but we can (and do!) have _stale_
properties left over from previous updates. #17386 really works best
if you start from a clean slate each time. However, `update_properties`
is called on every value update, and we don't get a reason why.
Moreover, values that weren't just refreshed are not removed. So blindly
looking at something like `self.values.access_control` when deciding to
apply a workaround is not going to always be correct - it may or may not
be, depending on what happened in the past.

For the sad case of the BE469, here are the Z-Wave events that happen
under various circumstances:

RF Lock / Unlock:
- Send: door lock command set
- Receive: door lock report
- Send: door lock command get
- Receive: door lock report

Manual lock / Unlock:
- Receive: alarm
- Send: door lock command get
- Receive: door lock report

Keypad lock / Unlock:
- Receive: alarm
- Send: door lock command get
- Receive: door lock report

Thus, this PR introduces yet another work around - we track the current
and last z-wave command that the driver saw, and make assumptions based
on the sequence of events. This seems to be the most reliable way to go
- simply asking the driver to refresh various states doesn't clear out
alarms the way you would expect; this model doesn't support the access
control logging commands; and trying to manually clear out alarm state
when calling RF lock/unlock was tricky.

The lock state, when the z-wave network restarts, may look out of sync
for a few minutes. However, after the full network restart is complete,
everything looks good in my testing.

* Fix linter
2018-12-07 21:17:34 +01:00
Daniel Høyer Iversen
a58b3aad59 Upgrade Tibber lib (#19098) 2018-12-07 19:33:06 +01:00
Nick Horvath
e567e3d4e7 Bump skybellpy version to fix api issue (#19100) 2018-12-07 19:20:05 +01:00
phnx
385f0298bd home-assistant/home-assistant#18645: revert heat-cool -> auto change 2018-12-07 10:00:56 -05:00
speedmann
7edd241059 Automatically detect if ipv4/ipv6 is used for cert_expiry (#18916)
* Automatically detect if ipv4/ipv6 is used for cert_expiry

Fixes #18818
Python sockets use ipv4 per default. If the domain which should be checked
only has an ipv6 record, socket creation errors out with
`[Errno -2] Name or service not known`
This fix tries to guess the protocol family and creates the socket
with the correct family type

* Fix line length violation
2018-12-07 11:08:41 +01:00
Pierre Ståhl
5bf6951311 Upgrade pyatv to 0.3.12 (#19085) 2018-12-07 11:06:38 +01:00
phnx
24d0aa3f55 home-assistant/home-assistant#18645: Remove un-used constants. 2018-12-07 01:50:48 -05:00
emontnemery
5ff7563070 Merge pull request #18923 from emontnemery/mqtt_binary_sensor_json_attributes_topic
Add JSON attribute topic to MQTT binary sensor
2018-12-07 07:48:55 +01:00
Matthew Garrett
def4e89372 Bump lakeside requirement to support more Eufy devices (#19080)
The T1203 works fine with the existing protocol.
2018-12-07 07:32:21 +01:00
ehendrix23
8a62bc9237 Set directv unavailable state when errors returned for longer then a minute (#19014)
* Fix unavailable

Change setting to unavailable when getting request exceptions only after 1 minute has past since 1st occurrence.

* Put common code in _check_state_available

Put common code to determine if available should be set to False in method _check_state_available
2018-12-07 07:26:49 +01:00
phnx
471d94b6cd home-assistant/home-assistant#18645: Fix climate mode mapping. 2018-12-07 01:15:04 -05:00
Paulus Schoutsen
393ada0312 Bumped version to 0.84.0b1 2018-12-07 07:14:19 +01:00
Anders Melchiorsen
da160066c3 Upgrade aiolifx to 0.6.7 (#19077) 2018-12-07 07:13:35 +01:00
Bram Kragten
ff9427d463 Force refresh Lovelace (#19073)
* Force refresh Lovelace

* Check config on load

* Update __init__.py

* Update __init__.py
2018-12-07 07:13:35 +01:00
Mike Miller
3eb646eb0d Fix missing colorTemperatureInKelvin from Alexa responses (#19069)
* Fix missing colorTemperatureInKelvin from Alexa responses

* Update smart_home.py

* Add test
2018-12-07 07:13:34 +01:00
Paulus Schoutsen
578fe371c6 Revert #17745 (#19064) 2018-12-07 07:13:34 +01:00
Paulus Schoutsen
1b03a35fa1 Updated frontend to 20181207.0 2018-12-07 07:13:23 +01:00
Paulus Schoutsen
ce736e7ba1 Updated frontend to 20181207.0 2018-12-07 07:12:59 +01:00
Bram Kragten
455508deac Force refresh Lovelace (#19073)
* Force refresh Lovelace

* Check config on load

* Update __init__.py

* Update __init__.py
2018-12-07 07:09:05 +01:00
Anders Melchiorsen
0a3af545fe Upgrade aiolifx to 0.6.7 (#19077) 2018-12-07 07:06:35 +01:00
Mike Miller
dd92318762 Fix missing colorTemperatureInKelvin from Alexa responses (#19069)
* Fix missing colorTemperatureInKelvin from Alexa responses

* Update smart_home.py

* Add test
2018-12-06 17:05:14 +01:00
Sean Wilson
c931619269 Add CM17A support (#19041)
* Add CM17A support.

* Update log entry
2018-12-06 16:25:58 +01:00
Ville Skyttä
1be440a72b Upgrade pylint to 2.2.2 (#18750)
* Upgrade to 2.2.0

* simplifiable-if-expression fixes

* duplicate-string-formatting-argument fixes

* unused-import fixes

* Upgrade to 2.2.1

* Remove no longer needed disable

* Upgrade to 2.2.2
2018-12-06 11:54:44 +01:00
Paulus Schoutsen
04c7d5c128 Revert #17745 (#19064) 2018-12-06 10:38:26 +01:00
Paulus Schoutsen
30c77b9e64 Bumped version to 0.85.0.dev0 2018-12-06 09:36:44 +01:00
Paulus Schoutsen
4fd4e84b72 Bumped version to 0.84.0b0 2018-12-06 09:34:21 +01:00
Daniel Høyer Iversen
d4c8024522 Add support for more Tibber Pulse data (#19033) 2018-12-06 09:30:11 +01:00
Martin Gross
72379c166e Update locationsharinglib to 3.0.9 (#19045) 2018-12-06 09:29:30 +01:00
Paulus Schoutsen
f198706767 Remove Instapush notify platform (#19051) 2018-12-06 09:28:31 +01:00
pbalogh77
f0d534cebc Implemented unique ID support for Fibaro hub integration (#19055)
* Unique ID support

New unique ID support, based on hub's serial number and device's permanent ID

* Fixes, showing attributes

Minor fixes
Showing room, hub, fibaro_id for easier mapping and finding of devices

* Update fibaro.py
2018-12-06 09:28:06 +01:00
Daniel Perna
47320adcc6 Update pyhomematic to 0.1.53 (#19056) 2018-12-06 09:25:39 +01:00
Bram Kragten
b9ed4b7a76 Fix saving YAML as JSON with empty array (#19057)
* Fix saving YAML as JSON with empty array

* Lint
2018-12-06 09:24:49 +01:00
Erik Eriksson
b71d65015a VOC: Update external dependency to fix engine start issue (#19062) 2018-12-06 09:22:49 +01:00
Paulus Schoutsen
962358bf87 Fix cloud const (#19052)
* Fix cloud const

* Fix tests
2018-12-06 09:20:53 +01:00
Paulus Schoutsen
26a38f1fae Updated frontend to 20181205.0 2018-12-06 00:30:45 +01:00
Paulus Schoutsen
83311df933 Add translations 2018-12-06 00:30:33 +01:00
emontnemery
06285d1bf3 Merge pull request #19019 from emontnemery/fix_mqtt_availability
Fix entity unavailable after reconfiguring MQTT availability
2018-12-05 22:14:37 +01:00
photinus
0aee355b14 Bump pyvizio version (#19048)
* Update vizio.py

Bump pyvizio version to reoslve get volume call and component setup failures

* Update of requirement_all
2018-12-05 16:00:49 -05:00
Fabian Affolter
b2b4712bb7 Remove Instapush notify platform 2018-12-05 21:17:02 +01:00
Sebastian Muszynski
af96694430 Remove unsupported strong mode of the Xiaomi Air Humidifier CA1 (#18926)
* Remove unsupported strong mode of the Xiaomi Air Humidifier CA1

* Clean up filter of unsupported modes
2018-12-05 20:56:43 +01:00
Erik
df346feb65 Review comments 2018-12-05 19:48:44 +01:00
Aaron Bach
08702548f3 Add support for multiple RainMachine controllers (#18989)
* Add support for multiple RainMachine controllers

* Member comments

* Member comments

* Member comments

* Cleanup

* More config flow cleanup

* Member comments
2018-12-05 10:31:32 -07:00
Teemu R
bc69309b46 Add last clean times to xiaomi vacuum (#19043) 2018-12-05 18:20:26 +01:00
Teemu R
da0542e961 Bump python-miio to 0.4.4 (#19042) 2018-12-05 18:19:30 +01:00
Jeff Irion
16e25f2039 Catch 'BrokenPipeError' exceptions for ADB commands (#19011) 2018-12-05 17:04:08 +01:00
Sébastien RAMAGE
3627de3e8a Change error to warning (#19035) 2018-12-05 15:58:46 +01:00
Glenn Waters
b31c52419d Bump version of elkm1_lib (#19030) 2018-12-05 09:31:07 -05:00
Paulus Schoutsen
578a2cf357 Small refactoring of MQTT switch (#19010) 2018-12-05 14:47:02 +01:00
emontnemery
69fd3aa856 Small refactoring of MQTT light (#19009) 2018-12-05 14:46:37 +01:00
Paulus Schoutsen
12f222b5e3 Don't wait for answer for webhook register (#19025) 2018-12-05 14:45:30 +01:00
Paulus Schoutsen
eb317bd302 Merge pull request #19036 from sdague/mychevy_1.0.1
update mychevy to 1.0.1
2018-12-05 14:44:43 +01:00
Paulus Schoutsen
ab9d1a83af Bump waterfurnace to 1.0 (#19040)
This bumps to the new version of the waterfurnace API. In the new
version the unit id is no longer manually set by the user, instead it
is retrieved from the service after login. This is less error prone as
it turns out discovering the correct unit id is hard from an end user
perspective.

Breaking change on the config, as the unit parameter is removed from
config. However I believe the number of users is very low (possibly
only 2), so adaptation should be easy.
2018-12-05 14:44:25 +01:00
Paulus Schoutsen
0e9e253b7b Fix CI by pinning IDNA (#19038)
* Fix CI

* Actual fix by @sdague
2018-12-05 14:43:29 +01:00
Bram Kragten
850caef5c1 Add states to panels (#19026)
* Add states to panels

* Line too long

* remove extra urls for states

* Update __init__.py
2018-12-05 14:27:35 +01:00
Sean Dague
8c0b50b5df Bump waterfurnace to 1.0
This bumps to the new version of the waterfurnace API. In the new
version the unit id is no longer manually set by the user, instead it
is retrieved from the service after login. This is less error prone as
it turns out discovering the correct unit id is hard from an end user
perspective.

Breaking change on the config, as the unit parameter is removed from
config. However I believe the number of users is very low (possibly
only 2), so adaptation should be easy.
2018-12-05 07:03:27 -05:00
Sean Dague
a785a1ab5d update mychevy to 1.0.1
After six months the chevy website finally has been reimplemented to
something that seems to work and is stable. The backend library has
been updated thanks to upstream help, and now is working again.
2018-12-05 05:42:27 -05:00
Paulus Schoutsen
3928d034a3 Allow checking entity permissions based on devices (#19007)
* Allow checking entity permissions based on devices

* Fix tests
2018-12-05 11:41:00 +01:00
jxwolstenholme
2680bf8a61 Update requirement btsmarthub_devicelist==0.1.3 (#18961)
* Added requirement 'btsmarthub_devicelist==0.1.2'

* Update requirements_all.txt

* Update bt_smarthub.py

* Update requirements_all.txt

* Update bt_smarthub.py
2018-12-04 23:26:20 +01:00
majuss
a8b5cc833d Lupupy version push to 0.0.17 - will now transmitted state_alarm_triggered (#19008)
* added state_alarm_triggered transmission; pushed lupupy version

* added state_alarm_triggered transmission; pushed lupupy version

* added state_alarm_triggered transmission; pushed lupupy version

* added state_alarm_triggered transmission; pushed lupupy version
2018-12-04 22:04:39 +01:00
Erik
f54710c454 Fix bug when reconfiguring MQTT availability 2018-12-04 21:25:18 +01:00
Erik
21197fb968 Review comments 2018-12-04 19:56:34 +01:00
Erik
47d48c5990 Small refactoring of MQTT switch 2018-12-04 16:39:49 +01:00
Matt Hamilton
38b09b1613 Remove stale user salts code (#19004)
user['salt'] was originally used as a part of the pbkdf2 implementation.
I failed to remove this as a part of the cleanup in #18736.
2018-12-04 14:39:43 +01:00
Paulus Schoutsen
26dd490e8e Fix toon operation mode (#18966)
* Fix toon

* Update toon.py
2018-12-04 13:24:18 +01:00
Emil Stjerneman
1c99960357 Fix VOC configuration resource list (#18992) 2018-12-04 11:39:42 +01:00
Alexei Chetroi
3e1ab1b23a Sort import order of zha component. (#18993) 2018-12-04 11:38:57 +01:00
pbalogh77
2a0c2d5247 Fibaro Light fixes (#18972)
* minor fixes to color scaling

* capped input to fibaro on setcolor
2018-12-04 11:38:21 +01:00
Paulus Schoutsen
b65bffd849 Mock out device tracker configuration loading funcs in Geofency + OwnTracks (#18968)
* Mock out device tracker configuration loading funcs

* Update test_init.py

* Update test_init.py
2018-12-04 10:45:41 +01:00
cdce8p
ab7c52a9c4 Add unnecessary-pass for pylint-update (#18985) 2018-12-04 10:45:16 +01:00
Fredrik Erlandsson
d6a4e106a9 Tellduslive refactoring (#18780)
* move component to a package

* move TelldusLiveEntry to separate file

* refactor

* move entities from a shared container
* using the dispatch helper instead for communication between component and platforms

* updated covereagerc and codeowners

* suggestions from MartinHjelmare

* don't make update async

* "Strip is good!"
2018-12-04 10:08:40 +01:00
Pierre Gronlier
a6511fc0b9 remove the need to have query feature support (#18942)
* remove the need to have query feature support

Some InfluxDB servers don't have /query support feature but are still valid servers for storing data.
Usually those servers are proxies to others timeseries databases.
The change proposes to still validate the configuration but with less requirements on the server side.

* `.query` call is replaced by `.write_points`

* no more query call in the influxdb component. remove test

* reset mock after the setup and before the test

* remove unused import

* reset mock stats after component setup
2018-12-04 09:59:03 +01:00
Bram Kragten
75b855ef93 Lovelace fix: badges are removed from view after update (#18983)
* badges are removed from view after update

* Only add badges and cards when not provided in new config
2018-12-04 09:56:30 +01:00
Dom
d8a7e9ded8 Updated Yale Smart Alarm platform to new Yale API (#18990)
* Updated Yale Smart Alarm platform to use Yale's new API which replaces the deprecated version. Bumped yalesmartalarmclient to v0.1.5.

* Update requirements
2018-12-04 09:56:14 +01:00
Craig J. Midwinter
f3d7cc66e5 downgrade version of client (#18995)
* downgrade version of client

* update requirements
2018-12-04 09:52:30 +01:00
Jason Hunter
b900005d1e New Events and Context Fixes (#18765)
* Add new events for automation trigger and script run, fix context for image processing, add tests to ensure same context

* remove custom logbook entry for automation and add new automation event to logbook

* code review updates
2018-12-04 09:45:17 +01:00
Daniel Høyer Iversen
8e9c73eb18 Upgrade switchbot lib (#18980) 2018-12-04 06:48:27 +01:00
Daniel Høyer Iversen
b024c3a833 Add @danielhiversen as codeowner (#18979) 2018-12-04 06:48:16 +01:00
Daniel Høyer Iversen
31078b2b3e Merge pull request #18928 from home-assistant/tibber_err_handle
Tibber, Improve logging and error handling
2018-12-04 06:47:50 +01:00
Joakim Sørensen
ad0e3cea8a Update CODEOWNERS (#18976) 2018-12-03 21:49:15 -05:00
Bram Kragten
b5e7e45f6c no ordered dict (#18982) 2018-12-03 21:54:34 +01:00
Kevin Fronczak
4486de743d Support for mulitple Blink sync modules (#18663) 2018-12-03 20:45:12 +00:00
Daniel Høyer Iversen
df3c683023 Improve err handling 2018-12-03 20:53:18 +01:00
Erik Eriksson
d7a10136df VOC: Update library version. Moved method one step out. Instruments can be a set as well (#18967) 2018-12-03 19:52:50 +01:00
Otto Winter
c8d92ce907 Fix MQTT re-subscription logic (#18953)
* Fix MQTT re-subscription logic

* Cleanup

* Lint

* Fix
2018-12-03 19:16:58 +01:00
Fredrik Erlandsson
111a3254fb Point fix for multiple devices (#18959)
* fix for multiple devices closes, #18956

* Point API finally supports "all" events
2018-12-03 16:50:05 +01:00
Paulus Schoutsen
d028236bf2 Refactor script helper actions into their own methods (#18962)
* Refactor script helper actions into their own methods

* Lint

* Lint
2018-12-03 15:46:25 +01:00
Bram Kragten
d0751ffd91 Add id when not exist and fix dup id check (#18960)
* Add id when not exist and fix dup id check

* config possibly not be a yaml dict
2018-12-03 15:44:04 +01:00
Paulus Schoutsen
2fff0324f8 Merge remote-tracking branch 'origin/master' into dev 2018-12-03 15:26:55 +01:00
pbalogh77
149eddaf46 Initial scene support for Fibaro hubs (#18779)
* Initial scene support

Added initial support for fibaro scenes

* removed comments

* cleanup based on code review

* Removed unused functions

* grrr, my mistake.

My local pylint and flake8 are playing tricks with me

* Update homeassistant/components/scene/fibaro.py

* fixes based on code review

ABC ordered the list of platforms
changed setup platform to async
removed overloaded name property as the FibaroDevice parent class already provides this
Changed to new style string formatting

* Update homeassistant/components/scene/fibaro.py

Co-Authored-By: pbalogh77 <peter.balogh2@gmail.com>
2018-12-03 14:57:55 +01:00
Paulus Schoutsen
acd2f55d4f Merge pull request #18958 from home-assistant/rc
0.83.3
2018-12-03 13:56:35 +01:00
Paulus Schoutsen
4ef1bf2157 Bumped version to 0.83.3 2018-12-03 11:42:49 +01:00
kennedyshead
106cb63922 bump aioasuswrt version (#18955) 2018-12-03 11:42:39 +01:00
kennedyshead
f6a79059e5 fix aioasuswrt sometimes return empty lists (#18742)
* aioasuswrt sometimes return empty lists

* Bumping aioasuswrt to 1.1.12
2018-12-03 11:42:38 +01:00
Paulus Schoutsen
35690d5b29 Add users added via credentials to admin group too (#18922)
* Add users added via credentials to admin group too

* Update test_init.py
2018-12-03 11:41:04 +01:00
William Scanlon
3575c34f77 Use capability of sensor if present to fix multisensor Wink devices (#18907) 2018-12-03 11:41:03 +01:00
ludeeus
ee1c29b392 corrects , -> . typo 2018-12-03 11:40:50 +01:00
ludeeus
82d89edb4f Use dict.get('key') instead of dict['key'] 2018-12-03 11:40:50 +01:00
ludeeus
475be636d6 Fix requirements_all 2018-12-03 11:40:50 +01:00
ludeeus
f8218b5e01 Fix IndexError for home stats 2018-12-03 11:40:50 +01:00
ludeeus
79a9c1af9e bump ghlocalapi to use clear_scan_result 2018-12-03 11:40:03 +01:00
ludeeus
6de0ed3f0a Fix stability issues with multiple units 2018-12-03 11:40:03 +01:00
Andrew Hayworth
1d717b768d bugfix: ensure the google_assistant component respects allow_unlock (#18874)
The `Config` object specific to the `google_assistant` component
had a default value for `allow_unlock`. We were not overriding this
default when constructing the Config object during `google_assistant`
component setup, whereas we do when setting up the `cloud` component.

To fix, we thread the `allow_unlock` parameter down through http setup,
and ensure that it's set correctly. Moreover, we also change the
ordering of the `Config` parameters, and remove the default. Future
refactoring should not miss it, as it is now a required parameter.
2018-12-03 11:38:43 +01:00
William Scanlon
85c0de550c Use capability of sensor if present to fix multisensor Wink devices (#18907) 2018-12-03 11:34:22 +01:00
Paulus Schoutsen
d2b62840f2 Add users added via credentials to admin group too (#18922)
* Add users added via credentials to admin group too

* Update test_init.py
2018-12-03 11:34:01 +01:00
kennedyshead
17c6ef5d54 bump aioasuswrt version (#18955) 2018-12-03 11:13:06 +01:00
cdce8p
3904d83c32 Extend partial reload to include packages (#18884)
* Merge packages after partial reload

* Remove merge from core reload & test

* Integrate merge in 'async_hass_config_yaml'

* Merge executors
2018-12-03 10:56:26 +01:00
Oliver
f3946cb54f Push to version 0.7.7 of denonavr (#18917) 2018-12-03 10:07:43 +01:00
James Hilliard
832fa61477 Initial hlk-sw16 relay switch support (#17855)
* Initial hlk-sw16 relay switch support

* remove entity_id and validate relay id's

* Bump hlk-sw16 library version and cleanup component

* refactor hlk-sw16 switch platform loading

* Use voluptuous to coerce relay id to string

* remove force_update for SW16Switch

* Move to callback based hlk-sw16 relay state changes

* fix hlk-sw16 default port and cleanup some unused variables

* Refactor to allow registration of multiple HLK-SW16 device

* Store protocol in instance variable instead of class variable

* remove is_connected

* flake8 style fix

* Move reconnect logic into HLK-SW16 client library

* Cleanup and improve logging

* Load hlk-sw16 platform entities at same time per device

* scope SIGNAL_AVAILABILITY to device_id

* Fixes for connection resume

* move device_client out of switches loop

* Add timeout for commands and keep alive

* remove unused variables
2018-12-03 09:31:53 +01:00
Andrew Hayworth
5ae65142b8 Allow verisure locks to be configured with a default code (#18873)
* Allow verisure locks to be configured with a default code

* linting fix

* PR feedback

* PR feedback - try harder to prevent future typos

A python mock is a magical thing, and will respond to basicaly
any method you call on it. It's somewhat better to assert against
an explicit variable named 'mock', rather than to assert on the
method name you wanted to mock... could prevent a typo from messing up
tests.

* PR feedback: convert tests to integration-style tests

Set up a fake verisure hub, stub out a _lot_ of calls, then test
after platform discovery and service calls.

It should be noted that we're overriding the `update()` calls in
these tests. This was done to prevent even further mocking of
the verisure hub's responses.

Hopefully, this'll be a foundation for people to write more tests.

* more pr feedback
2018-12-03 07:25:54 +01:00
GeoffAtHome
eb584a26e2 Add lightwave components for switches and lights (#18026)
* Added lightwave components for switches and lights.

* Address warnings raised by Hound

* Correcting lint messages and major typo. This time tested before commit.

* Trying to fix author

* Minor lint changes

* Attempt to correct other lint error.

* Another lint attempt.

* More lint issues.

* Last two lint errors! Hurrah.

* Changes after review from fabaff.

* Moved device dependent code to PyPi.

* Replaced DEPENDENCIES with REQUIREMENTS

* Updated following code review from Martin Hjelmare.

* Added lightwave to requirements_all.txt

* Omit lightwave from tests.

* Updated requirements_all.txt

* Refactored how lightwave lights and switches load.

* Removed imports that were no longer required.

* Add guard for no discovery_info.

* Make it a guard clause and save indentation. Rename LRFxxx to LWRFxxx.

* Sorted imports to match style guidelines.

* Correct return value.

* Update requirements_all.txt

* Catch case where we have no lights or switches configured.

* Improve configuration validation.
2018-12-02 20:58:31 +01:00
emontnemery
87fb492b14 Remove commented out code (#18925) 2018-12-02 19:12:03 +01:00
Erik
b9ad19acbf Add JSON attribute topic to MQTT binary sensor
Add MqttAttributes mixin
2018-12-02 17:00:31 +01:00
Paulus Schoutsen
d1a621601d No more opt-out auth (#18854)
* No more opt-out auth

* Fix var
2018-12-02 16:32:53 +01:00
emontnemery
ae9e3d83d7 Reconfigure MQTT switch component if discovery info is changed (#18179) 2018-12-02 16:16:46 +01:00
emontnemery
afa99915e3 Reconfigure MQTT light component if discovery info is changed (#18176) 2018-12-02 16:16:36 +01:00
Martin Fuchs
bb13829e13 Set sensor to unavailable if battery is dead. (#18802) 2018-12-02 16:01:18 +01:00
Daniel Høyer Iversen
fb12294bb7 remove unused import 2018-12-02 15:54:52 +01:00
Vladimir Eremin
debae6ad2e Fix hdmi_cec entity race (#18753)
* Update shouldn't be called before adding the entity.
* Transitional states from
  8adc786bac/include/cectypes.h (L458-L459)

Addressing https://github.com/home-assistant/home-assistant/issues/12846
2018-12-02 15:51:04 +01:00
Otto Winter
eec4564c71 Show ANSI color codes in logs in Hass.io (#18834)
* Hass.io: Show ANSI color codes in logs

* Lint

* Fix test

* Lint
2018-12-02 15:46:14 +01:00
Daniel Høyer Iversen
08dbd792cd Improve logging and error handling 2018-12-02 15:35:59 +01:00
Andrew Hayworth
b7e2522083 bugfix: ensure the google_assistant component respects allow_unlock (#18874)
The `Config` object specific to the `google_assistant` component
had a default value for `allow_unlock`. We were not overriding this
default when constructing the Config object during `google_assistant`
component setup, whereas we do when setting up the `cloud` component.

To fix, we thread the `allow_unlock` parameter down through http setup,
and ensure that it's set correctly. Moreover, we also change the
ordering of the `Config` parameters, and remove the default. Future
refactoring should not miss it, as it is now a required parameter.
2018-12-02 11:14:46 +01:00
Paulus Schoutsen
a62fc7ca04 Use string formatting (#18886)
* Use string formatting

* Fix lint issue

* Fix change
2018-12-02 10:53:09 +01:00
pbalogh77
0a68cae507 Fibaro ubs (#18889)
* Fibaro HC connection, initial commit

Very first steps working, connects, fetches devices, represents sensors, binary_sensors and lights towards HA.

* Cover, switch, bugfixes

Initial support for covers
Initial support for switches
Bugfixes

* Some cleanup and improved lights

pylint based cleanup
light switches handled properly
light features reported correctly

* Added status updates and actions

Lights, Blinds, Switches are mostly working now

* Code cleanup, fiblary3 req

Fiblary3 is now in pypi, set it as req
Cleanup based on pylint

* Included in .coveragerc and added how to use guide

Included the fibaro component in coveragerc
Added usage instructions to file header

* PyLint inspired fixes

Fixed pylint warnings

* PyLint inspired fixes

PyLint inspired fixes

* updated to fiblary3 0.1.5

* Minor fixes to finally pass pull req

Fixed fiblary3 to work with python 3.5
Updated fiblary3 to 0.1.6
(added energy and batteryLevel dummies)

* module import and flake8 fixes

Finally (hopefully) figured out what lint is complaining about

* Fixed color support for lights, simplified callback

Fixed color support for lights
Simplified callback for updates
Uses updated fiblary3 for color light handling

* Lean and mean refactor

While waiting for a brave reviewer, I've been making the code smaller and easier to understand.

* Minor fixes to please HoundCI

* Removed unused component

Scenes are not implemented yet

* Nicer comments.

* DEVICE_CLASS, ignore plugins, improved mapping

Added support for device class and icons in sensors and binary_sensors
Improved mapping of sensors and added heuristic matching
Added support for hidden devices
Fixed conversion to float in sensors

* Fixed dimming

Fibaro apparently does not need, nor like the extra turnOn commands for dimmers

* flake8

* Cleanup, Light fixes, switch power

Cleanup of the component to separate init from connect, handle connection error better
Improved light handling, especially for RGBW strips and working around Fibaro quirks
Added energy and power reporting to switches

* Missing comment added

Missing comment added to please flake8

* Removed everything but bin.sensors

Stripdown, hoping for a review

* better aligned comments

OMG

* Fixes based on code review

Fixes based on code review

* Implemented stopping

Implemented stopping of StateHandler thread
Cleanup for clarity

* Minor fix

Removed unnecessary list copying

* Nicer wording on shutdown

* Minor changes based on code review

* minor fixes based on code review

* removed extra line break

* Added Fibaro omcponents

Added cover, light, sensor and switch components

* Improved support for Fibaro UBS

Improved support for Fibaro Universal Binary Sensor, when configured to flood sensor or motion sensor.
2018-12-02 10:52:37 +01:00
Adam Mills
a10cbadb57 Restore states when removing/adding entities (#18890) 2018-12-02 10:51:15 +01:00
emontnemery
bbb40fde84 Optionally do not log template rendering errors (#18724) 2018-12-02 10:31:46 +01:00
emontnemery
ce218b172a Small refactoring of MQTT climate (#18814) 2018-12-02 10:30:07 +01:00
emontnemery
2e4e673bbe Small refactoring of MQTT alarm (#18813) 2018-12-02 10:29:31 +01:00
emontnemery
db4a0e3244 Small refactoring of MQTT cover (#18850) 2018-12-02 10:27:50 +01:00
Daniel Høyer Iversen
de82df3c6b Merge pull request #18892 from home-assistant/upgrade-sphinx
Upgrade Sphinx to 1.8.2
2018-12-02 09:57:52 +01:00
Daniel Høyer Iversen
3bc83920b4 Merge branch 'dev' into upgrade-sphinx 2018-12-02 08:46:34 +01:00
Daniel Høyer Iversen
253dc66129 Merge pull request #18895 from home-assistant/upgrade-slacker
Upgrade slacker to 0.11.0
2018-12-02 08:45:02 +01:00
Daniel Høyer Iversen
b063547138 Merge pull request #18851 from emontnemery/mqtt_fan_refactor
Small refactoring of MQTT fan
2018-12-02 08:43:56 +01:00
Daniel Høyer Iversen
d8c6cb1112 Merge pull request #18852 from emontnemery/mqtt_sensor_refactor
Small refactoring of MQTT sensor
2018-12-02 08:40:57 +01:00
Daniel Høyer Iversen
5b0c12b12b Merge pull request #18864 from meatheadmike/dev
Bump pywemo to 0.4.33 (expanded port range fixes dimmers on latest firmware)
2018-12-02 08:38:37 +01:00
Daniel Høyer Iversen
ba372c085c Merge pull request #18880 from ludeeus/tautulli-fix
Fixes error with getting attributes from Tautulli
2018-12-02 08:35:30 +01:00
Daniel Høyer Iversen
2c36f4411e Merge pull request #18879 from ludeeus/multiple-googlehome
Fix stability issues with multiple googlehome units
2018-12-02 08:33:33 +01:00
Daniel Høyer Iversen
8eb9445bea Merge pull request #18904 from home-assistant/upgrade-Pillow
Upgrade pillow to 5.3.0
2018-12-02 08:28:27 +01:00
Daniel Høyer Iversen
456cec2931 Merge pull request #18903 from home-assistant/upgrade-ruamel.yaml
Upgrade ruamel.yaml to 0.15.80
2018-12-02 08:28:04 +01:00
Daniel Høyer Iversen
af7fe8c4fd Merge pull request #18902 from home-assistant/upgrade-restrictedpython
Upgrade restrictedpython to 4.0b7
2018-12-02 08:27:40 +01:00
Daniel Høyer Iversen
41ad04276b Upgrade sphinx-autodoc-typehints to 1.5.1 (#18893) 2018-12-02 08:26:46 +01:00
Fabian Affolter
e591234b59 Upgrade keyring to 17.0.0 (#18901) 2018-12-02 08:26:23 +01:00
Fabian Affolter
9f3c9cdb11 Upgrade pillow to 5.3.0 2018-12-02 00:30:02 +01:00
Fabian Affolter
48b8fc9e01 Upgrade ruamel.yaml to 0.15.80 2018-12-02 00:17:41 +01:00
Fabian Affolter
4807ad7875 Upgrade restrictedpython to 4.0b7 2018-12-02 00:11:47 +01:00
Fabian Affolter
7b6893c9d3 Fix change 2018-12-01 22:08:15 +01:00
Fabian Affolter
4b85ffae4f Upgrade slacker to 0.11.0 2018-12-01 22:01:22 +01:00
Fabian Affolter
2ca4893948 Upgrade sphinx-autodoc-typehints to 1.5.1 2018-12-01 21:48:56 +01:00
Fabian Affolter
9156a827ce Upgrade Sphinx to 1.8.2 2018-12-01 21:45:16 +01:00
ludeeus
1dac84e9dd corrects , -> . typo 2018-12-01 21:34:31 +01:00
ludeeus
da715c2a03 Use dict.get('key') instead of dict['key'] 2018-12-01 21:32:31 +01:00
Fabian Affolter
fc1a4543d3 Fix lint issue 2018-12-01 20:57:39 +01:00
Fabian Affolter
54904fb6c0 Use string formatting 2018-12-01 19:27:21 +01:00
Michael Nosthoff
bd09e96681 Reintroduce unique_id for Netatmo sensor (#18774)
* netatmo: make module type identification more consistent

For the interpretation of voltage values the different types of netatmo
modules need to be distinguished. This is currently done by selecting
the second character of the modules '_id'. The _id-field actually
contains a mac address. This is an undocumented way of identifying the
module_type.

The netatmo API also delivers a field called 'type' which provides a
more consistent way to differentiate the fields. This commit introduces
a differentiation which uses this provided type. This should improve
readability.

Also the field module_id is renamed to module_type which should better
resemble what it actually represents.

* netatmo: reintroduce unique_id using actual module mac address

Each netatmo module features a unique MAC-Address. The base station uses
an actual assigned MAC Address it also uses on the Wifi it connects to.
All other modules have unique MAC Addresses which are only assigned and
used by Netatmo on the internal Wireless-Network. All theses Addresses
are exposed via the API. So we could use the combination
MAC-Address-Sensor_type as unique_id.

In a previous commit this had already been tried but there was a
misunderstanding in what the 'module_id' represented. It was actually
only a module_type representation so it clashed when two modules of the
same type where used.

* Netatmo: fixed line length
2018-12-01 18:00:49 +01:00
ludeeus
8e84401b68 bump ghlocalapi to use clear_scan_result 2018-12-01 16:28:22 +01:00
ludeeus
934eccfeee Fix stability issues with multiple units 2018-12-01 14:55:50 +01:00
ludeeus
89bd6fa494 Fix requirements_all 2018-12-01 14:51:32 +01:00
ludeeus
d8b9bee7fb Fix IndexError for home stats 2018-12-01 14:51:32 +01:00
Joakim Sørensen
558504c686 Fix ordinal filter in template (#18878) 2018-12-01 14:49:34 +01:00
Eliseo Martelli
c69fe43e75 fixed state case for rtorrent (#18778) 2018-12-01 12:00:35 +01:00
Carlos Gustavo Sarmiento
29f15393b1 Updated UVC camera component to support SSL connections (#18829) 2018-12-01 11:58:59 +01:00
Mahasri Kalavala
c23792d1fb Added new filters for templates (#18125)
* added additional filters

Added base64_encode, base64_decode and ordinal filters.

* added test cases

added test cases for base64_encode, base64_decode and ordinal filters.

* forgot to add filters :)
2018-12-01 10:38:10 +01:00
damarco
1ae58ce48b Add support for zha device registry (#18755) 2018-12-01 10:31:49 +01:00
ehendrix23
ecca51b16b Add tests for directv platform (#18590)
* Create test for platform

Created test for platform.
Added media_stop to common.py test

* Multiple improvements

Fixed lint issue in common.py
Fixed lint issues in test_directv.py
Improved patching import using modile_patcher.start() and stop()
Added asserts for service calls.

* Updates based on Martin's review

Updates based on Martin's review.

* Updated test based on PR#18474

Updated test to use service play_media instead of select_source based on change from PR18474

* Lint issues

Lint issues

* Further updates based on feedback

Updates based on feedback provided.

* Using async_load_platform for discovery test

Using async_load_platform for discovery tests.
Added asserts to ensure entities are created with correct names.

* Used HASS event_loop to setup component

Use HASS event_loop to setup the component async.

* Updated to use state machine for # entities

Updated to use state machine to count # entities instead of entities.

* Use hass.loop instead of getting current loop

Small update to use hass.loop instead, thanks Martin!

* Forgot to remove asyncio

Removed asyncio import.

* Added fixtures

Added fixtures.

* Remove not needed updates and assertions

* Return mocked dtv instance from side_effect

* Fix return correct fixture instance

* Clean up assertions

* Fix remaining patches

* Mock time when setting up component in fixture

* Patch time correctly

* Attribute _last_update should return utcnow
2018-12-01 10:28:27 +01:00
Aaron Bach
3a854f4c05 Fix issues with 17track.net sensor names (#18860) 2018-11-30 21:54:40 -07:00
Aaron Bach
c24ddfb1be Bump py17track to 2.1.1 (#18861) 2018-11-30 21:12:55 -07:00
meatheadmike
0754a63969 Bumped pywemo to 0.4.33 2018-11-30 14:03:32 -07:00
meatheadmike
8a75bee82f bump pywemo to 0.4.33
Bump pywemo to 0.4.33 - includes expended port range fix for dimmers
2018-11-30 14:00:26 -07:00
Paulus Schoutsen
df21dd21f2 RFC: Call services directly (#18720)
* Call services directly

* Simplify

* Type

* Lint

* Update name

* Fix tests

* Catch exceptions in HTTP view

* Lint

* Handle ServiceNotFound in API endpoints that call services

* Type

* Don't crash recorder on non-JSON serializable objects
2018-11-30 21:28:35 +01:00
Paulus Schoutsen
bac48aa9d2 Merge pull request #18857 from home-assistant/rc
0.83.2
2018-11-30 20:09:29 +01:00
Paulus Schoutsen
53cbb28926 Fix flaky geofency test (#18855) 2018-11-30 20:06:10 +01:00
Erik Eriksson
d7809c5398 Update of volvooncall component (#18702) 2018-11-30 19:07:42 +01:00
Paulus Schoutsen
9b3373a15b Bumped version to 0.83.2 2018-11-30 17:53:14 +01:00
pbalogh77
474909b515 Hotfix for Fibaro wall plug (#18845)
Fibaro wall plug with a lamp plugged in was misrecognized as a color light, generating crashes in the update function.
2018-11-30 17:53:04 +01:00
Paulus Schoutsen
80f2c2b124 Always set hass_user (#18844) 2018-11-30 17:53:04 +01:00
Darren Foo
ada148eeae bump gtts-token to 1.1.3 (#18824) 2018-11-30 17:53:03 +01:00
emontnemery
449cde5396 Revert change to MQTT discovery_hash introduced in #18169 (#18763) 2018-11-30 17:53:03 +01:00
Paulus Schoutsen
d014517ce2 Always set hass_user (#18844) 2018-11-30 17:32:47 +01:00
pbalogh77
8f50180598 Hotfix for Fibaro wall plug (#18845)
Fibaro wall plug with a lamp plugged in was misrecognized as a color light, generating crashes in the update function.
2018-11-30 17:23:25 +01:00
Erik
1686f73749 Small refactoring of MQTT sensor 2018-11-30 16:53:56 +01:00
Erik
deb9a1133c Small refactoring of MQTT fan 2018-11-30 16:53:14 +01:00
Matt Schmitt
e0f0487ce2 Add services description (#18839) 2018-11-30 16:31:35 +01:00
Daniel Høyer Iversen
44e35ec9a1 update netatmo library (#18823) 2018-11-30 08:45:40 -05:00
emontnemery
a9990c130d Revert change to MQTT discovery_hash introduced in #18169 (#18763) 2018-11-30 13:57:17 +01:00
Darren Foo
fcdb25eb3c bump gtts-token to 1.1.3 (#18824) 2018-11-30 11:18:24 +01:00
Heine Furubotten
4bee3f760f Add Entur departure information sensor (#17286)
* Added Entur departure information sensor.

* Fixed houndci-bot comments.

* Removed tailing whitespace.

* Fixed some comments from tox lint.

* Improved docstring, i think.

* Fix for C1801

* Unit test for entur platform setup

* Rewritten entur component to have pypi dependecy.

* Propper client id for api usage.

* Minor cleanup of usage of constants.

* Made location output configurable.

* Cleaned up usage of constants.

* Moved logic to be contained within setup or update methods.

* Moved icon consts to root in module.

* Using config directly in test

* Minor changes
2018-11-30 09:06:59 +01:00
Andrew Hayworth
5f53627c0a Bump python_awair to 0.0.3 (#18819) 2018-11-30 08:47:05 +01:00
Adam Mills
22f27b8621 Store state last seen time separately (#18806)
* Store state last seen time separately

This ensures that infrequently updated entities aren't accidentally
dropped from the restore states store

* Fix mock restore cache
2018-11-30 08:26:19 +01:00
ehendrix23
a9dc4ba297 Increase pyatv to 0.3.11 (#18801) 2018-11-29 23:44:29 +01:00
Paulus Schoutsen
3701c0f219 Merge pull request #18811 from home-assistant/rc
0.83.1
2018-11-29 23:18:13 +01:00
ehendrix23
a035725c67 Service already discovered log entry (#18800)
Add debug log entry if service is already discovered.
2018-11-29 23:15:48 +01:00
Paulus Schoutsen
440614dd9d Use proper signals (#18613)
* Emulated Hue not use deprecated handler

* Remove no longer needed workaround

* Add middleware directly

* Dont always load the ban config file

* Update homeassistant/components/http/ban.py

Co-Authored-By: balloob <paulus@home-assistant.io>

* Update __init__.py
2018-11-29 23:05:23 +01:00
Paulus Schoutsen
163c881ced Bumped version to 0.83.1 2018-11-29 22:58:06 +01:00
pbalogh77
0467d0563a Hotfix for crash with virtual devices (#18808)
* Quickfix for crash with virtual devices

Added try/except to critical loops of processing
Reinforced read_devices, map_device_to_type and update processing

* oops
2018-11-29 22:57:45 +01:00
pbalogh77
2b52f27eb9 Hotfix for crash with virtual devices (#18808)
* Quickfix for crash with virtual devices

Added try/except to critical loops of processing
Reinforced read_devices, map_device_to_type and update processing

* oops
2018-11-29 22:57:05 +01:00
Aaron Bach
31d7221c90 Remove additional self from update function in RainMachine (#18810) 2018-11-29 22:51:16 +01:00
Daniel Høyer Iversen
d9124b182a Remove self from update function in rainmachine (#18807) 2018-11-29 22:51:15 +01:00
Aaron Bach
f2b818658f Bumped py17track to 2.1.0 (#18804) 2018-11-29 22:51:15 +01:00
Eric Nagley
5a6ac9ee72 BUGFIX: handle extra fan speeds. (#18799)
* BUGFIX: add support for extra fan speeds.

* Drop extra fan speeds.

Remove catch all, drop missing fan speeds.

* fix self.speed_synonyms call. Remove un-needed keys() call
2018-11-29 22:51:14 +01:00
Paulus Schoutsen
7fa5f07218 Fix race condition in group.set (#18796) 2018-11-29 22:51:13 +01:00
Paulus Schoutsen
fa9a200e3c Render the secret (#18793) 2018-11-29 22:51:13 +01:00
Paulus Schoutsen
0ca67bf6f7 Make auth backwards compat again (#18792)
* Made auth not backwards compat

* Fix tests
2018-11-29 22:51:12 +01:00
cdce8p
f1c5e756ff Fix logbook domain filter - alexa, homekit (#18790) 2018-11-29 22:51:12 +01:00
Paulus Schoutsen
ff33d34b81 Legacy api fix (#18733)
* Set user for API password requests

* Fix tests

* Fix typing
2018-11-29 22:51:11 +01:00
Ian Richardson
601389302a Convert shopping-list update to WebSockets (#18713)
* Convert shopping-list update to WebSockets

* Update shopping_list.py

* Update test_shopping_list.py
2018-11-29 22:51:10 +01:00
Ian Richardson
2ba521caf8 Add websocket call for adding item to shopping-list (#18623) 2018-11-29 22:51:10 +01:00
Aaron Bach
6f7ff9a18a Remove additional self from update function in RainMachine (#18810) 2018-11-29 14:47:41 -07:00
Daniel Høyer Iversen
4bc9e6dfe0 Remove self from update function in rainmachine (#18807) 2018-11-29 22:28:27 +01:00
Paulus Schoutsen
28215d7edd Make auth backwards compat again (#18792)
* Made auth not backwards compat

* Fix tests
2018-11-29 22:26:19 +01:00
Paulus Schoutsen
38ecf71307 Fix race condition in group.set (#18796) 2018-11-29 22:26:06 +01:00
Eric Nagley
4e272624eb BUGFIX: handle extra fan speeds. (#18799)
* BUGFIX: add support for extra fan speeds.

* Drop extra fan speeds.

Remove catch all, drop missing fan speeds.

* fix self.speed_synonyms call. Remove un-needed keys() call
2018-11-29 22:24:53 +01:00
Aaron Bach
ab4d0a7fc3 Bumped py17track to 2.1.0 (#18804) 2018-11-29 22:24:32 +01:00
Paulus Schoutsen
ca74f5efde Render the secret (#18793) 2018-11-29 22:17:01 +01:00
Eric Nagley
e50a6ef8af Add support for Mode trait in Google Assistant. (#18772)
* Add support for Mode trait in Google Assistant.

* Simplify supported logic.

* Fix SUPPORTED_MODE_SETTINGS to correct rip failures.

* more stray commas

* update tests.
2018-11-29 21:14:17 +01:00
Eliseo Martelli
5c026b1fa2 Added qbittorrent sensor platform (#18618)
* added qbittorrent sensor platform

* Added requirements

* linting

* disabled broad-except

* added noqa

* removed pass statement (left that from development session)

* Added to coveragerc & moved to async

* fixed linting

* fixed indentation

* removed white space

* added await

* Removed generic exception

* removed pylint disable

* added auth checks

* linting

* fixed linting

* fixed error

* should be fixed now

* linting

* ordered imports

* added requested changes

* Update homeassistant/components/sensor/qbittorrent.py

Co-Authored-By: eliseomartelli <martely98@gmail.com>

* Update qbittorrent.py

* Minor changes
2018-11-29 20:40:26 +01:00
cdce8p
474567e762 Fix logbook domain filter - alexa, homekit (#18790) 2018-11-29 20:16:39 +01:00
Fabian Affolter
16911a5cb4 Update lang list (fixes #18768) (#18773)
* Update lang list (fixes #18768)

* Fix lint issues
2018-11-29 19:14:14 +01:00
Daniel Høyer Iversen
46389fb6ca Update switchmate lib (#18785) 2018-11-29 19:13:08 +01:00
Paulus Schoutsen
9aeb489282 Raise NotImplementedError (#18777) 2018-11-29 16:40:49 +01:00
Daniel Høyer Iversen
8c9a39845c Round average price for Tibber (#18784) 2018-11-29 16:39:39 +01:00
Fabian Affolter
c976ac3b39 Fix lint issues 2018-11-29 12:28:50 +01:00
mdallaire
07a7ee0ac7 Add more waterfurnace sensors (#18451)
Add the following sensors that provide interesting data when using a variable speed geothermal system:

* Compressor Power
* Fan Power
* Aux Power
* Loop Pump Power
* Compressor Speed
* Fan Speed
2018-11-29 06:04:12 -05:00
Paulus Schoutsen
c6c55c4419 Merge pull request #18776 from home-assistant/rc
0.83
2018-11-29 11:45:20 +01:00
Paulus Schoutsen
1364114dc1 Bumped version to 0.83.0 2018-11-29 10:57:40 +01:00
Ian Richardson
a306475065 Convert shopping-list clear to WebSockets (#18769) 2018-11-29 10:06:18 +01:00
Fabian Affolter
faeaa43393 Update lang list (fixes #18768) 2018-11-29 09:26:48 +01:00
ehendrix23
aadf72d445 Fix statistics for binary sensor (#18764)
* Fix statistics for binary sensor

-) Binary sensors have 'on' and 'off' for state resulting in issue as numbers were expected. Fixed so that it works with non-numeric states as well.
-) Added check to skip unknown states.
-) Updates test so that binary sensor test will use non-numeric values for states.

* Using guard clause and changed debug to error

Changed to use a guard clause for state unknown.
Writing error on value error instead of debug.

* Add docstring
2018-11-29 09:01:56 +01:00
Paulus Schoutsen
05915775e3 Bumped version to 0.83.0b3 2018-11-28 22:47:37 +01:00
Paulus Schoutsen
311c796da7 Default to on if logged in (#18766) 2018-11-28 22:47:09 +01:00
Paulus Schoutsen
f860cac4ea OwnTracks Config Entry (#18759)
* OwnTracks Config Entry

* Fix test

* Fix headers

* Lint

* Username for android only

* Update translations

* Tweak translation

* Create config entry if not there

* Update reqs

* Types

* Lint
2018-11-28 22:47:08 +01:00
Adam Mills
58e0ff0b1b Async tests for owntracks device tracker (#18681) 2018-11-28 22:47:08 +01:00
Paulus Schoutsen
48e28843e6 OwnTracks Config Entry (#18759)
* OwnTracks Config Entry

* Fix test

* Fix headers

* Lint

* Username for android only

* Update translations

* Tweak translation

* Create config entry if not there

* Update reqs

* Types

* Lint
2018-11-28 22:20:13 +01:00
Paulus Schoutsen
e06fa0d2d0 Default to on if logged in (#18766) 2018-11-28 22:17:37 +01:00
ehendrix23
0bdf96d94c Add block after setting up component (#18756)
Added a block_till_done after setting up component and before starting HASS.
2018-11-28 16:14:37 +01:00
Fabian Affolter
623cec206b Upgrade Adafruit-DHT to 1.4.0 (fixes #15847) (#18614) 2018-11-28 13:38:26 +01:00
Paulus Schoutsen
a2386f871d Forbid float NaN in JSON (#18757) 2018-11-28 13:25:23 +01:00
Adam Mills
5c3a4e3d10 Restore states through a JSON store instead of recorder (#17270)
* Restore states through a JSON store

* Accept entity_id directly in restore state helper

* Keep states stored between runs for a limited time

* Remove warning
2018-11-28 13:16:43 +01:00
Diogo Gomes
a039c3209b Replace token in camera.push with webhook (#18380)
* replace token with webhook

* missing PR 18206 aditions

* remove unused property

* increase robustness

* lint

* address review comments

* id -> name
2018-11-28 10:36:29 +01:00
majuss
fc8b1f4968 Update lupupy version to 0.0.13 (#18754)
* lupupy version push
2018-11-27 21:21:27 -05:00
damarco
052d305243 Add config entry for ZHA (#18352)
* Add support for zha config entries

* Add support for zha config entries

* Fix node_config retrieval

* Dynamically load discovered entities

* Restore device config support

* Refactor loading of entities

* Remove device registry support

* Send discovery_info directly

* Clean up discovery_info in hass.data

* Update tests

* Clean up rebase

* Simplify config flow

* Address comments

* Fix config path and zigpy check timeout

* Remove device entities when unloading config entry
2018-11-27 21:21:25 +01:00
ehendrix23
43676fcaf4 Moved stop method and registering STOP_EVENT outside of init (#18582)
* Moved stop method and registering outside of init

Moved the cleanup to a seperate method and perform registering for the event in setup.

* Removed use of global variable

Removed use of global variable.

* Removed API_SESSIONS

Removed unused declaration API_SESSIONS.
2018-11-27 20:41:25 +01:00
Paulus Schoutsen
f3047b9c03 Fix logbook filtering entities (#18721)
* Fix logbook filtering entities

* Fix flaky test
2018-11-27 20:16:32 +01:00
Paulus Schoutsen
775c909a8c Bumped version to 0.83.0b2 2018-11-27 20:15:57 +01:00
Paulus Schoutsen
3a8303137a Add permission checks to Rest API (#18639)
* Add permission checks to Rest API

* Clean up unnecessary method

* Remove all the tuple stuff from entity check

* Simplify perms

* Correct param name for owner permission

* Hass.io make/update user to be admin

* Types
2018-11-27 20:15:48 +01:00
Aaron Bach
093fa6f5e9 Bumped simplisafe-python to 3.1.14 (#18752) 2018-11-27 11:40:49 -07:00
Anton Johansson
dd8544fdf8 Fix typo in log (#18751) 2018-11-27 13:09:25 -05:00
Bryan York
02309cc318 Enable Google Assistant OnOffTrait for climate devices that support them (#18544)
* Enable Google Assistant OnOffTrait for climate devices that support them

This commit enables the OnOffTrait for climate devices that have the SUPPORT_ON_OFF feature. I have tested this locally with a Sensibo device which supports ON_OFF and a nest device that does not.

* Update trait.py

* Add tests for onoff_climate

* Add OnOff trait to climate.heatpump

* Add on status to heatpump in google_assistant tests
2018-11-27 17:11:55 +01:00
Austin
2f07e92cc2 Fix decora_wifi residences (#17228)
* Fix decora multiple residences

* Fix typo

* Update decora_wifi.py
2018-11-27 16:53:28 +01:00
Luis Martinez de Bartolome Izquierdo
7b3b7d2eec Wunderlist component (#18339)
* Wunderlist component

* Check credentials

* Dont print credentials

* Update __init__.py
2018-11-27 15:44:09 +01:00
Fredrik Erlandsson
5d5c78b374 Add unique_id for Daikin entities (#18747) 2018-11-27 15:36:55 +01:00
Fredrik Erlandsson
eb2e2a116e Add unique_id for tellduslive (#18744) 2018-11-27 15:35:51 +01:00
Fredrik Erlandsson
392898e694 Updated codeowners (#18746) 2018-11-27 14:59:25 +01:00
Jason Hu
4d5338a1b0 Fix google assistant request sync service call (#17415)
* Update __init__.py

* Add optional agent_user_id field to request_sync service

* Update services.yaml
2018-11-27 14:57:42 +01:00
kennedyshead
87507c4b6f fix aioasuswrt sometimes return empty lists (#18742)
* aioasuswrt sometimes return empty lists

* Bumping aioasuswrt to 1.1.12
2018-11-27 08:20:25 -05:00
Luis Martinez de Bartolome Izquierdo
9d1b94c24a Supports the new Netatmo Home Coach (#18308)
* Supports the new Netatmo Home Coach

* unused import

* Missing docstring

* Fixed pylint

* pydocs

* doc style
2018-11-27 14:01:34 +01:00
emontnemery
16e3ff2fec Mqtt light refactor (#18227)
* Rename mqtt light files

* Refactor mqtt light

* Remove outdated testcase

* Add backwards compatibility for MQTT discovered MQTT lights.
Refactor according to review comments.
2018-11-27 14:00:05 +01:00
Robert Dunmire III
c1ed2f17ac Update librouteros and re-connect to api if connection is lost (#18421)
* Reconnect when connection is lost

* Fix tabs

* add librouteros.exceptions

* add logger

* fix line too long

* added import librouteros

* Update librouteros version

* Update mikrotik.py

* Update mikrotik.py

* Fix trailing whitespace

* Update mikrotik.py

* Update mikrotik.py
2018-11-27 13:26:52 +01:00
Fabian Affolter
1cbe080df9 Fix remaining issues (#18416) 2018-11-27 13:21:42 +01:00
Malte Franken
61e0e11156 Geo Location platform code clean up (#18717)
* code cleanup to make use of new externalised feed manager

* fixed lint

* revert change, keep asynctest

* using asynctest

* changed unit test from mocking to inspecting dispatcher signals

* code clean-up
2018-11-27 13:12:29 +01:00
Malte Franken
013e181497 U.S. Geological Survey Earthquake Hazards Program Feed platform (#18207)
* new platform for usgs earthquake hazards program feed

* lint and pylint issues

* fixed config access

* shortened names of platform, classes, etc.

* refactored tests

* fixed hound

* regenerated requirements

* refactored tests

* fixed hound
2018-11-27 12:55:15 +01:00
David Bonnes
9a25054a0d Add zones to evohome component (#18428)
* Added Zones, and removed available() logic

flesh out Zones

tidy up init

some more tidying up

Nearly there - full functionality

passed txo - ready to send PR

Ready to PR, except to remove logging

Add Zones and associated functionality to evohome component

Add Zones to evohome (some more tidying up)

Add Zones to evohome (Nearly there - full functionality)

Add Zones to evohome (passed tox)

Add Zones to evohome (except to remove logging)

Add Zones and associated functionality to evohome component

Revert _LOGGER.warn to .debug, as it should be

Cleanup stupid REBASE

* removed a duplicate/unwanted code block

* tidy up comment

* use async_added_to_hass instead of bus.listen

* Pass evo_data instead of hass when instntiating

* switch to async version of setup_platform/add_entities

* Remove workaround for bug in client library
 - using github version for now, as awaiting new PyPi package

* Avoid invalid-name lint - use 'zone_idx' instead of 'z'

* Fix line too long error

* remove commented-out line of code

* fix a logic error, improve REDACTION of potentially-sensitive infomation

* restore use of EVENT_HOMEASSISTANT_START to improve HA startup time

* added a docstring to _flatten_json

* Switch instantiation from component to platform

* Use v0.2.8 of client api (resolves logging bug)

* import rather than duplicate, and de-lint

* We use evohomeclient v0.2.8 now

* remove all the api logging

* Changed scan_interal to Throttle

* added a configurable scan_interval

* small code tidy-up, removed sub-function

* tidy up update() code

* minimize use of self.hass.data[]

* remove lint

* remove unwanted logging

* remove debug code

* correct a small coding error

* small tidyup of code

* remove flatten_json

* add @callback to _first_update()

* switch back to load_platform

* adhere to standards fro logging

* use new format string formatting

* minor change to comments

* convert scan_interval to timedelta from int

* restore rounding up of scan_interval

* code tidy up

* sync when in sync context

* fix typo

* remove raises not needed

* tidy up typos, etc.

* remove invalid-name lint

* tidy up exception handling

* de-lint/pretty-fy

* move 'status' to a JSON node, so theirs room for 'config', 'schedule' in the future
2018-11-27 12:17:22 +01:00
emontnemery
a03cb12c61 Reconfigure MQTT sensor component if discovery info is changed (#18178)
* Reconfigure MQTT sensor component if discovery info is changed

* Do not pass hass to MqttSensor constructor

* Remove duplicated line
2018-11-27 11:23:47 +01:00
emontnemery
4a4ed128db Reconfigure MQTT fan component if discovery info is changed (#18177) 2018-11-27 11:22:55 +01:00
emontnemery
6170065a2c Reconfigure MQTT cover component if discovery info is changed (#18175)
* Reconfigure MQTT cover component if discovery info is changed

* Do not pass hass to MqttCover constructor
2018-11-27 11:22:26 +01:00
Matt Hamilton
4f2e7fc912 remove pbkdf2 upgrade path (#18736) 2018-11-27 10:42:56 +01:00
Paulus Schoutsen
c2f8dfcb9f Legacy api fix (#18733)
* Set user for API password requests

* Fix tests

* Fix typing
2018-11-27 10:41:44 +01:00
Paulus Schoutsen
9d7b1fc3a7 Enforce permissions for Websocket API (#18719)
* Handle unauth exceptions in websocket

* Enforce permissions in websocket API
2018-11-27 10:12:31 +01:00
Ville Skyttä
7248c9cb0e Remove some unused imports (#18732) 2018-11-27 09:35:35 +01:00
Ville Skyttä
b4e2f2a6ef Upgrade pytest and -timeout (#18722)
* Upgrade pytest to 4.0.1

* Upgrade pytest-timeout to 1.3.3
2018-11-26 22:43:14 +01:00
Paulus Schoutsen
9894eff732 Fix logbook filtering entities (#18721)
* Fix logbook filtering entities

* Fix flaky test
2018-11-26 19:53:24 +01:00
Paulus Schoutsen
1f123ebcc1 Updated frontend to 20181126.0 2018-11-26 14:40:43 +01:00
Paulus Schoutsen
3c92aa9ecb Update translations 2018-11-26 14:30:21 +01:00
Paulus Schoutsen
f9f71c4a6d Bumped version to 0.83.0b1 2018-11-26 14:20:56 +01:00
Joakim Sørensen
c3b76b40f6 Set correct default offset (#18678) 2018-11-26 14:20:49 +01:00
Bram Kragten
56c7c8ccc5 Fix vol Dict -> dict (#18637) 2018-11-26 14:20:49 +01:00
Fredrik Erlandsson
bb75a39cf1 Updated webhook_register, version bump pypoint (#18635)
* Updated webhook_register, version bump pypoint

* A binary_sensor should be a BinarySensorDevice
2018-11-26 14:20:48 +01:00
Eliseo Martelli
2f581b1a1e fixed wording that may confuse user (#18628) 2018-11-26 14:20:48 +01:00
pbalogh77
cf22060c5e Use asyncio Lock for fibaro light (#18622)
* Use asyncio Lock for fibaro light

* line length and empty line at end

* async turn_off

Turned the turn_off into async as well

* bless you, blank lines...

My local flake8 lies to me. Not cool.
2018-11-26 14:20:47 +01:00
Paulus Schoutsen
6bcedb3ac5 Updated frontend to 20181121.1 2018-11-26 14:16:30 +01:00
Paulus Schoutsen
7848381f43 Allow managing cloud webhook (#18672)
* Add cloud webhook support

* Simplify payload

* Add cloud http api tests

* Fix tests

* Lint

* Handle cloud webhooks

* Fix things

* Fix name

* Rename it to cloudhook

* Final rename

* Final final rename?

* Fix docstring

* More tests

* Lint

* Add types

* Fix things
2018-11-26 14:10:18 +01:00
pbalogh77
4a661e351f Use asyncio Lock for fibaro light (#18622)
* Use asyncio Lock for fibaro light

* line length and empty line at end

* async turn_off

Turned the turn_off into async as well

* bless you, blank lines...

My local flake8 lies to me. Not cool.
2018-11-26 13:17:56 +01:00
Ian Richardson
b5b5bc2de8 Convert shopping-list update to WebSockets (#18713)
* Convert shopping-list update to WebSockets

* Update shopping_list.py

* Update test_shopping_list.py
2018-11-26 09:59:53 +01:00
emontnemery
d290ce3c9e Small refactoring of MQTT binary_sensor (#18674) 2018-11-25 20:53:03 +01:00
Franck Nijhof
2cbe083460 ⬆️ Upgrades InfluxDB dependency to 5.2.0 (#18668) 2018-11-25 20:52:09 +01:00
Paulus Schoutsen
8b8629a5f4 Add permission checks to Rest API (#18639)
* Add permission checks to Rest API

* Clean up unnecessary method

* Remove all the tuple stuff from entity check

* Simplify perms

* Correct param name for owner permission

* Hass.io make/update user to be admin

* Types
2018-11-25 18:04:48 +01:00
Fabian Affolter
f387cdec59 Upgrade pysnmp to 4.4.6 (#18695) 2018-11-25 17:59:14 +01:00
Adam Mills
78b90be116 Async cover template tests (#18690) 2018-11-25 11:39:35 -05:00
Adam Mills
91c526d9fe Async device sun light trigger tests (#18689) 2018-11-25 11:39:18 -05:00
Jens
f3ce463862 Adds SomfyContactIOSystemSensor to TaHoma (#18560)
* Sorts all TAHOME_TYPES and adds SomfyContactIOSystemSensor as it wasn't added with 558b659f7c

* Fixes syntax errors related to sorting of entries.
2018-11-25 13:47:16 +01:00
Joakim Sørensen
23f5d785c4 Set correct default offset (#18678) 2018-11-25 12:30:38 +01:00
Soós Péter
cd773455f0 Fix false log message on CAPsMAN only devices (#18687)
* Fix false log message on CAPsMAN only devices 

False debug log message appeared on CAPsMAN only devices without physichal wireless interfaces. This fix eliminates them.

* Fixed indentation to pass flake8 test
2018-11-25 12:21:26 +01:00
Fabian Affolter
5a5cbe4e72 Upgrade youtube_dl to 2018.11.23 (#18694) 2018-11-25 11:41:49 +01:00
Daniel Høyer Iversen
ad2e8b3174 update mill lib, handle bad data from mill server (#18693) 2018-11-25 09:39:06 +01:00
Andrew Hayworth
eb6b6ed87d Add Awair sensor platform (#18570)
* Awair Sensor Platform

This commit adds a sensor platform for Awair devices, by accessing
their beta API. Awair heavily rate-limits this API, so we throttle
updates based on the number of devices found. We also allow for the
user to bypass API device listing entirely, because the device list
endpoint is limited to only 6 calls per day. A crashing or restarting
server would quickly hit that limit.

This sensor platform uses the python_awair library (also written
as part of this PR), which is available for async usage.

* Disable pylint warning for broad try/catch

It's true that this is generally not a great idea, but we really don't
want to crash here. If we can't set up the platform, logging it and
continuing is the right answer.

* Add space to satisfy the linter

* Awair platform PR feedback

- Bump python_awair to 0.0.2, which has support for more granular exceptions
- Ensure we have python_awair available in test
- Raise PlatformNotReady if we can't set up Awair
- Make the 'Awair score' its own sensor, rather than exposing it other ways
- Set the platform up as polling, and set a sensible default
- Pass in throttling parameters to the underlying data class, rather
than use hacky global variable access to dynamically set the interval
- Switch to dict access for required variables
- Use pytest coroutines, set up components via async_setup_component,
  and test/modify/assert in generally better ways
- Commit test data as fixtures

* Awair PR feedback, volume 2

- Don't force updates in test, instead modify time itself and let
  homeassistant update things "normally".
- Remove unneeded polling attribute
- Rename timestamp attribute to 'last_api_update', to better reflect
  that it is the timestamp of the last time the Awair API servers
  received data from this device.
- Use that attribute to flag the component as unavailable when data
  is stale. My own Awair device periodically goes offline and it really
  hardly indicates that at all.
- Dynamically set fixture timestamps to the test run utcnow() value,
  so that we don't have to worry about ancient timestamps in tests
  blowing up down the line.
- Don't assert on entities directly, for the most part. Find desired
  attributes in ... the attributes dict.

* Patch an instance of utcnow I overlooked

* Switch to using a context manager for timestream modification

Honestly, it's just a lot easier to keep track of patches. Moreover,
the ones I seem to have missed are now caught, and tests seem to
consistently pass.

Also, switch test_throttle_async_update to manipulating time more
explicitly.

* Missing blank line, thank you hound

* Fix pydocstyle error

I very much need to set up a script to do this quickly w/o tox, because
running flake8 is not enough!

* PR feedback

* PR feedback
2018-11-25 09:01:19 +01:00
Adam Mills
00c9ca64c8 Async tests for mqtt switch (#18685) 2018-11-24 17:08:28 -05:00
Adam Mills
6f0a3b4b22 Async tests for counter (#18684) 2018-11-24 16:12:29 -05:00
Adam Mills
66f1643de5 Async timer tests (#18683) 2018-11-24 16:12:19 -05:00
Adam Mills
50a30d4dc9 Async tests for remaining device trackers (#18682) 2018-11-24 15:10:57 -05:00
Adam Mills
6ebdc7dabc Async tests for owntracks device tracker (#18681) 2018-11-24 14:34:36 -05:00
Adam Mills
d24ea7da90 Async tests for device tracker mqtt (#18680) 2018-11-24 13:24:06 -05:00
emontnemery
5e18d52302 Reconfigure MQTT alarm component if discovery info is changed (#18173) 2018-11-24 10:48:01 +01:00
emontnemery
e41af133fc Reconfigure MQTT climate component if discovery info is changed (#18174) 2018-11-24 10:40:07 +01:00
Bram Kragten
986ca23934 Dict -> dict (#18665) 2018-11-24 10:02:06 +01:00
Kacper Krupa
8771f9f7dd converted majority of effects from ifs to dict map, which makes it easier to extend in the future. Also, added LSD effect! (#18656) 2018-11-23 23:53:33 +01:00
Bram Kragten
37327f6cbd Add save command to lovelace (#18655)
* Add save command to lovelace

* Default for save should by json

* typing
2018-11-23 22:56:58 +01:00
emontnemery
4c04abfccc Merge pull request #18654 from emontnemery/fix_mqtt_availability_qos
Support updated MQTT QoS when reconfiguring MQTT availability
2018-11-23 17:13:29 +01:00
Erik
b198bb441a Support updated MQTT QoS when reconfiguring MQTT availability 2018-11-23 15:32:24 +01:00
Eliseo Martelli
1c17b885db Added deviceclass timestamp constant (#18652)
* Added deviceclass timestamp

* added device class timestamp to sensor

* fixed comment
2018-11-23 14:51:26 +01:00
Paulus Schoutsen
c0cf29aba9 Remove since last boot from systemmonitor sensor (#18644)
* Remove since last boot

* Make systemmonitor last_boot be a timestamp
2018-11-23 11:55:45 +01:00
Ian Richardson
92978b2f26 Add websocket call for adding item to shopping-list (#18623) 2018-11-23 08:56:18 +01:00
Adam Mills
c99204149c Convert device tracker init tests to async (#18640) 2018-11-23 08:55:25 +01:00
cdheiser
98f159a039 [Breaking Change] Cleanup Lutron light component (#18650)
Remove the return value from setup_platform
Convert LutronLight.__init__ to use super() when referencing the parent class.
Change device_state_attributes() to use lowercase snakecase (Rename 'Lutron Integration ID' to 'lutron_integration_id')
2018-11-23 08:54:28 +01:00
Eliseo Martelli
bb37151987 fixed wording that may confuse user (#18628) 2018-11-23 01:46:22 +01:00
Diogo Gomes
af0f3fcbdb IPMA Weather Service - version bump (#18626)
* version bump

* gen

* gen
2018-11-22 19:09:45 -05:00
Joakim Sørensen
c7bfdbf3cf Merge pull request #18632 from dshokouhi/neato_additional_error_messages
Add additional neato error messages to status attribute
2018-11-22 22:20:58 +01:00
David F. Mulcahey
67aa76d295 Refactor ZHA (#18629)
* refactor ZHA

* lint

* review request

* Exclude more zha modules from coverage
2018-11-22 19:00:46 +01:00
Fredrik Erlandsson
cccc41c23e Updated webhook_register, version bump pypoint (#18635)
* Updated webhook_register, version bump pypoint

* A binary_sensor should be a BinarySensorDevice
2018-11-22 16:43:10 +01:00
Pascal Vizeli
13144af65e Fix raising objects on proxy camera component 2018-11-22 15:06:31 +01:00
Giuseppe
b246fc977e Add support for cropping pictures in proxy camera (#18431)
* Added support for cropping pictures in proxy camera

This includes extending the configuration to introduce a mode
(either 'resize', default, or 'crop') and further coordinates
for the crop operation.

* Also fixed async job type, following code review
2018-11-22 13:14:28 +01:00
Bram Kragten
e5d2900151 Fix vol Dict -> dict (#18637) 2018-11-22 12:48:50 +01:00
mopolus
01ee03a9a1 Add support for multiple IHC controllers (#18058)
* Added support for secondary IHC controller

Most IHC systems only have one controller but the system can be setup with a linked secondary controller.
I have updated the code to have it support both primary and secondary controller. Existing configuration is not impacted and secondary controller can be setup the same way, with similar settings nested under 'secondary' in the configuration

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update __init__.py

* Update const.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update const.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update __init__.py

* Update ihc.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

indentation was incorrect for "load_platform" in "get_manual_configuration". Load_platform was not called with the correct component name
2018-11-22 09:45:40 +01:00
Daniel Shokouhi
7daf2caef2 Correct error message 2018-11-21 23:31:08 -08:00
Daniel Shokouhi
9f36cebe59 Add additional neato error messages to status attribute 2018-11-21 22:47:30 -08:00
Nick Whyte
22ab83acae Cleanup BOM dependencies + add basic test + IDEA autoformat (#18462)
* Cleanup BOM dependencies + add basic test
2018-11-21 20:41:53 -05:00
nragon
1ad3c3b1e2 Minor change to still image on mjpeg (#18602)
* Update mjpeg.py

* Lint
2018-11-21 23:12:16 +01:00
Josh Anderson
3d178708fc Add /sbin to launchd PATH (#18601)
* Add /sbin to launchd PATH

* Put /sbin at the end to allow overrides

Co-Authored-By: andersonshatch <andersonshatch@gmail.com>
2018-11-21 20:56:38 +01:00
Paulus Schoutsen
1341ecd2eb Use proper signals (#18613)
* Emulated Hue not use deprecated handler

* Remove no longer needed workaround

* Add middleware directly

* Dont always load the ban config file

* Update homeassistant/components/http/ban.py

Co-Authored-By: balloob <paulus@home-assistant.io>

* Update __init__.py
2018-11-21 20:55:21 +01:00
Paulus Schoutsen
5b3e9399a9 Bump to 0.84.0.dev0 2018-11-21 20:53:44 +01:00
Paulus Schoutsen
fd7fff2ce8 Version bump to 0.83.0b0 2018-11-21 20:50:11 +01:00
Paulus Schoutsen
4e58eb8bae Updated frontend to 20181121.0 2018-11-21 20:35:46 +01:00
Paulus Schoutsen
49121f2347 Update translations 2018-11-21 20:18:56 +01:00
Fabian Affolter
708ababd78 Upgrade requests to 2.20.1 (#18615) 2018-11-21 19:58:56 +01:00
Pawel
92c0f9e4aa Fix mqtt cover inverted (#18456)
* Fixed state and position retrieval in inverted mode 100-0

* Always calculating find_percentage_in_range

* Added usage of max/min functions.
2018-11-21 15:48:44 +01:00
Martin Gross
81cac33801 Update locationsharinglib requirement to 3.0.8 (#18612) 2018-11-21 15:13:20 +01:00
Jonathan McDowell
1e3930a447 Add support for Panasonic Blu-Ray players (#18541)
* Add support for Panasonic Blu-Ray players

* Update panasonic_bluray.py

* Update panasonic_bluray.py
2018-11-21 14:22:24 +01:00
Joakim Sørensen
3cde8dc3a9 Add support for HTTPS and basic HTTP authentication for Glances (#18608)
* Add support for SSL and basic HTTP auth

* Remove blank line at the end of the file
2018-11-21 12:38:42 +01:00
Paulus Schoutsen
36c31a6293 Add permissions check in service helper (#18596)
* Add permissions check in service helper

* Lint

* Fix tests

* Lint

* Typing

* Fix unused impoert
2018-11-21 12:26:08 +01:00
Kevin Fronczak
8aa2cefd75 Upgrade blinkpy to 0.10.3 (Fixes #18341) (#18603) 2018-11-21 08:57:59 +01:00
pbalogh77
3b53003795 Fibaro components (#18487)
* Added Fibaro omcponents

Added cover, light, sensor and switch components

* Improvements based on code review

Improvements based on code review

* Fixes based on code review

Fixes based on code review

* Changes to light behavior based on code review

Changes to light behavior based on code review

* Internal changes

Changed how brightness is represented internally.
It should have no impact on functionality.
2018-11-21 06:15:54 +01:00
ehendrix23
377730a37c Change channel with play_media instead of select_source (#18474)
* Use service play_media instead of select_source

Use service play_media instead of select_source to change the channel as play_media is the right service for that.

* Log error on invalid media type

Log an error instead of raising a NotImplementedError if an invalid media type is provided.

* Changed so that success is not in else statement

Updated so that if media_type is channel that it is not in the else of an if.

* Update directv.py

Removed SELECT_SOURCE as supported feature.

* Rebased

Re-based with dev
2018-11-20 16:05:25 -07:00
Paulus Schoutsen
d9c7f777c5 Add cloud pref for Google unlock (#18600) 2018-11-20 23:23:07 +01:00
Charles Garwood
b7742999cf Update Z-Wave Tests asyncio/yield from -> async/await (#18599)
* Update lock tests

* Update binary sensor

* Update zwave component tests
2018-11-20 14:58:03 -05:00
Daniel Høyer Iversen
8742750926 Improve available for Mill heater (#18597)
* improve available for Mill heater

* typo
2018-11-20 20:00:13 +01:00
Charles Garwood
e87ecbd500 Z-Wave Lock Config Entry Support (#18209)
* Config Entry setup for zwave lock

* fix merge conflict

* lint

* Update other tests

* Fix tests

* Remove debug line and unused import
2018-11-20 14:59:34 +01:00
Fredrik Erlandsson
3838be4cb8 Add support for Daikin BRP069B41 (#18564)
* Add support for BRP069B41, fixes #18563

* Use fan_mode and swing_mode from pydaikin 0.8
2018-11-20 14:14:11 +01:00
Pascal Vizeli
0ddd502d00 Hass.io config check (#18576) 2018-11-20 13:30:09 +01:00
dapowers87
d88040eeed Revert changes that broke UI (#18495)
* Revert changes that broke UI

* Change from UNKNOWN to None

* Remove STATE_UNKNOWN import
2018-11-20 13:29:05 +01:00
Ian Richardson
44b33d45b1 Add websocket calls to shopping-list (#18392)
* Add websocket calls to shopping-list

Plan to deprecate API calls once shopping-list panel is removed from UI and replaced fully by Lovelace card

* Address ci-bot issues

* Fix violations

* Address travis complaints

* Address review comments

* Update test_shopping_list.py
2018-11-20 12:44:17 +01:00
Paulus Schoutsen
9b53b7e9e4 Bump Python-Nest to 4.0.5 (#18580)
* Fix Nest eco

* Update Python-nest to 4.0.5

* Update requirements_all.txt

* Update requirements_test_all.txt
2018-11-20 12:18:46 +01:00
Franck Nijhof
80cd8b180c Adds light switch platform (#18562)
* Adds light switch platform

* Addresses HoundCI warnings

* Addresses Flake8 reported issues

* Removes async_update call as per review
2018-11-20 11:51:34 +01:00
William Scanlon
b3e37af9b1 Added unique id to all Wink devices. (#18589) 2018-11-19 22:52:43 -05:00
Eliseo Martelli
57f7e7eedc Bumped ghlocalapi to 0.1.0 (#18584)
* mumped ghlocalapi to 0.1.0

* update requirement_all.txt
2018-11-19 15:01:26 -05:00
Sebastian Muszynski
14ad7428ea Prefix all xiaomi_aqara events (#17354) 2018-11-19 20:55:08 +01:00
Paulus Schoutsen
f86083cf52 Fix MQTT async_added_to_hass (#18575)
* Fix some invocations

* Update manual_mqtt.py
2018-11-19 20:48:26 +01:00
Soós Péter
3891f2eebe Add mikrotik SSL support (#17898)
* Update mikrotik.py

* Update mikrotik.py

* Added basic  api_ssl support

Added preliminary support to use api_ssl instead of api. It don't check the validity of the certificate need it.
At Home Assistant side add ssl = true to your sensor configuration, and don't forget to change the port too (to 8729 by default):

device_tracker:
  - platform: mikrotik
    host: 192.168.88.1
    port: 8729
    ssl: true
    username: homeassistant
    password: TopSecret

At MikroTik side you have to add or generate a certificate, and configure api_ssl to use it. Here is an example:

/certificate add common-name="Self signed demo certificate for API" days-valid=3650 name="Self signed demo certificate for API" key-usage=digital-signature,key-encipherment,tls-server,key-cert-sign,crl-sign
/certificate sign "Self signed demo certificate for API"
/ip service set api-ssl certificate="Self signed demo certificate for API"
/ip service enable api-ssl
/ip service disable api
/user group add name=homeassistant policy=read,api,!local,!telnet,!ssh,!ftp,!reboot,!write,!policy,!test,!winbox,!password,!web,!sniff,!sensitive,!romon,!dude,!tikapp
/user add group=homeassistant name=homeassistant
/user set password="TopSecret" homeassistant

* Fixed import missind ssl lib

* SSL support code cleanup, use ssl-api port by default if ssl enabled

* Restored accidentalli deleted method parameter

* Fixed Python 3.5.3 compilation errors

Fixed Python 3.5.3 compilation errors reported by Travis CI

* Removed duplicated MTK_DEFAULT_API_PORT
2018-11-19 16:54:09 +01:00
emontnemery
de9bac9ee3 Reconfigure MQTT binary_sensor component if discovery info is changed (#18169)
* Recreate component if discovery info is changed

* Update component instead of remove+add

* Set name and unique_id in __init__

* Update unit test

* Cleanup

* More cleanup

* Refactor according to review comments

* Change discovery_hash

* Review comments, add tests

* Fix handling of value_template
2018-11-19 16:49:04 +01:00
Oleksii Serdiuk
01953ab46b Darksky: Expose missing conditions for day 0 forecast (#18312)
Dark Sky Sensor didn't expose conditions for day 0 (today forecast) that
had the same name as current conditions. With this change all conditions
form day 0 (today) forecast are exposed the same way as conditions for
the rest of the days (1..7): as `dark_sky_<condition>_<day>`. As a
consequence, conditions for day 0 that were already exposed now have
`_0` suffix. This actually improves the code by removing most of
special handling, based on condition name.

To get day 0 conditions the user now has to add `- 0` to `forecast`
configuration parameter.

Conditions, for which suffix `_0` appeared: `precip_accumulation`,
`temperature_high`, `temperature_low`, `apparent_temperature_high`,
`apparent_temperature_low`, `precip_intensity_max`, `moon_phase`.

This is a breaking change!

Closes #18205
2018-11-19 14:48:52 +01:00
Daniel Perna
fc4dd4e51f Update pyhomematic to 0.1.52 and add features for lights (#18499)
* Update pyhomematic and add features for lights

* Lint

* Lint

* Update homematic.py

* Update homematic.py
2018-11-19 14:26:08 +01:00
bw3
90f3f2b1e7 Fix for epson state not updating (#18357)
* Fixed update method name

* Update epson.py
2018-11-19 13:47:52 +01:00
Fredrik Erlandsson
c1ca7beea1 Support for Point component (#17466)
* Minut Point support

* tox tests for Point

* config flow fixes

* fixes requested by @MartinHjelmare

* swedish translation :)

* fix tests
2018-11-19 12:52:21 +01:00
Anders Melchiorsen
84fd66c8a1 Template binary sensor to not track all state changes (#18573) 2018-11-19 12:10:48 +01:00
arigilder
97c493448b Correct cached stale device tracker handling (#18572)
* Fix async addition of stale devices

* Add comment to mark_stale

* Remove extraneous whitespace
2018-11-19 12:06:57 +01:00
ehendrix23
9fa34f0d77 Add support for sessions (#18518)
Added support for sessions to keep connection open with August portal, improving performance.
py-august version increased to 0.7.0
2018-11-19 11:53:27 +01:00
ehendrix23
cdcc818bf9 Remove turn_on and turn_off feature for clients (#18234)
* Enhancements for DirecTV media player

Following enhancements have been made:

1. Added debug logging
2. Added ability to change channel using select_source service of the remote platform.
3. State will now show paused if a recorded program is paused, for live TV playing will always be returned.
4. Added the following attributes:
    a. media_position: current position of the media (in seconds)
    b. media_position_updated_at: timestamp when media_position was updated.
   c. source: current source (channel).
   d. media_isbeingrecorded: if current media is being recorded or not.
   e. media_rating: TV/Movie rating of the media
   f. media_recorded: if current media is recorded or live TV
   g. media_starttime: Timestamp media was aired

Reordered properties to follow same order as how they are in __init__.py of remote platform.

* Fixed error and cleaned up few items

Fixed an issue when determining if a program is recorded or not.
Cleaned up some coding.

* Added available property

Added available property

* Disable feature TURN_ON and TURN_OFF for DVR clients

Disable the feature turn_on and turn_off for DVR clients.

* self._is_client and raise NotImplementedError

Updated setting self._is_client
Raise NotImplementedError if turn_on or turn_off is called for clients.
2018-11-19 11:47:00 +01:00
Phil Bruckner
83b4e56978 Log delay and wait_template steps in scripts (#18448)
* Log delay and wait_template steps in scripts

Help improve script debugging by logging delay and wait_template steps in scripts.

* Update tests

* Fix lint issue
2018-11-19 11:14:00 +01:00
Aleksandr Smirnov
089a2f4e71 Logbook speedup (#18376)
* filter logbook results by entity_id prior to instantiating them

* include by default, pass pep8

* pass pylint

* use entityfilter, update tests
2018-11-19 10:36:00 +01:00
emontnemery
f241becf7f Avoid race in entity_platform.async_add_entities() (#18445)
This avoids a race between multiple concurrent calls to
entity_platform.async_add_entities() which may cause
entities to be created with non-unique entity_id
2018-11-19 10:13:50 +01:00
emontnemery
7e702d3caa Fix small issue related to topic prefix (#18512)
Fix expansion of topic prefix when discovery message contains non string-type items.
2018-11-19 09:59:07 +01:00
Jeff Irion
ab8c127a4a Enable native support + ADB authentication for Fire TV (#17767)
* Enable native support + ADB authentication for Fire TV

* Remove unnecessary underscore assignments

* Bump firetv to 1.0.5.3

* Change requirements to 'firetv>=1.0.6'

* Change requirement from 'firetv>=1.0.6' to 'firetv==1.0.6'

* Address pylint errors

* Ran 'python script/gen_requirements_all.py'

* Address some minor reviewer comments

* Run 'python script/gen_requirements_all.py'

* Just use the 'requirements_all.txt' and 'requirements_test_all.txt' from the 'dev' branch...

* Edit the 'requirements_all.txt' file manually

* Pass flake8 tests

* Pass pylint tests, add extended description for 'select_source'

* More precise exception catching

* More Pythonic returns

* Import exceptions inside '__init__'

* Remove 'time.sleep' command

* Sort the imports

* Use 'config[key]' instead of 'config.get(key)'

* Remove accessing of hidden attributes; bump firetv version to 1.0.7

* Bump firetv to 1.0.7 in 'requirements_all.txt'

* Don't access 'self.firetv._adb', use 'self.available' instead

* Remove '_host' and '_adbkey' attributes

* Create the 'FireTV' object in 'setup_platform' and check the connection before instantiating the entity

* Fixed config validation for 'adbkey'

* add_devices -> add_entities

* Remove 'pylint: disable=no-name-in-module'

* Don't assume the device is available after attempting to connect

* Update the state after reconnecting

* Modifications to 'adb_decorator'

* Modifications to 'setup_platform'

* Don't update the state if the ADB reconnect attempt was unsuccessful

* 'return None' -> 'return'

* Use 'threading.Lock()' instead of a boolean for 'adb_lock'

* Use a non-blocking 'threading.Lock'
2018-11-19 07:05:58 +01:00
sdelliot
afe21b4408 Re-adding the season attribute (#18523) 2018-11-18 18:35:36 -07:00
Anders Melchiorsen
b066877453 Allow unloading of LIFX config entry (#18535) 2018-11-18 19:51:17 +01:00
Per Sandström
796933de68 Upgrade vsure to 1.5.2 (#18557)
Upgrade vsure to 1.5.2
2018-11-18 19:41:24 +01:00
Aaron Bach
8f59be2059 Make MyQ platform async (#18489)
* Make MyQ platform async

* Bumped requirements

* Member comments

* Member updates
2018-11-18 18:37:03 +01:00
Ville Skyttä
dfb8f60fe2 Upgrade pytest and pytest-cov (#18542)
* Upgrade pytest to 4.0.0

* Upgrade pytest-cov to 2.6.0
2018-11-18 09:33:01 +01:00
Daniel Høyer Iversen
3f747f1a8c Mill lib (#18529)
* Mill attr and update the lib

* lib

* heater_generation
2018-11-17 18:39:38 +01:00
Fabian Affolter
4751ad69a7 Upgrade ruamel.yaml to 0.15.78 (#18508) 2018-11-17 13:20:17 +01:00
Anders Melchiorsen
c6ca27e9b4 Improve handling of unavailable Sonos speakers (#18534) 2018-11-17 13:18:51 +01:00
Aaron Bach
e73b9b9b8f Clean up left-behind dispatcher handlers when removing RainMachine (#18488)
* Clean up left-behind dispatcher handlers when removing RainMachine

* Member comments
2018-11-17 10:42:50 +01:00
Daniel Høyer Iversen
6b2f50b29e Improve real time consumption for Tibber sensor (#18517) 2018-11-16 14:19:54 -05:00
Eliseo Martelli
fcd756d58a fixed sky_hub schema to reflect documentation (#18509) 2018-11-16 14:14:46 -05:00
Paulus Schoutsen
24db2b66ab Ban systemair-savecair (#18483) 2018-11-16 14:28:39 +01:00
Fabian Affolter
320efdb744 Upgrade sqlalchemy to 1.2.14 (#18504) 2018-11-16 14:15:53 +01:00
Fabian Affolter
9e0497875e Upgrade sphinx-autodoc-typehints to 1.5.0 (#18505) 2018-11-16 14:15:04 +01:00
Fabian Affolter
30806fa362 Upgrade numpy to 1.15.4 (#18506) 2018-11-16 14:14:40 +01:00
Fabian Affolter
9f51deb1de Upgrade youtube_dl to 2018.11.07 (#18507) 2018-11-16 14:14:20 +01:00
cdce8p
0ca94f239d Update HAP-python 2.4.1 (#18417)
* Bugfixes
2018-11-16 11:42:48 +01:00
cdce8p
ed7aea006a Add safe_mode HomeKit (#18356)
* Use: 'safe_mode: True' in case of pairing issues
2018-11-16 11:08:39 +01:00
Martin Gross
b7b8296c73 Alexa v3 name change for additionalApplianceDetails (#18485) 2018-11-15 11:15:50 -07:00
Leothlon
afb3a52b5b Fixed bug for receivers without support for new command (#18478)
* Fixed bug for receivers without support for new command

* removed extra parenthesis
2018-11-15 10:49:10 -07:00
Aaron Bach
4446b15cb0 Add Rainmachine to the device registry (#18452)
* Device registry in

* Member comments

* Hound
2018-11-15 10:43:20 -07:00
Oleksii Serdiuk
d1b5bc19da AirVisual: Show icon for air pollution level, based on its value (#18482)
Show excited, happy, neutral, sad, dead emoticon, or biohazard icon,
based on air pollution level.

Also, fix a small typo and change air quality index icon to
`mdi:chart-line`. Seems a bit more logical.
2018-11-15 10:23:46 -07:00
Paulus Schoutsen
75bb78d440 Update translations 2018-11-15 14:30:37 +01:00
Paulus Schoutsen
2d870a29c4 Merge branch 'master' into dev 2018-11-15 14:30:21 +01:00
Paulus Schoutsen
7cb7c76a83 Merge pull request #18481 from home-assistant/rc
0.82.1
2018-11-15 14:25:56 +01:00
Paulus Schoutsen
b40b934029 Bumped version to 0.82.1 2018-11-15 14:01:21 +01:00
Pascal Vizeli
5ffcb99b4f Update pyozw to 0.1.1 (#18436)
* Update pyozw to 0.1.1

* Update requirements_all.txt
2018-11-15 14:01:15 +01:00
Abílio Costa
69d358fa08 edp_redy: increase UPDATE_INTERVAL (#18429)
The server was getting a bit mad sometimes and would lock users out.
2018-11-15 14:01:14 +01:00
Fredrik Erlandsson
f36b94b376 updated pydaikin version (#18413) 2018-11-15 14:01:14 +01:00
Pawel
b5d4e18880 Changed checking of cover state closed from 0 to closed_position variable. (#18407)
Change error message to avoid expression "get_position_topic".
2018-11-15 14:01:13 +01:00
Paulus Schoutsen
43271ca0f7 Bump aioasuswrt to 1.1.6 2018-11-15 14:01:02 +01:00
Diogo Gomes
7659c33439 cancel off_delay action (#18389) 2018-11-15 13:56:14 +01:00
Clayton Nummer
b8ddbc3fdb Fix default value for optional Sense configuration parameter (#18379) 2018-11-15 13:56:13 +01:00
Bram Kragten
2aa2233d9b Fix including from sub dir (#18378)
The include path is now always relative to the root of the config dir.
2018-11-15 13:56:13 +01:00
Martin Hjelmare
6bcba1fbea Fix hangouts notify (#18372)
* Remove notify schema from hangouts platform

* Notify platforms shouldn't overwrite the notify component service
  schema. That has no effect.

* Fix hangouts service data key value
2018-11-15 13:56:12 +01:00
Jason Hunter
466d3a5ef8 catch key error when saving image (#18365) 2018-11-15 13:56:12 +01:00
Aaron Bach
8aa1283adc Add Rainmachine config entry (#18419)
* Initial stuff

* More work in place

* Starting with tests

* Device registry in place

* Hound

* Linting

* Member comments (including extracting device registry)

* Member comments (plus I forgot cleanup!)

* Hound

* More Hound

* Removed old import

* Adding config entry test to coverage

* Updated strings
2018-11-14 13:23:49 -07:00
pbalogh77
312872961f Initial support for Fibaro HomeCenter hubs (#17891)
* Fibaro HC connection, initial commit

Very first steps working, connects, fetches devices, represents sensors, binary_sensors and lights towards HA.

* Cover, switch, bugfixes

Initial support for covers
Initial support for switches
Bugfixes

* Some cleanup and improved lights

pylint based cleanup
light switches handled properly
light features reported correctly

* Added status updates and actions

Lights, Blinds, Switches are mostly working now

* Code cleanup, fiblary3 req

Fiblary3 is now in pypi, set it as req
Cleanup based on pylint

* Included in .coveragerc and added how to use guide

Included the fibaro component in coveragerc
Added usage instructions to file header

* PyLint inspired fixes

Fixed pylint warnings

* PyLint inspired fixes

PyLint inspired fixes

* updated to fiblary3 0.1.5

* Minor fixes to finally pass pull req

Fixed fiblary3 to work with python 3.5
Updated fiblary3 to 0.1.6
(added energy and batteryLevel dummies)

* module import and flake8 fixes

Finally (hopefully) figured out what lint is complaining about

* Fixed color support for lights, simplified callback

Fixed color support for lights
Simplified callback for updates
Uses updated fiblary3 for color light handling

* Lean and mean refactor

While waiting for a brave reviewer, I've been making the code smaller and easier to understand.

* Minor fixes to please HoundCI

* Removed unused component

Scenes are not implemented yet

* Nicer comments.

* DEVICE_CLASS, ignore plugins, improved mapping

Added support for device class and icons in sensors and binary_sensors
Improved mapping of sensors and added heuristic matching
Added support for hidden devices
Fixed conversion to float in sensors

* Fixed dimming

Fibaro apparently does not need, nor like the extra turnOn commands for dimmers

* flake8

* Cleanup, Light fixes, switch power

Cleanup of the component to separate init from connect, handle connection error better
Improved light handling, especially for RGBW strips and working around Fibaro quirks
Added energy and power reporting to switches

* Missing comment added

Missing comment added to please flake8

* Removed everything but bin.sensors

Stripdown, hoping for a review

* better aligned comments

OMG

* Fixes based on code review

Fixes based on code review

* Implemented stopping

Implemented stopping of StateHandler thread
Cleanup for clarity

* Minor fix

Removed unnecessary list copying

* Nicer wording on shutdown

* Minor changes based on code review

* minor fixes based on code review

* removed extra line break
2018-11-14 20:58:32 +01:00
Daniel Høyer Iversen
00235cf6f0 Improve support for 1. generation mill heater (#18423)
* Improve support for 1. gen mill heater

* style

* None operation_list for gen 1 heater

* Remove SUPPORT_OPERATION_MODE for gen 1
2018-11-14 19:35:12 +01:00
Rick van Hattem
80e616cacf Make mikrotik method setting optional as intended (#18454)
Pull request #17852 accidently made the `method` setting required.
2018-11-14 18:05:29 +01:00
Maikel Punie
c7ac216602 Readded climate.velbus (#18434)
* Readded climate.velbus

* houndci-bot changes

* Added more comments

* Fix flake8 error

* return TEMP_* constants

* more comments
2018-11-14 09:40:43 -05:00
Fredrik Erlandsson
0d43cb6d0e fixes for last version bump on pydaikin (#18438) 2018-11-14 09:38:16 -05:00
ehendrix23
d2e102ee2f Init statistics sensor upon HASS start (#18236)
* Update query to include maxAge

Updated the query from recorded to include MaxAge if set; reducing the amount of records retrieved that would otherwise be purged anyway for the sensor.

* Initialization upon HASS start

Register the state listener and read previous information from recorder once HASS is started.

* Updated test_statistics.py for HASS start

Updated test_statistics.py to start HASS and wait it is completed before running test.

* Added newline in docstring

Added newline in docstring.

* Added start of HASS to test_initialize_from_database_with_maxage

Added start of HASS to new test test_initialize_from_database_with_maxage.

* Updates based on review

Following updates based on review:
-) Removed self._hass and passing hass
-) Changed async_add_job to async_create_task
-) For state update, calling async_schedule_update_ha_state
2018-11-14 15:13:32 +01:00
Sebastian Muszynski
d2907b8e53 Add Philips Zhirui Downlight support (#18455) 2018-11-14 12:33:27 +01:00
Glenn Waters
419400f90b Bump elkm1_lib version (#18450) 2018-11-14 02:20:15 +01:00
Pascal Vizeli
532a75b487 Update pyozw to 0.1.1 (#18436)
* Update pyozw to 0.1.1

* Update requirements_all.txt
2018-11-13 23:43:01 +01:00
JC Connell
291fba0ba4 Update Magicseaweed sensor (#18446)
* Increment python-magicseaweed version.

* Update requirements_all.txt
2018-11-13 23:41:58 +01:00
Joakim Sørensen
597da90622 Fixes issue for returning the correct docker version. (#18439) 2018-11-13 21:00:21 +01:00
Abílio Costa
f14251bdcc edp_redy: increase UPDATE_INTERVAL (#18429)
The server was getting a bit mad sometimes and would lock users out.
2018-11-13 14:24:30 +01:00
kennedyshead
ebdfb56803 Bumping aioasuswrt (#18427) 2018-11-13 14:04:36 +01:00
Daniel Høyer Iversen
7aa41d66e9 Avg price for tibber sensor (#18426)
* Avg price for tibber sensor

* change to sum_price
2018-11-13 11:29:04 +01:00
Fabian Affolter
7113ec6073 Fix smhi docstrings (#18414)
* Fix docstrings

* Fix lint

* Fix another typo

* Fix mobile phone edit
2018-11-13 10:01:14 +01:00
kbickar
f78dcb96b0 Sense will not list removed devices (#18410)
* Sense will not list removed devices

* quote update
2018-11-13 08:34:11 +01:00
Fredrik Erlandsson
996da72a4c Daikin fixes (#18415)
* updated pydaikin version

* some Daikin models does not support fan settings
2018-11-13 08:33:34 +01:00
Aaron Bach
8547489014 Bumps pytile to 2.0.5 (#18395) 2018-11-12 19:10:03 -07:00
Fredrik Erlandsson
c6683cba7d updated pydaikin version (#18413) 2018-11-12 22:53:50 +01:00
Fabian Affolter
ea4480f170 Use existing constant (#18408) 2018-11-12 22:32:30 +01:00
Diogo Gomes
0ab81b03a8 cancel off_delay action (#18389) 2018-11-12 21:28:00 +01:00
Pawel
d0463942be Changed checking of cover state closed from 0 to closed_position variable. (#18407)
Change error message to avoid expression "get_position_topic".
2018-11-12 19:45:59 +00:00
Glenn Waters
275b485b36 Add support for keypad keypress (#18393)
* Add support for keypad keypress

* Update requirements_all
2018-11-12 16:10:28 +01:00
Levi Govaerts
15c77fe548 Add niko-home-control support (#18019)
* Add niko-home-control support

* Remove the sensor platform

* Minor changes

* Fix docstring
2018-11-12 15:59:52 +01:00
Philipp Wensauer
e5930da972 Update pynello to 2.0.2 (#18402)
* Update to pynello 2.0.2

* Update to pynello 2.0.2

* Update to pynello 2.0.2
2018-11-12 09:54:08 -05:00
Paulus Schoutsen
8fb6030f97 Bump frontend to 20181112.0 2018-11-12 15:14:37 +01:00
Jorim Tielemans
9eac11dcbe Filter Coinbase account wallets (#18167)
Only add sensor entities for accounts with the specified currencies.
This is a none breaking change.
If it's not specified then all account wallets will be loaded.
2018-11-12 11:26:05 +01:00
kennedyshead
afd9c44ffb Bumping aioasuswrt (#18400) 2018-11-12 11:10:53 +01:00
Hmmbob
1f06d6ac1a Update waze_travel_time.py (#18399) 2018-11-12 11:09:39 +01:00
Adam Belebczuk
ca86755409 Discord - Minor bugfixes (#18385)
Suppress PyNaCl warnings of Discord notify
2018-11-11 23:16:23 +01:00
Clayton Nummer
1f476936a2 Fix default value for optional Sense configuration parameter (#18379) 2018-11-11 22:55:45 +01:00
Eric Nagley
ddeeba20b9 Google assistant enable fan speed controls (#18373)
* Initial commit of Traits changes.

* Initial commit of tests chagnes for added FanSpeed trait.

* pylint fixes.

* Default reversible to false

* Ensure reversible returns True/False.

* Fix FanSpeed trait name and fix order.

* Add remaining checks to FanSpeed trait Test.

* Remove un-needed blank lines at EOF.

* Update homeassistant/components/google_assistant/trait.py

Co-Authored-By: marchingphoenix <eanagley@gmail.com>

* use fan.SPEED_* constants as keys to speed_synonyms dict.
convert True if() to bool() for reversible assignment.

* use fan.SPEED_OFF constant of 'on' check.
2018-11-11 22:02:33 +01:00
Aaron Bach
5129a48750 Fixed misspellings in some of the Pollen sensor names (#18382) 2018-11-11 13:01:26 -07:00
Fabian Affolter
95eae47438 Bump version to 0.83.0 2018-11-11 18:22:28 +01:00
bouni
372470f52a Fix and improvment of Swiss Hydrological Data component (#17166)
* Fix and improvment of Swiss Hydrological Data component

* changed component to get data from a REST API rather than from crawling the website

* fixed several issues and lint errors

* Fix and improvment of Swiss Hydrological Data component

* Minor changes

- Simplify the sensor configuration (expose value as attributes rather than sensor)
- Make the setup fail if station is not available
- Add unique ID
- Prepare for config flow
2018-11-11 17:48:44 +01:00
Martin Hjelmare
02cc6a2f9a Fix hangouts notify (#18372)
* Remove notify schema from hangouts platform

* Notify platforms shouldn't overwrite the notify component service
  schema. That has no effect.

* Fix hangouts service data key value
2018-11-11 17:46:28 +01:00
Jason Hunter
9cb6464c58 catch key error when saving image (#18365) 2018-11-11 17:44:41 +01:00
Jack Wilsdon
5b9a9d8e04 Return color information in Alexa Smart Home response (#18368)
Fixes #18367.
2018-11-11 17:43:01 +01:00
Ville Skyttä
9411fca955 Add more type hints to helpers (#18350)
* Add type hints to helpers.entityfilter

* Add type hints to helpers.deprecation
2018-11-11 17:39:50 +01:00
Bram Kragten
b8c06ad019 Fix including from sub dir (#18378)
The include path is now always relative to the root of the config dir.
2018-11-11 17:15:58 +01:00
Steven Looman
9c92151ad1 Upgrade async_upnp_client to 0.13.2 (#18377) 2018-11-11 15:10:03 +00:00
Daniel Høyer Iversen
f0a0ce504b Better error handling in Tibber (#18363)
* Better error handling in Tibber

* return if received error
2018-11-11 14:06:21 +01:00
Matthew Garrett
d9533127f9 Merge pull request #18364 from mjg59/avion
Bump python-avion dependency
2018-11-10 18:34:27 -08:00
Matthew Garrett
fa127188df Bump python-avion dependency
The current version of python-avion doesn't work correctly with Python 3.5.
Update it to one that does.
2018-11-10 18:03:55 -08:00
Chris Kacerguis
667b41dd4a Show battery_level as a percent vs a decimal (#18328) 2018-11-10 21:30:03 +01:00
Ville Skyttä
f236e14bd6 Upgrade pytest and pytest-sugar (#18338)
* Upgrade pytest to 3.10.0

* Upgrade pytest-sugar to 0.9.2
2018-11-10 21:08:32 +01:00
Antoine Meillet
e75f9b36f9 add heartbeat support to mysensors (#18359) 2018-11-10 21:08:03 +01:00
cdce8p
132bb7902a Update HAP-python to 2.4.0 (#18355) 2018-11-10 18:33:45 +01:00
Paulus Schoutsen
df2ab62ce9 Merge pull request #18335 from home-assistant/rc
0.82
2018-11-10 09:52:37 +01:00
Adam Belebczuk
f7c99ada9d WeMo - Change name of discovery option (#18348) 2018-11-10 09:32:09 +01:00
Tyler Page
8bd281d5a3 Update credstash.py (#18349)
* Update credstash.py

* Update requirements_all.txt
2018-11-10 08:21:39 +01:00
Adam Belebczuk
210eab16da WeMo - Change name of discovery option (#18348) 2018-11-10 08:17:24 +01:00
uchagani
64ada1ea5a bump total connect client to 0.22 (#18344) 2018-11-09 20:04:28 -05:00
Daniel Høyer Iversen
14ad5c0006 Switchmate library update (#18336) 2018-11-09 23:41:44 +01:00
Joakim Sørensen
d34c47a9e1 Rename sensor.launch to sensor.launch_library (#18337) 2018-11-09 22:24:26 +01:00
Aaron Bach
f971309113 Add support for sensors from Flu Near You (#18136)
* Add support for sensors from Flu Near You

* Added sensor for total reports with symptoms

* Member comments

* Member comments
2018-11-09 08:23:07 -07:00
Paulus Schoutsen
f8ca4cfd91 Merge remote-tracking branch 'origin/master' into rc 2018-11-09 15:44:17 +01:00
Paulus Schoutsen
4324d87673 Bumped version to 0.82.0 2018-11-09 15:42:17 +01:00
Abílio Costa
7f48a280ee fix last device ignored (#18329) 2018-11-09 15:41:21 +01:00
Paulus Schoutsen
f4c35a389d Remove Velbus climate platform (#18319) 2018-11-09 15:41:20 +01:00
Daniel Høyer Iversen
8ab2f669d2 Fix xiaomi binary_sensor warning (#18280)
* Fix xiaomi binary_sensor warning

* Fix xiaomi binary_sensor warning
2018-11-09 15:41:20 +01:00
Paulus Schoutsen
de37fc90c0 Bump frontend to 20181103.3 2018-11-09 15:40:46 +01:00
Daniel Høyer Iversen
c571637176 Fix xiaomi binary_sensor warning (#18280)
* Fix xiaomi binary_sensor warning

* Fix xiaomi binary_sensor warning
2018-11-09 11:36:00 +01:00
Abílio Costa
b803075eb4 fix last device ignored (#18329) 2018-11-09 10:41:08 +01:00
ehendrix23
ae85baf396 Restrict recorder query to include max age (#18231)
* Update query to include maxAge

Updated the query from recorded to include MaxAge if set; reducing the amount of records retrieved that would otherwise be purged anyway for the sensor.

* Added newline in docstring

Added newline in docstring.

* Add test + small fix

Added test to ensure query works correctly
Query should be greater then or equal instead of greater then. Fixed.

* Fixed lint issue

Fixed lint issue.
2018-11-08 23:08:36 +00:00
Brig Lamoreaux
05eac915d1 Srpenergy (#18036)
* Add srp_energy

* Update message on TypeError. Add check for None state.

* Add check for none in history

* Add srpenergy to Test requirements.

* Add srpenergy to requirments.

* Change = to ==.

* Change import for srpenergy

* Fix Flak8 errors

* Add srp to gen requirements script

* Change config name.

* Add daily usage test

* Add test for daily usage.

* Fix Flake8 message.

* Remove blank after docstring.

* Add srpenergy to coverage

* Bump requires version to srpenergy

* Fix type in coverage. Import from Sensor. Use dict.

* Update to 1.0.5. Check credentials on setup. Standalone test.

* Fix formating.

* Remove period. Rename _ variables.

* Fix rebase merge

* Add rebase requirement

* Improve Mock Patching.
2018-11-08 19:19:30 +01:00
horga83
8f107c46fe W800rf32 (#17920)
* Initial commit of w800rf32 component and binary_sensor.

The W800 family is an X10 RF receiver used with keypads and motion sensors etc.

* Initial commit of w800rf32 switch platform.

The W800 family is an X10 RF receiver used with keypads and motion sensors etc.

* Remove unused code.

* Additions for w800rf32 component and platform code

* Fix w800rf32 minor lint issues and make sure gen_requirements.py correctlly adds w800rf32

* Added dispatch_connect/send and refactor somewhat

* Fix missed indentation lint

* Removed shared entity dict and use async_dispatch code

* Fix long line not caught by lint

* One more line too long, missed it

* Remove unused code and changes for async

* Remove  @callback that shouldn't be there.

* Remove switch platform, can't have read only switch.

* Remove unused CONF_DEBUG

* Remove used vars and make CONF_DEVICES required

* Move CONF_OFF_DELAY to platform, only used there
2018-11-08 18:49:00 +01:00
Joakim Sørensen
fd2987e551 Add new launch sensor to keep track of space launches. (#18274)
* Add new launch sensor to keep track of space launches.

* Added attribution to Launch Library.

* Adds data class and throtle, reuse aiohttp session.

* Add one extra blank line before the new class..

* Change throttle to simpler SCAN_INTERVAL.

* Remove the usage of the LaunchData class.

* Bump pylaunches, remove . from log, fix line breaker for agency_country_code, remove CONF_ from ATTRIBUTION.
2018-11-08 16:37:11 +01:00
Matthias Urlichs
9472529d43 Doc fix: a circular dependency does not raise an error. (#18298)
This is easier to handle than raising an exception: a circular
dependency causes multiple error entries in the log, which is what we
want.

This is harder to achieve with an exception. Since there is only one
user of this code, I choose to fix the documentation -- instead of
adding a lot of mostly-useless exception handling.

Closes: #13147
2018-11-08 12:59:58 +01:00
Paulus Schoutsen
f7f0a4e811 System groups (#18303)
* Add read only and admin policies

* Migrate to 2 system groups

* Add system groups

* Add system groups admin & read only

* Dont' mutate parameters

* Fix types
2018-11-08 12:57:00 +01:00
Paulus Schoutsen
54b0cde52a Remove Velbus climate platform (#18319) 2018-11-08 11:17:44 +01:00
Joakim Sørensen
a016dd2140 Bump pyhaversion to 2.0.2 (#18318) 2018-11-08 10:07:49 +01:00
Pascal Vizeli
878e369c4a Fix log error message (#18305)
* Fix log error message

* Update __init__.py
2018-11-08 10:07:48 +01:00
Nick Touran
599542394a Added optional precision configuration option to generic_thermostat. (#18317)
* Added optional precision configuration option to generic_thermostat.

* Added optional precision configuration option to generic_thermostat.

* Style update.
2018-11-08 09:39:35 +01:00
Joakim Sørensen
7fed49c4ab Bump pyhaversion to 2.0.2 (#18318) 2018-11-08 09:27:51 +01:00
Aaron Bach
954191c385 Add support for 17track.net package sensors (#18038)
* Add support for 17track.net package sensors

* Updated CODEOWNERS

* Addressing comments

* Fixed requirements

* Member comments

* Revert "Member comments"

This reverts commit 61a19d7966.

* Member comments

* Member comments
2018-11-07 22:25:08 -07:00
Pascal Vizeli
e2fca0691e Fix log error message (#18305)
* Fix log error message

* Update __init__.py
2018-11-08 00:33:51 +01:00
Paulus Schoutsen
f24979c7cf Bumped version to 0.82.0b4 2018-11-07 21:58:18 +01:00
Jeff Wilson
5bab0018f5 Make flux switch async (#18277)
* Make flux switch async

* Fix line lengths

* Fix indentation

* Set tracker before await to avoid race condition

* Fix lint errors
2018-11-07 21:52:55 +01:00
Pascal Vizeli
f541b101c9 Bugfix discovery (delete/mqtt) call for Hass.io (#18159)
* Bugfix discovery delete call for Hass.io

* Fix host

* fix tests
2018-11-07 21:45:47 +01:00
Joakim Sørensen
0bf054fb59 Update pyruter to 1.1.0 to be able to reuse aiohttp session. (#18310)
* Update pyruter to 1.1.0 to be able to reuse aiohttp session.

* Taged correct version of pyruter.
2018-11-07 13:54:33 -05:00
kennedyshead
aa4da479b5 Add upload and download sensors and component for asuswrt (#17757)
* Adds upload and download sensors for asuswrt and makes it a component.

* Rebase

* removes warnings

* Fixing review issues

* More robust connection phase

* Generate dependencies

* Not needed try catch

* Rename sensors

* Revorked tests so they can be turned on again

* Using component setup

* Test through correct setup

* Forgot we dont need to worry about older py
2018-11-07 18:32:13 +01:00
Steven Looman
d93716bd84 Add SUPPORT_SEEK for DLNA DMR devices + now (better) providing media_image_url for DLNA DMR devices (#18157)
* Upgrade to async_upnp_client==0.13.2, now (better) providing media_image_url for DLNA DMR devices

* Add SUPPORT_SEEK for DLNA DMR devices
2018-11-07 13:48:51 +01:00
Tsvi Mostovicz
f99701f41a Upgrade hdate to 0.7.5 (#18296)
In 0.7.x the API to HDate was cleaned up so as to move logic from homeassistant to
the HDate external library.

This commit removes all the superfluous code, updates the required tests and changes the
requirement from version 0.6.5 to 0.7.5
2018-11-07 13:30:41 +01:00
Jorim Tielemans
29be78e08e Improve version sensor (#18292)
* Validate value against valid list

* Show correct name

Constants in alphabetical order.
Added default name when not showing the local/current version.

* Add icon

Icon was already defined but not set

* Unnecessary "elif" after "return" (no-else-return)
2018-11-07 13:28:25 +01:00
majuss
ec732c896d Add support for Lupusec alarm control panel (#17691)
* Adds support for Lupusec alarm control panel

* fixed various mostly cosmetic issues

* fixed generic type of binary sensors

* fixed some formatting; removed scan interval completely -> defaults now to 2 secs

* removed unused data caches; added check if binary sensor class exists

* cosmetics

* generic type fix

* small fix

* small fixes

* guard clause added

* small fixes
2018-11-07 12:51:12 +01:00
Paulus Schoutsen
00c1b40940 Add translations 2018-11-07 10:45:29 +01:00
Paulus Schoutsen
4287d1dd2d Bump frontend to 20181107.0 2018-11-07 10:45:15 +01:00
Paulus Schoutsen
e9b8b290fc Bumped version to 0.82.0b3 2018-11-07 10:37:57 +01:00
mvn23
06b9600069 Bump pyotgw to 0.3b1 (#18286)
* Bump pyotgw to 0.3b1

* Update requirements_all.txt
2018-11-07 10:37:41 +01:00
Johann Kellerman
cff4755708 SMA Guard against older pysma (#18278) 2018-11-07 10:37:40 +01:00
Pascal Vizeli
17f04c1736 Migrate python-openzwave to homeassistant-pyozw (#18268)
* Migrate python-openzwave to homeassistant-pyozw

* Update requirements_all.txt

* Fix requirements
2018-11-07 10:37:05 +01:00
Mikko Tapionlinna
0b6aa38b13 Update pynetgear to 0.5.1 (#18238) 2018-11-07 10:36:28 +01:00
Paulus Schoutsen
782f5c7d19 Bump frontend to 20181103.2 2018-11-07 10:36:15 +01:00
Oleksii Serdiuk
5cee9942a6 Darksky: Add icon to summary sensors (#18275)
The icon changes dynamically, based on summary.
2018-11-07 10:01:05 +01:00
Adam Mills
65be458ce0 Update input component tests to async (#18290) 2018-11-07 09:56:32 +01:00
Adam Mills
ce069be16e Update manual ACP tests to async (#18289) 2018-11-07 09:56:24 +01:00
Adam Mills
0d7cb54872 Update litejet automation tests to async (#18287) 2018-11-07 09:56:10 +01:00
Adam Mills
6935b62487 Remove skipped device tracker tests (#18291) 2018-11-07 09:55:55 +01:00
mvn23
e698fc2553 Bump pyotgw to 0.3b1 (#18286)
* Bump pyotgw to 0.3b1

* Update requirements_all.txt
2018-11-07 09:55:22 +01:00
Sebastian Muszynski
df3d82e0e3 Use async_add_executor_job at the xiaomi_miio platforms (#18294) 2018-11-07 09:03:35 +01:00
Johann Kellerman
35ae85e14e SMA Guard against older pysma (#18278) 2018-11-07 08:52:51 +02:00
Pascal Vizeli
c89dade619 Migrate python-openzwave to homeassistant-pyozw (#18268)
* Migrate python-openzwave to homeassistant-pyozw

* Update requirements_all.txt

* Fix requirements
2018-11-06 22:08:04 +01:00
Rohan Kapoor
bdba3852d0 Split out geofency with a component and platform (#17933)
* Split out geofency with a component and platform

* Make geofency component/device_tracker more async

* Move geofency tests to new package

* Remove coroutine in geofency callback

* Lint

* Fix coroutine in geofency callback

* Fix incorrect patch
2018-11-06 20:12:03 +01:00
Joakim Sørensen
c41ca37a04 Add Norwegian Public Transportation sensor (Ruter). (#18237)
* Add Norwegian Public Transportation sensor (Ruter).

* Corrected typo.

* change stopid to stop_id, actually use attributes, changed logging, corrected link, removed unused variable.

* Change to RuterSensor for the class, and move logic to me more readable.

* Use correct sensor class.

* Add return if blank list, remove else
2018-11-06 19:49:38 +01:00
Adam Mills
917ebed4c9 Update PR checklist with commented out code check (#18272)
Along with hopefully helping resolve these actual problems, a nudge for people to look at their own code might help catch other quick fixes before anyone else has to review a PR.
2018-11-06 19:47:19 +01:00
Paulus Schoutsen
43ae57cc59 Lint 2018-11-06 19:27:52 +01:00
Pascal Vizeli
f4d3d5904e HmIP thermostat fix with operations (#18068)
* HmIP thermostat fix with operations

* Update homematic.py
2018-11-06 16:36:12 +01:00
Paulus Schoutsen
bde02afe4f Normalize MAC addresses (#16916)
* Normalize MAC addresses

* Handle all mac formats
2018-11-06 16:33:31 +01:00
Matt Schmitt
42fea4fb97 Add services to set/update and cancel Nest ETA (#17836)
* Add service to cancel ETA

* Update test requirements

* Change service name and update logging

* Reformat logging to verify structures
2018-11-06 16:11:10 +01:00
Daniel Shokouhi
52074ee9bb Update Neato states, actions and alerts based on Neato docs (#17353)
* Update neato sstates actions and alerts based on neato docs

* Remove unused STATES
2018-11-06 16:10:39 +01:00
Georgi Kirichkov
eb385515c8 Switch OwnTracks HTTP to use webhook component (#17034)
* Update OwnTracks_HTTP to use the webhook component

* Update owntracks_http.py

* Update owntracks_http.py
2018-11-06 16:10:17 +01:00
emontnemery
589764900a Move more MQTT platforms to config entries (#18180)
* Move Lock MQTT platform to config entries

* Move MQTT JSON Light platform to config entries

* Review comments

* Review comments

* Revert mqtt_json changes
2018-11-06 16:09:46 +01:00
Filip Bednárik
9329ec2486 Add support for switches in homekit controller (#17916) 2018-11-06 15:32:32 +01:00
Ludovico de Nittis
47af194d06 Add iAlarm "triggered" support (#18263) 2018-11-06 15:30:41 +01:00
kennedyshead
39412dc930 Adding current_humidity to attributes if its not None. (#18261)
* Adding current humidity if not None

* Removed the logic in supported feature

* More appropriate placement
2018-11-06 15:18:46 +01:00
Fabian Affolter
2e517ab6bc Enable config flow for Luftdaten (#17700)
* Move file to new location

* Update requirement

* Enable config flow

* Add luftdaten

* Add tests

* Update

* Add constants

* Changes according to the review comments

* Remove wrong entry from flows

* Fix dict handling

* Add callback and use OrderedDict

* Remve leftover

* Fix

* Remove await
2018-11-06 14:27:52 +01:00
Matthew Parlane
7933bd7f91 Allow alexa to simply turn on and off climate components. (#16989) 2018-11-06 14:17:56 +01:00
Sebastian Muszynski
58c77e1f55 Add Xiaomi Air Purifier 2s support (#18260) 2018-11-06 14:16:15 +01:00
Tyler
e3a8f3a106 Add input_boolean reporting to Prometheus (#17966) 2018-11-06 13:19:36 +01:00
akloeckner
1aba4699b9 Add attributes of ARP table (#17987)
* Add attributes of ARP table

This adds the device attributes available in the ARP table and a few more. Implementation is inspired by the nmap scanner.

* lint spaces
2018-11-06 13:15:48 +01:00
4lloyd
114bc8ec18 Support eco mode option on Ziggo Mediabox XL (#17990)
* Added eco mode option to Ziggo Mediabox XL

* Changed eco_mode_on to eco_mode

* Removed eco_mode option, the player is unavailable when offline

* Timeout on connection, on/off states are handled via update

* Improved state detection and added available property
2018-11-06 13:14:52 +01:00
kennedyshead
c6f3c239bb Melissa state_attributes (#18201)
* Melissa attributes

* overide device_state_attributes rather than state_attributes

* Selected attributes

* Adding current humidity rather than a state_attribute
2018-11-06 13:08:58 +01:00
Glen Takahashi
34d7758b4a Correct expose_by_default interaction with expose_domains (#17745)
Based on the documentation here: https://www.home-assistant.io/components/google_assistant/#expose_by_default it seems that expose_by_default means all devices should be exposed unless explicitly set to false, and that regardless if this is set domains in exposed_domains should be exposed.
2018-11-06 12:53:47 +01:00
Joakim Sørensen
2c36b9db1f Add support for Google Home device tracking (#18190)
* Add support for Google Home device tracking.

* Use dict[key] for options.

* Delete googlehome.py.save

* Change stylling of name, and attr mac_address to btle_mac_address, removed unesssesarry attributes copying.
2018-11-06 12:47:53 +01:00
Filip Bednárik
24efda20bf Add additional property to HomeKitSwitch to show whether the Homekit outlet is in use (#17448)
* Add additional property to HomeKitSwitch to show whether the Homekit outlet is in use or not

* Fix issues from review - Remove unused property, simplify and rename the device_state_attributes method
2018-11-06 12:43:47 +01:00
akloeckner
3322fee814 Fritz keepalive (#18155)
* Add keepalive support

- adds keepalive support
- adds debug messages
- corrects CONF_PHONEBOOK and CONF_PREFIXES constants

* Add keepalive config constant

* Fix default value

* More visual indentation

* move to platform

* Move to platform

* Make keepalive default and remove option

* Forgot a few lines
2018-11-06 12:43:16 +01:00
Matthias Urlichs
4581a741bd Report *which* component didn't return a bool (#18258)
* Report *which* component didn't return a bool

* break over-long line
2018-11-06 12:41:39 +01:00
Matthias Urlichs
b506aafbb4 docstring fix (#18257) 2018-11-06 12:41:15 +01:00
Jorim Tielemans
121ec5c684 Add season icons (#18221)
* Add season icons

* Use STATE constants

* Calm down hound

* Update season.py
2018-11-06 12:34:11 +01:00
Matthew Treinish
087bffeaae Add workaround to use notification state for zwave lock state (#17386)
* Add workaround to use notification state for zwave lock state

There are several zwave lock models out there which do not seem to
update the lock state on non-rf events (see #11934 #14632 #14534 for
examples) including kwikset smartkey zwave plus locks (which I own).
In these cases it seems that the notifications for non-rf events the
access_control value is updated but not the primary value for the
lock state, which is what is used to set the is_locked property. To
properly have the lock state accurate for all types of notifications
on these models we need to use the access_control field. This commit
adds a workaround for the 4 models reported to exhibit this behavior
so that home-assistant will reliably set the lock state for all
device notifications.

* Add YRD220 as per adrum to workaround list

* Inline constants
2018-11-06 11:00:48 +01:00
Andrew Hayworth
2bf2214d51 Add support for locks in google assistant component (#18233)
* Add support for locks in google assistant component

This is supported by the smarthome API, but there is no documentation
for it. This work is based on an article I found with screenshots of
documentation that was erroneously uploaded:

https://www.androidpolice.com/2018/01/17/google-assistant-home-can-now-natively-control-smart-locks-august-vivint-first-supported/

Google Assistant now supports unlocking certain locks - Nest and August
come to mind - via this API, and this commit allows Home Assistant to
do so as well.

Notably, I've added a config option `allow_unlock` that controls
whether we actually honor requests to unlock a lock via the google
assistant. It defaults to false.

Additionally, we add the functionNotSupported error, which makes a
little more sense when we're unable to execute the desired state
transition.

https://developers.google.com/actions/reference/smarthome/errors-exceptions#exception_list

* Fix linter warnings

* Ensure that certain groups are never exposed to cloud entities

For example, the group.all_locks entity - we should probably never
expose this to third party cloud integrations. It's risky.

This is not configurable, but can be extended by adding to the
cloud.const.NEVER_EXPOSED_ENTITIES array.

It's implemented in a modestly hacky fashion, because we determine
whether or not a entity should be excluded/included in several ways.

Notably, we define this array in the top level const.py, to avoid
circular import problems between the cloud/alexa components.
2018-11-06 10:39:10 +01:00
Tom Harris
ddee5f8b86 Fix IOLinc sensor (#18250) 2018-11-06 10:36:52 +01:00
Robert Svensson
c5d0440041 deCONZ - manual input fallback in config flow (#18116)
* Add config flow step for manual input
Remove support for loading discovery config from json file

* Small cleanup
Fix all translations to step user instead of step init

* Revert to using step_init

* Small cleanup
Add test_gateway that was forgotten in a previous PR

* Fix hound comment

* Fix empty pydocstring
2018-11-06 10:34:24 +01:00
Bram Kragten
24c110ad3c Lovelace: Duplicate ID check on load config + caching (#18152)
* Add caching + dupl. ID check

* duplicate imports...

* lint

* remove for/else

* found

* Missed one...
2018-11-05 20:12:31 -05:00
Glenn Waters
7077e19cf8 Elk-M1 fixes (#18154)
* Fix default value for temperature unit

* Add defaults for subdomains

* Remove unused import

* Fix PR comment
2018-11-05 20:09:07 -05:00
Mikko Tapionlinna
6f568d1cf6 Update pynetgear to 0.5.1 (#18238) 2018-11-05 19:00:46 -05:00
Sebastian Muszynski
d951ed4d68 Add Xiaomi Smartmi Fresh Air System support (#18097)
* Add Xiaomi Air Fresh VA2 support

* Add LED property again (available now)
2018-11-06 00:09:15 +01:00
Daniel Høyer Iversen
3366d2c1ad Tibber login validate (#18235)
* tibber login validate

* requirements
2018-11-05 23:29:42 +01:00
ehendrix23
46b5b6240f Improve debug log information (#18230)
Added debug log information for when records are purged and added entity_id to existing debug information to identify the entity the debug information is for.
2018-11-05 23:12:46 +01:00
Paulus Schoutsen
30fccc696e Bumped version to 0.82.0b2 2018-11-05 21:41:48 +01:00
Bram Kragten
fb947288ad Check if os has chown (#18229) 2018-11-05 21:41:43 +01:00
Paulus Schoutsen
be3800d9a5 Cloud conf (#18216)
* Add original config to entityfilter

* Add alexa/google config to cloud status call

* Lint
2018-11-05 21:41:42 +01:00
Pascal Vizeli
de79c42b8a Add support for TensorFlow in official docker (#18191) 2018-11-05 21:41:42 +01:00
Pascal Vizeli
b3bd59efb0 Handle TensorFlow like OpenCV (#18185)
* Handle TensorFlow like OpenCV

* Update requirements_all.txt
2018-11-05 21:41:41 +01:00
jjlawren
31737c5100 Remove config (breaking change) (#18153) 2018-11-05 21:41:41 +01:00
Johann Kellerman
dbf6b01a60 SMA: Optional import in schema & backoff fix (#18099) 2018-11-05 21:41:40 +01:00
Bram Kragten
abf147ed57 Check if os has chown (#18229) 2018-11-05 21:41:19 +01:00
quthla
c59b038512 Add scenes as switches HomeKit (#17799) 2018-11-05 21:36:30 +01:00
Daniel Høyer Iversen
93b16e7efb Mill room temp (#18203)
* mill, avg room temp

* typo

* Mill device_state_attributes
2018-11-05 20:52:34 +01:00
ehendrix23
561f6996c6 Duplicate entities on discovery (#18074)
* Enhancements for DirecTV media player

Following enhancements have been made:

1. Added debug logging
2. Added ability to change channel using select_source service of the remote platform.
3. State will now show paused if a recorded program is paused, for live TV playing will always be returned.
4. Added the following attributes:
    a. media_position: current position of the media (in seconds)
    b. media_position_updated_at: timestamp when media_position was updated.
   c. source: current source (channel).
   d. media_isbeingrecorded: if current media is being recorded or not.
   e. media_rating: TV/Movie rating of the media
   f. media_recorded: if current media is recorded or live TV
   g. media_starttime: Timestamp media was aired

Reordered properties to follow same order as how they are in __init__.py of remote platform.

* Fixed error and cleaned up few items

Fixed an issue when determining if a program is recorded or not.
Cleaned up some coding.

* Fix issue in checking if DTV device is already configured

If a DTV device was configured before, then discovery would add this device again seperately if the name specified in the configuration is different from the name on the DTV.

This issue is fixed now. Part of the fix also ensure to allow multiple "primary" devices on the network to be discovered.
Further also added debug logging to the setup_platform.

* Further improvements

Some additional improvements related to handling the DATA_DIRECTV in hass.data.

* Fixed flake8 issue

Fixed flake8 issue

* Added available property

Added available property

* Updated to use get_locations()

Replaced doing the request for getLocations with the get_locations() API from DirectPy instead.

* Fix for checking if device is available

Fix for checking if device is available and small update to debug log message.

* Fixed lint issue

Fixed lint issue with unused variable by adding ingore for it as this is for a enumerate

* Updated try/except and removed available

Updated tr/except having the except by the statement we're doing except on.
Removed available, will be a different PR.

* Updated known_devices to be tupples in a set

Updated known_devices to be a tupple in a set, removing loop to determine if client was already added.
2018-11-05 19:33:59 +01:00
vetegrodd
b261c4b7f8 Activate kodi media player progress bar (#17626)
* Added code for progress bar

* Added doc string

* Using in

* More cleaning

* Only update position if needed.
2018-11-05 12:39:37 -05:00
cdce8p
26ba4a56e8 Ignore duplicate state changes GarageDoor HomeKit (#18149)
* Ignore duplicate state changes GarageDoor HomeKit

* Don't ignore service_call
2018-11-05 16:42:19 +01:00
Robert Svensson
dcdae325ea deCONZ - reflect hub status on entities (#18106)
* Support for controlling entity available attribute based on gateways availability

* Fix string not being in imperative mood
2018-11-05 16:21:44 +01:00
ehendrix23
3d4ff74761 Add available property to DirecTV (#18168)
* Enhancements for DirecTV media player

Following enhancements have been made:

1. Added debug logging
2. Added ability to change channel using select_source service of the remote platform.
3. State will now show paused if a recorded program is paused, for live TV playing will always be returned.
4. Added the following attributes:
    a. media_position: current position of the media (in seconds)
    b. media_position_updated_at: timestamp when media_position was updated.
   c. source: current source (channel).
   d. media_isbeingrecorded: if current media is being recorded or not.
   e. media_rating: TV/Movie rating of the media
   f. media_recorded: if current media is recorded or live TV
   g. media_starttime: Timestamp media was aired

Reordered properties to follow same order as how they are in __init__.py of remote platform.

* Fixed error and cleaned up few items

Fixed an issue when determining if a program is recorded or not.
Cleaned up some coding.

* Fix issue in checking if DTV device is already configured

If a DTV device was configured before, then discovery would add this device again seperately if the name specified in the configuration is different from the name on the DTV.

This issue is fixed now. Part of the fix also ensure to allow multiple "primary" devices on the network to be discovered.
Further also added debug logging to the setup_platform.

* Further improvements

Some additional improvements related to handling the DATA_DIRECTV in hass.data.

* Fixed flake8 issue

Fixed flake8 issue

* Added available property

Added available property

* Updated to use get_locations()

Replaced doing the request for getLocations with the get_locations() API from DirectPy instead.

* Fix for checking if device is available

Fix for checking if device is available and small update to debug log message.

* Fixed lint issue

Fixed lint issue with unused variable by adding ingore for it as this is for a enumerate

* Updated try/except and removed available

Updated tr/except having the except by the statement we're doing except on.
Removed available, will be a different PR.

* Add available property

Add the available property to the entiry.
2018-11-05 16:19:03 +01:00
Paulus Schoutsen
81fa74e5ca Remove unrelated scripts (#18219)
* Remove influxDB scripts

* Remove ancient db migrator

* Update requirements
2018-11-05 16:14:34 +01:00
kennedyshead
f9f53fd278 Removes melissa sensors (they should be state attributes as implemented in #18201) (#18214) 2018-11-05 16:10:30 +01:00
Adam Belebczuk
36524e9d3f Bump version of pywemo to 0.4.29 (#18217) 2018-11-05 13:23:46 +01:00
Paulus Schoutsen
bf54582d76 Cloud conf (#18216)
* Add original config to entityfilter

* Add alexa/google config to cloud status call

* Lint
2018-11-05 13:21:03 +01:00
Marcel Hoppe
8de79ed57c add service to reconnect the bot (#18142) 2018-11-05 13:14:22 +01:00
quthla
8ee0e0c6c6 Turn off not cancellable scripts automatically HomeKit (#17793) 2018-11-05 11:11:26 +01:00
Joakim Sørensen
a901c594a9 Add Traccar device tracker (#18200)
* Add Traccar device tracker.

* Updated pytraccar to 0.1.1

* Adds default values for optional options.

* Use dict[key] for options.

* remove logging, duplicate by core
2018-11-05 09:28:02 +01:00
Paulus Schoutsen
2e9132873a Webhook names (#18206)
* Add new automation_info param to async_trigger

* Add domain and name to webhook registration and add WS command
2018-11-05 09:23:58 +01:00
Dav0815
6e4ce35a69 Add destination and icon (#18210)
* Add destination and icon

* Update test_transport_nsw.py

* Error handling fix in external lib

* Reverse sensor name change to prevent break
2018-11-05 08:27:20 +01:00
Andrea Tosatto
1c3ef8be55 Implemented tplink_lte components and notify service via SMS (#17111)
* Implemented tplink_lte components and notify service

* Device discovery for the notify component

* Improved the config schema. Small fixes

* Improved login retry mechanism

* Log successful connection only on retries

* Removed CancelledError handlers and small fixes
2018-11-05 02:09:29 +01:00
Ville Skyttä
922f34f72d Add more type hints to helpers (#18196)
* Test typing for helpers.__init__ and temperature

* Add type hints to helpers.sun

* Add type hints to helpers.signal

* Add type hints to helpers.entity_values

* Add type hints to helpers.dispatcher
2018-11-04 22:46:42 +01:00
cdce8p
959fa81ea6 Fix temperature interval Thermostat HomeKit (#18192)
* Will round to nearest .0 or .5
2018-11-04 22:04:51 +01:00
Martin Hjelmare
9a6c229b1d Refactor mysensors message handling (#17214)
* Refactor mysensors message handling

* Add handler module and register handlers per message type or message
  sub-type. This will allow easier extension of message handling in the
  future.
* Move some common functions to a helpers module.

* Add node handler and signal

* Fix inconsistent return

* Upgrade pymysensors to 0.18.0

* Fix bug in message modification.
2018-11-04 21:08:27 +01:00
rafale77
4a7507bcea Update python-openzwave to 0.4.11 (#18160)
* Update Python OpenZWave to 0.4.11

* Update requirements_all.txt
2018-11-04 14:21:53 -05:00
Johann Kellerman
44556a86e3 SMA: Optional import in schema & backoff fix (#18099) 2018-11-04 19:09:14 +02:00
Fabian Affolter
e161dc3b77 Upgrade toonlib to 1.1.3 (#18189) 2018-11-04 17:22:03 +01:00
Troy Kelly
dbf721cd2c Added AU (Australia) (#18183)
Added missing Australia region
2018-11-04 15:46:02 +01:00
jjlawren
0992e83f8d Remove config (breaking change) (#18153) 2018-11-04 15:20:32 +01:00
Pascal Vizeli
a498e15910 Add support for TensorFlow in official docker (#18191) 2018-11-04 15:19:48 +01:00
Pascal Vizeli
27e159f63f Handle TensorFlow like OpenCV (#18185)
* Handle TensorFlow like OpenCV

* Update requirements_all.txt
2018-11-04 15:15:14 +01:00
Paulus Schoutsen
7b53238f9b Merge pull request #18188 from home-assistant/816
0.81.6
2018-11-04 14:17:23 +01:00
Paulus Schoutsen
075169a7a9 Bumped version to 0.81.6 2018-11-04 13:20:25 +01:00
Pascal Vizeli
3abe49bace Bugfix discovery (delete/mqtt) call for Hass.io (#18159)
* Bugfix discovery delete call for Hass.io

* Fix host

* fix tests
2018-11-04 13:20:20 +01:00
Pascal Vizeli
eb0d989c88 Bugfix discovery (delete/mqtt) call for Hass.io (#18159)
* Bugfix discovery delete call for Hass.io

* Fix host

* fix tests
2018-11-04 12:19:04 +01:00
Jorim Tielemans
42cb23f768 Update Coinbase icons (#18172)
* Add extra icons

and don't rely on the name

* Use dictionary for icons

use safe get() with default value

* Use better vars
2018-11-04 09:50:00 +01:00
Florian Klien
5418e0510d XMPP HTTP upload (#17426)
* notify.xmpp: first working http upload

* extension guessing for upload

* docstrings, flake8, pylint

* hass.async_add_executor_job(...)

* catch more errors, allow unverified SSL request

allow user to specify unverified SSL request to URL
cleaner code
catch more exceptions

* pylint

* catching XMPP exceptions, timeout for requests call

removed calls for roster and presence
added timeout for upload request call
cleared up debug, info, warning messages
cleared up requests call for secure and insecure retrieval of image
catching IqError, IqTimeout, XMPPError from slixmpp
docstring updated

* added timout for http upload of local files

* timeout, mimetypes, random filenames

guessing filetypes and mimetypes with stdlib mimetypes
setting a random filename for privacy
working around slixmpp timeout issues with asyncio.wait_for

* code cleanup

* added file upload for rooms/groupchats

* version bump for slixmpp to 1.4.1

added NotConnectedError, removed double catches of IqErrors
removed asyncio import

* slixmpp 1.4.1 in requirements_all

* added url and path templating

* Minor changes

* fixed review requests

fixed possible path issue for foo/../bar/ paths
fixed possible access for non-whitelisted files
fixed None or X
fixed try-else block, moved else block into try
fixed raising error in upload_file if url is None
fixed using data.get after it's already been checked
fixed added docstring for tiny get_url function
2018-11-04 09:17:05 +01:00
Anders Melchiorsen
164c68093b Improve netgear_lte logging when unconnected (#18163)
* Improve netgear_lte logging when unconnected

* Use callback
2018-11-04 09:15:57 +01:00
Jorim Tielemans
5dd691e55d Rename huawei_lte.py to test_huawei_lte.py (#18170) 2018-11-04 01:33:05 +01:00
Corey Edwards
155df912e5 Add option to manually specify device detection method (#17852)
* Add option to manually specify device detection method

* Fix style and lint issue
2018-11-03 23:48:08 +01:00
Joakim Sørensen
610b0b6494 Add Tautulli sensor platform (#17835)
* Adds Tautulli as a sensor platform.

* Remove blank last line.

* Rewrite the platform to comply with review.

* Linting issues.

* Remove tailing newline.

* Corrected typo

* Correcte check_connection, removed wierd defaults, added line in imports, removed unused var, use the correct user list.

* Use dict[key] for required config options.

* Minor changes
2018-11-03 23:47:31 +01:00
rafale77
f76ccb636c Add support for various load level devices (#18161) 2018-11-03 22:25:05 +01:00
Paulus Schoutsen
b2bdf05cae Bumped version to 0.82.0b1 2018-11-03 19:18:38 +01:00
Paulus Schoutsen
461e6acf5c Bump frontend to 20181103.1 2018-11-03 19:18:33 +01:00
Paulus Schoutsen
fbcf0880f3 Bump frontend to 20181103.1 2018-11-03 19:18:20 +01:00
Paulus Schoutsen
9bf824bf00 Bumped version to 0.82.0b0 2018-11-03 13:48:45 +01:00
Paulus Schoutsen
0009e7bde9 Merge remote-tracking branch 'origin/master' into dev 2018-11-03 13:48:19 +01:00
Paulus Schoutsen
67e62e8020 Merge remote-tracking branch 'origin/rc' into dev 2018-11-03 13:48:16 +01:00
Paulus Schoutsen
e8e135fd25 Update translations 2018-11-03 13:47:36 +01:00
Paulus Schoutsen
63e53fdf15 Bump frontend to 20181103.0 2018-11-03 13:47:13 +01:00
Paulus Schoutsen
ed3ca2b74f Merge pull request #18144 from home-assistant/rc
0.81.5
2018-11-03 13:27:15 +01:00
Paulus Schoutsen
91a93b0060 Merge remote-tracking branch 'origin/master' into rc 2018-11-03 12:38:00 +01:00
Paulus Schoutsen
6d3167fcd4 Bumped version to 0.81.5 2018-11-03 12:36:51 +01:00
jjlawren
255607f3a5 Remove FFmpeg input tests (#18131)
* Remove FFmpeg input tests

* Not needed here

* Removing tests for removed functionality

* Minor lint

* Fix tests to reflect removed config option

* Remove async service registration by request

* More lint

* Unused imports

* Make it a non-breaking change

* Update ffmpeg.py
2018-11-03 12:36:47 +01:00
jjlawren
9807ba1a5d Remove FFmpeg input tests (#18131)
* Remove FFmpeg input tests

* Not needed here

* Removing tests for removed functionality

* Minor lint

* Fix tests to reflect removed config option

* Remove async service registration by request

* More lint

* Unused imports

* Make it a non-breaking change

* Update ffmpeg.py
2018-11-03 12:36:22 +01:00
alex9446
782a90a535 Fix hassio command timeout (#17567)
* fix hassio command timeout

* Increased command timeout
2018-11-03 11:04:17 +01:00
Fabian Affolter
7caddd48cd Fix typos and update docstrings (#18137) 2018-11-03 10:24:02 +01:00
Adam Belebczuk
5c99862878 Allow disabling WeMo Discovery (#18079)
* WeMo - Disable Discovery - New config option

* WeMo - Disable Discovery - Change log level to debug

* WeMo - Disable Discovery - Change logging level
2018-11-02 21:42:24 -06:00
Pascal de Ladurantaye
6a5f9faa33 Add optional ttl config to route53 component (#18135)
* Add optional ttl config to route53 component

* linting :)
2018-11-02 21:41:26 -06:00
mtl010957
03d94df3cd Fix DTE Energy Bridge V2 scaling issue. (#18124) (#18129) 2018-11-02 22:48:17 +01:00
Jason Hunter
45484ba569 TensorFlow image_processing component (#17795)
* initial tensorflow image_processing component

* linting fixes

* make displayed attribute a summary of objects

* fix missed merge conflict and add warning supression back in for CPU type

* restructure tensorflow component to install on the fly, remove from Docker

* add both matches and summary as attributes

* address review comments

* do not use deps folder as default, as it should only be managed by HA.  Update to have tensorflow in root config directory
2018-11-02 21:57:03 +01:00
Robert Svensson
92c536ec0e Don't create a switch for POE device if said device is Cloud key (#18117) 2018-11-02 21:09:16 +01:00
Adam Mills
1f290bad94 Update fan/demo tests to async (#18109)
* Update fan/demo tests to async

* Use async_create_task
2018-11-02 21:08:22 +01:00
Adam Mills
dd938d7460 Async generic thermostat tests (#18111) 2018-11-02 21:06:59 +01:00
Paulus Schoutsen
73ed2ab164 bump frontend to 20181026.4 2018-11-02 20:09:12 +01:00
Joakim Sørensen
283407fe6c Exposes initial attribute on the entity. (#18123) 2018-11-02 16:52:02 +01:00
Aaron Bach
97e928df4a Update Pollen.com to use numpy for trend analysis (#18107)
* Update Pollen.com to use numpy for trend analysis

* Hound

* Linting
2018-11-02 15:48:22 +01:00
vacumet
a39846bad9 Changed from pifacecommon 4.1.2 to 4.2.2 to make the piface digital i/o boards work on rpi like 3 (#18101) 2018-11-02 14:44:20 +01:00
Maikel Punie
3fe895c18f Adding climate.velbus support (#18100)
* Adding climate.velbus support

* Fix version

* fixed houndci-bot

* More fixes

* Fix typos and ordering
2018-11-02 14:43:17 +01:00
Paulus Schoutsen
d7efe274c1 Merge pull request #18122 from home-assistant/rc
0.81.4
2018-11-02 14:08:21 +01:00
Paulus Schoutsen
91b7d56aa6 Bumped version to 0.81.4 2018-11-02 14:07:02 +01:00
Paulus Schoutsen
1895e03874 Frontend bump to 20181026.3 2018-11-02 14:06:49 +01:00
Adam Mills
0a301f7dcb Convert nsw rural fire tests to async (#18112) 2018-11-02 14:03:05 +01:00
Oleksii Serdiuk
58c7ee649d Darksky: Round all temperatures to 1 decimal place (#18119)
Some temperatures were not rounded to 1 decimal place:
`temperature_low`, `apparent_temperature_low`, `temperature_high`,
`apparent_temperature_high`.
2018-11-02 13:44:53 +01:00
Paulus Schoutsen
d80dce31da Merge pull request #18120 from home-assistant/rc
0.81.3
2018-11-02 13:25:53 +01:00
Diogo Gomes
94f24e6d49 Upgrade pyipma (#17992)
* bump dependency version

* Add more context to debug message

Co-Authored-By: dgomes <diogogomes@gmail.com>

* shorten debug messages
2018-11-02 13:25:32 +01:00
Paulus Schoutsen
2e169320a4 Bumped version to 0.81.3 2018-11-02 12:33:02 +01:00
Anders Melchiorsen
dce6a9f882 Fix time zone for flux switch (#18102) 2018-11-02 12:32:52 +01:00
Anders Melchiorsen
93689d68f7 Fix time zone for flux switch (#18102) 2018-11-02 12:32:41 +01:00
cdce8p
5a802c1069 Revert HomeKit update to 2.2.2 (#18069) 2018-11-02 12:31:58 +01:00
Jason Hu
602b59aed8 Change cv.string to [cv.string] (#18050) 2018-11-02 12:31:58 +01:00
Nate Clark
6f8ac7f5c9 Konnected: Pass hass_config to load_platform (#18027) 2018-11-02 12:31:57 +01:00
Tomas Hellström
5910161202 fix naming bug (#17976) 2018-11-02 12:31:56 +01:00
Paulus Schoutsen
afc70fda50 Bump frontend to 20181026.2 2018-11-02 12:31:45 +01:00
Leothlon
8613694544 Added service select_video_output and video_out attribute (#18081)
* Added service select_video_output and video_out attribute

* Fixed white lines and long lines

* Made line shorter

* Added period to comment according to flake8 rules

* Imported domain const

* Prefixed service with platform name

* changed "video output" to "hdmi output" to better reflect eiscp cammand

* video_output to hdmi_output rename
2018-11-02 11:07:36 +01:00
Neil Crosby
cb7ae5cdf2 Allow MS face detection to handle updating entities when no face is detected (#17593)
* Allow Microsoft face detection to handle updating entities when no face is detected

* Remove microsoft_face_detect_no_face_detected.json and hard code in simple empty list into the tests
2018-11-02 10:50:43 +01:00
Ville Skyttä
a4c0c34028 Use ssdp udn uuid as Samsung TV unique id (#18022) 2018-11-02 11:50:07 +02:00
kbickar
6eba7c4ff3 Add binary sensors for sense energy monitor (#17645)
* Added error handling for sense API timeouts

* Moved imports in function

* Moved imports to more appropriate function

* Change exception to custom package version

* Updated sense_energy library to 0.4.2

* Added binary sensors for individual devices

* Whitespace updates

* Split into component, sensors, binary sensors

* Fixed whitespace

* Fixed whitespace

* Moved time constant into sensor file

* Regenerated requirements

* Fixed whitespace

* Updated component dependency

* Fixed whitespace

* Code cleanup

* High and low target temps are also supported if target is supported

* Revert "High and low target temps are also supported if target is supported"

This reverts commit 66b33dc2b8.

* Added all sense components to .coveragerc

* Added check authentication exception

* binary/sensor platforms loaded in setup

* Changed to add all detected devices

* Changed to add all sensors on setup

* Code cleanup

* Whitespace

* Whitespace

* Added sense as requirement for platform

* pylint fixes

* Whitespace

* Switched requirement to dependency

* Made non-class function

* Whitespace

* Removed unneeded checks

* Increased API delay to 60 seconds

* Added guard clause for discovery_info

* Tidy code

* Whitespace
2018-11-02 10:13:14 +01:00
Rick van Hattem
82edea6077 Removed assumptions about provided upnp data (#17604)
* Removed assumptions about incomplete UPnP devices

* Removed assumptions about incomplete UPnP devices
2018-11-01 22:59:42 +01:00
Petro31
9b47af68ae Add surround programs to zone 2+ (#17445)
* Add surround programs to zone 2+

Add surround programs and surround program to any zone that supports it.

* Update yamaha.py

removed double fetching.
2018-11-01 21:26:53 +01:00
Lev Aronsky
02b46e2ba3 Ignore min_cycle_duration when manually controlling the thermostat. (#16128)
* Ignore min_cycle_duration when manually controlling the thermostat.

* style

* Generic thermostat: add minimum cycle duration to keep-alive tests.

There was a bug in previous versions of the code, that would not execute
the keep-alive action if the minimum cycle duration hasn't passed.
This test verifies that the keep-alive action is executed correctly.

* Generic thermostat: added tests to verify that changing the
thermostat mode manually triggers the switch, regardless of
minimum cycle duration.

* Updated tests to use `common` module instead of the deprecated `climate`
2018-11-01 21:25:50 +01:00
Andy Castille
e9ae862fca Update to DoorBirdPy v2 (again) (#14933)
* Update to DoorBirdPy v2

* Move get_schedule_entry to DoorBirdPy, general cleanup

* Update requirements_all.txt

* Requested changes.

* Update requirements post merge.

* Correct call to async_add_executor_job

* Update clear schedule endpoint to be async

* Refactor view and device favorite reset

* Register listeners so events show in GUI

* Add token based authorization

* Update requirements

* Linting issues

* Linting issues

* Linting issues

* Correct logging and inheritance
2018-11-01 21:23:06 +01:00
Oleksii Serdiuk
31dc6832e7 Darksky: Fetch summary for daily forecasts (#18031) 2018-11-01 21:57:32 +02:00
Pawel
c3e3f662f4 Always save current position if payload is numeric value (#16148)
* Change of behaviour. Allow user to configure either a position topic or a state topic but not
both.

* optimistic mode in set_cover and tests added

* optimistic mode in set_cover_position using percentage_position

* fixes accroding to Martin review.

* added validation schema for set_position_topic and get_position_topic

* check only set_position_topic in supported_features.

* Multidoc string fix.
2018-11-01 20:09:43 +01:00
Charles Garwood
bcea3a9cba Don't try to re-add existing Z-Wave entities (#17995)
* Keep track of created entities

* lint

* Update tests
2018-11-01 19:38:23 +01:00
Rohan Kapoor
23290fa6ee Use a fixture for dialogflow calls in unit tests (#17999)
* Use a fixture for dialogflow calls in unit tests

* Lint
2018-11-01 19:37:38 +01:00
Aaron Bach
4ee21e66dc Update Pollen.com sensor platform to include asthma info (#18024)
* Update Pollen.com sensor platform to include asthma info

* Updated requirements

* Bump to 2.2.2
2018-11-01 19:36:42 +01:00
cdce8p
4a3f754033 Revert HomeKit update to 2.2.2 (#18069) 2018-11-01 19:35:02 +01:00
Sebastian Muszynski
c75c00d568 Bump python-miio version (#18095) 2018-11-01 17:53:48 +01:00
Fabian Affolter
a9361482d9 Catch KeyError if data is not available (fixes #18082) (#18089) 2018-11-01 16:32:36 +01:00
Malte Franken
83e83520e6 Upgrade georss_client to 0.4 (#18088)
* update geojson_client to 0.3

* update georss_client to 0.4
2018-11-01 16:32:21 +01:00
Fabian Affolter
65e6c50748 Upgrade restrictedpython to 4.0b6 (#18087) 2018-11-01 14:25:45 +01:00
Simon van der Veldt
2a76347071 sensor/wunderground add device_class (#18072)
to relevant sensors
2018-11-01 14:10:43 +01:00
Fabian Affolter
c5f9220500 Upgrade psutil to 5.4.8 (#18086) 2018-11-01 09:03:18 -04:00
Mike Megally
afc109a585 Pass though file_url from extended data attrs (#17801)
* pass though file_url from extended data attrs so synology chat bot can send files

* some code cleanup
2018-11-01 13:33:51 +01:00
Fabian Affolter
a69c3953f1 Upgrade youtube_dl to 2018.10.29 (#18085) 2018-11-01 13:26:12 +01:00
Fabian Affolter
a3e77bc5f3 Upgrade sqlalchemy to 1.2.13 (#18084) 2018-11-01 13:25:45 +01:00
Fabian Affolter
957320f265 Upgrade locationsharinglib to 3.0.7 (#18083) 2018-11-01 13:00:24 +01:00
Mattias Welponer
2fce79eccf HomematicIP_Cloud fix test (#17376)
* fix-homematicip_cloud-flow_config

* remove-homematicip_cloud-flow_config-stale-print

* Fix redundant backslash between brackets
2018-11-01 12:21:59 +01:00
Fabian Affolter
caa48fab13 Upgrade astral to 1.7.1 2018-11-01 11:26:33 +01:00
Jonathan Keljo
19ebdf2cf1 Add a component for GreenEye Monitor (#16378)
* Add a component for GreenEye Monitor

[GreenEye Monitor](http://www.brultech.com/greeneye/) is an energy
monitor that can monitor emergy usage of individual circuits, count pulses
from things like water or gas meters, and monitor temperatures. This component
exposes these various sensors in Home Assistant, for both data tracking and
automation triggering purposes.

* Consolidate sensors

* lint

* .coveragerc

* - cv.ensure_list
- DOMAIN, where appropriate
- defaults to schema
- single invocation of async_load_platform
- async_create_task instead of async_add_job
- fail if no sensors
- monitors required
- async_add_entities
- call add_devices once
- remove unused schema
- use properties rather than set fields
- move _number and unique_id to GEMSensor
- remove unnecessary get(xxx, None)
- keep params on one line when possible
- new-style string format

* Fix `ensure_list` usage, log message

* Pass config through
2018-11-01 10:46:11 +01:00
akloeckner
e9f96bfd7f Allow different types to match in pilight (#17922)
* Allow different types to match

see discussion here: https://github.com/home-assistant/home-assistant/pull/17870

* lint spaces

* line length < 79
2018-11-01 10:37:19 +01:00
MatteGary
ab8299b6cf Fix in Daikin.py for set swing_mode and speed (#18013) 2018-11-01 10:29:48 +01:00
Jared Quinn
1c5800d98b Added identifier and name to connect/disconnect events (#18078)
* Added identifier and name to connect/disconnect events

* Fix indentation from failed tests
2018-11-01 09:48:44 +01:00
thoscut
bfa86b8138 Add message template support for alert component (#17516)
* Add problem text to message if available

* Revert "Add problem text to message if available"

This reverts commit 7be519bf7f.

* Cleanup setup

* Add message template support

* Fix for failing test

* Added tests

* Refactor changes

* Fix lint violation

* Fix failing tests

* Unify handling for message and done_message parameter and sending function

* Update tests

* Fix lint warnings
2018-11-01 09:48:11 +01:00
Bram Kragten
4163889c6b Add view commands to Lovelace (#18063)
* Add get and update view command

* Add add view command

* Add move view command

* Add delete command

* lint
2018-11-01 09:44:38 +01:00
Tsvi Mostovicz
329d128e03 Change test to parametrized test using pytest (#18047) 2018-11-01 09:40:31 +01:00
Jason Hu
f516550f9f Fix camera mjpeg stream handling (#18076)
* Fix handle_async_mjpeg_stream

* Lint
2018-11-01 09:28:23 +01:00
Daniel Høyer Iversen
32ee4f0714 remove schedule_update_ha_state from mill (#18080)
* remove schedule_update_ha_state from mill

* remove return
2018-11-01 09:24:25 +01:00
Joakim Sørensen
3d1a324f33 Add functionality to the version sensor (#18067)
* Added functionality to the version sensor.

* Corrected typo.

* Change default name to not cause a breaking change.

* Use vol.lower in the schema.

* Add missing blank line.

* Change order of cv.string and vol.Lower.
2018-11-01 09:20:30 +01:00
Robert Svensson
a9140dc8f5 deCONZ - retry if setup fails (#17772)
* Make component retry if setup fails
* Improve overall test coverage
2018-10-31 22:38:04 +01:00
Daniel Høyer Iversen
145677ed75 Mill, support opeation mode (#18059) 2018-10-31 21:39:13 +01:00
Johann Kellerman
7363378ac4 Update SMA sensor to pysma 0.2.2 (#17988) 2018-10-31 21:09:00 +02:00
Phil Frost
93706fa568 Report correct thermostat mode to Alexa (#18053)
We were erroneously reporting the _previous_ mode. So if the thermostat was off
and the user asks, "Alexa, set the thermostat to heat", the thermostat would be
set to heat but Alexa would respond, "The thermostat is off."

Bug caught by @Thunderbird2086 at
https://github.com/home-assistant/home-assistant/pull/17969#issuecomment-434654345
2018-10-31 16:09:13 +01:00
Bram Kragten
b763c0f902 Extract ruamel.yaml to util with secrets, lovelace ws decorators (#17958)
* Extract ruamel.yaml to util, ws decorators, secrets

* lint

* Extend SafeConstructor

Somehow my last commit is gone after rebase...

* lint

* Woof...

* Woof woof...

* Cleanup type hints

* Update homeassistant/scripts/check_config.py

* lint

* typing
2018-10-31 13:49:54 +01:00
Jason Hu
1578187376 Change cv.string to [cv.string] (#18050) 2018-10-31 12:52:21 +01:00
mvn23
b12e79e5cf Add opentherm_gw services (#17762)
* Move components/opentherm_gw.py to components/opentherm_gw/__init__.py

* Update requirements-all.txt

* Await set_clock coroutine rather than scheduling it.

* Create task for async_load_platform
2018-10-31 12:33:43 +01:00
Adam Belebczuk
239e314dc1 Add services.yaml entry for new WeMo Humidifier platform service (#18032)
* WeMo Humidifier - Add entry to services.yaml

* WeMo Humidifier - Fix typo in wemo.py

* WeMo Humidifier - Fixed incorrect parameter name
2018-10-31 10:54:15 +01:00
kennedyshead
e85e5789a2 Bumping aioasuswrt to 1.1.2 (#18042) 2018-10-31 09:44:41 +01:00
Ville Skyttä
9c840f93f0 Use const.SUN_EVENT_* more (#18039) 2018-10-31 09:10:28 +01:00
Nate Clark
dcc46226ee Konnected: Pass hass_config to load_platform (#18027) 2018-10-31 08:42:33 +02:00
Philip Rosenberg-Watt
314e5ac296 Add SMA sensor SSL verification option (#18033) 2018-10-31 08:22:55 +02:00
Gavin Mogan
9c77465c0e Upgrade to asuswrt 1.1.1 to better handle mac addresses with letters in them (#18030)
* Upgrade to asuswrt 1.1.1 to better handle mac addresses with letters in them

Signed-off-by: Gavin Mogan <git@gavinmogan.com>

* Update requirements_all as well

Signed-off-by: Gavin Mogan <git@gavinmogan.com>
2018-10-31 06:33:04 +01:00
kennedyshead
4073f63256 Async version of melissa (#17721)
* rebase upstream

* Fixed tests

* Fixing lint
2018-10-30 21:29:11 +01:00
Diogo Gomes
9565c0bd1d Upgrade pyipma (#17992)
* bump dependency version

* Add more context to debug message

Co-Authored-By: dgomes <diogogomes@gmail.com>

* shorten debug messages
2018-10-30 21:25:12 +01:00
Daniel Shokouhi
9cb5ea20af Fix Bloomsky api call (#18016) 2018-10-30 21:23:44 +01:00
Adam Belebczuk
eef9246db1 Support for WeMo Humidifier (#17996)
* Fix Vera climate component to use correct states

Changed the Vera climate component so it uses the STATE_* states from the base climate component. This will allow it to work with Google Assistant.

* Wemo Humidifier - Initial Commit

* WeMo Humidifier - First draft of component

* WeMo Humidifier - Removed direct IO from property

* WeMo Humidifier - Trivial comment change

* Added myself as codeowner for WeMo

* WeMo Humidifier - Fixed various syntax & lint issue

* WeMo Humidifier - Small comment addition

* WeMo Humidifier - Fix TypeError: 'WemoHumidifier' object is not iterable

* WeMo Humidifier - Rename set humidity service

* WeMo Humidifier - Add to .coveragerc

* WeMo Humidifier - Fixed lint/pylint issues

* WeMo Humidifier - First round of requested changes

* WeMo Humidifier - Round two of requested changes

* WeMo Humidifier - Third round of requested changes

* WeMo Humidifier - Fixed whitespace issue on dict comprehension

* WeMo Humidifier - Fourth round of requested changes

* WeMo Humidifier - Corrected typo in async_add_executor_job call

* WeMo Humidifier - Fixed spacing before inline comments
2018-10-30 21:19:49 +01:00
Neil Crosby
865ea82432 Allow jinja namespace command to work. (#18011) 2018-10-30 19:13:20 +01:00
Ville Skyttä
4d9ef9e795 Import homeassistant domain instead of hardcoding it (#17985) 2018-10-30 17:38:09 +02:00
Tsvi Mostovicz
87bd2a32e4 Change hebrew date at sunset (#17449)
* Change date at sunset

* Fix tests to actually run and add fix to component

* Make tests pass

* Use get_astral_event_next instead of get_astral_event_date

* Revert to using get_astral_event_date

* Make tox happy: reset state on tearDown
2018-10-30 15:21:58 +01:00
Rohan Kapoor
f0693f6f91 Switch mailgun webhooks to the new Mailgun webhook api (#17919)
* Switch mailgun webhooks to the webhook api

* Change mailgun strings to indicate application/json is in use

* Lint

* Revert Changes to .translations.

* Don't fail if the API key isn't set
2018-10-30 12:12:41 +01:00
Anders Melchiorsen
3de822a0e2 RFC: Static templates match no entities, not all (#17991)
* Static templates match no entities, not all

* Clean up test values
2018-10-30 12:03:27 +01:00
Nick Whyte
71b56363d3 Reverse out change #14234 BOM Weather throttle fix (#17468)
* Reverse out change #14234 BOM Weather throttle fix

Reverted back to original throttle code to ensure sensors are updated on time.

* Fixed lint issues

* Review as a commit

* Use last_updated for attributes

* lint

* lint
2018-10-30 11:56:00 +01:00
Paulus Schoutsen
f400925825 Merge remote-tracking branch 'origin/master' into dev 2018-10-30 11:39:16 +01:00
Paulus Schoutsen
20fb7b59ef Update translations 2018-10-30 11:35:40 +01:00
Paulus Schoutsen
622f23abd7 Update frontend to 20181030.0 2018-10-30 11:35:25 +01:00
Tomas Hellström
5337d0b4f3 fix naming bug (#17976) 2018-10-30 10:44:07 +01:00
Paulus Schoutsen
2aabdf29bb Merge pull request #17970 from home-assistant/rc
0.81.2
2018-10-30 08:13:59 +01:00
Luc Touraille
b71dc752fa Upgrade aiofreepybox (#17989)
- Add features to get connection status and stats
 - Improve error reporting
 - Fix issue with the authentication file (#16934)
2018-10-30 07:35:23 +01:00
Phil Frost
e16793013a Refactor Alexa API, fix thermostats (#17969)
* Refactor Alexa API to use objects for requests

This introduces _AlexaDirective to stand in for the previous model of passing
basic dict and list data structures to and from handlers. This gives a more
expressive platform for functionality common to most or all handlers.

I had two use cases in mind:

1) Most responses should include current properties. In the case of locks and
thermostats, the response must include the properties or Alexa will give the
user a vague error like "Hmm, $device is not responding." Locks currently work,
but thermostats do not. I wanted a way to automatically include properties in
all responses. This is implemented in a subsequent commit.

2) The previous model had a 1:1 mapping between Alexa endpoints and Home
Assistant entities. This works most of the time, but sometimes it's not so
great. For example, my Z-wave thermostat shows as three devices in Alexa: one
for the temperature sensor, one for the heat, and one for the AC. I'd like to
merge these into one device from Alexa's perspective. I believe this will be
facilitated with the `endpoint` attribute on `_AlexaDirective`.

* Include properties in all Alexa responses

The added _AlexaResponse class provides a richer vocabulary for handlers.

Among that vocabulary is .merge_context_properties(), which is invoked
automatically for any request directed at an endpoint. This adds all supported
properties to the response as recommended by the Alexa API docs, and in some
cases (locks, thermostats at least) the user will get an error "Hmm, $device is
not responding" if properties are not provided in the response.

* Fix setting temperature with Alexa thermostats

Fixes https://github.com/home-assistant/home-assistant/issues/16577
2018-10-29 22:16:35 -04:00
Daniel Høyer Iversen
98163504fb Mill service (#17971)
* Mill service

* style
2018-10-29 23:36:49 +01:00
Anton Sarukhanov
32cb666dac Update Avi-On to work with latest API (#17780)
* Update Avi-On to work with the API.

* Use voluptuous defaults instead of .get()

* Bump library version.

* Remove unnecessary voluptuous defaults. Fix manually-configured devices.

API-discovered devices are already Avion objects, but manually-configured devices need to be instantiated as Avion objects first.

* Use .get() where appropriate.

* Remove default
2018-10-29 23:29:27 +01:00
Evan Bruhn
03dd1e6870 Updated ring_doorbell dependency to 0.2.2 (#17945)
- Resolves an issue with the sensor platform for Ring Spotlight Cam devices
2018-10-29 23:27:12 +01:00
Victor Cerutti
cb73a8bbb0 Météo-france sensor : current weather and 1 hour rain forecast (#17773)
* 🌧 Meteo France rain forecast

* do not fail on wrong config

* Update name of sensor class

* do not show sensor if not working

* Update .coveragerc

* ability to submit insee location code without final 0 needed by meteo-france

* Lynting

* more lynting

* update comment

* block comment linting

* reducing length of long lines

* linting

* Update météo-france platform

Now work with pypi package and monitored conditions

* remove error log

* Update requirements_all.txt

* Increase scan interval to 5 minutes

* Update meteo_france according to review

* better error handling of location missing some monitored conditions

* fix lint error

* moving error log

Errors are now catched at sensor initialization and state is set when updating the data

* Update updating of sensor
2018-10-29 23:22:47 +01:00
Phil Frost
3169c0416e Update Alexa tests to async syntax (#17965)
See https://github.com/home-assistant/home-assistant/issues/12614
2018-10-29 17:57:27 -04:00
Paulus Schoutsen
1e03f945b5 Don't use keyset (#17984) 2018-10-29 21:32:37 +01:00
Paulus Schoutsen
a91d894132 Update requests to 2.20.0 (#17978) 2018-10-29 21:32:36 +01:00
Paulus Schoutsen
2f71f8908b Don't use keyset (#17984) 2018-10-29 21:25:17 +01:00
Paulus Schoutsen
c38a0f1bf0 Update requests to 2.20.0 (#17978) 2018-10-29 21:16:05 +01:00
ehendrix23
deeb288daf Change source, add attributes, and improve state of DirecTV (#17536)
* Enhancements for DirecTV media player

Following enhancements have been made:

1. Added debug logging
2. Added ability to change channel using select_source service of the remote platform.
3. State will now show paused if a recorded program is paused, for live TV playing will always be returned.
4. Added the following attributes:
    a. media_position: current position of the media (in seconds)
    b. media_position_updated_at: timestamp when media_position was updated.
   c. source: current source (channel).
   d. media_isbeingrecorded: if current media is being recorded or not.
   e. media_rating: TV/Movie rating of the media
   f. media_recorded: if current media is recorded or live TV
   g. media_starttime: Timestamp media was aired

Reordered properties to follow same order as how they are in __init__.py of remote platform.

* Fixed error and cleaned up few items

Fixed an issue when determining if a program is recorded or not.
Cleaned up some coding.

* Attribute last position update only updated when position changed.

The attribute media_position_updated_at will only be updated if the position changed (thus media is playing for recorded or live TV).
Added assumed_state; will be set to False if in standby or when a recorded show is watched. For live TV it will be set to True.

* Added some empty lines for easier reading

Added some empty lines before returns to improve readability.

* Seperated words in constants

Seperated the words in constants.

* Fix _lastupdate to _last_update

Split words in _lastupdate to _last_update as I missed it.
2018-10-29 21:06:37 +01:00
Paulus Schoutsen
d6913c6914 Fix operation mode for Alexa thermostat (#17972) 2018-10-29 20:52:34 +01:00
Phil Frost
af5eacf303 Fix spelling error in log output (#17963) 2018-10-29 19:40:32 +01:00
Mariusz Łuciów
a87a5d266e Fixed copy-paste errors (#17948) 2018-10-29 19:32:58 +01:00
jxwolstenholme
027f173a08 Added codeowner for bt_smarthub (#17947) 2018-10-29 19:27:03 +01:00
Paulus Schoutsen
66d0fb7dbf Bumped version to 0.81.2 2018-10-29 19:22:59 +01:00
Paulus Schoutsen
3a8891d9ac Pass hass_config to load_platform (#17952)
* Pass hass_config to load_platform

* Fix tests

* Lint
2018-10-29 19:22:40 +01:00
Robert Svensson
04e0fd1d46 Fix controller not being stored when setup fails and sequentially fails the retry functionality (#17927) 2018-10-29 19:21:38 +01:00
Paulus Schoutsen
6ae345b01c Pass hass_config to load_platform (#17952)
* Pass hass_config to load_platform

* Fix tests

* Lint
2018-10-29 19:21:21 +01:00
Robert Svensson
b03e6050c5 Fix controller not being stored when setup fails and sequentially fails the retry functionality (#17927) 2018-10-29 19:09:54 +01:00
Paulus Schoutsen
98dfbf2565 Disable upnp from being discovered (#17937) 2018-10-29 15:52:30 +01:00
Paulus Schoutsen
3740424725 Fix venv check (#17939)
* Fix venv check

* Lint
2018-10-29 15:50:44 +01:00
Paulus Schoutsen
360addfb0b Fix incorrect chevy discovery (#17942) 2018-10-29 15:49:57 +01:00
Paulus Schoutsen
f4ac317d64 Permissions improv (#17811)
* Break up permissions file.

* Granular entity permissions

* Add "all" entity permission

* Lint

* Fix types
2018-10-29 11:28:04 +01:00
Joakim Sørensen
d1ef875132 Fix for verify_ssl in the pi_hole sensor. (#17910) 2018-10-29 11:27:37 +01:00
Steven Looman
96c5e4c507 Fixes for upnp-component/#17753 and missing hass-data when only setup from config entry (#17868)
* Upgrade to async_upnp_client==0.13.0, fixing #17753

* Fix missing 'local_ip' when upnp-component itself is not setup, but ConfigEntry is
2018-10-29 08:10:01 +01:00
Rohan Kapoor
851d7e22e7 Make light.yeelight stop doing IO when accessing properties (#17917) 2018-10-29 08:07:57 +01:00
Anders Melchiorsen
e5c97fdcab Extract entity ids from all templates (#17902) 2018-10-29 08:03:10 +01:00
Ville Skyttä
3e6de21302 Upgrade pytest to 3.9.3 (#17921) 2018-10-29 07:02:34 +01:00
Robert Svensson
4579717317 Axis - prepare for config entry (#17566)
Make component more in line with other more modern components in preparation for config entry support.
2018-10-29 06:52:30 +01:00
kennedyshead
3802fec568 Merge conflicting changes (#17761) 2018-10-28 23:49:55 +01:00
Richard Patel
b62b3b26f2 Monitor all sensor types by default to rtorrent (#17894)
* Default to all sensor types for monitoring

* Cleanup code

* 👀

* Chop long line
2018-10-28 23:37:28 +01:00
Eduard van Valkenburg
62752e0065 Updated Brunt code owner (#17854)
* Updated Brunt code owner

* Fix platform
2018-10-28 23:03:43 +01:00
Julius Mittenzwei
df65d2151d updated version of xknx (#17912) 2018-10-28 23:03:27 +01:00
Ville Skyttä
c9c707e368 Start type annotating/testing helpers (#17858)
* Add type hints to helpers.intent and location

* Test typing for helpers.icon, json, and typing

* Add type hints to helpers.state

* Add type hints to helpers.translation
2018-10-28 21:12:52 +02:00
Luca Angemi
0f877711a0 Fixes Telegram webhooks (#17554) 2018-10-28 19:39:23 +01:00
Rohan Kapoor
60080a529d Migrate dialogflow over to the new webhook component (#17804)
* Migrate dialogflow over to the new webhook component

* Updating dialogflow unit tests

* Lint

* Revert changes to HomeAssistantView

* Use json_response from aiohttp
2018-10-28 19:25:43 +01:00
Mariusz Łuciów
38576e5b74 Corrected fan device type in google assistant to fan (#17792) 2018-10-28 14:53:47 +01:00
emontnemery
3f3955c1cd Fix RFLink issue #17875 (#17889) 2018-10-28 13:57:44 +01:00
Evan Bruhn
6cb735271f Fix logi_circle sensor update method naming (#17909)
Resolves regression in 0.81
2018-10-28 13:46:28 +01:00
Lindsay Ward
0acd4b28f9 Add myself to CODEOWNERS for Yeelight Sunflower light platform (#17896) 2018-10-28 12:18:44 +01:00
Paulus Schoutsen
b6a799499a Merge pull request #17895 from home-assistant/rc
0.81.1
2018-10-28 08:37:44 +01:00
Adam Belebczuk
cbadd64b28 Fix Vera climate component to use correct states (#17892)
Changed the Vera climate component so it uses the STATE_* states from the base climate component. This will allow it to work with Google Assistant.
2018-10-28 08:35:57 +01:00
Paulus Schoutsen
29c9081ca1 Bumped version to 0.81.1 2018-10-27 23:54:15 +02:00
Paulus Schoutsen
1f07909a14 Move migrate to separate WS command (#17890) 2018-10-27 23:54:15 +02:00
Paulus Schoutsen
21686c9263 Allow a list ofr update entity (#17860)
* Allow a list ofr update entity

* Update services.yaml

* Update services.yaml
2018-10-27 23:54:15 +02:00
Aaron Bach
edf2974979 Fixes an issue with OpenUV config import failing (#17831)
* Fixes an issue with OpenUV config import failing

* Update

* Update __init__.py

* Update config_flow.py
2018-10-27 23:54:15 +02:00
Paulus Schoutsen
ea75e3bfa8 bump frontend to 20181026.1 2018-10-27 23:54:15 +02:00
Paulus Schoutsen
9cd8a86eb4 Move migrate to separate WS command (#17890) 2018-10-27 23:51:40 +02:00
Rohan Kapoor
d6e4208665 Switch to using Client from twilio.rest rather than the deleted TwilioRestClient (#17883) 2018-10-27 21:37:07 +02:00
Rohan Kapoor
a0d4595f78 Switch to using Client from twilio.rest rather than the deleted TwilioRestClient (#17885) 2018-10-27 21:36:47 +02:00
Paulus Schoutsen
649bc55a3b Allow a list ofr update entity (#17860)
* Allow a list ofr update entity

* Update services.yaml

* Update services.yaml
2018-10-27 21:34:33 +02:00
Aaron Bach
a22aad50e1 Fixes an issue with OpenUV config import failing (#17831)
* Fixes an issue with OpenUV config import failing

* Update

* Update __init__.py

* Update config_flow.py
2018-10-27 11:07:08 -06:00
Florian Klien
92e9c2aa72 adding myself as yessssms codeowner (#17862) 2018-10-27 14:23:04 +02:00
Ryan Wagoner
2adf5918f5 Fix Alexa unsupported operation_mode off (#17844) 2018-10-27 11:57:04 +02:00
Daniel Høyer Iversen
21870e2167 Mill device state attributes (#17834)
* Mill device state attributes

* lower case
2018-10-27 09:17:48 +02:00
Abílio Costa
6b7cbca04c Alexa motion sensor (#17798)
* Alexa: add motion sensors

* Alexa: add motion sensor tests

* Fix comparison and lint
2018-10-26 23:43:31 +02:00
Fabian Affolter
8a4c78b69f Minor changes to the config validation (#17808) 2018-10-26 23:39:11 +02:00
Mariusz Łuciów
cfbd84f450 Added vacuum dock and pause/unpause traits (#17657) 2018-10-26 23:02:07 +02:00
cgtobi
9f146a3954 Raise PlatformNotReady for RMVtransport if API not available (#17635)
* Raise PlatformNotReady if API not available

* Delete whitespaces

* Revert unwanted breaking changes

* Revert deleted line

* Update homeassistant/components/sensor/rmvtransport.py

* Use await asyncio.wait
2018-10-26 20:18:14 +02:00
Paulus Schoutsen
e28170a0a6 Merge pull request #17809 from home-assistant/rc
0.81
2018-10-26 19:45:29 +02:00
Bram Kragten
3175627363 Add delete command (#17816) 2018-10-26 17:29:33 +02:00
Yevgeniy
86d7bc4962 Add snow to Openweathermap precipitation forecast (#17551)
* Add snow to Openweathermap precipitation forecast

* Fix lint

* Fix pylint

* Add missing docstring
2018-10-26 15:50:30 +02:00
Fabian Affolter
434c848104 Minor changes (#17812) 2018-10-26 15:45:57 +02:00
kennedyshead
92bad453f2 Bumping aioasuswrt version (#17814) 2018-10-26 15:45:38 +02:00
Paulus Schoutsen
644c33cc1e Convert MQTT Light tests to async (#17754) 2018-10-26 15:10:05 +02:00
Bram Kragten
b7896491e3 Lovelace ws: add move command (#17806)
* Check for unique ids + ids are strings

* Add move command

* Add test for move

* lint

* more lint

* Address comments

* Update test
2018-10-26 12:56:14 +02:00
Paulus Schoutsen
dcf8aba150 frontend bump 2018-10-26 12:55:57 +02:00
Paulus Schoutsen
cce8b1183f frontend bump 2018-10-26 12:55:44 +02:00
Paulus Schoutsen
e276e899cf Convert automation tests to async (#17794)
* Convert automation tests to async

* Fix 8 last tests

* Lint
2018-10-26 11:31:14 +02:00
Jeroen ter Heerdt
3f4798b5c3 MQTT Vacuum now passes error messages. (#17685)
* MQTT Vacuum now passes error messages.

* Fixing pylint error

* Use string formatting
2018-10-26 11:07:39 +02:00
Fabian Affolter
714d44c503 Upgrade numpy to 1.15.3 (#17796) 2018-10-26 10:35:21 +02:00
Paulus Schoutsen
121a59abe0 Bumped version to 0.81.0 2018-10-26 10:22:26 +02:00
Paulus Schoutsen
0c7b0bdb44 Fix unloading an entry can leave states around (#17786)
* Add test that tests unloading on remove

* Add more test things

* Untangle entity remove code from entity platform

* Don't add default implementation of async_will_remove

* Keep entity weakref alive
2018-10-26 10:19:59 +02:00
Tomas Hellström
c4b2c2bfcf SMHI weather component not showing correct values in current forecast (#17783)
* fixes not showing current forecast correctly

* Update config_flow.py

* Update smhi.py

* Update requirements_all.txt

* Update requirements_test_all.txt
2018-10-26 10:19:58 +02:00
cdce8p
bc67115df3 Update HAP-python to 2.3.0 (#17778)
* Update HAP-python to 2.3.0

* Fix tests
2018-10-26 10:19:58 +02:00
Aaron Bach
af03390c4f Fixed an incorrect reference in the entity registry (#17775) 2018-10-26 10:19:57 +02:00
Paulus Schoutsen
a4773dc3e4 Update translations 2018-10-26 10:19:28 +02:00
Paulus Schoutsen
ad903f9917 Bump frontend to 20181026.0 2018-10-26 10:19:23 +02:00
Paulus Schoutsen
c00da509a1 Update translations 2018-10-26 10:18:10 +02:00
Paulus Schoutsen
9e286d7c1f Bump frontend to 20181026.0 2018-10-26 10:17:40 +02:00
Andrey Kupreychik
9e33398a7b Bumped NDMS2 client to 0.0.5 to fix unicode characters support (#17803) 2018-10-26 10:06:53 +02:00
Leonardo Brondani Schenkel
47003fc04f deCONZ: configure service can now use 'field' as a subpath together with 'entity' (#17722)
Allow both 'entity' and 'field' to be used simultaneously, where 'field' is used as a sub-path of the device path that is defined by 'entity'.
2018-10-26 09:15:26 +02:00
Rohan Kapoor
b7b62a90e2 Delete sensor.yahoo_finance (#17805) 2018-10-26 08:29:41 +02:00
Ben Schattinger
901c4f18cb Install face_recognition on Docker build (#17502)
* Install face_recognition on Docker

* Update setup_docker_prereqs
2018-10-25 22:56:10 +02:00
Ville Skyttä
43048962f2 Upgrade flake8 to 3.6.0 (#17770)
* Upgrade flake8 to 3.6.0

* flake8/pylint comment tweaks

* flake8 F841 fixes

* flake8 W605 fix

* Ignore pyflakes bug #373 false positives

https://github.com/PyCQA/pyflakes/issues/373

* pycodestyle bug #811 workaround

https://github.com/PyCQA/pycodestyle/issues/811
2018-10-25 23:15:20 +03:00
Paulus Schoutsen
77bf10e37c Fix unloading an entry can leave states around (#17786)
* Add test that tests unloading on remove

* Add more test things

* Untangle entity remove code from entity platform

* Don't add default implementation of async_will_remove

* Keep entity weakref alive
2018-10-25 19:57:36 +02:00
Abílio Costa
9c7d3c2a63 Add contact sensors to alexa smart home (#17704)
* add contact sensors to alexa smart home

* door sensors are binary_sensors

* fix tests; cleanup

* lint

* fix state

* Add missing doc string
2018-10-25 16:46:43 +02:00
Paulus Schoutsen
312d49caec Allow creating signed urls (#17759)
* Allow creating signed urls

* Fix parameter

* Lint
2018-10-25 16:44:57 +02:00
Paulus Schoutsen
b5284aa445 Fix device reg considered changed (#17764)
* Fix device reg considered changed

* Better syntax
2018-10-25 16:43:11 +02:00
Jan van Helvoort
b6e8cafdea typo (#17787) 2018-10-25 09:58:09 -04:00
liaanvdm
3c68db32d6 Restore manual alarm-control-panel state using async_get_last_state (#17521)
* Restore manual alarm-control-panel state using async_get_last_state

This is to address issue #10793

* Added tests for restoring manual alarm state on startup

* Cleaned up test formatting

* Fixed more linting errors

* Changed async methods to use asynch/await syntax

* Removed unused asyncio import
2018-10-25 12:21:20 +02:00
Tomas Hellström
544a3b929f SMHI weather component not showing correct values in current forecast (#17783)
* fixes not showing current forecast correctly

* Update config_flow.py

* Update smhi.py

* Update requirements_all.txt

* Update requirements_test_all.txt
2018-10-25 10:16:09 +02:00
kennedyshead
67d92c4f5d This makes mqtt_template tests async (#17784) 2018-10-25 10:00:07 +02:00
kennedyshead
8bebfba21a Testing async in MQTT_json lights (#17768) 2018-10-25 09:54:53 +02:00
Rohan Kapoor
5024a80d61 Migrate twilio webhooks to the webhook component (#17715)
* Migrate twilio webhooks to the webhook component

* Fix typos in twilio

* Mock out twilio in the tests

* Lint

* Fix regression in twilio response
2018-10-25 09:46:22 +02:00
cdce8p
599390d985 Update HAP-python to 2.3.0 (#17778)
* Update HAP-python to 2.3.0

* Fix tests
2018-10-25 09:45:56 +02:00
Fabian Affolter
577cf0991f Remove username from log entry (#17777) 2018-10-25 09:43:40 +02:00
Fabian Affolter
aa157e17f9 Add wind gust (fixes #17766) (#17774) 2018-10-25 09:33:23 +02:00
Aaron Bach
bd23145331 Fixed an incorrect reference in the entity registry (#17775) 2018-10-24 21:53:18 -06:00
Manuel de la Rosa
a629e1bec2 Add Mexican Spanish language (#17735) 2018-10-24 22:56:14 +02:00
kennedyshead
ec7d33f277 Async MQTT sensor room (#17765) 2018-10-24 22:20:52 +02:00
kennedyshead
c099c259ea Async tests for MQTT lock (#17763) 2018-10-24 22:20:25 +02:00
Paulus Schoutsen
a3ec37834b Bumped version to 0.81.0b2 2018-10-24 22:15:57 +02:00
Fabian Affolter
3d841681d7 Remove day (fixes #17741) (#17743) 2018-10-24 22:15:51 +02:00
Bram Kragten
295a004326 Lovelace ws: add card (#17730)
* Change set to update

* Add 'add card'

* Woof.
2018-10-24 22:15:50 +02:00
Charles Garwood
8de0824688 Add cover to supported platforms (#17725) 2018-10-24 22:15:50 +02:00
Glenn Waters
edc1cbdc32 Elk-M1 climate (#17679)
* Initial climate for Elk-M1.

* Tidy

* fix hound error

* fix hound error
2018-10-24 22:15:49 +02:00
Paulus Schoutsen
1788eaf037 Update frontend to 20181024.0 2018-10-24 22:15:35 +02:00
Paulus Schoutsen
52974ff742 Update frontend to 20181024.0 2018-10-24 22:15:21 +02:00
Fabian Affolter
54d463e746 Update name (fixes #17752) (#17756) 2018-10-24 18:59:52 +02:00
Paulus Schoutsen
c7c0ed89c8 Convert auth websocket commands to use async_response decorator (#17755) 2018-10-24 15:23:09 +02:00
Fabian Affolter
8283f50e22 Remove day (fixes #17741) (#17743) 2018-10-24 14:14:01 +02:00
Daniel Høyer Iversen
86e67e4712 Clean up clicksend_tts (#17749)
* Clean up clicksend_tts

* style
2018-10-24 14:13:07 +02:00
Hedda
ad3d7c9523 Update zha __init__.py to reflect new Zigbee name stylization by the Zigbee Alliance (#17751)
Zigbee Alliance has changed their stylized writing (and logo) of the Zigbee name from “ZigBee” to “Zigbee”, as in they are no longer writing Zigbee with a capital “B” in the middle of the name.
2018-10-24 14:12:30 +02:00
Rohan Kapoor
a10fb94e9e Remove webhook_id from yaml config for mailgun (#17732) 2018-10-24 13:37:07 +02:00
Paulus Schoutsen
08fe7c3ece Pytest tests (#17750)
* Convert core tests

* Convert component tests to use pytest assert

* Lint 🤷‍♂️

* Fix test

* Fix 3 typos in docs
2018-10-24 12:10:05 +02:00
Charles Garwood
4222f7562b Add cover to supported platforms (#17725) 2018-10-24 11:53:45 +02:00
Glenn Waters
6ac9677168 Elk-M1 climate (#17679)
* Initial climate for Elk-M1.

* Tidy

* fix hound error

* fix hound error
2018-10-24 11:15:59 +02:00
Steven Looman
fc8af22191 IGD review fixes (#17400)
* Fix discovery-dependency for upnp

* Only delete port mappings on EVENT_HOMEASSISTANT_STOP + refactoring MockDevice

* Call and store local_ip from async_setup

* Don't depend on http-component

* Remove discovery dependency
2018-10-23 21:52:01 +02:00
Bram Kragten
0f69be117f Lovelace ws: add card (#17730)
* Change set to update

* Add 'add card'

* Woof.
2018-10-23 21:48:35 +02:00
Ville Skyttä
2734a30f37 Upgrade mypy to 0.641 (#17734) 2018-10-23 21:06:58 +02:00
Ville Skyttä
65a8882426 Upgrade pytest to 3.9.2 (#17736) 2018-10-23 21:06:37 +02:00
jxwolstenholme
7be7a8de30 Add device tracking for the BT Smart Hub router (#17158)
* Support for BT smarthub router device tracking

* Update requirements_all.txt for bt_smarthub device tracker

* Added bt_smarthub.py exclusion

* Update .coveragerc

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Fix linting issues

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update bt_smarthub.py

* Update .coveragerc

* Update bt_smarthub.py

* Minor changes

* Update bt_smarthub.py

* Update bt_smarthub.py
2018-10-23 18:35:21 +02:00
Fabian Affolter
f9973696f3 Rename readthedocs file (#17718)
* Rename file

* Add requirements file
2018-10-23 17:39:17 +02:00
Andrey Kupreychik
9798ff019f Don't call off_delay_listener if not needed (#17712)
Don't call off_delay_listener if 'OFF' is actually received
Moved `off_delay_listener` to be defined once
2018-10-23 14:21:03 +02:00
kennedyshead
f6f549dc3c Removes re-init (#17724) 2018-10-23 14:15:56 +02:00
Paulus Schoutsen
4750656f1a Bumped version to 0.81.0b1 2018-10-23 14:09:47 +02:00
Jaxom Nutt
011cc624b6 Bug fix for clicksend (#17713)
* Bug fix

Current version causes 500 error since it is sending an array of from numbers to ClickSend. Changing the from number to 'hass' identifies all messages as coming from Home Assistant making them more recognisable and removes the bug.

* Amendment

Changed it to use 'hass' as the default instead of defaulting to the recipient which is the array. Would have worked if users set their own name but users who were using the default were experiencing the issue.

* Added DEFAULT_SENDER variable
2018-10-23 14:09:41 +02:00
Anders Melchiorsen
2d9a964953 Update limitlessled to 1.1.3 (#17703) 2018-10-23 14:09:40 +02:00
Matt Snyder
87133a0e77 Update flux library version (#17677) 2018-10-23 14:09:40 +02:00
Nicko van Someren
fe8dec27a3 Fixed issue #16903 re exception with multiple simultanious writes (#17636)
Reworked tests/components/emulated_hue/test_init.py to not be
dependent on the specific internal implementation of util/jsonn.py
2018-10-23 14:09:39 +02:00
Bram Kragten
b5323cd894 Add lovelace websocket get and set card (#17600)
* Add ws get, set card

* lint+fix test

* Add test for set

* Added more tests, catch unsupported yaml constructors

Like !include will now give an error in the frontend.

* lint
2018-10-23 14:09:39 +02:00
Malte Franken
23316a8344 Geo location trigger added (#16967)
* zone trigger supports entity id pattern

* fixed lint error

* fixed test code

* initial version of new geo_location trigger

* revert to original

* simplified code and added tests

* refactored geo_location trigger to be based on a source defined by the entity

* amended test cases

* small refactorings
2018-10-23 14:09:38 +02:00
ehendrix23
4a757b7994 Set available property (#17706)
Will set the available property to False if unable to communicate with August lock or doorbell.
HTTP request errors (i.e. timeout, connection error, HTTP error) will not result in traceback. Instead an error will be logged.
2018-10-23 14:09:08 +02:00
Daniel Høyer Iversen
37a667c2de clean up clicksend (#17723) 2018-10-23 14:06:42 +02:00
Paulus Schoutsen
86ecd7555a Update translations 2018-10-23 14:05:03 +02:00
Paulus Schoutsen
02f55b039c Update frontend to 20181023.0 2018-10-23 14:04:37 +02:00
Paulus Schoutsen
398ea40189 Update translations 2018-10-23 14:04:25 +02:00
Paulus Schoutsen
cf0bd6470a Update frontend to 20181023.0 2018-10-23 14:03:38 +02:00
kennedyshead
0723c7f5dc Just use debug instead of error if the binary_sensor does not get data (#17720) 2018-10-23 13:03:01 +02:00
Dougal Matthews
7def587c93 Only strip from the bluetooth name if it isn't None (#17719)
This prevents the following traceback that will otherwise occur.

    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/bluetooth_le_tracker.py", line 107, in update_ble
        see_device(address, devs[address], new_device=True)
      File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/bluetooth_le_tracker.py", line 47, in see_device
        see(mac=BLE_PREFIX + address, host_name=name.strip("\x00"),
    AttributeError: 'NoneType' object has no attribute 'strip'
2018-10-23 12:33:56 +02:00
Rohan Kapoor
d5a5695411 Migrate Mailgun to use the webhook component (#17464)
* Switch mailgun to use webhook api

* Generalize webhook_config_entry_flow

* Add tests for webhook_config_entry_flow

* Add tests for mailgun

* Remove old mailgun file from .coveragerc

* Refactor WebhookFlowHandler into config_entry_flow

* Remove test of helper func from IFTTT

* Lint
2018-10-23 11:14:46 +02:00
kennedyshead
277a9a3995 Async version for asuswrt (#17692)
* Testing async data for asuswrt

* Moved to lib
2018-10-23 11:08:11 +02:00
Nicko van Someren
50f0eac7f3 Fixed issue #16903 re exception with multiple simultanious writes (#17636)
Reworked tests/components/emulated_hue/test_init.py to not be
dependent on the specific internal implementation of util/jsonn.py
2018-10-23 10:54:03 +02:00
Jaxom Nutt
44e35b7f52 Bug fix for clicksend (#17713)
* Bug fix

Current version causes 500 error since it is sending an array of from numbers to ClickSend. Changing the from number to 'hass' identifies all messages as coming from Home Assistant making them more recognisable and removes the bug.

* Amendment

Changed it to use 'hass' as the default instead of defaulting to the recipient which is the array. Would have worked if users set their own name but users who were using the default were experiencing the issue.

* Added DEFAULT_SENDER variable
2018-10-23 10:28:49 +02:00
Yegor Vialov
324587b2db Away mode temperature fix for generic thermostat (#17641)
* Resolves /home-assistant/home-assistant#17433

Away mode temperature issue fix for generic_thermostat

* Debug messages removed from generic_thermostat.py

* Test for repeat away_mode set

Test for fix of generic thermostat issue when away_mode was set several times in a row.

* Code style fix in generic_thermostat

* Remove blank line in the end of generic_thermostat

* Fix style
2018-10-23 09:04:47 +02:00
Fabian Affolter
ad3d0c4e99 Upgrade Sphinx to 1.8.1 (#17701) 2018-10-23 07:12:12 +02:00
Anders Melchiorsen
3014930371 Update limitlessled to 1.1.3 (#17703) 2018-10-23 07:11:55 +02:00
Aaron Bach
b773a9049c Updated simplisafe-python to 3.1.13 (#17696) 2018-10-22 22:49:12 +02:00
Sébastien RAMAGE
4e8cd7281c All supported domains should be exposed by default (#17579)
According to documentation, all supported domains should be exposed by default
https://www.home-assistant.io/components/google_assistant/#expose_by_default
2018-10-22 20:07:11 +02:00
Tom Monck JR
fd9370da39 Add readthedoc.yml file to specify the version of python to run during documentation building. (#17642) 2018-10-22 20:05:00 +02:00
Manuel de la Rosa
399f8a72c3 Fix Mexican Spanish identifier (#17674)
Mexican Spanish identifier is "es-MX" instead of "en-MX".
2018-10-22 20:02:55 +02:00
Malte Franken
75e42acfe7 Geo location trigger added (#16967)
* zone trigger supports entity id pattern

* fixed lint error

* fixed test code

* initial version of new geo_location trigger

* revert to original

* simplified code and added tests

* refactored geo_location trigger to be based on a source defined by the entity

* amended test cases

* small refactorings
2018-10-22 20:01:01 +02:00
Tommy Jonsson
42a444712b Add missing hangouts data/image to notify service (#17576)
* add missing hangouts image_file/url to notify services

Missed adding support for hangouts image to notify service

* default in schema
2018-10-22 19:36:29 +02:00
Daniel Høyer Iversen
61a96aecc0 Mill, support more heater types (#17676)
* mill, suport more heater types

* mill requirements
2018-10-22 19:32:19 +02:00
Bram Kragten
96105ef6e7 Add lovelace websocket get and set card (#17600)
* Add ws get, set card

* lint+fix test

* Add test for set

* Added more tests, catch unsupported yaml constructors

Like !include will now give an error in the frontend.

* lint
2018-10-22 14:45:13 +02:00
Matt Snyder
0524c51c1a Update flux library version (#17677) 2018-10-22 07:04:47 +02:00
Paulus Schoutsen
ebaf7f8c00 Bumped version to 0.81.0b0 2018-10-21 20:34:50 +02:00
Paulus Schoutsen
355005114b Update translations 2018-10-21 20:34:28 +02:00
Paulus Schoutsen
8f529b20d7 Bump frontend to 20181021.0 2018-10-21 20:34:12 +02:00
Richard Patel
b2faa67ab7 Add new rtorrent sensor (#17421)
* New rtorrent sensor

* Fix lint issue

* Fix another lint issue

* Fix pylint issue

* how many python linters do you guys use

* Cleanup code

* python linting

* newline
2018-10-21 20:12:51 +02:00
Luke Fritz
95371fe4a6 Bump pyarlo==0.2.2 (#17673)
* Bump pyarlo to 0.2.2, fixes #17427

* Increase log level for refresh message to clear up logs
2018-10-21 19:54:51 +02:00
Mathieu Velten
2d980f2a92 Update pynetgear to 0.5.0 (#17652) 2018-10-21 19:54:01 +02:00
Oscar Tin Lai
b6d3a199ce Add support for Dyson Hot+Cool Fan as a climate device (#14598)
* Added support for dyson hot+cool fan as climate device

* Removed decimal place in kelvin units conversion

Minor edits to be consistent with Dyson's internal conversion of temperature from kelvin to celsius. It does not include decimal place to convert between kelvin and celsius.

* made changes according to comments

* Refactored target temp logics, fixed enum issues

* changed name of component to entity

* removed temperature conversion for min/max property

* changed back to 644 permission

* added extra tests for almost-all coverage

* changed assert method to avoid lack of certain method in py35

* added test_setup_component

* shorten line length

* fixed mock spec and added checking of message listener is called

* added doc string and debug msg

* shorten line length

* removed pending target temp
2018-10-21 17:35:07 +02:00
Fabian Affolter
731753b604 Upgrade holidays to 0.9.8 (#17656) 2018-10-21 15:07:44 +02:00
Fabian Affolter
cf24687024 Upgrade async_timeout to 3.0.1 (#17655) 2018-10-21 14:13:30 +02:00
Daniel Høyer Iversen
ef93d48d50 available to switchmate (#17640) 2018-10-21 13:41:27 +02:00
emontnemery
9982867d66 Very minor cleanup of RFLink components (#17649) 2018-10-21 13:05:02 +02:00
Paulus Schoutsen
bdfd473aaa Reconnect if sub info comes in that is valid again (#17651) 2018-10-21 12:16:24 +02:00
Daniel Høyer Iversen
7e3d0f0700 Remove ryobi from .coveragerc (#17647) 2018-10-21 11:21:09 +02:00
guillaume1410
c03b137130 Removing ryobi gdo (#17637) 2018-10-21 08:08:35 +02:00
Raymon de Looff
85dbf1eed3 Upgrade dsmr_parser to 0.12 (#17634) 2018-10-20 22:07:47 +02:00
mvn23
237ac08076 Add opentherm_gw binary sensor support (#17625)
* Add OpenTherm Gateway binary sensor support.

* opentherm_gw binary_sensor platform does not need polling.
2018-10-20 18:51:01 +02:00
Bob Clough
2e973c7572 Fix mqtt light brightness slider (#17075)
* Enable brightness slider for RGB

If we are using RGB with no brightness topic, the brighness slider
should still be visible, as we can scale the RGB amount to give us the
brightness.

* Output RGB scaled by brightness

If we are outputting to an RGB device, but do not have a dedicated
brightness topic set, when the brightness slider is changed, we should
output the current colour's HS, with the V coming from the brightness
slider.

* Brightness from RGB when we're not using a brightness topic

When we aren't using a brightness topic, set the brightness slider based
on the received value from an RGB -> HSV conversion.

* Test for new brightness state scaled by RGB

This adds a test to make sure the brightness stored in the state is
being computed correctly from the RGB value when a dedicated brightness
topic is not set.

* Changes from review

Fixes formatting of supported features flags, and checks HS colour
hasn't been set when operating in RGB-only mode

* Set optimistic brightness correctly in rgb mode

When we're using rgb mode to set the brightness, we want to set
optimistic brightness if:

we are running in optimistic mode
OR
the brightness state topic isn't set and we have a brightness command topic
OR
the rgb state topic isn't set and we don't have a brightness command topic

* Add test for turn_on in RGB brightness mode
2018-10-20 12:37:25 -04:00
Julien Debaru
e980d1b9fe Fix linky sensor login error (#17110)
* Fix linky sensor login error

* Make platform fail-safe

Adding following enhancements:
* Make sure the platform loads correctly by making the first API request in setup_platform.
* Close the session after each API call.
* Use timeout parameter everywhere.

* Fix Hound CI error: line too long.

* Update pylinky library

* Remove LinkyClient from update()
2018-10-20 15:30:10 +02:00
Robert Svensson
26b7c2de7e deCONZ - Add support for Xiaomi window covers (#17337)
Add support for Xiaomi window covers
2018-10-20 15:13:23 +02:00
Daniel Shokouhi
ab826b8fe2 Use cached robot serial for Neato update (#17633)
* Use cached robot serial for neato update

* Hound
2018-10-20 14:28:30 +02:00
cdce8p
a9a8cbbd10 Homekit component cleanup (#17627)
* hass.async_add_executor_job
* Fix accessories.run -> async_track_state_change
* Fixed media_player test
* Flags are now local vars
* consistent use of " and '
2018-10-20 00:14:05 +02:00
Glenn Waters
3655fefec2 Add Elk-M1 sensor platform (#17342)
* Initial sensor version.

* Add Elk-M1 sensor services. Initial version of services.yaml.

* Fix lint errors.

* Fix PR comments.

* fix PR comment

* Fix PR comment

* Fix PR comments

* fix
2018-10-19 23:41:04 +02:00
cdce8p
ff33cbd22f Add water_heater support to HomeKit (#17614)
* Homekit add support for water_heater
* Added tests
2018-10-19 21:04:05 +02:00
Nick Touran
e343f5521c Upgrade gstreamer-player to 1.1.2 (#17568)
* Upgrade gstreamer-player to 1.1.2

* Updated requirements for gstreamer-player properly.
2018-10-19 18:11:47 +02:00
Steven Looman
f7bc44955c Upgrade async_upnp_client to 0.12.7 (#17601) 2018-10-19 18:10:04 +02:00
Nick Horvath
df2c3cdded Bump thermoworks version to fix conflict from upstream pyrebase sseclient (#17620) 2018-10-19 17:48:46 +02:00
ehendrix23
f504e5ef61 Add doorsense sensor for August 3rd Gen Smart Lock Pro (#17299)
* Add doorsense sensor for August 3rd Gen Smart Lock Pro

Add a binary sensor to August for the August 3rd Gen Smart Lock Pro doorsense sensor.

This is a re-do from PR 17116 https://github.com/home-assistant/home-assistant/pull/17116 that I closed due to rebase issue on my end.

* Changed to use snjoetw provided code

Going through the py-august I found that snjoetw had provided updated versions for the august component (august.py and binary_sensor/august.py) to include DoorSense sensor.
Changed what I did to to what snjoetw provided instead as he split it into 2 classes; much cleaner I think.

I modified his coding with:
   Fixes that were done to the August component and not part of the coding snjoetw provided.
   Added the debug logging improvement I had done in the code.

Note, fix I committed earlier for lock atribute (lock/august.py) is thus still the same.

* Reverted change from add_device to add_entities

Missed an item when merging snjoetw's code with current. Fixed.

* Updated call from add_devices to add_entities as well

Updated the call from add_devices to add_entities.

* Fixed permissions on files

Fixed permissions on components/august.py and binary_snesor/august.py

* Changed if/else to if/continue

Changed logic so that if the door sensor state is unknown during initalization the debug log is written and then continue the loop instead of using if/else logic.

* Added available property for Door Sensor

Added the available property for the Door Sensor and setting it to False if a status unknown is received.

* Updated setting self._available

Changed line for setting self._available to what Martin provided. Much  more efficient to read. :-)
2018-10-19 09:37:02 +02:00
Thomas Lovén
8bf58e1df5 Revert "De-syncing binary_sensor.ping (#17056)" (#17606)
This reverts commit 11d5671ee0.
2018-10-19 09:29:48 +02:00
Thomas Lovén
90183bd682 Tuya light icon fix (#17605)
* Fix for tuya light icons going too bright

* Make sure other values aren't strings either
2018-10-19 09:17:19 +02:00
jjlawren
88ec73ed8f Add missing await for coroutine (#17609) 2018-10-19 09:10:41 +02:00
mvn23
7baffed7b7 Add sensor support to opentherm_gw (#17314)
* Add OpenTherm Gateway sensor platform.

* Add OTGW_ variables to list of supported sensors.

* Order imports.

* Add OpenTherm Gateway binary sensor support.

* Revert "Add OpenTherm Gateway binary sensor support."

This reverts commit 115acaa912.

* Import COMP_SENSOR from sensor component rather than defining it.

* Update opentherm_gw sensor platform docs url.

* Update dependency to v0.2b1
Old version had incorrect variable names for some of the sensors

* Update requirements_all.txt

* Address review findings.

* Update .coveragerc
2018-10-19 07:31:19 +02:00
Anders Melchiorsen
cc4d29d42a Fix flux switch update interval (#17458) 2018-10-18 23:04:22 +02:00
emontnemery
10c1378195 Add binary_sensor support to RFlink (#17146)
* Add binary_sensor support to RFlink

* Add support for aliases

* Fix review comments

* Refactor, add tests

* Review comments

* Review comments

* Review comments

* Review comments
2018-10-18 22:28:40 +02:00
Ville Skyttä
cf3a97ff3c Upgrade pytest to 3.9.1 (#17598) 2018-10-18 21:31:52 +02:00
Kevin Fronczak
222ba96b3e Bump blinkpy version to 0.10.1 (#17595) 2018-10-18 21:30:46 +02:00
Nikolay Vasilchuk
6239a523cc Fix: Xiaomi Plug state is set twice (#17482)
* Xiaomi Plug UI fix #17422

* Review
2018-10-18 20:28:43 +02:00
Malte Franken
7eb6e49df7 Fixing race condition in geo location platforms (#17581)
* fixed race condition where obsolete entities kept listening for dispatcher signals

* making tests python 3.5 compatible
2018-10-18 15:25:48 +02:00
Paulus Schoutsen
7e91c0dc83 Merge branch 'master' into dev 2018-10-18 14:59:14 +02:00
Paulus Schoutsen
b1a05e7605 Merge pull request #17578 from home-assistant/rc
0.80.3
2018-10-18 14:55:46 +02:00
Paulus Schoutsen
cd90bb4161 Bumped version to 0.80.3 2018-10-18 13:58:58 +02:00
Paulus Schoutsen
17d0fe02c7 Update snapcast to 2.0.9 (#17573) 2018-10-18 13:58:48 +02:00
Steven Looman
43b140be5e Upgrade async_upnp_client to 0.12.6 (#17560) 2018-10-18 13:58:48 +02:00
Steven Looman
9ded16ccc3 Update to async-upnp-client==0.12.5 (#17401) 2018-10-18 13:58:47 +02:00
Marcel Hoppe
91dc0c3731 update hangups to 0.4.6 and fix Issue #16593 hangouts reconnects. (#17518) 2018-10-18 13:57:04 +02:00
Paulus Schoutsen
6e4a99cec0 Bump frontend to 20181018.0 2018-10-18 13:52:52 +02:00
Paulus Schoutsen
20bd14defb Bump frontend to 20181018.0 2018-10-18 13:52:38 +02:00
Paulus Schoutsen
20fa6c5383 Update snapcast to 2.0.9 (#17573) 2018-10-18 11:06:32 +02:00
Matthew Garrett
e2a1e21c8d Add support for LG soundbars (#17570)
* Add LG soundbar support

We can autodiscover these, so for now let's skip any local configuration.
Currently we expose volume, source and equaliser preset - we can expose the
other volume controls and options as well if necessary, but I don't know
whether it's worth it.

* Add discovery of LG devices

This is a generic discovery type that doesn't obviously contain enough
information to identify whether we're talking to a speaker system or any
other kind of device - on the other hand I haven't been able to find any
other LG devices that respond like this, so we can cross that bridge when
we get to it.

* Lint
2018-10-18 10:39:33 +02:00
Brian Gianforcaro
45878c6df0 Upgrade twilio package to version 6.19.1 (#17395) (#17424)
- Bump twilio requirement to latest 6.19.1 version

- The generic response type is gone in the latest
  versions of the twilio package. It appears we were
  generating an empty response just to get the empty
  xml body. TwilML is the new base class all responses
  inherit from. So I've switched the code over to using
  and empty TwilML object instead.

- The exception type was moved to a different location.
2018-10-18 09:17:55 +02:00
Daniel Høyer Iversen
3e5233d115 danielhiversen as mill codeowner (#17571) 2018-10-18 08:12:09 +02:00
Jorim Tielemans
b50c93ccb7 Validate ports as a port (#17549)
* Validate ports as port

Better than just a positive integer since it limits the range from 1 to 65535.

* Validate port for Axis

* Validate port for Xiaomi Home Camera

* Validate port for Modbus

* Validate port for Yamaha MusicCast Receivers

* Update zhong_hong.py

Validate port as a port, the gateway address as positive_int
Also moved the default values to their variable

* Validate port for the Asterisk Voicemail interface

* Fix lint

* Validate port for Xiaomi Cameras
2018-10-17 23:09:05 +02:00
Eduard van Valkenburg
50a66abd80 Updated package to fix #16960 (#17555) 2018-10-17 22:56:54 +02:00
Steven Looman
7106d9e9d4 Upgrade async_upnp_client to 0.12.6 (#17560) 2018-10-17 22:56:21 +02:00
ehendrix23
daf9d28565 Fix mold_indicator errors at startup (#17346)
* Initial changes to resolve issue 16733

Added logic to ensure that if the state is unknown during startup that the error about being unable to parse the value is not logged.
Further,  also ensured that if an attribute is set to None it does not try to convert the None value to Fahrenheit as that will cause an error.

* Cleaned up and added few comments

Cleaned up some lines based on flake8 and pylint.
Added some comment lines on the items added.

* Changed to async and using async_added_to_hass

Changed sensor to use async.
Registering state tracking for sensors and initial setup is now done upon the home assistant start event.

* Updated test and small fix

Updated test to handle unavailable state of sensor and return of None for attributes when data is unavailable.
Ensured that atributes are set to None when state is unavailable due to incorrect data.

* Fixed some flake8 issues in test

Fixed some flake8 issues in test_moldindicator.py.

* Updates based on review

Updates based on review from MartinHjelmare

* Added sensor entity_id to logger errors

Added sensor entity_id to logger error messages
Update test to use constant STATE_UNKNOWN instead of fixed string.
2018-10-17 18:42:39 +02:00
Bram Kragten
33860bf23c Adding id to lovelace cards in ui-lovelace.yaml (#17498)
* ID is added to cards without ID in ui-lovelace.yaml when loaded

* Hound

* Remove ui-lovelace.yaml

* Nicer get

* Update tests

* If YAML dump fails, config not gone

* Add tests

* Woof!

* Remove nosetests

* Address comments

* Woof...

* Delete test.yaml

* update rights to saved file

* fix

* line break
2018-10-17 16:31:06 +02:00
Paulus Schoutsen
fa196e5889 Merge pull request #17546 from home-assistant/rc
0.80.2
2018-10-17 14:56:58 +02:00
Paulus Schoutsen
9500bb1ac8 Bumped version to 0.80.2 2018-10-17 14:17:56 +02:00
Paulus Schoutsen
b3548f1ead Add another 3 days leeway to give time for payment processing times (#17542) 2018-10-17 14:17:47 +02:00
Kevin Fronczak
f74e976be1 Blink update - fixes #17316 (#17538)
* Updgrae blinkpy to 0.10.0

- Remove status sensor (API endpoint unreliable for this)
- Wifi strength reports in wifi bars rather than dBm (result of new API
endpoint)
- Added unique ids based on serial number

* Update requirements
2018-10-17 14:17:47 +02:00
Nikolay Vasilchuk
dc55718bc3 Fix: Connection pool of Request object is smaller than optimal value (8) (#17483) 2018-10-17 14:17:46 +02:00
Paulus Schoutsen
6551c53e32 Bump frontend to 20181017.0 2018-10-17 14:17:35 +02:00
Paulus Schoutsen
a27d49d022 Update translations 2018-10-17 14:17:33 +02:00
Paulus Schoutsen
95c43d634b Bump frontend to 20181017.0 2018-10-17 14:16:49 +02:00
Paulus Schoutsen
a5b9f5040f Update translations 2018-10-17 14:12:41 +02:00
cgtobi
e83a9aace4 Remove unnecessary call (#17514) 2018-10-17 10:53:05 +02:00
Anders Melchiorsen
1e4463957d Scan all network interfaces for LIFX bulbs (#17530) 2018-10-17 10:50:13 +02:00
Paulus Schoutsen
326787ef1a Add another 3 days leeway to give time for payment processing times (#17542) 2018-10-17 10:45:01 +02:00
Ville Skyttä
15f4ed74ac Tweak sensors comments in default config (#17526)
Makes it more clear that there should be only one sensors section, and
that the weather prediction comment applies only to the yr platform.
2018-10-17 09:58:41 +02:00
Ville Skyttä
b7b4224429 Huawei LTE sensor improvements (#17533)
* Sensor value formatting improvements

* Make default names more consistent with other sensors

* Improve unique id formatting
2018-10-17 09:00:15 +02:00
Kevin Fronczak
5088e7ee49 Blink update - fixes #17316 (#17538)
* Updgrae blinkpy to 0.10.0

- Remove status sensor (API endpoint unreliable for this)
- Wifi strength reports in wifi bars rather than dBm (result of new API
endpoint)
- Added unique ids based on serial number

* Update requirements
2018-10-17 08:38:03 +02:00
Nate Clark
11004bcf34 Manual IP & port configuration for Konnected devices (#17120)
* add capability for manually specifying IP and port of Konnected device(s)

* add config options for blink and discovery settings

* import konnected only in functions where needed

* updates from code review feedback

* convert manual_discovery to async

* code review updates; use correct sync vs async
2018-10-17 00:39:32 +02:00
Brant Knudson
83db673bd0 Add unique_id to Vera entities (#17450)
I believe this adds registry support. The UI allows me to change
the entity ID now.

For example, a light bulb called "BasementHallLight" in the Vera
has an initial Entity ID like light.basementhalllight_108, where
108 is the unique ID that the Vera assigned the device when I
added it to the z-wave network.

Now I can use the UI to change the Entity ID to
light.basementhalllight and I can still turn it on and off.
2018-10-16 23:27:57 +02:00
Marcel Hoppe
6b3e4ca7bd update hangups to 0.4.6 and fix Issue #16593 hangouts reconnects. (#17518) 2018-10-16 20:09:34 +02:00
Daniel Høyer Iversen
aa176312a5 Update switchmate library (#17519) 2018-10-16 20:08:34 +02:00
Daniel Høyer Iversen
6235aae196 Update mill library (#17520) 2018-10-16 20:08:04 +02:00
Ben Lebherz
764ea06795 Fix unhandled exception which creates many useless logs (#17508)
* Fix unhandled exception which creates many useless logs

* recover old component logic, sorry

* remove inline conditional
2018-10-16 16:41:38 +02:00
Charles Garwood
9c52a3ce22 Z-Wave Device Registry Support (#17291)
* Add device_registry support for sensor and switch domains

* Add device_registry support for light

* Add device registry to binary_sensor, climate, cover

* Add device registry to zwave fan

* Fix test for config entry loading

* lint

* revert erroneous modification

* Revert device_registry.py change
2018-10-16 14:58:25 +02:00
Tsvi Mostovicz
c6d9ceca63 Bump hdate version to 0.6.5 (#17510)
* Bump hdate version to 0.6.4

* Bump to 0.6.5

* Change test so we check when passing tzinfo object
2018-10-16 13:45:39 +02:00
ehendrix23
fee87cd6ed Add LogBook support to HomeKit (#17180) 2018-10-16 13:32:53 +02:00
William Scanlon
71ab8a9b1a Moved Wink water heater from climate to water heater. (#17504)
* Moved Wink water heater from climate to water heater.

* Remove deprecated states from Tuya

* Update toon.py

* Update toon.py

* Lint
2018-10-16 11:27:01 +02:00
Robert Svensson
a795093705 UniFi POE control (#17011)
* First commit

* Feature complete?

* Add dependency

* Move setting poe mode logic to library

* Use guard clauses

* Bump requirement to 2

* Simplify saving switches with poe off

* Store and use poe mode

* Fix indentation

* Fix flake8

* Configuration future proofing

* Bump dependency to v3

* Add first test

* Proper use of defaults with config flow (thanks helto)

* Appease hound

* Make sure there can't be duplicate entries of combination host+site

* More tests

* More tests

* 98% coverage of controller

* Fix hound comments

* Config flow step init not necessary

* Use async_current_entries to check if host and site for controller is used

* Remove storing/restoring poe off devices to slim PR

* First batch of switch tests

* More switch tests.

* Small improvements and clean up

* Make tests pass
Don't name device in device registry

* Dont process clients that belong to non-UniFi POE switches

* Allow selection of site from a list in config flow

* Fix double blank lines in method

* Update codeowners
2018-10-16 10:35:35 +02:00
Nikolay Vasilchuk
0c0c471447 Fix: Connection pool of Request object is smaller than optimal value (8) (#17483) 2018-10-16 10:22:57 +02:00
Daniel Shokouhi
dc7e5e3af4 Add unique_id for Ring (#17497) 2018-10-16 10:06:00 +02:00
Aaron Bach
a9389d2d43 Bumps simplisafe-python to 3.1.12 (#17509)
* Bumps simplisafe-python to 3.1.12

* Updated requirements
2018-10-15 22:54:32 -06:00
Alexander Lyon
993a02b8c4 Fix the sabnzbd component api error (#17014)
* Bump pysabnzbd version number

* Pass hass aiohttp session to pysabnzbd
2018-10-16 00:18:59 +02:00
Aaron Bach
29c2b2fe79 Clean up OpenUV config flow (#17349)
* Cleaned up OpenUV config flow

* Added proper listener removal

* Added proper exception

* Unnecessary exception message

* Moved API key error to correct place

* Member-requested changes (part 1)

* Hound

* Member-requested changes (part 2)

* Cleanup

* Fixed tests
2018-10-15 13:21:21 -06:00
Daniel Perna
73197c9a6c Update pyhomematic to 0.1.51 (#17491) 2018-10-15 21:15:26 +02:00
Anders Melchiorsen
1a5048baaf Add device info for LIFX (#17330)
* Add device info for LIFX

* Address review comments
2018-10-15 20:46:33 +02:00
Daniel Perna
9718a17351 Fix HomeMatic availability detection (#17341)
* Fix availability detection
2018-10-15 20:34:03 +02:00
Dougal Matthews
6feacbbfe1 Include the name of the Volumio media player in errors (#17481)
When you have multiple Volumio media players it can be hard to determine
which one has a problem without this information.
2018-10-15 19:11:12 +02:00
Paulus Schoutsen
4ea71b0602 Merge pull request #17480 from home-assistant/rc
0.80.1
2018-10-15 16:10:50 +02:00
emontnemery
2ceb4d2d1e Refactor RFLink component (#17402)
* Start refactor of RFLink component

* alias _id not added correctly

Aliases for sensor not added correctly
And some debug traces.

* Update rflink.py

* Cleanup, fix review comments

* Call event handlers directly when processing initial event

* Use hass.async_create_task when adding discovered device

* Review comments

* Review comments
2018-10-15 15:35:33 +02:00
Paulus Schoutsen
708334c0c2 Bumped version to 0.80.1 2018-10-15 15:31:12 +02:00
Paulus Schoutsen
b5272f2bc7 Fix websocket API (#17471) 2018-10-15 15:30:21 +02:00
Pascal Vizeli
80867cc9b7 Bugfix eventstream with EOF on end (#17465) 2018-10-15 15:30:20 +02:00
Tommy Jonsson
f92b392a24 Fix hangout.send_message requiring data key (#17393) 2018-10-15 15:30:20 +02:00
Martin Berg
220054a6c3 Fix arm/disarm calls. (#17381) 2018-10-15 15:30:19 +02:00
Pascal Vizeli
0904ff45fe Cleanup HM Notify platform (#17355)
* Cleanup HM Notify platform

* Fix python 3.5.4

* Update homematic.py

* Update homematic.py
2018-10-15 13:26:09 +02:00
Niels Mündler
d6752d2270 Fix rangefilter (#17473)
* Fix rangefilter

RangeFilter would break for lower or upper bounds of 0, evaluating to False and thus not being handled correctly as bounds

* Add test for zero bounds
2018-10-15 12:24:21 +02:00
Julius Mittenzwei
373e3b12d8 Switched to async_fire (#17472) 2018-10-15 12:16:40 +02:00
Paulus Schoutsen
e985f30247 Fix websocket API (#17471) 2018-10-15 11:48:36 +02:00
Adam
22bf4d0783 Re-assign conditions (#17364) 2018-10-15 11:43:27 +02:00
kennedyshead
1cbb5b8e51 State is set to UNKNOWN rather than ON in order to make UI have an play/pause button (#17357) 2018-10-15 11:42:27 +02:00
Paulus Schoutsen
ac79ff9e24 Add context to scripts run by template entities (#17329) 2018-10-15 11:38:49 +02:00
Anders Melchiorsen
0bf10b0b09 Fire an event when timer gets out of sync (#17398) 2018-10-15 11:34:36 +02:00
Ville Skyttä
31981fde7e Make dicttoxml logging less verbose (#17446) 2018-10-15 11:25:38 +02:00
Ville Skyttä
4fce051838 Add RSRQ, RSRP, and SINR to huawei_lte default sensors (#17425)
These are important LTE signal monitoring values.
2018-10-15 11:22:49 +02:00
Rohan Kapoor
bd450ee9ff Migrate CONF_WEBHOOK_ID to homeassistant.const (#17460)
* Migrate CONF_WEBHOOK_ID to homeassistant.const

* Switch over all instances of webhook_id to the const

* Switch last instance of webhook_id to the const

* automation: conf constants for conf

* webhook: conf constants for conf
2018-10-15 11:18:21 +02:00
Malte Franken
879924fea4 refactored to make its code structure similar to nsw_rural_fire_service_feed platform (#17461) 2018-10-15 11:17:46 +02:00
Pascal Vizeli
3b0db291dd Bugfix eventstream with EOF on end (#17465) 2018-10-15 10:31:49 +02:00
Julius Mittenzwei
a71cc67efb Fix NoEntitySpecifiedError during knx startup (#17366)
* Potential fix for #13699

* removed uneccessary initialization of hass

* removed hass from signature
2018-10-15 03:29:36 +02:00
Tsvi Mostovicz
c5905ee5ca Show torah reading during weekdays (#17447)
* Add support for showing torah reading on weekdays as well

* Update docstrings for test functions
2018-10-14 23:55:11 +02:00
Craig J. Midwinter
3edcc9420a Update pysher version (#17455) 2018-10-14 23:51:15 +02:00
Aaron Bach
b022dde622 Bumped simplisafe-python to 3.1.11 (#17454)
* Bumped simplisafe-python to 3.1.10

* Updated requirements

* Updated requirements
2018-10-14 14:26:44 -06:00
kennedyshead
1187e0aea5 Remove day as a conf option (#17452) 2018-10-14 21:33:18 +02:00
Daniel Høyer Iversen
a401be9b1b New climate device (#17313)
* initial version of millheater

* Remove unused imports

* Add some comments

* separate lib

* fix review comments
2018-10-14 20:22:20 +02:00
Paulus Schoutsen
49a9b61f6f Update frontend to 20181014.0 2018-10-14 19:17:41 +02:00
Paulus Schoutsen
ed683d8c2c Update frontend to 20181014.0 2018-10-14 19:17:30 +02:00
Fabian Affolter
d4061b73b0 Upgrade youtube_dl to 2018.10.05 (#17429) 2018-10-14 17:14:06 +02:00
Fabian Affolter
9305ea9a6b Upgrade numpy to 1.15.2 (#17431) 2018-10-14 17:13:25 +02:00
Fabian Affolter
7b0c88c54b Update docstrings (#17435) 2018-10-14 17:12:34 +02:00
Fabian Affolter
253e154a79 Minor updates (#17436) 2018-10-14 17:11:39 +02:00
Fabian Affolter
daf48a3b1f Minor updates (#17437) 2018-10-14 17:10:46 +02:00
Fabian Affolter
5ac0469ef9 Upgrade python-telegram-bot to 11.1.0 (#17441) 2018-10-14 17:08:17 +02:00
Malte Franken
fccaf7f919 NSW Rural Fire Service platform (#16802)
* initial integration with nsw rural fire service feed

* improved test coverage

* updated requirements

* grouped imports

* removed debug print statement

* moved manager's startup code into separate call

* simplified feed update code

* simplified feed update code

* simplified device state attribute code

* added source to conform with pr #17339

* fixed lint

* refactored how entities are managed

* fixed pylint

* simplified signalling
2018-10-14 14:11:25 +02:00
Brant Knudson
f198859441 Upgrade pyvera to 0.2.45 (#17419)
This release adds support for garage door openers. A garage door
opener will show up as a switch.
2018-10-14 09:26:34 +02:00
333ryan18
a302112879 Bump Totalconnect (#17418)
* Update totalconnect.py

* Update requirements_all.txt
2018-10-14 09:25:24 +02:00
William Scanlon
6a8eb8d0a1 Moved econet from climate to water heater (#17322)
* Moved econet from climate to water heater

* Updated .coveragerc

* Fixed requirements_all.txt
2018-10-13 23:16:44 +02:00
Fredrik Baberg
f23708ce6f Update Vagrant Windows support (#17205)
* Update Vagrantfile with Hyper-V support

* Correction to name.

* Exclude files in Vagrant provision tests
2018-10-13 23:02:00 +02:00
noxhirsch
0dd3640c78 Adding support for HmIP-SLO (outdoor brightness sensor) (#17413)
* Add IPBrightnessSensor

* Add ILLUMINATION unit & icon

* Update homematic.py

* Added missing entry
2018-10-13 22:58:41 +02:00
J4nsen
d0da265166 Fix netio component (#17411)
* bump pynetio to 0.1.9.1 to actually use provided credentials.

* cast to int to fix TypeError

* update requirements_all.txt
2018-10-13 21:09:10 +02:00
Dan Klaffenbach
3ca3fe7015 homematic: Support additional property for sabotage detection (#17407)
At least HM-Sec-Sir-WM uses ERROR_SABOTAGE, see:

    pyhomematic.devicetypes.actors.RFSiren
2018-10-13 21:08:06 +02:00
Miloš Bunčić
ef8253c549 Added ssl and verify_ssl parameters in ddwrt device tracker component (#17406)
* Added ssl and verify_ssl parameters in ddwrt device tracker component

* Set defaults in validation
2018-10-13 21:04:51 +02:00
Keiran S
78e29cd3fa Add AWS Route53 Dynamic DNS support (#17072)
* Add AWS Route53 dynamic DNS support to Home Assistant

* Remove line breaks
2018-10-13 21:03:30 +02:00
Ville Skyttä
9c178cf488 Add unique id to syncthru sensors (#17399) 2018-10-13 14:31:53 +02:00
Steven Looman
e6d002c377 Update to async-upnp-client==0.12.5 (#17401) 2018-10-13 14:29:12 +02:00
Tommy Jonsson
70281a148b Fix hangout.send_message requiring data key (#17393) 2018-10-13 10:54:35 +02:00
Florian Klien
d4b092706a XMPP async (#17283)
* new lib dependencies, working old xmpp

* non working aioxmpp

* reverting to sync xmpp

will try slixmpp instead of aioxmpp

reasons:
echo bot example of aioxmpp had blocking behavior (slixmpp echo bot works fine)
closer API to sleekxmpp
less dependencies than aioxmpp

* first working slixmpp version

* DEBUG messages, changed MUC call

the joinMUC method changed from sleekxmpp to slixmpp
added debug messages
better name for cleanup callback

* flake8

* little cleanup, tested MUC

* requirements_all

* dependencies managed by slixmpp, removed debug messages

* resource configurable by user, requirements updated

* changed __init__ parameter code format

* removed trailing dots from LOG messages

* changed super call to python3 format
2018-10-13 10:37:42 +02:00
Tom Harris
db536797be Bump insteonplm version to 0.15.0 (#17384) 2018-10-13 10:33:34 +02:00
Martin Berg
d9d27733d1 Fix arm/disarm calls. (#17381) 2018-10-13 10:30:49 +02:00
Daniel Shokouhi
5f16f3c3a6 Add unique_id for Bloomsky (#17383)
* Add unique_id for Bloomsky

* Add bloomsky camera unique ID
2018-10-13 10:23:00 +02:00
Daniel Shokouhi
d3672f36fb Add unique_id for Neato (#17369)
* Add unique_id for Neato

* Only send the serial per review comments
2018-10-13 00:33:13 +02:00
Daniel Shokouhi
3cf6c76f8b Add unique_id for Lightify (#17377) 2018-10-13 00:32:35 +02:00
Tom French
434d1d7d63 Added option to use a location other than home (#17340) 2018-10-12 20:04:52 +02:00
Aaron Bach
401e22fc0c Add config entry for SimpliSafe (#17148)
* Initial move into component

* Base functionality in place

* Starting tests in place

* All config entry tests in place

* Made default scan interval more obvious and removed extra logging

* Inherit default scan interval from alarm_control_panel

* Updated coveragerc and CODEOWNERS

* Member-requested changes

* Hound

* Updated requirements

* Updated tests

* Member-requested changes

* Owner-requested changes

* Constant cleanup

* Fixed config flow test

* Owner-requested updates

* Updated requirements

* Using async_will_remove_from_hass

* Corrected scan interval logic

* Fixed tests

* Owner-requested changes

* Additional logging

* Owner-requested changes
2018-10-12 19:07:47 +02:00
Paulus Schoutsen
8eb4e77365 Merge pull request #17361 from home-assistant/rc
0.80.0
2018-10-12 16:57:52 +02:00
Malte Franken
1f863830e1 Adding source attribute to geo location platforms (#17339)
* added source attribute to all geo_location platforms

* amended test cases

* constant moved and source method now forces subclasses to override
2018-10-12 16:48:02 +02:00
Paulus Schoutsen
cd29b47924 Bumped version to 0.80.0 2018-10-12 14:59:36 +02:00
Pascal Vizeli
edb3722abd Hass.io auth/sso part2 (#17324)
* Update discovery.py

* Create const.py

* Update auth.py

* Update const.py

* Update const.py

* Update http.py

* Update handler.py

* Update auth.py

* Update auth.py

* Update test_auth.py
2018-10-12 14:59:17 +02:00
Pascal Vizeli
bc036cc2fe Fix auth for hass.io (#17318)
* Update test_auth.py

* Update auth.py

* Update test_auth.py
2018-10-12 14:59:17 +02:00
Martin Hjelmare
8778b707f1 Allow tradfri groups for new imported entries (#17310)
* Clean up leftover config schema option

* Allow import groups via new config yaml setup

* Fix and add test

* Add a test without groups for legacy import

* Change default import groups to False

* Fix I/O in test
2018-10-12 14:59:16 +02:00
Alok Saboo
05ae8f9dd4 Fix samsung bug (#17285) 2018-10-12 14:59:16 +02:00
Nikolay Vasilchuk
d199f57aa8 Logbook: filter by entity and period (#17095)
* Filter logbook by entity_id

* Filter logbook by period

* Simple test

* houndci-bot review

* Tests

* Test fix

* Test Fix
2018-10-12 14:59:15 +02:00
Paulus Schoutsen
f47e080f37 Update translations 2018-10-12 14:58:48 +02:00
Paulus Schoutsen
cfc5ebbfb0 Update frontend 2018-10-12 14:58:23 +02:00
Paulus Schoutsen
6971e84ddf Update translations 2018-10-12 14:58:09 +02:00
Paulus Schoutsen
397c4336bc Update frontend 2018-10-12 14:57:35 +02:00
kennedyshead
e00ed84d84 The ping command will not detect device in standby as off (#17358) 2018-10-12 14:51:03 +02:00
Jedmeng
7b28963a88 Fix setting opple light color temperature (#17359) 2018-10-12 14:50:20 +02:00
Sebastian Muszynski
5a00cc5afc Provide an individual color temperature range per Yeelight model (#17305)
* Provide an individual color temperature range per Yeelight model

* Fix lint

* Bump yeelight version

* Remove unused const

* Enable SUPPORT_COLOR_TEMP for BulbType.WhiteTemp
2018-10-12 11:35:33 +02:00
Martin Mois
cb3d62eeef notify.homematic (#16973)
* Add notify.homematic_signalgen

* Update homematic_signalgen.py, test_homematic_signalgen.py

* Added new files to .coveragerc

* Fixed review comments from houndci-bot

* Fixed pylint errors

* Regenerate requirements_test_all.txt by script/gen_requirements_all.py

* Fix flake8 warnings

* Renamed notify.homematic_signalgen to notify.homematic and made it generic

* Update .coveragerc and requirements_test_all.txt

* Removed the terms signal generator from the sources.
2018-10-12 09:36:52 +02:00
Daniel Perna
241d87e9d3 Add exception handling to dnsip sensor (#17332)
* Add exception handling to dnsip sensor

* Refactor import

* Fix exception
2018-10-12 09:30:35 +02:00
emontnemery
b2789d9883 Support abbreviations in discovery topic (#16635)
* Support abbreviations in discovery topic

* Add abbreviations for all words. Add testcase.

Add missing docstring.

* Add missing abbreviations

* Support topic prefix

* Update test case

* Restrict topic prefix

* Fix merge

* Simplify abbreviations expanding, assume TOPIC_PREFIX is one character long

* Support abbreviated keys instead of words

* Remove redundant abbreviations

* Remove extra spaces in abbreviation list

* Make topic prefix less restrictive

* Make topix prefix a bit more restrictive again
2018-10-12 08:51:16 +02:00
shred86
7bb60068d7 Color control for Abode RGB lights (#17347)
* Color control support for Abode lights

* Updated add_devices to add_entities

* Update line length

* Changed elif to if for pylint warning
2018-10-12 08:47:14 +02:00
Daniel Shokouhi
1c23a36f46 Set botvac availability (#17350)
* Set botvac availability

* Lint

* Reduce availability calls per review comments
2018-10-12 08:40:45 +02:00
Zhong Jianxin
0ea5a73e8d Fix motion sensor in Aqara LAN protocol V2 (#17240) 2018-10-12 08:34:32 +02:00
Mister Wil
6df3c480b3 Bump version of abodepy to 0.14.0 (#17336) 2018-10-11 22:00:51 +02:00
Paulus Schoutsen
61f7a39748 Add permissions foundation (#16890)
* Add permission foundation

* Address comments

* typing

* False > True

* Convert more lambdas

* Use constants

* Remove support for False

* Fix only allow True
2018-10-11 19:24:25 +02:00
emontnemery
5961f2f577 Add support for off_delay to MQTT binary_sensor (#16993)
* Add support for off_delay to MQTT binary_sensor

* Fix debounce, add testcase

* Make off_delay number of seconds instead of timedelta

* Update mqtt.py

* Fix testcase, remove CONF_OFF_DELAY from const.py
2018-10-11 19:14:23 +02:00
Paulus Schoutsen
61bf4d8a29 Add user events (#17328) 2018-10-11 17:06:51 +02:00
Nikolay Vasilchuk
44477f3d32 Logbook: filter by entity and period (#17095)
* Filter logbook by entity_id

* Filter logbook by period

* Simple test

* houndci-bot review

* Tests

* Test fix

* Test Fix
2018-10-11 14:15:04 +02:00
Karim Geiger
ed45dff6e8 Implement turn_off and turn_on actions for eq3btsmart (#17168)
* Implement turn_off and turn_on actions for eq3btsmart

This commit implements the turn_off and turn_on methods for eq3btsmart. Turning the device off will set the thermostat to "OFF". Turning it on will set it to "AUTO".

* Add missing support flags for on/off feature

* Fix line length
2018-10-11 13:25:48 +02:00
Nikolay Vasilchuk
2a35a3901e Template Lock (#17288)
* Template Lock component

* Tests

* CI Fix

* Don't track templates if they have result in MATCH_ALL

* async/await

* houndci-bot review fix
2018-10-11 12:53:54 +02:00
Paulus Schoutsen
ebff253cc9 still update sensor on startup (#17319) 2018-10-11 11:38:35 +02:00
Pascal Vizeli
f5d3aa1826 Hass.io auth/sso part2 (#17324)
* Update discovery.py

* Create const.py

* Update auth.py

* Update const.py

* Update const.py

* Update http.py

* Update handler.py

* Update auth.py

* Update auth.py

* Update test_auth.py
2018-10-11 10:55:38 +02:00
uchagani
cffb704311 Enable BMW component to be unit system aware (#17197)
* Enable BMW component to be unit system aware

* lint fixes

* use constants for config entries

* remove configuration from component and rely only on HA config of unit_system

* remove unused import

* update code to reflect feedback

* lint fixes

* remove unnecessary comments

* rework return statement to satisfy pylint

* more lint fixes

* add tests for volume utils

* lint fixes

* more lint fixes

* remove unnecessary comments
2018-10-11 10:55:22 +02:00
Martin Hjelmare
58af332d21 Allow tradfri groups for new imported entries (#17310)
* Clean up leftover config schema option

* Allow import groups via new config yaml setup

* Fix and add test

* Add a test without groups for legacy import

* Change default import groups to False

* Fix I/O in test
2018-10-11 10:37:34 +02:00
George Marshall
ef2c8b2e5b Update python_openzwave==0.4.10 (#17323) 2018-10-11 10:59:16 +03:00
Fabien Piuzzi
9fa7906aef Made it possible to define multiple Octoprint printers (#16519)
* Made it possible to define multiple octoprint printers

* style fix

* Added configuration option for octoprint port

* SSL support in octoprint platform configuration

* Octoprint component now auto loads sensor and binary_sensor platforms

* preliminary support for auto discovery of octoprint servers

* Moved sensors and binary sensors configuration into main octoprint configuration

* Using base_url as the key for storing api in the octoprint component

* made sure to not supersede the platforms' domains

* bugfix: continue setting up other printers if one fails

* flake8 style correction

* Added icons to sensors

* Fail platform setup if no printers were successfully added

* Simplified custom validator
2018-10-11 09:52:13 +02:00
Dav0815
c6c5d40056 Transport NSW (#17242)
* Resubmission of development

* Clean up

* Finishing touch and clean up

* Remove not needed error check
2018-10-11 09:44:17 +02:00
Rohan Kapoor
d7cd1a2b4b Implement ZoneMinder run states (#17198) 2018-10-11 09:38:31 +02:00
Fabian Affolter
7e8973a315 Update file header (#17317) 2018-10-11 07:43:15 +02:00
Pascal Vizeli
3f87d41381 Fix auth for hass.io (#17318)
* Update test_auth.py

* Update auth.py

* Update test_auth.py
2018-10-11 01:02:00 +02:00
Fabian Affolter
8d9da4e7b9 Upgrade construct to 2.9.45 (#16362) 2018-10-10 23:52:45 +02:00
Glenn Waters
93e3596e5a Add Elk-M1 switch and scene platforms (#17256)
* Add Elk-M1 switch platform.

* Fix travis error.

* Fix very annoying lint error.

* Fix PR comments.

* Fix comment.

* Fix lint errors.

* Fix PR comments.

* Fix PR

Apologize. Going too fast. You should not have to find those.
2018-10-10 19:05:19 +02:00
zhumuht
c434ad6af5 fix_broadlink_sp2_show_energy (#17271)
* fix_broadlink_sp2_show_energy

Signed-off-by: 朱海涛 <zhumu.zht@alibaba-inc.com>

* fix_broadlink_sp2_show_energy

Signed-off-by: 朱海涛 <zhumu.zht@alibaba-inc.com>

* fix_broadlink_sp2_show_energy

Signed-off-by: 朱海涛 <zhumu.zht@alibaba-inc.com>

* fix_broadlink_sp2_show_energy

Signed-off-by: 朱海涛 <zhumu.zht@alibaba-inc.com>

* fix_broadlink_sp2_show_energy

Signed-off-by: 朱海涛 <zhumu.zht@alibaba-inc.com>
2018-10-10 18:56:00 +02:00
cgtobi
99c6622ee2 Add direction configuration (#17308) 2018-10-10 17:59:55 +02:00
Paulus Schoutsen
9d4dbd7d97 ABC config entries (#17309) 2018-10-10 16:02:03 +02:00
Paulus Schoutsen
fa3f6ca2c7 Bumped version to 0.80.0b5 2018-10-10 14:29:04 +02:00
Paul Annekov
1d78393680 fixed 'on_startup() takes 0 positional arguments but 1 was given' (#17295) 2018-10-10 14:26:34 +02:00
Pascal Vizeli
951d7154b8 Fix hassio discovery (#17275)
* Update discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Fix tests

* fix lint
2018-10-10 14:26:33 +02:00
Pascal Vizeli
3f28b30860 Hassio auth (#17274)
* Create auth.py

* Update auth.py

* Update auth.py

* Update __init__.py

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Add tests

* Update test_auth.py

* Update auth.py

* Update test_auth.py

* Update auth.py
2018-10-10 14:26:32 +02:00
Paulus Schoutsen
83dec7173c Update translations 2018-10-10 14:25:49 +02:00
Paulus Schoutsen
d16e6c8524 Update translations 2018-10-10 14:25:21 +02:00
Paul Annekov
052c094425 fixed 'on_startup() takes 0 positional arguments but 1 was given' (#17295) 2018-10-10 14:24:30 +02:00
Pascal Vizeli
40e0966d7f Hassio auth (#17274)
* Create auth.py

* Update auth.py

* Update auth.py

* Update __init__.py

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Add tests

* Update test_auth.py

* Update auth.py

* Update test_auth.py

* Update auth.py
2018-10-10 14:07:51 +02:00
Joshi
ad4d5666fe Yamaha AVR update and change Sound Mode only on main_zone (#17241)
* Add support for sound_mode for Yamaha rxv media_player

* Catch ParseError Exeption on surround_program for unsupported models

* Catch all Exeptions from rxv

* only get sound mode list / current sound mode on main_zone
2018-10-10 14:07:33 +02:00
definitio
7f896bfb40 WIP: Don't set initial values for MQTT HVAC in non-optimistic mode (#17268)
* Don't set initial temperature in non-optimistic mode

* Fix tests

* Don't set initial values in non-optimistic mode

For fan mode, current operation and swing mode

* Fix tests again
2018-10-10 14:06:53 +02:00
Pascal Vizeli
83dd961fde Fix hassio discovery (#17275)
* Update discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Fix tests

* fix lint
2018-10-10 13:50:11 +02:00
Paulus Schoutsen
a1dac28e4b Template sensors to not track all state changes (#17276)
* Disable template sensor match all

* Only manual update template sensors that match all
2018-10-10 13:49:15 +02:00
Martin Hjelmare
e5c3a4be80 Fix and clean haveibeenpwned (#17306)
* Move first forced data fetching and update to async_added_to_hass.
* Clean up code.
2018-10-10 13:46:03 +02:00
Ville Skyttä
707b7c202d Narrow scope of various pylint inline disables (#15364)
* Narrow scope of various pylint inline disables

* Whitespace tweaks
2018-10-10 12:17:11 +02:00
Teemu R
78c38749ab Xiaomi Vacuum: keep error state active after erroring (#16562)
* Check for got_error to keep consistent error reporting

* reword a comment
2018-10-10 12:16:32 +02:00
Markus Nigbur
670c75e844 Added resolve_state to template distance function (#17290)
_resolve_state was already used in the "closest" function, to allow for states and entity ids
2018-10-10 11:49:24 +02:00
Colby Rome
419725e1a9 Add Verizon Fios Quantum Gateway device_tracker platform (#17023)
* wrote quantum_gateway.py

* ran gen_requirements script

* fixed linting errors, added docstrings

* update .coveragerc

* fixed typo

* add myself to contributors

* single quotes for single words

* added error handling to prevent stacktrace

* updated my pypi library

* houndci fixes - added RequestException

* added password to config schema
2018-10-10 08:23:31 +02:00
cgtobi
cfc175d71d Make rmvtransport async (#17225)
* Make rmvtransport async

* Make rmv transport async

* Make async tests

* Update rmvtransport module version

* Remove unnecessary import

* Make rmvtransport async

* Make rmv transport async

* Make async tests

* Update rmvtransport module version

* Remove unnecessary import

* Update requirements

* Remove async loop

* Fix wrong import

* Fix stupidness

* Remove unnecessary import

* Bump upstream version

* Don't store the session

* Refactor tests

* Add test for no data

* Fix linter issues

* Fix stale docstring

* Fix stale docstring

* Remove unnecessary test code

* Remove unnecessary import

* Add configurable timeout

* Remove global variable
2018-10-10 08:10:42 +02:00
hanzoh
8310f4a1cf Add valve level to HmIP thermostat attributes (#17297) 2018-10-09 18:53:49 -06:00
Fabian Affolter
5022cf8a6c Upgrade locationsharinglib to 3.0.6 (#17294) 2018-10-10 00:02:07 +02:00
Fabian Affolter
2cd99e5a97 Upgrade shodan to 1.10.4 (#17292) 2018-10-09 22:37:50 +02:00
Alok Saboo
26f2e3dd8b Fix samsung bug (#17285) 2018-10-09 21:43:59 +02:00
mvn23
fc67f5eef3 Rewrite opentherm_gw to a component (#17133)
* Rewrite opentherm_gw to a component which loads the opentherm_gw climate platform.

* Add OpenTherm Gateway sensor platform.

* Remove library imports from platforms (use hass.data instead)
* Update .coveragerc
* Update docstrings to use new component documentation url

* Add OpenTherm Gateway binary sensor support.
Fix houndci findings.

* Revert "Add OpenTherm Gateway binary sensor support."

This reverts commit 5711dc4c25.

* Revert "Add OpenTherm Gateway sensor platform."

This reverts commit b3505ed561.

* Remove import from platform, use hass.data instead.
Update .coveragerc
Update docstrings
Update requirements_all.txt
General code cleanup

* Fix review findings.
Avoid using hass.data within connect_and_subscribe.
2018-10-09 21:06:24 +02:00
dickesW
2aeb0efc7c Fixed Temperature for HMIP-WeatherStation Plus/Basic (#17216) 2018-10-09 11:19:21 -06:00
Markus Nigbur
a99ba0a1d4 Bumped fints component to version 1.0.1 (#17280) 2018-10-09 11:18:46 -06:00
Paulus Schoutsen
e903f7ffda Manual updates (#17278) 2018-10-09 16:54:38 +02:00
Charles Garwood
cf249e3e5e Z-Wave Config Entry Support (#17119)
* Initial Z-Wave Config Entry Support

* Use conf.get() for config import

* Uncomment test

* Re-add line breaks

* tabs -> space

* Unused import cleanup & lint fixes

* Remove unused config flow link step

* Address comments

* Remove unused import

* Fix tests

* Check for valid usb_path

* Test for Z-Stick in config flow

* Pass config dir to ZWaveOption

* Auto-generate Network Key if none provided

* Test fixes

* Address comments & more start network service registration

* add_executor_job for options.lock()
2018-10-09 16:30:55 +02:00
Paulus Schoutsen
a8a21ee28d Bumped version to 0.80.0b4 2018-10-09 16:20:39 +02:00
Anders Melchiorsen
1a76603f53 Remove warning on script delay (#17264)
* Remove warning on script delay

* Use suppress
2018-10-09 16:20:31 +02:00
Steven Looman
089e15e046 Add defaults, fixing #17229 (#17261) 2018-10-09 16:20:31 +02:00
Sebastian Muszynski
b59d69f313 Fix ambient light state of the Philips Eyecare Lamp (Closes: #16269) (#17259) 2018-10-09 16:20:30 +02:00
Paulus Schoutsen
eb7db1f763 block external IP (#17248)
* block external IP

* Update __init__.py
2018-10-09 16:20:29 +02:00
Paulus Schoutsen
429f09deb3 Add a webhook automation trigger (#17246) 2018-10-09 16:20:29 +02:00
damarco
5167658a1d Add support for zha custom cluster mappings (#16714)
* Add support for custom cluster mappings

* Refactor sub_component mapping
2018-10-09 12:53:02 +02:00
definitio
6bf3f9e748 Fix mpd timeout error (#17254)
* Increase mpd client timeout

* Update mpd.py
2018-10-09 12:24:39 +02:00
Daniel Perna
9d56730b8d Add optional "all" parameter for groups (#17179)
* Added optional mode parameter

* Cleanup

* Using boolean configuration

* Fix invalid syntax

* Added tests for all-parameter

* Grammar

* Lint

* Docstrings

* Better description
2018-10-09 10:14:55 +02:00
Otto Winter
26cf5acd5b Make async_track_time_change smarter (#17199)
* Make async_track_time_change smarter

* Move to util/dt

* Remove unnecessary check

* Lint

* Remove tzinfo check

* Remove check

* Add comment about async_track_point_in_utc_time

* Fix typing check

* Lint
2018-10-09 10:14:18 +02:00
Otto Winter
9190fe1c21 Add device registry to MQTT fan (#17250) 2018-10-09 10:13:42 +02:00
marcolertora
0c34c50d2f Added lumitek/ankuoo recswitch component (#15764)
* Added lumitek/ankuoo recswitch component

* cosmetics

* remove callback

* cosmetics

* update requirements pyrecswitch==1.0.2

* add in .coveragerc
2018-10-09 10:13:03 +02:00
Sebastian Muszynski
757ba3b60e Add basic support of the Philips Zhirui desk lamp (philips.light.mono1) (#17258) 2018-10-09 10:11:34 +02:00
Sebastian Muszynski
882c4b73ae Fix ambient light state of the Philips Eyecare Lamp (Closes: #16269) (#17259) 2018-10-09 10:11:14 +02:00
Steven Looman
4455a287fc Add defaults, fixing #17229 (#17261) 2018-10-09 10:07:30 +02:00
Anders Melchiorsen
5db7d702c8 Remove warning on script delay (#17264)
* Remove warning on script delay

* Use suppress
2018-10-09 10:06:42 +02:00
Tomas Hellström
540d22d603 Swedish weather institute weather component (#16717)
* SMHI Component

* Clean up typos

* Fixed default values first config to home location (tests will follow)

* Fixed tests and removed unused function

* Minor fixup after comments from @kane610

* add support for precipitation in forecast

* Removed old async_step_init not needed.
2018-10-08 23:54:55 +02:00
Teemu R
56a43436d7 Bump python-miio requirement (#17260) 2018-10-08 22:33:06 +02:00
Nick Horvath
1393766659 Thermoworks Smoke Sensor (#16139)
* Add support for monitoring the temperature of a thermoworks smoke thermometer.

* Use string formatting.

* Add line break.

* Add error handling for authentication.

* Fix linting errors.

* Fix quotes.

* Bump thermoworks_smoke library version.

* Review changes for @MartinHjelmare

* Add unique id attribute and change battery attribute to the standard "battery_level".

* requested changes to snake case and monitored conditions

* fix lint error

* exclude firmware from state attrs. rename original_unit to unit_of_min_max so it's more clear what it is for.

* add device_info

* add regex validator for exclude

* undo device info stuff

* remove serial number from attributes even though other components are allowed to have it...

* exclude firmware
2018-10-08 22:15:38 +02:00
Paulus Schoutsen
68d72931c4 block external IP (#17248)
* block external IP

* Update __init__.py
2018-10-08 20:50:24 +02:00
Jari Ylimäinen
0c0184973b Add configurable temperature step for MQTT climate component (#16201)
* Add configurable temperature step

* Remove temp step from climate component
2018-10-08 20:24:25 +02:00
damarco
59ec469722 Use only_cache parameter in binary_sensor.zha.Remote (#16711) 2018-10-08 20:23:26 +02:00
Paulus Schoutsen
68472b8241 Add a webhook automation trigger (#17246) 2018-10-08 20:16:37 +02:00
Glenn Waters
9380fca97e Add Elk light platform (#17222)
* Add Elk light platform.

* Add ElkM1 light code. Doh.

* Fix PR comments.

* Fix hound errors.

* Fix PR comment.

* Move state from base to class(s) where used
2018-10-08 17:30:27 +02:00
Paulus Schoutsen
c3b1121d77 Add group foundation (#16935)
Add group foundation
2018-10-08 16:35:38 +02:00
Paulus Schoutsen
4d3d51635d Bumped version to 0.80.0b3 2018-10-08 16:16:01 +02:00
Malte Franken
a372053eac updated georss-client library to 0.3 (#17239) 2018-10-08 16:15:40 +02:00
Paulus Schoutsen
2e120061b4 Guard for bad device info (#17238) 2018-10-08 16:15:40 +02:00
Paulus Schoutsen
3a6eac216c Fix SPC (#17236) 2018-10-08 16:15:39 +02:00
Otto Winter
6671cbb96d Fix potential MQTT discovery race condition (#17208)
* Fix potential MQTT discovery race condition

* Rename data key
2018-10-08 16:15:39 +02:00
Matt Schmitt
9e386938bb MyQ cover return unknown state if not available (#17207)
* Add additional supported states

* Use get method for lookup

* Return None if unable to get status
2018-10-08 16:15:38 +02:00
Paulus Schoutsen
6be52208fc Prevent accidental device reg override (#17136) 2018-10-08 16:15:38 +02:00
Otto Winter
dd55ff87c8 Add device registry to MQTT cover (#17245)
* Add device registry to MQTT cover

* Fix tests
2018-10-08 16:13:44 +02:00
Malte Franken
b637b48bd8 emptying device state attributes if the update from the feed fails (#17249) 2018-10-08 16:13:08 +02:00
emontnemery
42fb886d71 Add support for HS color to mqtt light (#16958)
* Add support for HS color to mqtt light

* Warn if hs state update is invalid
2018-10-08 15:36:57 +02:00
Otto Winter
9290f245bf Convert MQTT fan to config entry (#17247) 2018-10-08 14:59:04 +02:00
Otto Winter
c41ef65da6 Add device registry to MQTT switches (#17244) 2018-10-08 14:57:07 +02:00
Otto Winter
744dd42ad3 Add device registry to MQTT binary sensor (#17243) 2018-10-08 14:44:00 +02:00
Matt Schmitt
27f0331f0f MyQ cover return unknown state if not available (#17207)
* Add additional supported states

* Use get method for lookup

* Return None if unable to get status
2018-10-08 14:19:23 +02:00
Malte Franken
394ffc40b6 updated georss-client library to 0.3 (#17239) 2018-10-08 13:32:16 +02:00
Paulus Schoutsen
d5f5273c31 Guard for bad device info (#17238) 2018-10-08 12:53:51 +02:00
Otto Winter
af2402ea59 Implement base for MQTT device registry integration (#16943)
* Implement base for MQTT device registry integration

* Lint

* Lint

* Address comments

* Lint

* Lint

* Address comments

* Only add keys if specified

See https://github.com/home-assistant/home-assistant/pull/17136#discussion_r223267185
2018-10-08 12:53:30 +02:00
Daniel Lashua
71a0274b12 Add Support for Xiaomi Vibration Sensor (#16422) 2018-10-08 12:08:46 +02:00
Otto Winter
3f498bd042 Fix potential MQTT discovery race condition (#17208)
* Fix potential MQTT discovery race condition

* Rename data key
2018-10-08 10:59:43 +02:00
MatteGary
ee5e1fa355 Daikin Climate - Better integration with Climate base component (#16913)
* Daikin Climate - Better integration with Climate base component

Made some modification in order to better integrate the Daikin AC Component with the base Climate Component.
Benefits are:
Support localization for Operation Mode
Support for Homekit Integration (if the AC is turned On, now the status is updated in Homekit)

* Build bug fixing

* Bug fixing in Set Operation_Mode functionality

Fixed to .title() functionality in matching the Operation_Mode

* Fix useless code

* Fix hound bug

* Bug fixing

Change in list of Operation Mode

* Trailing white space fix

* Compile fixing

* Whitespace fix
2018-10-08 10:49:54 +02:00
William Scanlon
f2d8f3bcb8 Water heater support (#17058)
* Moved econet to water_heater

* Wink and Econet are now in water heater!

* Removed away mode from econet and added demo water heater

* Added demo tests

* Updated coveragerc

* Fix lint issues.

* updated requirements all

* Requirements all actually updated.

* Reset wink and econet and fixed service.

* Reset wink and econet to the correct dev state

* Reset requirements_all and .coveragerc and removed the new econet and wink water_heater files

* Removed @bind_hass service methods

* Actually reset the .coverage file

* Fixed the tests

* Addressed @MartinHjelmare's comments

* Removed unused import

* Switched to async_add_executor_job

* Fixed lint

* Removed is_on

* Added celsius demo water heater and tests.

* Removed metric import
2018-10-08 10:38:07 +02:00
Sebastian Muszynski
ff4204244b Fix data_key and power_consumed attribute of the Aqara Wall Switch (Closes: #16457) (#17235) 2018-10-08 10:37:27 +02:00
Paulus Schoutsen
a54e242245 Fix SPC (#17236) 2018-10-08 10:20:18 +02:00
Oliver
849665b9ca Pushed to version 0.7.6 of denonavr library to add more sound modes (#17227) 2018-10-08 09:32:14 +02:00
Sebastian Muszynski
315f83e1ea Add some new model names of Xiaomi Aqara devices (#17234)
* Add additional model name of the Xiaomi Aqara Button (WXKG11LM)

* Add additional model name of the Xiaomi Aqara Wireless Switch (WXKG02LM, WXKG03LM)

* Bump PyXiaomiGateway version
2018-10-08 09:32:01 +02:00
Paulus Schoutsen
4b7f85518f Prevent accidental device reg override (#17136) 2018-10-08 09:30:40 +02:00
Daniel Høyer Iversen
59d78b060f danielhiversen as codeowner for met.no (#17232) 2018-10-08 08:36:32 +02:00
Paulus Schoutsen
bd4ff6fc21 Bumped version to 0.80.0b2 2018-10-07 23:33:46 +02:00
Martin Berg
5fcea074c4 Init sub-components using global var. (#17220) 2018-10-07 23:33:40 +02:00
Per Sandström
7369af0639 Verisure standard config for scan interval (#17192)
* verisure configurable polling

* fix indentation
2018-10-07 23:33:40 +02:00
Anders Melchiorsen
b872cb95c7 Upgrade aiolifx_effects to 0.2.1 (#17188) 2018-10-07 23:33:39 +02:00
cdce8p
3338ebd4c1 Bugfix switch flux - light service call (#17187)
* Bugfix switch flux - light service call

* Change x_val and y_val test
2018-10-07 23:33:38 +02:00
cdce8p
7b176aa7c9 Fix device_tracker service call & cleanup (#17173)
* Bugfix group service - device_tracker

* Cleanup
2018-10-07 23:33:38 +02:00
Paulus Schoutsen
c722091967 Fix data used for logbook (#17172)
* Fix data used for logbook

* Lint
2018-10-07 23:33:38 +02:00
Martin Berg
e922dd10ba Init sub-components using global var. (#17220) 2018-10-07 23:30:09 +02:00
Paulus Schoutsen
4cffef7f2b Update translations 2018-10-07 23:27:57 +02:00
Paulus Schoutsen
31b1b0c044 Update frontend to 20181007.0 2018-10-07 23:27:57 +02:00
Paulus Schoutsen
2de1193fd9 Update translations 2018-10-07 23:26:46 +02:00
Paulus Schoutsen
c12bbddc0b Update frontend to 20181007.0 2018-10-07 23:26:23 +02:00
Anders Melchiorsen
086c71525e Add config entry for LIFX (#17201)
* Add config entry for LIFX

* Use list for dependencies

* Obsolete the platform config

* Use DOMAIN

* Use async_create_task
2018-10-07 23:14:53 +02:00
Glenn Waters
06a64c0167 Add support for ElkM1 alarm/automation panel (#16952)
* Add support for ElkM1 alarm/automation panel.

* fix lines too long

* Address PR comments

* Fix hound ci errors

* Changes for PR comments

* Use vol.Range for checking range value

* Address PR comments

* Fix lint errors

* Added elkm1-lib requirement

* Update coverage to exclude elk

* Fix flake8 errors

* Fix flake8 error

* Cleanup config parsing

* Add housecode converter

* fix PR comments

* fix syntax error

* Fix PR comment
2018-10-07 21:45:36 +02:00
Daniel Høyer Iversen
c1ed9edd26 Add forecast for Met.no (#17109)
test met

met no 0.3.0

fix line length

fix line length
2018-10-07 21:00:12 +02:00
emontnemery
1d7d82fde5 Fix aliases support for RFLink sensors (#17190) 2018-10-07 13:14:37 +02:00
Brian Towles
592e1dc96a Enable new registry rename for Insteon (#17171)
* Enable new registry rename for Insteon

* Segment unique_id from name
2018-10-07 13:12:33 +02:00
Anders Melchiorsen
6e81ae096e Disallow list/dict for string configuration (#17202) 2018-10-07 12:35:44 +02:00
Per Sandström
c8266c6692 vsure version 1.5.0 (#17209) 2018-10-07 12:33:16 +02:00
Philip Rosenberg-Watt
8fda705377 Fix Todoist custom project update (#17115)
* Fix Todoist custom project update

Custom projects were not refreshing the API state and were using
local/stored state. This resulted in invalid tasks being retained upon
update. This change resets the local Todoist API state, syncs it, and
then continues normal update operation(s) on the Todoist project data
object.

* Remove blank line after docstring

* Update logging call

* Simplify logging
2018-10-07 01:38:25 +02:00
cdce8p
5d6562a73f Bugfix switch flux - light service call (#17187)
* Bugfix switch flux - light service call

* Change x_val and y_val test
2018-10-06 23:30:07 +02:00
Guy Khmelnitsky
9285831fa1 Upgrade boto3 to 1.9.16 (#17140) 2018-10-06 20:46:20 +02:00
Per Sandström
760047f964 Verisure standard config for scan interval (#17192)
* verisure configurable polling

* fix indentation
2018-10-06 20:03:22 +02:00
Anders Melchiorsen
8683eeb908 Upgrade aiolifx_effects to 0.2.1 (#17188) 2018-10-06 14:32:54 +02:00
Fabian Affolter
75e236de73 Add myself to more sensors (#17185) 2018-10-06 09:54:03 +02:00
Fabian Affolter
169abe637c Update core, add myself and introduce grouping (#17175) 2018-10-06 07:16:06 +02:00
cdce8p
07d90c6c55 Fix device_tracker service call & cleanup (#17173)
* Bugfix group service - device_tracker

* Cleanup
2018-10-05 23:09:55 +02:00
Paulus Schoutsen
a66db59359 Fix data used for logbook (#17172)
* Fix data used for logbook

* Lint
2018-10-05 23:07:27 +02:00
Fabian Affolter
bed1b96f5a Revert "Update core, add myself and introduce grouping"
This reverts commit 13106a9b55.
2018-10-05 21:46:26 +02:00
Fabian Affolter
13106a9b55 Update core, add myself and introduce grouping 2018-10-05 21:45:14 +02:00
kennedyshead
7598067b55 Adding myself as melissa owner (#17157) 2018-10-05 20:48:20 +02:00
Paulus Schoutsen
7a22fbe961 Bumped version to 0.80.0b1 2018-10-05 20:21:27 +02:00
Paulus Schoutsen
738089c57c Fix incorrect yaml in hangouts (#17169) 2018-10-05 20:21:23 +02:00
Paulus Schoutsen
5e7d4a57a3 Fix incorrect yaml in hangouts (#17169) 2018-10-05 20:21:09 +02:00
Paulus Schoutsen
1061c369f1 Bumped version to 0.81.0.dev0 2018-10-05 19:54:15 +02:00
Paulus Schoutsen
88c0a92857 Bumped version to 0.80.0b0 2018-10-05 17:56:30 +02:00
Paulus Schoutsen
0c770520ed Update translations 2018-10-05 17:50:00 +02:00
Paulus Schoutsen
92e28067d8 Update frontend to 20181005.0 2018-10-05 17:49:27 +02:00
prophit987
d1636dab31 @danielhiversen as codeowner for Tibber (#17154) 2018-10-05 14:55:16 +02:00
prophit987
13aa935147 Discover Danfoss/devolo RS Room Sensor thermostat (#17153)
Allows the Danfoss/Devolo RS Room Sensor thermostat to be discovered as climate device in homeassistant.
This device is defined as GENERIC_TYPE_MULTILEVEL_SENSOR, and not GENERIC_TYPE_THERMOSTAT.
Ref: https://community.home-assistant.io/t/devolo-zwave-thermostat/58739
2018-10-05 14:39:10 +02:00
Paul Annekov
29c3f1618f Fix miflora connection errors during platform setup (#16798)
* possible fix for startup delay

* fixed reported issues

* moved update code into setup

* reverted to previous solution
2018-10-05 13:33:28 +02:00
cdce8p
37a47b5a59 Add faucet, shower, sprinkler, valve to HomeKit (#17145) 2018-10-05 12:43:50 +02:00
Julius Mittenzwei
2e62afabdc Added warning to HomeKit component (#16807)
* added warning if more then 100 devices are added to HomeKit
2018-10-05 12:32:26 +02:00
Rohan Kapoor
a8f5e8699a Fix zoneminder zms_url construction (#17150) 2018-10-05 10:30:08 +02:00
Lewis Juggins
4218efddcd Cleanly stop tradfri on shutdown (#17114)
* Tradfri shutdown fix

* Bump version

* Bump version

* Fix

* Derp

* Remove unnecessary shutdown event
2018-10-05 09:59:34 +02:00
Gerard
aec320dc19 Fix a typo (#17147) 2018-10-05 07:48:40 +02:00
Aaron Bach
acf684de05 Added OpenUV CODEOWNERS info (#17149) 2018-10-04 19:57:52 -06:00
Florian Klien
ce1e8f8ace YesssSMS handling more errors, upgrade to version 0.2.3 (#17052)
* YesssSMS handling more errors, upgrade to version 0.2.1

 - handling missing internet connection nicely
 - disabling login with non-working credentials (website locked account for 1 hour)
 - upgrade to new upstream version of YesssSMS

* notify.yessssms tests

* test requirements

* flake8 fix

* fixing tests, new upstream version 0.2.3

fixing tests based on requested changes, coverage

* removing unmotivated print

* passing exception to ConnectionError and SMSSendingError logger
2018-10-04 17:34:04 -04:00
Per Sandström
b55c7a5ba2 verisure configurable polling (#17144) 2018-10-04 21:41:02 +02:00
cdce8p
52ff232797 Bugfix invalid entity_config parameter HomeKit (#17143) 2018-10-04 20:37:04 +02:00
Paulus Schoutsen
769dda735d Remove discovery (#17070) 2018-10-04 16:04:44 +02:00
Ana Paula Gomes
02bf07d9df Add timeout and fix oscillations on Samsung TV component (#17102)
* Add timeout and fix oscillations

* Adjust code to py3.5.3

* Clean code
2018-10-04 16:02:14 +02:00
Georgi Kirichkov
b92b24e8a4 Webhook component - pass headers to webhook handler (#17091)
* Pass headers to webhook handler

* Refactors webhook component to post Request object instead of data

* Update webhook tests

* Cleanup webhook test and fix a bug in ifttt

* Address code review comments
2018-10-04 15:54:51 +02:00
Paulus Schoutsen
0cfbb9ce91 Allow config entry setup to raise not ready (#17135) 2018-10-04 15:53:50 +02:00
Tsvi Mostovicz
c9976718d4 Take timezone into consideration when calulating Zmanim. Partial fix for #16946 (#17131) 2018-10-04 15:51:56 +02:00
Jason Hu
b61a250321 Fix upnp component l10n error (#17132) 2018-10-04 15:50:42 +02:00
Alok Saboo
ae0dd33e2e Add update service to Google Travel Sensor (#17092)
* Add update service

* Update service name

* Register service only once

* Make hound happy
2018-10-04 14:02:30 +02:00
Daniel Høyer Iversen
0d93bf9a45 Update xiaomi lib (#17129) 2018-10-04 13:24:54 +02:00
Heiko Thiery
178bf736f6 Add new component fritzbox binary_sensor (#17057)
* Add new component fritzbox binary_sensor

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* fix failed flake8 test

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* add new file to .coveragerc

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* use wildcard to cover all platforms

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* remove polling because polling is true by default

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* add blank line to keep imports ordered

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* Minor changes
2018-10-04 12:16:27 +02:00
Paulus Schoutsen
a559c06d6b Make it easier for auth to consume newer formats (#17127) 2018-10-04 10:41:13 +02:00
Jerad Meisner
cc1891ef2b Add time created to persistent notifications. (#17121)
* Add time created to persistent notifications.

* UTC
2018-10-04 10:24:14 +02:00
Daniel Høyer Iversen
05d8c57212 Tibber component and notify (#17062)
* Refactor tibber, and Tibber notify

* update Tibber lib.

* tibber

* Tibber coveragerc

* Tibber upgrade lib

* style

* comments

* use async_get_service

* event
2018-10-04 09:29:49 +02:00
Adam Mills
3abdf217bb Homekit controller reconnect (#17060)
* Add threaded call_later helper

* Reconnect to device when connection fails

* Consolidate connection logs and warn on first
2018-10-04 09:25:05 +02:00
Martin Hjelmare
6a0c9a718e Fix sonos async use (#17099)
* Entry setup wasn't using the async api. Fix this by using correct
  async api.s
* Also use new async executor scheduler in async_added_to_hass.
2018-10-04 09:20:20 +02:00
Ville Skyttä
abd329d707 Upgrade pytest to 3.8.2 (#17125) 2018-10-04 09:03:31 +02:00
Aaron Bach
04fdde0e86 Bumps simplisafe-python to 3.1.2 (#16931)
* Bumps simplisafe-python to 3.0.4

* Updated requirements

* Refresh token logic added

* Member-requested changes

* Removed unused import

* Updated CODEOWNERS

* Bump library to 3.1.2
2018-10-03 21:03:29 -06:00
Michael Wei
2b3019bdf4 Support multiple accounts in Tile, use device identifiers (#17108)
*  Update tile to support multiple accounts

* 🎨 fix indent

* 🐛 fix format string

* 🎨 use .format

* 🎨 fix line indent
2018-10-03 17:22:21 -06:00
Diogo Gomes
cf0147098a Merge pull request #16300 from StevenLooman/igd
Adds discovery and config flow
Breaking change: no longer possible to map ports other than the port used by Home Assistant
2018-10-03 22:55:01 +01:00
mvn23
aeb21596a0 Fix counter restore. (#17101)
Add config option to disable restore (always use initial value on restart).
Add unit tests for restore config option.
2018-10-03 23:12:21 +02:00
Tsvi Mostovicz
cf5f02b347 Fix jewish calendar sensor with language set to english (#17104)
* Add failing testcase for issue #16830

* Fix for #16830
2018-10-03 18:43:25 +02:00
Michael Wei
467a59a6ed Change Tile icon to view-grid (#17098) 2018-10-03 09:59:11 -06:00
Kevin Fronczak
da622abb79 Adding myself as blink codeowner (#17096) 2018-10-03 17:04:31 +02:00
David Bilay
16cbc2d07f Add weather condition code to OpenWeatherMap sensor (#17093) 2018-10-03 16:15:45 +02:00
Anders Melchiorsen
952a1b3513 Smaller steps for Sonos volume up/down (#17080) 2018-10-03 15:09:05 +02:00
Anders Melchiorsen
a5402739b7 Keep the repeat mode when setting Sonos shuffle mode (#17083)
* Keep the repeat mode when setting Sonos shuffle mode

* Fix test
2018-10-03 14:50:13 +02:00
Pascal Vizeli
704c9d8582 Add support for Hass.io discovery feature for Add-ons (#17035)
* Update handler.py

* Update __init__.py

* Update handler.py

* Update __init__.py

* Create discovery.py

* Update handler.py

* Update discovery.py

* Update __init__.py

* Update discovery.py

* Update discovery.py

* Update discovery.py

* Update struct

* Update handler.py

* Update discovery.py

* Update discovery.py

* Update discovery.py

* Update __init__.py

* Update discovery.py

* Update discovery.py

* Update discovery.py

* Update discovery.py

* Update discovery.py

* Update discovery.py

* Update discovery.py

* Update discovery.py

* Update __init__.py

* Update discovery.py

* fix lint

* Update discovery.py

* cleanup old discovery

* Update discovery.py

* Update discovery.py

* Fix lint

* Fix tests

* Write more tests with new functions

* Update test_handler.py

* Create test_discovery.py

* Update conftest.py

* Update test_discovery.py

* Update conftest.py

* Update test_discovery.py

* Update conftest.py

* Update test_discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Update test_discovery.py

* Fix test

* Add test

* fix lint

* Update handler.py

* Update discovery.py

* Update test_discovery.py

* fix lint

* Lint
2018-10-03 13:10:38 +02:00
David Peterson
2e5eb4d9dc Add optional headers configuration for scrape (#17085) 2018-10-03 12:47:38 +02:00
Steven Looman
5d693277f0 Fix stale docstrings 2018-10-03 11:27:38 +02:00
Steven Looman
3cb20c7b4d Changes after review by @MartinHjelmare 2018-10-03 11:08:32 +02:00
Paulus Schoutsen
4210835dcd Async response all the things (#17073)
* Use async_response

* Update device_registry.py
2018-10-03 07:53:54 +02:00
Dan Cinnamon
15a160a630 Bump pyenvisalink (#17086) 2018-10-03 06:28:08 +02:00
Kevin Fronczak
c78850a983 Overhaul of Blink platform (#16942)
* Using new methods for blink camera

- Refactored blink platform (breaking change)
- Camera needs to be uniquely enabled in config from now on
- Added motion detection enable/disable to camera platform

* Fix motion detection

- bumped blinkpy to 0.8.1
- Added wifi strength sensor

* Added platform schema to sensor

- Added global variables for brand and attribution to main platform

* Removed blink binary sensor

* Add alarm control panel

* Fixed dependency, added alarm_home

* Update requirements

* Fix lint errors

* Updated throttle times

* Add trigger_camera service (replaced snap_picture)

* Add refresh after camera trigger

* Update blinkpy version

* Wait for valid camera response before returning image

- Motion detection now working!

* Updated for new blinkpy 0.9.0

* Add refresh control and other fixes for new blinkpy release

* Add save video service

* Pushing to force bot to update

* Changed based on first review

- Pass blink as BLINK_DATA instead of DOMAIN
- Remove alarm_arm_home from alarm_control_panel
- Re-add discovery with schema for sensors/binar_sensors
- Change motion_detected to a binary_sensor
- Added camera_armed binary sensor
- Update camera device_state_attributes rather than state_attributes

* Moved blink.py to own folder. Added service hints.

* Updated coveragerc to reflect previous change

* Register services with DOMAIN

- Change device add for loop order in binary_sensor

* Fix lint error

* services.async_register -> services.register
2018-10-03 04:17:14 +02:00
Fabian Affolter
8e3a70e568 Upgrade youtube_dl to 2018.09.26 (#17079) 2018-10-02 22:31:59 +02:00
Thomas Lovén
06340c9875 Allow no movement in vamera.onvif_ptz service (#17065) 2018-10-02 14:36:28 +02:00
Paulus Schoutsen
31dd327c59 Catch possible errors from tradfri (#17068)
* Catch possible errors from tradfri

* Update config_flow.py
2018-10-02 14:35:43 +02:00
Paulus Schoutsen
38e2926a48 Update translations 2018-10-02 14:33:47 +02:00
Paulus Schoutsen
19722a0ef8 bump frontend to 20181002.0 2018-10-02 14:33:30 +02:00
Paulus Schoutsen
a6f8c3f662 Add logging to light updates (#17069) 2018-10-02 13:33:16 +02:00
Thomas Lovén
11d5671ee0 De-syncing binary_sensor.ping (#17056)
* Quick and dirty asyncing of binary_sensor.ping

* Minor changes
2018-10-02 11:43:34 +02:00
Paulus Schoutsen
20601cfc2d Merge branch 'master' into dev 2018-10-02 11:19:25 +02:00
Paulus Schoutsen
07972c84a1 Merge pull request #17067 from home-assistant/rc
0.79.3
2018-10-02 11:17:14 +02:00
cdce8p
7f0a50ce31 async_create_task (#17059)
* async_create_task

* Update google.py
2018-10-02 11:03:09 +02:00
Paulus Schoutsen
03845ef490 Lint 2018-10-02 10:35:15 +02:00
Paulus Schoutsen
37706c2731 Lint 2018-10-02 10:35:00 +02:00
Aaron Bach
71e3047f5c OpenUV: Fixed issue with missing protection window data (#17051) 2018-10-02 10:34:12 +02:00
Charles Garwood
0954eefa9f MJPEG Camera Log Filter Fixes (#17050)
* Move filter to setup platform

* pylint
2018-10-02 10:24:44 +02:00
cdce8p
90f71261c5 Remove service helper (8) (#17055)
* Updated keyboard

* Updated microsoft_face

* Updated ffmpeg

* Updated logger

* Updated components/__init__.py
2018-10-02 10:23:37 +02:00
Malte Franken
13af61e103 GeoRSS events sensor refactored (#16939)
* refactored geo_rss_events sensor to make use of new georss-client library that handles the communication with the rss feed

* fixed lint error
2018-10-02 10:20:51 +02:00
Nicko van Someren
b0b3620b2b Added working support for private storage (#16903)
* Fixed file corruption bugs in private storage code.

* Restoring fixed test case.

* Implemented test suite for utils/json.py

* Added new unit test cases for util/json.py

* Dixed formatting nags

* Fixed more nags from the Hound

* Added doc strings to some very short functions

* Fixing lint's complains about my choice of parts of speach. Sigh.

* Moved atomic save operations down into util/json.py so that all benefit.

Added extra clean-up code to ensure that temporary files are removed in
case of errors.
Updated emulated_hue unit tests to avoid errors.

* Apparently 'e' is not allows as a variable name for an exception...
2018-10-02 10:16:43 +02:00
Paulus Schoutsen
e07b6dfe0b Bumped version to 0.79.3 2018-10-02 09:57:01 +02:00
Paulus Schoutsen
3f5018459f Proactor policy fix (#17066)
* Proactor policy fix

* Backport Proactor policy for <py37
2018-10-02 09:56:54 +02:00
Jason Hu
2feab82396 Use Protractor loop in Windows (#17061)
* Use Protractor loop in Windows

* Add import sys
2018-10-02 09:56:53 +02:00
Paulus Schoutsen
1decba0052 Proactor policy fix (#17066)
* Proactor policy fix

* Backport Proactor policy for <py37
2018-10-02 09:55:37 +02:00
Jason Hu
1667481342 Use Protractor loop in Windows (#17061)
* Use Protractor loop in Windows

* Add import sys
2018-10-02 09:21:02 +02:00
Mathieu Velten
8e276295eb Update pynetgear to 0.4.2 (fix #14752) (#17064) 2018-10-02 09:14:07 +02:00
Sean Wilson
284d4d49c7 Add AquaLogic component (#16763)
* Add missing ups.status states.

* Add missing DISCHRG state.

* AquaLogic work-in-progress

* - Fix dependencies
- Switch updates

* Add support for aqualogic 0.8 features.

* Remove debugging.

* Switch to async updates rather than using polling.

* Rebase

* Fix lint errors

* Fix lint errors

* Fix lint errors

* Fix lint errors

* Fix lint errors.

* Bump aqualogic version to 0.11

* Update .coveragerc

* Remove integration-specific I/O

* Resolve code review issues.

* Fixed init() call.
2018-10-02 07:32:03 +02:00
cdce8p
c3eff5773b Remove alert service helper (#17038) 2018-10-02 00:33:45 +02:00
Daniel Perna
4d471622f6 Update pyhomematic to 0.1.50 (#17048) 2018-10-02 00:02:59 +02:00
SNoof85
90f2990b9e Support code 7 (#17047) 2018-10-01 22:18:56 +02:00
Charles Garwood
b197b8bab3 Suppress urllib3 header parsing error (#17042) 2018-10-01 20:39:40 +02:00
Fabian Affolter
a148f3e2a9 Mind the unit system (fixes #16819) (#16823) 2018-10-01 20:38:41 +02:00
Steven Looman
d732f8eca2 Changes after review by @MartinHjelmare 2018-10-01 19:26:43 +02:00
Nikolay Vasilchuk
b0c1c37cd5 Fix long update 'load_power' and 'in_use' for Xiaomi Zegbee Plug (#16915) 2018-10-01 18:00:48 +02:00
Anders Melchiorsen
4c36ffd0ef Remove error logging when Sonos shuffle_set is not available (#16921)
Error on set_shuffle with UPnP Error 712 received: Play mode not supported from 10.23.2.16
2018-10-01 17:58:04 +02:00
Paulus Schoutsen
fbc1c41673 Logbook context (#16937)
* Convert logbook to use attr

* Add context to events

* Enhance logbook

* Lint

* Fix logbook entry

* Don't use intermediary classes for logbook entries
2018-10-01 16:12:25 +02:00
Paulus Schoutsen
2e6346ca43 Break up websocket 2 (#17028)
* Break up websocket 2

* Lint+Test

* Lintttt

* Rename
2018-10-01 16:09:31 +02:00
Paulus Schoutsen
122e21a3c4 Merge pull request #17041 from home-assistant/rc
0.79.2
2018-10-01 15:50:25 +02:00
Paulus Schoutsen
33a54043e9 Bumped version to 0.79.2 2018-10-01 15:08:56 +02:00
Rohan Kapoor
d09ee8ac82 Fix switch.zoneminder name (#17026) 2018-10-01 15:08:50 +02:00
Paulus Schoutsen
1ca2e5226b Fix MQTT certificates (#16999) 2018-10-01 15:08:50 +02:00
cdce8p
b5e3d8c337 Async syntax (#17033)
* async-syntax-mqtt_room

* async-syntax-alert

* Additional fixes
2018-10-01 14:44:11 +02:00
Josh Anderson
f0fbdd6a26 Send headers with REST switch GET request (#17036) 2018-10-01 14:43:54 +02:00
cdce8p
e5c0e4336d Update coverage to exclude not tested file (#17039) 2018-10-01 14:41:35 +02:00
Paulus Schoutsen
c69a790ede Add Hass.io discovery to MQTT (#16962)
* Add Hass.io discovery to MQTT

* Update en.json

* Update __init__.py

* Update config_flow.py

* Update strings.json

* Update test_config_flow.py

* Lint

* Ensure we don't send bad data in config entry
2018-10-01 14:11:21 +02:00
David De Sloovere
5bc2e78ab4 Bump Enphase_Envoy dependency for older models (#17032) 2018-10-01 14:10:32 +02:00
Heiko Thiery
68bda1c732 Add new device attributes to fritzbox climate (#17027)
* Add new device attributes to fritzbox climate

With Fitz!OS 7 new parameters are introduced.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* update requirements

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
2018-10-01 12:53:25 +02:00
Timmo
3137099348 🔨 update errors (#17029) 2018-10-01 12:51:39 +02:00
Paulus Schoutsen
22a80cf733 Break up websocket component (#17003)
* Break up websocket component

* Lint
2018-10-01 11:21:00 +02:00
Fabian Affolter
9edf1e5151 Upgrade locationsharinglib to 3.0.3 (#17010)
* Upgrade locationsharinglib to 3.0.3

* Revert change from #16969
2018-10-01 10:55:16 +02:00
Rohan Kapoor
6159f8b0ce Fix switch.zoneminder name (#17026) 2018-10-01 10:53:20 +02:00
Ville Skyttä
d4cde2bfbf Upgrade huawei-lte-api to 1.0.16 (#16972) 2018-10-01 10:52:49 +02:00
Otto Winter
760f822dce Fix MQTT discovery (#17004) 2018-10-01 09:01:40 +02:00
cdce8p
b24f9f5dfa Async syntax 3/8 (#17017)
* Async syntax 3, device_tracker & fan & hassio & image_processing & input

* Pylint fixes
2018-10-01 08:59:45 +02:00
cdce8p
134eeecd65 Async syntax 4/8 (#17018)
* Async syntax 4, media_player & notify

* Pylint fixes
2018-10-01 08:58:21 +02:00
cdce8p
3b5e5cbcd6 Async syntax 5, light & lock & remote & scene & telegram & helpers (#17019) 2018-10-01 08:56:50 +02:00
cdce8p
9e4c8f45d6 Async syntax 6, sensor (#17020) 2018-10-01 08:55:43 +02:00
cdce8p
121dba659c Async syntax 7, switch & tts & vacuum (#17021) 2018-10-01 08:55:00 +02:00
cdce8p
9aaf11de8c Async syntax 8/8 (#17022)
* Async syntax 8

* Pylint fixes
2018-10-01 08:52:42 +02:00
Charles Garwood
ea7b1e4573 Update Z-Wave service descriptions to point to proper log file (#17024) 2018-10-01 08:50:32 +02:00
cdce8p
8444b9ba03 Async syntax 2, camera & climate & config (#17016) 2018-10-01 08:50:05 +02:00
cdce8p
38e371c5d9 Async syntax 1, alarm_control_panel & automation & binary_sensor (#17015) 2018-10-01 08:49:19 +02:00
sander76
750c96709e Homematic cloud device update fix (#17001) 2018-09-30 22:39:25 +02:00
Patrik
940d5fb2ee Add basic support for Tradfri switches (#17007)
* Initial commit

* Sockets have been moved to separate component

* Sockets have been moved to separate component

* Fix const PLATFORM_SCHEMA

* Fix unique id

* Fix async_create_task

* Fix PLATFORM_SCHEMA

* Fix typo

* Remove pylint disable
2018-09-30 22:22:07 +02:00
Paulus Schoutsen
0a2b266742 Fix MQTT certificates (#16999) 2018-09-30 21:36:27 +02:00
Steven Looman
f511920a04 Merge remote-tracking branch 'upstream/dev' into igd 2018-09-30 20:22:10 +02:00
Totoo
1b7bfec247 Google Maps supports battery level and charging. (#16969)
* Google Maps supports battery level and charging.

With 3.0.2 locationsharinglib now the battery level and the charging attributes are available.

* Update google_maps.py

fix too long line error

* Update google_maps.py

Fix multi line import, and line length limit

* Update gen_requirements_all.py

Add locationsharinglib to gen_requirements_all

* update requirements_all

* Last try to fix requirements_all...
2018-09-30 15:17:39 +02:00
Paulus Schoutsen
f5632a5da5 Add webhook + IFTTT example (#16817)
* Add webhook + IFTTT example

* Abort if not externally accessible

* Abort on local url

* Add description to create entry

* Make body optional

* Allow ifttt setup without config

* Add tests

* Lint

* Fix Lint + Tests

* Fix typing
2018-09-30 14:45:48 +02:00
Paulus Schoutsen
1e28c752e1 Merge pull request #16988 from home-assistant/rc
0.79.1
2018-09-30 13:31:29 +02:00
Paulus Schoutsen
677714ecab Bumped version to 0.79.1 2018-09-30 10:22:49 +02:00
Rohan Kapoor
e2aadc3227 Bump zm-py to 0.0.4 (#16979) 2018-09-30 10:22:42 +02:00
Greg Laabs
c45b240026 Fix ISY blocking bug (#16978)
This fix results in `is_on` returning False if the state is unknown (which was a bug in 0.79).
2018-09-30 10:22:42 +02:00
Jason Hu
32d652884b Override unique_id of NestActivityZoneSensor (#16961) 2018-09-30 10:22:41 +02:00
Anders Melchiorsen
3528f8e647 Fix exception during history_stats startup (#16932)
* Fix exception during history_stats startup

* Do not track changes during startup

* Ignore args
2018-09-30 10:22:41 +02:00
Jason Hu
3e6cf8f59f Optimize Ring Sensors platform setup (#16886) 2018-09-30 10:22:41 +02:00
Ville Skyttä
06d959ed43 Upgrade pytest to 3.8.1 (#16980) 2018-09-30 10:20:10 +02:00
Greg Laabs
7f47d601f1 Fix ISY blocking bug (#16978)
This fix results in `is_on` returning False if the state is unknown (which was a bug in 0.79).
2018-09-30 09:21:27 +02:00
Rohan Kapoor
8b1bdda0fa Bump zm-py to 0.0.4 (#16979) 2018-09-30 09:21:07 +02:00
Otto Winter
70ce9bb7bc Add pressure sensor device class (#16965)
* Add pressure sensor device class

* Undo github desktop line exclude
2018-09-29 22:01:04 +02:00
Otto Winter
45fdda3f5d Add unique_id to MQTT fan (#16949) 2018-09-29 21:22:57 +02:00
Anders Melchiorsen
caaf4f5694 Fix exception during history_stats startup (#16932)
* Fix exception during history_stats startup

* Do not track changes during startup

* Ignore args
2018-09-29 21:22:24 +02:00
Otto Winter
3ddad83a84 Add unique_id to MQTT cover (#16950)
* Add unique_id to MQTT cover

* Fix tests
2018-09-29 20:54:57 +02:00
Otto Winter
35b6064581 Convert fan component to config entry (#16951)
* Conver fan component to config entry

* Lint
2018-09-29 20:53:48 +02:00
Jason Hu
c600d28b6a Override unique_id of NestActivityZoneSensor (#16961) 2018-09-29 20:53:02 +02:00
Diogo Gomes
909c3bdd63 Merge pull request #16954 from abmantis/patch-2
Adds @abmantis to CODEOWNERS
2018-09-28 23:05:59 +01:00
Abílio Costa
4b8c38819e Add myself to CODEOWNERS 2018-09-28 22:47:29 +01:00
Jan van Helvoort
7d1960baba Add zwave.network_complete_some_dead event (#16894)
* Add zwave.network_complete_some_dead event

* add missing comma

* typo

* Add SIGNAL_AWAKE_NODES_QUERIED_SOME_DEAD Test

* Add blank lines

* fix linter warnings

Line too long

* remove trailing whitespace

* Change test signal

* Listen to other event
2018-09-28 19:14:57 +02:00
Otto Winter
af89e7c50f Move more MQTT platforms to config entries (#16918)
* Move more MQTT platforms to config entries

* Address comments
2018-09-28 16:57:17 +02:00
Paulus Schoutsen
c93879074b Merge pull request #16940 from home-assistant/rc
0.79.0
2018-09-28 16:51:25 +02:00
Paulus Schoutsen
f476d781ec Version bump to 0.79.0 2018-09-28 15:28:24 +02:00
Anders Melchiorsen
720b05c301 Fix race between script delay and turn_off (#16923) 2018-09-27 22:08:09 -06:00
Otto Winter
c9b6567265 Remove discovered mqtt_json light entity when discovery is cleared (#16906)
* Remove discovered mqtt_json entity device when discovery topic is cleared

* Keep imports ordered
2018-09-28 00:25:51 +02:00
Greg Laabs
9abdbf3db6 Rachio component modernization (#16911)
Add `unique_id` to all rachio entities
Add platform discovery to rachio component
Move config options from switch.rachio platform to the rachio component
2018-09-27 23:17:15 +02:00
cdce8p
f879ac0993 Remove service helper (6) (#16920)
* Update automation

* Update group

* Async_create_task
2018-09-27 23:14:09 +02:00
cdce8p
70b901017f Remove service helper (5) (#16917)
* Update switch

* Update script

* Update light

* Fix tests

* Fix config/script hook

* Async_create_task

* Fix flux switch
2018-09-27 23:13:11 +02:00
Paulus Schoutsen
7bfe0e1c00 Bumped version to 0.79.0b3 2018-09-27 23:10:42 +02:00
Paulus Schoutsen
fb39641eef Handle exception handling websocket command (#16927)
* Handle exception handling websocket command

* lint

* Lint2
2018-09-27 23:10:36 +02:00
Paulus Schoutsen
b7e03f6973 Prevent discovered Tradfri while already configured (#16891)
* Prevent discovered Tradfri while already configured

* Lint
2018-09-27 23:10:35 +02:00
Charles Garwood
7597e30efb Add unique_id to Nest Sensors (#16869)
* Add unique_id

* Add device_info

* Fix typo

* Update __init__.py
2018-09-27 23:10:35 +02:00
Paulus Schoutsen
a7248d4574 Handle exception handling websocket command (#16927)
* Handle exception handling websocket command

* lint

* Lint2
2018-09-27 23:10:07 +02:00
Paulus Schoutsen
51dbc988f9 Update translations 2018-09-27 23:08:04 +02:00
Paulus Schoutsen
71333a15f7 Bump frontend to 20180927.0 2018-09-27 23:08:04 +02:00
Paulus Schoutsen
bac71d3d22 Update translations 2018-09-27 23:04:28 +02:00
Paulus Schoutsen
d77e88645e Bump frontend to 20180927.0 2018-09-27 23:04:03 +02:00
Otto Winter
2d104f95d7 Fix MQTT Config Entry Discovery (#16919) 2018-09-27 22:56:04 +02:00
Paulus Schoutsen
81e21b90c9 Fix auth redirect (#16914)
* Fix auth redirect

* Remove old test
2018-09-27 09:02:50 -07:00
Otto Winter
d1ad2cc225 Make MQTT platforms config entries (#16904)
* Make MQTT platforms config entries

* Fix tests

* Address Comment

* Rework tests

* Undo style auto-reformat style changes
2018-09-27 16:07:56 +02:00
zxdavb
8d65230a36 Add (EU-based) Honeywell evohome CH/DHW controller (#16427)
* Add support for Honeywell evohome CH/DHW systems

More flake8 corrections

Passes Flake8 tests

Almost passed flake8.pylint!

Passed all tox tests

Now it needs serious testing!

Almost ready to submit

BUGFIX: DHW state now functional

More improvements to available()

Solved the DHW temp units problem!

Last minute bug squash

to improve dicts merge

Trying to rebase

fixing more rbase errors

revert to creating HTTP_error_code internally for now

ready to submit PR

Added support for Honeywell evohome CH/DHW systems

* Updated requirements_test_all.txt

* Fix: D401 First line should be in imperative mood

* Remove _LOGGER.info (replace with _LOGGER.debug)

* raise PlatformNotReady when RequestException during setup()

* Revert some LOGGER.debug to LOGGER.warning

* Improved logging levels, and removed some unwanted comments

* Improvments to logging - additional self._status info

* BUGFIX: DHW wrongly showing available = False (and some other tweaks)

* Fix trailing whitespace

* Remove state_attributes override and API_VER code

* Removed heating zones, DHW and heuristics to reduce # lines of code

* Removed some more lines of code

* Removed unused configuration parameters

* Remove some more un-needed lines

* Removed more (uneeded) lines of code & fixed two minor typos

* Improvements to debug logging of available() = False

* Improvements to code, and code clean-up

* Corrected a minor typo

* A small tidy up

* reduces precision of emulated temps floats to 0.1

* Some code improvements as suggested by JeardM

* Rewrite of exception handler

* Removed another unwanted logging in properties

* Remove async_ version of various methods

* moved available heuristics to update()

* Cleanup of code, and re-work linter hints

* fixed a minor documentation typo

* scan_interval is now no longer a configurable option

* Change from Master/Slave to Parent/Child

* Removed the last of the slaves

* Removed the last of the masters

* Move -PARALLEL_UPDATES to .\climate\evohome.py'

* main code moved to climate/evohome.py

* merge EvoEntity into EvoController class

* remove should_poll (for now)

* woops! left a hint in

* removed icon

* only log a WARNING the first time available = False

* cleanup dodgy exception handling

* Tidy up exception handling

* Many changes as suggested by @MartinHjelmare, thanks

* remove hass from init, part 1

* use async_added_to_hass instead of dispatcher_connect

* remove hass from init, part 2 (done)

* add 1-2 arrays, and tidied up some comments

* from dispatcher to async_added_to_hass

* cleaned up some logging, and removed others

* Many changes as request by @MartinHjelmare

* Homage to the lint

* Changed to the HA of doing operating_mode

* Now using update_before_add=True

* reduced logging further still...

* fixed minor lint

* fix a small logic error

* Add device_state_attributes to track actual operating mode

* Clean up doc quotes caused by  previous changes

* Woops! removed some debug lines that shoudln't have stayed in

* Add a complete set of device_state_attributes

* Cleanup some constants

* Remove more legacy code

* domain_data to evo_data & this else should be a finally

* minor change for readability

* Minor change for readability #2

* removed unused code

* small tidy up - no code changes

* fix minor lint

* Correct URLs & descriptions in docstring

* whoops - fixed a typo in docstrings

* remove an unused line of cide & a small tidy-up
2018-09-27 13:29:44 +02:00
Blake Blackshear
2cc6263092 Add new services for set/refresh Z-Wave device values (#16638)
* Add services for getting and setting indicator values for Z-Wave

* Add service to manually refresh Z-Wave node value by value_id

* Remove refresh_indicator service

* Coerce to int

* Add generic set_node_value service

* Remove set_indicator service
2018-09-27 12:34:42 +02:00
emontnemery
ad79dc673d MQTT Light - Do not throw if property is missing from templated MQTT message (#16720)
* Do not throw if property is missing

* Render template once, add debug prints
2018-09-27 11:48:52 +02:00
Paulus Schoutsen
da3342f1aa Update new values coming in for dev registry (#16852)
* Update new values coming in for dev registry

* fix Lint+Test;2C
2018-09-27 11:26:58 +02:00
Anders Melchiorsen
29db43edb2 Ignore Xiaomi hub callbacks during setup (#16910) 2018-09-27 09:44:19 +02:00
Anders Melchiorsen
24e9c62fe7 Upgrade pysonos to 0.0.3 (#16901)
This version has downgraded/removed some logging that we then no
longer have to hide.
2018-09-27 01:09:30 +02:00
Anders Melchiorsen
81d4338b93 Upgrade aiolifx_effects to 0.2.0 (#16900) 2018-09-27 01:08:20 +02:00
Jason Hu
96e5acda1a Optimize Ring Sensors platform setup (#16886) 2018-09-26 15:38:13 -07:00
Anders Melchiorsen
726cf9b1c4 Remove unused import (#16909)
* Remove unused import

* Revert test usage
2018-09-27 00:21:29 +02:00
Paulus Schoutsen
631ecf578e Lint 2018-09-26 23:48:55 +02:00
Paulus Schoutsen
273a7af330 Prevent discovered Tradfri while already configured (#16891)
* Prevent discovered Tradfri while already configured

* Lint
2018-09-26 18:03:25 +02:00
cdce8p
4b674b1d16 Remove unused legacy test helper methods (#16893) 2018-09-26 18:03:13 +02:00
cdce8p
dd45e99302 Remove service helper (4) (#16892)
* Update media_player

* Update lock

* Update notify

* Update remote

* Update scene

* Update vacuum

* Remove timer helpers

* Removed unused legacy helpers
2018-09-26 18:02:05 +02:00
Paulus Schoutsen
d0ddc28f96 Revert file mode write_json (#16897) 2018-09-26 17:58:44 +02:00
Paulus Schoutsen
9ab8f78b19 Don't pass use_env=True (#16896) 2018-09-26 17:20:34 +02:00
Paulus Schoutsen
732009c668 Update translations 2018-09-26 15:39:20 +02:00
Paulus Schoutsen
d20e0f5c95 Update frontend to 20180926.0 2018-09-26 15:39:20 +02:00
cgtobi
98a4b1e9ac Update language strings (#16884) 2018-09-26 13:07:43 +02:00
Nikolay Vasilchuk
917df1af00 Telegram_bot polling support proxy_url and proxy_params (Fix #15746) (#16740)
* Telegram bot polling proxy support

* CI fix

* houndci-bot review fix

* houndci-bot review fix

* CI fix

* Review

* Update polling.py
2018-09-26 11:59:37 +02:00
Blake Blackshear
f13f723a04 Add bitwise operations as template helpers (#16833) 2018-09-26 11:57:16 +02:00
Paulus Schoutsen
7b68f344e3 Bumped version to 0.79.0b2 2018-09-26 11:21:22 +02:00
Paulus Schoutsen
824e59499f Make ring sync again (#16866) 2018-09-26 11:21:10 +02:00
Paulus Schoutsen
ff9377d1d9 Fix MQTT discovery (#16864)
* Fix MQTT discovery

* Update __init__.py
2018-09-26 11:21:09 +02:00
Charles Garwood
cf0d0fb33e Device Registry Support for iOS Sensors (#16862)
* Add device_info property to iOS sensors for device registry

* Remove unused logger import

* Fix spacing

* lint

* Lint
2018-09-26 11:21:09 +02:00
Jason Hu
75c372021d Fix example for long-lived access token WS API (#16882) 2018-09-26 11:20:48 +02:00
Paulus Schoutsen
3aaf619fc3 Update translations 2018-09-26 11:20:07 +02:00
Paulus Schoutsen
e375b63902 Update frontend to 20180926.0 2018-09-26 11:20:00 +02:00
Nicko van Someren
e5861241c7 Added support for private storage. (#16878)
* Addded support for private storage.

Include 'private' flag parameters to the Store class and save_json function.
Updated various authentication and onboarding classes to use private stores.
Fixed unit test for emulated_hue which used a mock patch on save_json().

* Fixed Hound formatting issues not detected by local linting.
2018-09-26 10:24:32 +02:00
Paulus Schoutsen
e205092693 Revert incorrect check (#16883) 2018-09-26 10:15:49 +02:00
cdce8p
fa98a27df7 Remove service helper (2) (#16863)
* alarm_control_panel

* automation

* camera

* climate

* counter

* fan

* Add legacy notes

* Fix tests
2018-09-26 09:49:55 +02:00
Paulus Schoutsen
c899875abb Fix MQTT discovery (#16864)
* Fix MQTT discovery

* Update __init__.py
2018-09-26 09:38:50 +02:00
Charles Garwood
bab079f649 Add unique_id to Nest Sensors (#16869)
* Add unique_id

* Add device_info

* Fix typo

* Update __init__.py
2018-09-26 09:19:47 +02:00
Jason Hu
92a5068977 Use HA native OAuth2 flow for google assistant components (#16848)
* Use HA native OAuth2 flow for google assistant components

* Lint

* Force breaking changes

* Fix CONFIG_SCHEMA
2018-09-26 08:57:55 +02:00
Charles Garwood
3cba2e695c Device Registry Support for iOS Sensors (#16862)
* Add device_info property to iOS sensors for device registry

* Remove unused logger import

* Fix spacing

* lint

* Lint
2018-09-26 08:56:23 +02:00
cdce8p
bfa1c55803 Fix fan_init test (#16865)
* Fix fan_init test

* Readd __init__.py
2018-09-26 08:53:24 +02:00
Paulus Schoutsen
ba2b8512c5 Make ring sync again (#16866) 2018-09-26 08:52:22 +02:00
cdce8p
e2a56721d3 Remove service helper (3) (#16879)
* Update duckdns

* Update google_assistant

* Update group

* Update homematic

* Update image_processing

* Update input_boolean

* Update input_number

* Update input_select

* Update input_text
2018-09-26 08:50:05 +02:00
Martin Mois
672fc61bb2 aiohttp.ClientSession gets proxy information from HTTP_PROXY/HTTPS_PROXY (#16874) 2018-09-26 08:43:09 +02:00
Gerard
6490ec87f3 Upgrade to bimmer_connected 0.5.3 (#16877) 2018-09-26 08:24:59 +02:00
Daniel Høyer Iversen
dc102a96a9 Tibber realtime consumption, Tibber pulse (#16870)
* tibber real time data

* Tibber Pulse, realtime consumption

* update lib
2018-09-26 07:49:09 +02:00
cdce8p
b91a061cef Add missing __init__ test files (#16871) 2018-09-25 23:08:37 +02:00
cdce8p
7eaf8640d0 Update cover tests (#16832)
* Update test_group
* Update test_command_line
* Update test_demo
* Update test_mqtt
* Update test_template
* Remove cover service call helpers
2018-09-25 22:32:05 +02:00
Jedmeng
8e311686d0 Add support for Opple light (#16765)
* Add support for Opple light

* Update docstring

* review fix

* review fix

* review fix
2018-09-25 20:49:37 +02:00
Paulus Schoutsen
5a22e7d211 Fail if dirty (#16839)
* Fail if dirty

* Update check_dirty

* Update text

* Fix comment

* Add -e

* Update dirty script
2018-09-25 20:47:51 +02:00
Paulus Schoutsen
7de0e1e39a Add executor job (#16853) 2018-09-25 20:47:22 +02:00
emontnemery
4501bdb4a0 Remove discovered MQTT cover device when discovery topic is cleared (#16857) 2018-09-25 19:32:42 +02:00
emontnemery
4a265f37e0 Remove discovered MQTT fan device when discovery topic is cleared (#16858) 2018-09-25 19:32:31 +02:00
emontnemery
c3f58b8c74 Remove discovered MQTT lock device when discovery topic is cleared (#16859) 2018-09-25 19:32:25 +02:00
emontnemery
422ccc1a28 Remove discovered MQTT sensor device when discovery topic is cleared (#16860) 2018-09-25 19:32:16 +02:00
emontnemery
eb59f2dd3c Move MQTT discovery removal tests to platform test files (#16861) 2018-09-25 19:32:04 +02:00
Paulus Schoutsen
399040de46 Fix files left behind (#16855)
* Light demo test to not write entity registry

* Fix Manual MQTT alarm control panel
2018-09-25 17:19:46 +02:00
emontnemery
0dbfd77402 Remove discovered MQTT climate device when discovery topic is cleared (#16856) 2018-09-25 17:15:39 +02:00
Paulus Schoutsen
61a2d09342 Bumped version to 0.79.0b1 2018-09-25 15:39:42 +02:00
Paulus Schoutsen
345c886dec Add unique ID and device info to Nest camera (#16846)
* Add unique ID and device info to Nest camera

* Remove sw version
2018-09-25 15:39:36 +02:00
Paulus Schoutsen
b9043ef7a7 Allow MQTT discovery (#16842) 2018-09-25 15:39:36 +02:00
Paulus Schoutsen
356040d506 Support old tradfri config format (#16841) 2018-09-25 15:39:35 +02:00
Rohan Kapoor
0431e38aa2 Bump zm-py to 0.0.3 (#16835) 2018-09-25 15:39:34 +02:00
Paulus Schoutsen
4c32ad3b48 Don't warn but info when on dev mode (#16831) 2018-09-25 15:39:33 +02:00
Tommy Jonsson
bc8d323bdd Add image support to hangouts notifications (#16560)
* add image to services.yaml

* add image support

Add image support to hangouts notification.

* fix indents

* fix line length

* Add data schema

forgot schema

* fix linelength

* use is_allowed_path and better file error handling

* elif not else if

* fix logger error

* fixes

* fix travis errors/warnings

* remove trailing whitespace

* fix travis pylint naming

* new async style

* removed unused async_timeout

* change to image_file/url (#3)

* change to image_file/url

* removed whitespace

* forgot to remove unused urlparse import

* image_file/url in service help
2018-09-25 15:04:43 +02:00
Paulus Schoutsen
a1c914dfeb On removal, only unload config entry if loaded (#16844)
* On removal, only unload config entry if loaded

* Fix test
2018-09-25 14:29:13 +02:00
emontnemery
093285f92f Remove discovered MQTT binary_sensor device when discovery topic is cleared (#16826) 2018-09-25 14:25:03 +02:00
Paulus Schoutsen
9ea5afd109 Add unique ID and device info to Nest camera (#16846)
* Add unique ID and device info to Nest camera

* Remove sw version
2018-09-25 13:47:12 +02:00
Daniel Høyer Iversen
01925fdfff change unknown to None in Netatmo public (#16845) 2018-09-25 13:41:29 +02:00
Paulus Schoutsen
7840b1e387 Fix MQTT leaving files behind (#16840) 2018-09-25 12:22:27 +02:00
Paulus Schoutsen
e4898bb05c Allow MQTT discovery (#16842) 2018-09-25 12:22:14 +02:00
Paulus Schoutsen
f4974f58fe Config entry update data (#16843)
* WIP

* Allow updating data of a config entry
2018-09-25 12:21:11 +02:00
Paulus Schoutsen
2b2502c91c Support old tradfri config format (#16841) 2018-09-25 11:57:32 +02:00
Daniel Winks
4a4c07ac1b GitLab-CI sensor integration addition. (#16561)
* Updates to GitLab Sensor

* Updates to GitLab_CI sensor.

* Added GitLab_CI sensor.

* Updated interval to a more appropriate 300 seconds.

* Added GitLab_CI.py to ommitted files.

* Initial refactor to use python-gitlab PyPI module.

* Fixes to dict parsing.

* Updated required packages for GitLab_CI requirements.

* Updates and refactoring to more closely align with Home-Assistant standards.

* Moved import to init, removed unreachable requests exception.

* Removed references to STATE_UNKNOWN and replaced with None

* Removed extra whitespace

* Changed PLATFORM_SCHEMA and renamed add_devices.

Changed PLATFORM_SCHEMA to use SCAN_INTERVAL and add_devices to add_entities

* Added configurable name, changed logger and removed cruft.

* Removed _status to use _state instead, as both held same value.

* Fixed ATTR_BUILD_BRANCH, removed more extraneous cruft.

* Changed required config keys to dict[key] format.

* Removed extraneous CONF_SCAN_INTERVAL as it's already defined.
2018-09-25 11:18:23 +02:00
GP8x
03bce84c32 Add additional Netatmo public data sensors (#16671)
Update deps
2018-09-25 11:14:42 +02:00
Paulus Schoutsen
4f9fc9b39f Don't create entity registry in tests (#16838) 2018-09-25 10:16:30 +02:00
sander76
069b819679 Add unique_id to homematic_cloud (#16828)
* add unique_id

* add docstring and trigger travis
2018-09-25 10:15:03 +02:00
emontnemery
90197b6ec9 Remove discovered MQTT light device when discovery topic is cleared (#16824) 2018-09-25 09:19:04 +02:00
emontnemery
42790d3e97 Remove discovered MQTT alarm_control_panel device when discovery topic is cleared (#16825) 2018-09-25 08:44:14 +02:00
Paulus Schoutsen
e78f4d1b65 Extract lovelace to it's own component (#16816)
* Extract lovelace to it's own component

* Lint

* Update comment

* Lint

* Lint
2018-09-25 08:39:35 +02:00
Rohan Kapoor
354c8f3409 Bump zm-py to 0.0.3 (#16835) 2018-09-25 07:53:35 +02:00
Paulus Schoutsen
579b77ba4c Don't warn but info when on dev mode (#16831) 2018-09-25 07:52:10 +02:00
randellhodges
b52e8525ac Add mode (daily/hourly) to darksky (#16719)
* added daily mode to darksky and wind_bearing, ozone, and visibility

* Removed dew point and pressure until the standard is updated
2018-09-24 18:09:15 +02:00
Paulus Schoutsen
dc75db6376 Bumped version to 0.80.0.dev0 2018-09-24 12:15:47 +02:00
Paulus Schoutsen
7d68ec1110 Merge branch 'dev' into rc 2018-09-24 12:14:43 +02:00
Paulus Schoutsen
c352b6fa59 Version bump to 0.79.0b0 2018-09-24 12:13:52 +02:00
Paulus Schoutsen
0bd94d8b56 Remove unused translation key 2018-09-24 12:02:26 +02:00
Paulus Schoutsen
3e2a9afff0 Another update translations 2018-09-24 12:01:34 +02:00
Paulus Schoutsen
d4b239d1d4 Update translations 2018-09-24 12:01:01 +02:00
Paulus Schoutsen
b2a9e203f2 Update frontend to 20180924.0 2018-09-24 11:58:03 +02:00
Greg Laabs
dc1534c6d1 Fix some unhandled exceptions due to missing null checks (#16812)
Fixed a couple cases that would produce errors when the ISY node status was None or `-inf`.
2018-09-24 11:43:00 +02:00
Robin Clarke
589554ad16 Allow soundtouch to play https content too (#16713) 2018-09-24 11:16:28 +02:00
Ville Skyttä
33d6c99f19 Add Python 3.7 classifier (#16645) 2018-09-24 11:11:24 +02:00
Daniel Høyer Iversen
1f74adae2a Broadlink service name (#16345)
* Broadlink. slugify service name

* style
2018-09-24 11:10:33 +02:00
Jason Hu
7a77951bb4 Add Notify MFA module (#16314)
* Add Notify MFA

* Fix unit test

* Address review comment, change storage implementation

* Add retry limit to mfa module

* Fix loading

* Fix invalaid login log processing

* Typing

* Change default message template

* Change one-time password to 8 digit

* Refactoring to not save secret

* Bug fixing

* Change async_initialize method name to aysnc_initialize_login_mfa_step

* Address some simple fix code review comment
2018-09-24 11:06:50 +02:00
Thomas Lovén
ad47ece5c6 Allow split component definitions in packages (#16177)
* Allow split component definitions in packages

Two different configuration styles are described in
https://www.home-assistant.io/docs/configuration/devices/#style-2-list-each-device-separately

But only one is allowed in packages according to
https://www.home-assistant.io/docs/configuration/packages/

This change allows "Style 2" configuration in packages.

* Added test for split component definition in packages
2018-09-24 10:17:24 +02:00
emontnemery
5ee4718e24 Remove discovered MQTT Switch device when discovery topic is cleared (#16605)
* Remove discovered device when discovery topic is cleared

* Move entity removal away from mqtt discovery

* Move discovery update to mixin class

* Add testcase

* Review comments
2018-09-24 10:11:49 +02:00
Martin Berg
a5cb4e6c2b Use pyspcwebgw for SPC component (#16214)
* Use pyspcwebgw library.

* Support alarm triggering.

* Update requirements.

* Add pyspcwebgw to test reqs.

* Also update script.

* Use dispatcher.

* Address review feedback.
2018-09-24 10:10:10 +02:00
Baptiste Lecocq
4fd2f773ad Add linky sensor (#16468)
* Add linky component

* Update requirements_all.txt

* Add timeout to pylinky requests

* Make linky platform fail fast
2018-09-24 08:09:34 +02:00
Jason Hu
564ad7e22a Rework chromecast fix (#16804)
* Revert changes of #16471, and fix the platform setup issue

* Fix unit test

* Fix

* Fix comment

* Fix test

* Address review comment

* Address review comment
2018-09-23 23:35:07 +02:00
mvn23
329d9dfc06 Improve opentherm_gw state detection (#16809)
Only show the platform in STATE_HEAT when the boiler is actually heating.
2018-09-23 22:16:24 +02:00
Anders Melchiorsen
2258c56d34 Handle netgear_lte connection errors (#16806) 2018-09-23 18:58:09 +02:00
Daniel Shokouhi
e90abf1007 Set botvac state when offline (#16805) 2018-09-23 12:35:18 +02:00
Paul Biester
eaee55175b Add configurable host for bbox routers (#16778)
* Add configurable host for bbox routers

Add configurable host for bbox router running on non-default IP addresses.

* Fix unused import

Fix unused import which also resolves "line too long"

* Fix wrong import order

* Update validation
2018-09-23 10:37:53 +02:00
huangyupeng
539b86e079 Add Tuya cover state (#16709)
* add cover open and close state

* add tuya cover state

* fix pylint

* fix pylint problem
2018-09-23 10:36:33 +02:00
tadly
127395ae8d Upgrade zeroconf to 0.21.3 (#16789) 2018-09-23 09:50:59 +02:00
Greg Laabs
eca1f050cd Bump sucks (Ecovacs) lib to 0.9.3 (#16803)
* Bump sucks (Ecovacs) lib to 0.9.3

Changed code that was in place as a workaround pre-0.9.2. This version bump fixes a few issues.

* Update requirements_all
2018-09-23 09:43:01 +02:00
Rohan Kapoor
0d681b0ba6 Bump zm-py up to 0.0.2 (#16800) 2018-09-23 09:42:11 +02:00
Daniel Shokouhi
94d38a1c6b Bump pybotvac to 0.0.10 (#16799) 2018-09-23 09:41:45 +02:00
Daniel Høyer Iversen
cfd1aec741 Update Tibber lib (#16795) 2018-09-22 18:25:17 +02:00
Daniel Shokouhi
eec6722cf4 Fix return to base logic for neato (#16776) 2018-09-22 11:34:46 +02:00
Paulus Schoutsen
fce275d29c Merge pull request #16787 from home-assistant/rc
0.78.3
2018-09-22 11:20:29 +02:00
Paulus Schoutsen
5eda5f2f7b Bumped version to 0.78.3 2018-09-22 11:18:54 +02:00
edif30
5ab580ab34 Bump gtts-token to 1.1.2 (#16775)
* bump gtts-token to 1.1.2

* bump gtts-token to 1.1.2

* bump gtts-token to 1.1.2
2018-09-22 11:18:47 +02:00
Paulus Schoutsen
5613816476 Fix Windows loop (#16737)
* Fix Windows loop

* Fix windows Ctrl+C

* Move windows restart handler out of setup_and_run_hass
2018-09-22 09:54:37 +02:00
Gerard
e9c7fe184d Upgrade bimmer_connected to 0.5.2 (#16780) 2018-09-22 08:52:57 +02:00
Fabian Affolter
41bb4760f7 Upgrade restrictedpython to 4.0b5 (#16779) 2018-09-21 23:21:00 +02:00
edif30
ee3f17d5c7 Bump gtts-token to 1.1.2 (#16775)
* bump gtts-token to 1.1.2

* bump gtts-token to 1.1.2

* bump gtts-token to 1.1.2
2018-09-21 21:22:27 +02:00
Malte Franken
18d37ff0fd GeoJSON platform (#16610)
* initial version of geojson platform

* unit tests for geo json platform added; smaller bugfixes and code cleanups

* fixing pylint issues

* moved all code accessing the external feed into separate library; refactored platform and tests to work with that new library

* fixing lint

* small refactorings
2018-09-21 21:15:57 +02:00
Robert Svensson
7fe0d8b2f4 deCONZ cover support (#16759)
deCONZ cover platform for Keen vents
2018-09-21 19:59:20 +02:00
Paulus Schoutsen
8b42d0c471 Add confirmation to Cast/Sonos/iOS config entries (#16769)
* Add confirmation to Cast/Sonos/iOS config entries

* Remove redundant code
2018-09-21 16:34:37 +02:00
Giuseppe
213171769d Refactored units and icons for the Dyson sensors (#14550)
* Refactored units and icons for the Dyson sensors

* Adapted unit tests to the new device names and unit of measurements

* Use None as empty unit of measurement

* Unrelated overall improvements following code review

* Adapted tests to new constructors as per previous commit

* Make sure the sensors have their `hass` attribute set in the test environment
2018-09-21 15:55:07 +02:00
Malte Franken
d5813cf167 Make rest sensor and binary sensor more efficient (#14484)
* create binary sensor even if initial update fails

* fixed broken test assertion

* fixed broken test assertion

* avoid fetching resource twice - manually in the setup_platform and then through add_devices

* raising PlatformNotReady instead of creating the sensor if the initial rest call fails; throttling the update to avoid fetching the same resource again immediately after setting up sensor

* rolled back throttling of the rest update call; can still avoid updating the binary sensor's rest resoure twice; fixed tests

* typo
2018-09-21 15:54:50 +02:00
Paulus Schoutsen
3e59ffb33a Add tradfri device info (#16768) 2018-09-21 14:47:52 +02:00
Maciej Bieniek
a0a54dfd5b Add unique_id to mqtt camera (#16569)
* Add unique_id to mqtt camera

* Remove whitespaces

* Add test for unique_id

* Add blank line
2018-09-21 13:09:54 +02:00
cdce8p
3bfe9e757e Add Carbon Monoxide HomeKit Sensor (#16664) 2018-09-21 12:51:02 +02:00
Alexei Chetroi
9fdf123a2f Zha switch schedule update state (#16621)
* switch.zha: Schedule state update.

if turning switch On or Off operation was successful, then schedule
state update

* switch.zha: Update debug logging.
2018-09-21 12:11:23 +02:00
Evan Bruhn
aeaf694552 Add Logi Circle component, camera and sensor platform (#16540)
* Added Logi Circle platform, camera and sensor

* Integrated with Logo Circle API’s feature detection to exclude sensors not supported by device. Added services for recording livestream and taking a snapshot from the livestream.

* Migrated livestream snapshot and recording functionality out of home assistant components and into the logi circle API wrapper. Added services.yaml entries for logi services.

* Added new Logi sensor types, updated to latest version of `logi_circle` and tidy up in preparation for pull request.

- Renamed `logi_set_mode` to `logi_set_config`.
- Live stream recording and snapshot methods now respect whitelisted path configuration.
- Added `streaming_mode` and `speaker_volume` sensors.
- Moved model-specific turn on/off logic to `logi_circle` library.

* Renamed `logi` component domain to `logi_circle`.

* Updates based on PR feedback

* Added timeout of 15s to logi_circle initial setup requests (login and grabbing cameras).
* Added unique ID (uses MAC address for camera platform, MAC address + sensor type for sensor platform).
* Added battery level and battery charging attributes to camera.
* Removed static attributes from device_state_attributes.
* Replaced STATE_UNKNOWN with None, replaced ‘on’ & ‘off’ with STATE_ON and STATE_OFF.
* Removed redundant SCAN_INTERVAL in sensor, removed redundant hass param from async_setup_platform in camera and sensor.
* Style tweaks.

* Replaced `asyncio.wait_for` with `async_timeout` to be consistent with other components.
2018-09-21 12:00:15 +02:00
Rohan Kapoor
3d1c8ee467 Implement support for complex templates in script delays (#16442)
* Implement support for complex templates in script delays

* Swap out dict instead of collections.Mapping
2018-09-21 11:57:01 +02:00
PhracturedBlue
98b92c78c0 Add Call Data Log platform. Mailboxes no longer require media (#16579)
* Add multiple mailbox support

* Fix extraneous debugging

* Add cdr support

* liniting errors

* Mailbox log messages should mostly be debug.  Fix race condition with initializing CDR

* async decorators to async

* Lint fixes

* Typo

* remove unneeded parameter

* Fix variable names

* Fix async calls from worker thread.  Other minor cleanups

* more variable renames
2018-09-21 11:55:12 +02:00
Paulus Schoutsen
df67093441 Fix faulty color temp crashing google (#16758)
* Fix faulty color temp crashing google

* Rename

* Print warning for incorrect color temp
2018-09-21 10:51:46 +02:00
Anders Melchiorsen
c475a876ce Upgrade pysonos to 0.0.2 (#16761) 2018-09-21 09:21:56 +02:00
Robert Svensson
90c18d1c15 deCONZ add via_hub attribute for device registry (#16760)
* deCONZ add via_hub attribute for device registry

* A shorter way to get bridgeid
2018-09-21 09:21:44 +02:00
Anders Melchiorsen
78b6439ee6 Use pysonos for Sonos media player (#16753) 2018-09-20 23:50:11 +02:00
Paulus Schoutsen
092c146eae Add option to disable specific integrations (#16757)
* Add option to disable specific integrations

* Lint
2018-09-20 23:46:51 +02:00
Zoé Bőle
03de658d4d Changed save_on_change to default to False (#16744) 2018-09-20 20:24:01 +02:00
Alexei Chetroi
3ea8c25e1f light.zha: Catch exceptions for all commands. (#16752)
Catch exceptions for all operations which may fail because of device
reachibility
More verbose debug logging on operations
2018-09-20 20:23:09 +02:00
Steven Looman
6e01ea5929 Preserve compatibility with original upnp 2018-09-20 18:15:04 +02:00
Pascal Vizeli
c6ccbed828 Small cleanup for slack (#16743) 2018-09-20 15:14:43 +02:00
Paulus Schoutsen
e58836f99f Add subscription info endpoint (#16727)
* Add subscription info endpoint

* Lint

* Lint

* Make decorator

* Lint
2018-09-20 14:53:13 +02:00
Paulus Schoutsen
874225dd67 Merge branch 'master' into dev 2018-09-20 13:57:35 +02:00
Paulus Schoutsen
fc6cc22b6d Bump frontend to 20180920.0 2018-09-20 13:09:43 +02:00
Fabian Affolter
39ea9a8c90 Upgrade shodan to 1.10.2 (#16736) 2018-09-20 11:34:37 +02:00
Daniel Høyer Iversen
93af3c57ff Avoid calling yr update every second for a minute ones every hour (#16731)
* Avoid calling yr update every second for a minute one every hour

* style
2018-09-20 11:31:05 +02:00
Jason Hu
d1acb0326c Upgrade netdisco to 2.1.0 (#16735) 2018-09-20 11:11:39 +02:00
Fabian Affolter
35005474f8 Upgrade keyring to 15.1.0 (#16734) 2018-09-20 11:11:08 +02:00
Jason Hu
3a45481b5b Handle chromecast CONNECTION_STATUS_DISCONNECTED event (#16732) 2018-09-20 10:48:45 +02:00
Daniel Høyer Iversen
aa7635398a Met.no weather platform (#16582)
* Add met.no weather component

* requirements .coveragerx

* use lib

* style

* style

* renam function to _fetch_data

* Only update once per hour

* style
2018-09-20 10:32:14 +02:00
Fabian Affolter
d3658c4af9 Upgrade zeroconf to 0.21.2 (#16730) 2018-09-20 09:38:35 +02:00
Fabian Affolter
dfe38b4d5a Upgrade youtube_dl to 2018.09.18 (#16729) 2018-09-20 09:37:44 +02:00
Vikram Gorla
fcb84d951e On-demand update of swiss public transport sensor (#16723)
* Sensor values to be updated only when required (only after the train has crossed).
Looking at the documentation on https://transport.opendata.ch/docs.html, delay information is available only on stationboard, so no need to query often if there is no "real"time info.

* Bumping up version of python_opendata_transport to 0.1.4 in order to catch client errors like throttling rejection (HTTP 429)

* pleasing the hound

* bumping python_opendata_transport to 0.1.4
2018-09-20 08:45:16 +02:00
Nikolay Kasyanov
27eede724c Add unique_id to mqtt_json light (#16721)
Applies changes from #16303 to mqtt_json component.
Fixes #16600.
2018-09-20 08:15:17 +02:00
kunago
258beb9cd3 Upgrading librouteros version (#16718) 2018-09-20 07:52:06 +02:00
Charles Garwood
da882672bd Save disabled_by in entity registry (#16699)
* Save disabled_by in entity registry

* Add trailing comma
2018-09-20 00:52:10 +02:00
geekofweek
60dfd68083 MyQ Open State Fix (#16681)
* MyQ Open State Fix

Fixes issues with MyQ reporting an open state

* Update myq.py

* MyQ STATE_OPEN Fix

remove un-needed code
2018-09-19 22:03:47 +02:00
Andreas Oberritter
6e4a6cc069 SnmpSensor: Fix async_update (#16679) (#16716)
Bugfix provided by awarecan.
2018-09-19 22:01:54 +02:00
Paulus Schoutsen
a1c524d372 Config flow tradfri (#16665)
* Fix comments

* Add config flow tests

* Fix Tradfri light tests

* Lint

* Remove import group from config flow

* fix stale comments
2018-09-19 21:21:43 +02:00
Ville Skyttä
3160fa5de8 Make pylint report non-LF linefeeds per the style guidelines (#16601) 2018-09-19 15:51:57 +02:00
Ville Skyttä
d4b7057a3d Use posargs in tox lint env (#16646)
Allows linting specified files or dirs only.
2018-09-19 15:48:04 +02:00
Ville Skyttä
227a1b919b More isort preparations (#16633)
* Adjust config closer to currently established style conventions

* Adjust some imports for better outcome with their comments
2018-09-19 15:40:36 +02:00
Matthias Urlichs
0121e3cb04 Remove usage of "run_until_complete" (#16617)
* De-run_forever()-ization

* Use asyncio.run (or our own implementation on Python <3.7)
* hass.start is only used by tests
* setup_and_run_hass() is now async
* Add "main" async hass.run method
* move SIGINT handling to helpers/signal.py
  * add flag to .run to disable hass's signal handlers
* Teach async_start and async_stop to not step on each other
  (more than necessary)

* shorten over-long lines

* restore missing "import asyncio"

* move run_asyncio to homeassistant.util.async_

* LOGGER: warn => warning

* Add "force" flag to async_stop

only useful for testing

* Add 'attrs==18.2.0' to requirements_all.txt

Required for keeping requirements_test_all.txt in sync, where it is in
turn required to prevent auto-downgrading "attrs" during "pip install"

* Fixes for mypy

* Fix "mock_signal" fixture

* Revert mistaken edit

* Flake8 fixes

* mypy fixes

* pylint fix

* Revert adding attrs== to requirements_test*.txt

solved by using "pip -c"

* Rename "run" to "async_run", as per calling conventions
2018-09-19 15:40:02 +02:00
Paulus Schoutsen
da108f1999 bump frontend to 20180919.0 2018-09-19 15:17:05 +02:00
Pascal Vizeli
d376049a3f Use one regex for Hass.io URL check (#16710) 2018-09-19 12:57:55 +02:00
Ville Skyttä
7f462ba0ec Upgrade mypy to 0.630 (#16674) 2018-09-19 08:58:58 +02:00
Fabien Piuzzi
b7ef4dddb4 Netdata configuration change: Allows multiple elements per group (#16656)
Allows multiple Netdata elements per group
2018-09-19 00:42:09 +02:00
Steven Looman
b72499a949 Fixes after rename 2018-09-18 20:22:33 +02:00
Steven Looman
b770acd9a7 Update requirements_all.txt 2018-09-18 20:21:52 +02:00
Adam Dullage
56b0d2e99f Added support for Starling Bank (#16522)
* Added support for Starling Bank

* Fixing Lint Issues

* Resolving Change Requests

* HTTP Error Handling & Sandbox URL Option

* Update starlingbank Requirement to v1.2

* Minor changes
2018-09-18 15:55:10 +02:00
Maikel Punie
8e7f783da8 Added velbus counter sensors, updated to py-velbus 2.0.20 (#16683) 2018-09-18 15:51:22 +02:00
Fabian Affolter
1913d07c39 Upgrade zeroconf to 0.21.1 (#16687) 2018-09-18 15:49:54 +02:00
Glenn Waters
2a85ed7236 Streamline log messages (#16243) 2018-09-18 15:06:52 +02:00
Fabian Affolter
cba3a5b055 Upgrade paho-mqtt to 1.4.0 (#16688) 2018-09-18 14:59:39 +02:00
Fabian Affolter
d2246d5a4f Fix test 2018-09-18 12:15:55 +02:00
Greg Laabs
72419a1afe Fix Ecovacs vacuums showing "None" for name (#16654)
Was previously checking for a missing key, when should have been checking for the value being None
2018-09-18 08:30:20 +02:00
Fabian Affolter
a7325ebe1f Suppress traceback and log error (#16669) 2018-09-18 07:55:13 +02:00
Aaron Bach
27d50d388f Fixes an AirVisual bug where response data is missing (#16673) 2018-09-17 14:44:18 -06:00
Tsvi Mostovicz
25712f16b3 Jewish calendar sensor (#16393)
* Initial commit for  jewish calendar sensor

* Make check for logging errors into it's own function

* Can't use f-strings as we need to support python3.5

* Implement basic functionality: printing of date

* Update requirements_all.txt

* Allow user to specify date for sensor

* Add hdate to test requirements

* Update to match pull request

* Support date output in hebrew

* Limit languages to english and hebrew

* Add name back to sensor

* Change icon to be calendar-today

* Add multiple sensors

* Fix tests

* Make Hound happy, remove unused imported class

* hdate expects datetime.date not datetime.datetime

* Return sensor name

* Times should be returned as time object, not datetime

* Add myself to codeowners for jewish calendar component

* Return actual reading, not index

* Add more tests. Currently failing.

Will need to update hdate API and version before continuing.

* Fix weekly portion test

* Make all tests pass

* Make travis happy and add a test so it doesnt happen again

* Remove defaults in __init__ method

* Change sensor state variable to local variable in update() method

* Minor changes
2018-09-17 22:43:31 +02:00
Steven Looman
5cb0c92e78 Fix discovery/config entry handlers 2018-09-17 22:25:32 +02:00
Steven Looman
a7a16e4317 Fix tracebacks 2018-09-17 22:15:44 +02:00
Steven Looman
c19665fed4 Rename igd to upnp 2018-09-17 22:10:18 +02:00
Steven Looman
6588dceadd Fix uppercase
Fix translation
2018-09-17 22:09:51 +02:00
Paulus Schoutsen
4b30cbbf3b Update translations 2018-09-17 14:18:20 +02:00
Paulus Schoutsen
41ac2a3c73 Bump frontend to 20180917.0 2018-09-17 14:18:04 +02:00
Paulus Schoutsen
b8257866f5 Clean up device update, add via-hub (#16659)
* Clean up device update, add via-hub

* Test loading/saving data

* Lint

* Add to Hue"

* Lint + tests
2018-09-17 13:39:30 +02:00
Paulus Schoutsen
849a93e0a6 Update translations 2018-09-17 10:48:22 +02:00
damarco
1c251009fe Add zha device entity (#14579)
* Add endpoint entity

* Fix lint error

* Add nwk address as device state attribute

* Change to ZhaDeviceEntity

* Show last_seen only if offline

* Remove obsolete _discover_endpoint_info()
2018-09-17 10:42:21 +02:00
Paulus Schoutsen
201fd4afee Add config entries to connection class (#16618) 2018-09-17 10:12:46 +02:00
Anders Melchiorsen
3e0c6c176a Rework timer delays (#16650)
* Calibrate timer for each tick

* Return of timer out of sync detection
2018-09-17 10:10:50 +02:00
Alexei Chetroi
44fdfdf695 Log raw result of configure_reporting() command. (#16655) 2018-09-17 07:45:44 +02:00
Fabian Affolter
fea1c921fc Fix link to docs (#16652) 2018-09-17 07:45:01 +02:00
Fabian Affolter
5e3e441aa0 Upgrade holidays to 0.9.7 (#16651) 2018-09-17 07:44:23 +02:00
Daniel Perna
a1e6e04a5e Update pyhomematic to 0.1.49 (#16649) 2018-09-16 22:56:01 +02:00
tadly
2002497d09 Upgrade zeroconf to 0.21.0 (#16647) 2018-09-16 22:53:25 +02:00
Daniel Høyer Iversen
baeb791d84 Upgrade Switchmate lib (#16637)
* new version switchmate lib, fix bug, and enable more logging in lib

* new version switchmate lib, fix bug, and enable more logging in lib
2018-09-16 13:58:26 +02:00
Abílio Costa
9c9df793b4 New EDP re:dy component (#16426)
* add new EDP re:dy platform

* lint

* move api code to pypi module; fix lint

* fix lint; remove unused import

* pass aiohttp client session and hass loop to platform

* update requirements_all.txt

* fix docstring lint

* normalize quotes

* use async setup_platform

* improve entities update mechanism

* doc lint

* send update topic only after loading platforms

* lint whitespaces

* mute used-before-assignment pylint false error
2018-09-16 01:17:47 +02:00
Mattias Welponer
05922ac56a Add new devices to HomematicIP Cloud (#16636)
* Add support for outdoor temperature sensor and cleanup

* Add support for rotary handle and water sensor

* Fix comment
2018-09-15 21:28:49 +02:00
Jason Hu
34deaf8849 Add valid_window=1 to TOTP verify (#16625) 2018-09-15 13:28:25 +02:00
Ville Skyttä
cc38981a38 Update developer doc links to developers.home-assistant.io (#16622) 2018-09-15 13:27:37 +02:00
Rohan Kapoor
19514ea500 Clean up MjpegCamera by removing unnused hass object in __init__ (#16628) 2018-09-15 11:26:29 +02:00
Sören Oldag
00918af94d Upgrade pwmled to 1.3.0 (#16624) 2018-09-15 10:08:52 +02:00
Ville Skyttä
e054e4da1b Small huawei_lte improvements (#16626)
* Add bunch of RouterData tests

* Avoid raising AttributeError from RouterData.__getitem__

* Use new style string formatting

* Use {key: value} instead of dict(key=value)
2018-09-15 10:42:36 +03:00
Rohan Kapoor
0c945d81c8 Add @rohankapoorcom to CODEOWNERS for the zoneminder platform (#16627) 2018-09-15 09:25:21 +02:00
Rohan Kapoor
1ca09ea36f Extracting zoneminder to a new library (#16527)
* Migrating out the zoneminder platform (and camera.zoneminder) to a new library

* Clean up the global variable ZM usage

* Modify camera.zoneminder to use the new Monitor class implementation

* Refactor camera.zoneminder after latest refactor in zm-py

* Implementing changes to switch.zoneminder to use zm-py native methods

* Complete migrating over sensor.zoneminder to the zm-py library

* Tweaking ZoneMinder components from code review

* Linting fixes for the zoneminder components

* Directly assign value when turning on/off in switch.zoneminder
2018-09-15 08:44:48 +02:00
Nate Clark
8ce2d701c2 fix bug where momentary switch with activation low does not reset (#16603) 2018-09-14 13:31:41 -06:00
christopheBfr
9c1a539f90 Adding support for RTDSContactSensor and RTDSMotionSensor in Tahoma … (RTS Alarms sensors and contacts for Somfy Protexiom alarms) (#16609)
* Adding support for RTDSContactSensor and RTDSContactSensor in Tahoma component

* Removing extra blank lines
2018-09-14 13:31:08 -06:00
Steven Looman
ca7911ec47 Set ports (hass -> hass) when no ports have been specified 2018-09-14 21:30:08 +02:00
Alexei Chetroi
0d0bda9658 Switch components.sensor.zha to await syntax. (#16619) 2018-09-14 13:29:10 -06:00
Pascal Vizeli
7705666061 Rewrite bluetooth le (#16592)
* Rewrite bluetooth le

* Update requirements_all.txt

* Update gen_requirements_all.py

* Update bluetooth_le_tracker.py

* Update bluetooth_le_tracker.py

* Update bluetooth_le_tracker.py

* Update bluetooth_le_tracker.py

* Update bluetooth_le_tracker.py

* Update bluetooth_le_tracker.py
2018-09-14 13:49:20 +02:00
Anders Melchiorsen
e82e75baf3 Improve precision of timer ticks (#16598) 2018-09-14 12:28:09 +02:00
Fabian Affolter
481f6e09fa Upgrade python-twitch-client to 0.6.0 (#16602) 2018-09-14 12:08:33 +02:00
Paulus Schoutsen
72e746d240 MQTT config entry (#16594)
* MQTT config entry

* Solely rely on config entry

* Improve wawrning

* Lint

* Lint2
2018-09-14 11:57:31 +02:00
Paulus Schoutsen
05c0717167 Add websocket list APIs for the registries (#16597)
* Add websocket list APIs for the registries

* Remove identifiers

* Fix tests

* Use ordered dict
2018-09-14 11:57:18 +02:00
Ville Skyttä
67b5b5bc85 Add myself to CODEOWNERS for upcloud (#16599) 2018-09-14 08:42:23 +02:00
Harvtronix
d076251b18 Changing z-wave brightness calculation to respect 0x01 and 0x02 byte values (#16420)
* Changing z-wave brightness calculation to respect 0x01 and 0x02 byte
values

* adding additional line breaks to satisfy houndci

* - Update comment style for linter
- Add additional unit test to increase code coverage

* Update zwave.py
2018-09-13 10:38:07 -04:00
Ville Skyttä
e59ba28fe6 Add Huawei LTE router platform, device tracker, and sensor (#16498)
* Add Huawei LTE router platform, device tracker, and sensor

* Add myself to CODEOWNERS for huawei_lte
2018-09-13 10:01:28 +02:00
Sergiy Maysak
f63dba5521 Multiple tag managers for Wireless Sensor Tags. (#16353)
* Added support for multiple tag managers. Fixed typo for signal strength.

* Corrected broken merge.

* Fixed flake8/pylint error.

* Improved docstring.
2018-09-13 09:48:17 +02:00
William Scanlon
f43d9ba680 Support for the Quirky Nimbus (#16520)
* Support for quriky nimbu

* Fixed lint

* fixed some typos
2018-09-13 09:35:40 +02:00
Daniel Høyer Iversen
aec134c47a xiaomi lib 0.10.0 (#16591) 2018-09-13 09:26:46 +02:00
Daniel Høyer Iversen
901dd9acca Update tibber lib version (#16590) 2018-09-13 09:23:33 +02:00
Alexei Chetroi
7a52bbdf24 Allow only_cache parameter in zha.safe_read() (#16553)
* Allow only_cache parameter in zha.safe_read()

* Use cache_only for binary_sensor.zha initial update.

* Use cache_only for fan.zha initial update.

* Use cache_only for sensor.zha initial update.

* Use cache_only for switch.zha initial update.

* Use cache_only for light.zha initial update.

* Refactor cached only read in zha platform.
2018-09-13 09:22:50 +02:00
Alexei Chetroi
f2203e52ef Add configure_reporting() method to zha component (#16487)
* Add zha.configure_reporting() method.

Binds a cluster and configures reporting for the specified attribute.

* git add homeassistant/components/binary_sensor/zha.py

* Refactor sensor.zha to use new 'configure_reporting() method.

* Zha configure reporting - switch (#1)

* use configure_reporting for zha switch

* lint fixes

* Rename variables/classes to properly reflect the content
2018-09-13 09:11:47 +02:00
Jason Hu
1586d3000c Fix broken bluetooth tracker (#16589) 2018-09-13 07:52:31 +02:00
Daniel Perna
d0aeb90c22 Update pyhomematic to 0.1.48 (#16588) 2018-09-13 01:04:15 +02:00
Daniel Høyer Iversen
cb542a90eb Switchmate (#16395)
* Switchmate

* switchmate

* swithcmate

* switchmate

* switchmate

* switchmate

* Make switchmate a bit more robust

* style

* style

* style

* Use external lib for switchmate

* add_entities

* Update requirements_all.txt

* unnecessary string format
2018-09-12 21:10:04 +02:00
Paulus Schoutsen
3824582e68 Add config entry to iOS (#16580)
* Add config entry to iOS

* Add translation
2018-09-12 20:17:52 +02:00
Nate Clark
2682d26f79 Konnected component feature updates (#16479)
* add  config option to invert state of binary_sensor

* Add API endpoint to get state of a Konnected switch
2018-09-12 13:54:38 +02:00
Jason Hu
308b7fb385 Add retry limit for chromecast connection (#16471) 2018-09-12 13:42:54 +02:00
Marcel Hoppe
4efe86327d Hangouts help "page" and little bugfix (#16464)
* add 'default_conversations' parameter

* remove the empty message segment at the end of every message

* add 'HangoutsHelp' intent

* add hangouts/intents.py
2018-09-12 13:27:21 +02:00
Jason Hu
ff78a5b04b Track refresh token last usage information (#16408)
* Extend refresh_token to support last_used_at and last_used_by

* Address code review comment

* Remove unused code

* Add it to websocket response

* Fix typing
2018-09-12 13:24:16 +02:00
Paulus Schoutsen
453cbb7c60 Update frontend to 20180912.0 2018-09-12 13:23:50 +02:00
Zoé Bőle
77026a2242 Increasing python-websockets' version number (#16578)
* increasing python-websockets' version number so now it works with python 3.7

* required version for websockets increased to work with Python 3.7

* script/gen_requirements_all.py is done
2018-09-12 12:44:14 +02:00
Alexei Chetroi
501f2b0a93 Update fan.zha platform. (#16551)
* Update fan.zha platform.

switch from asyncio to async def()
catch DeliveryError exceptions
keep previous state, if reading 'fan_mode' attribute fails

* fan.zha: Use None for unknown state.

if we fail to read 'fan_mode' attribute, use None for state
2018-09-12 12:43:06 +02:00
Alexei Chetroi
117ea9e553 Refactor zha/async_device_initialized(). (#16485)
Leverage endpoint.model and endpoint.manufacturer properties
2018-09-12 11:39:23 +02:00
Ville Skyttä
beed82ab12 Upgrade pytest to 3.8.0 and pytest-timeout to 1.3.2 (#16489) 2018-09-12 11:33:26 +02:00
Daniel Perna
601f2df5a7 Notifications for Android TV: Add fontsize and sending images (#16565)
* Add fontsize and image functionality

* woof
2018-09-12 11:22:21 +02:00
Jason Hu
34d369ba26 Return if refresh token is current used one in WS API (#16575) 2018-09-12 09:49:44 +02:00
Daniel Høyer Iversen
e2465da7c2 yr: use async syntax (#16563) 2018-09-12 04:52:01 +02:00
William Scanlon
6bd120ff1d Bump pyeconet (#16571)
* Updated pyeconet to the newest version to deal with econet API change
2018-09-11 21:45:51 -04:00
Aaron Bach
188f5de5ae Fixes an OpenUV bug with the scan interval (#16570) 2018-09-11 17:13:16 -06:00
Paulus Schoutsen
06af76404f Fix invalid state (#16558)
* Fix invalid state

* Make slightly more efficient in unsubscribing

* Use uuid4"
2018-09-11 21:40:35 +02:00
Paulus Schoutsen
629c4a0bf5 Update frontend to 20180911.0 2018-09-11 21:37:38 +02:00
Paulus Schoutsen
3f06b4eb9b Update translations 2018-09-11 21:36:54 +02:00
Paulus Schoutsen
0db13a99aa Add websocket commands for refresh tokens (#16559)
* Add websocket commands for refresh tokens

* Comment
2018-09-11 09:08:03 -07:00
Paulus Schoutsen
4e3faf6108 Fix typo (#16556) 2018-09-11 12:55:05 +02:00
Jason Hu
9583947012 Long-lived access token (#16453)
* Allow create refresh_token with specific access_token_expiration

* Add token_type, client_name and client_icon

* Add unit test

* Add websocket API to create long-lived access token

* Allow URL use as client_id for long-lived access token

* Remove mutate_refresh_token method

* Use client name as id for long_lived_access_token type refresh token

* Minor change

* Do not allow duplicate client name

* Update docstring

* Remove unnecessary `list`
2018-09-11 12:05:15 +02:00
Jerad Meisner
50fb59477a Store notifications in component. Add ws endpoint for fetching. (#16503)
* Store notifications in component. Add ws endpoint for fetching.

* Comments
2018-09-11 11:39:30 +02:00
Diogo Gomes
20f6cb7cc7 Replace api_password in Camera.Push (#16339)
* Use access_token and user provided token instead of api_password

* address comments by @awarecan

* new tests

* add extra checks and test

* lint

* add comment
2018-09-11 11:30:20 +02:00
Zellux Wang
6b08e6e769 Fix arlo intilization when no base station available (#16529)
* Fix arlo intilization when no base station

* Fix pylint for empty camera check

* Fix typo

* Minor change to trigger CI again
2018-09-11 11:25:38 +02:00
Ville Skyttä
ee696643cd Isort preparations (#16555)
* Don't treat typing as an "in-between" module for import order

That was a < 3.5 era thing.

* Tighten scope of some pylint unused-import disables

To avoid isort moving a top level one around, undesirably broadening its
scope.
2018-09-11 11:21:48 +02:00
cgtobi
a059cc860a Update PyRMVtransport version (#16547)
* Update PyRMVtransport version

* Update requirements.
2018-09-11 05:55:02 +02:00
Paulus Schoutsen
cfe5db4350 Fail fetch auth providers if onboarding required (#16454) 2018-09-10 23:51:40 +02:00
Tom Harris
dcd7b9a529 Fix insteon Hub v1 support (#16472)
* Fix support for Hub version 1 (i.e. pre-2014 Hub model 2242)

* Bump insteonplm to 0.14.1

* Code review changes

* Clean up and better document set_default_port

* Simplify set_default_port based on code review

* Remove Callable type import

* Simplify port setup
2018-09-10 16:54:17 +02:00
mrosseel
f858938ada Make the Qnap sensor more resilient if server is not reachable (#16445)
* add CONF_ALLOW_UNREACHABLE option, retry connection if allowed

* fix linting errors

* Removing the config option, just using PlatformNotReady
2018-09-10 16:19:17 +02:00
vikramgorla
e96635b5c1 bugfix - incorrect camera type and missing sensors when multiple netatmo cameras (#16490)
fixed get_camera_type as it was originally not consuming any input, was looping with all cameras and the first camera type was retutned, modified to call cameraType using provided camera name.
2018-09-10 16:13:05 +02:00
Fabian Affolter
d2d715faa8 Upgrade wakeonlan to 1.1.6 (#16512) 2018-09-10 16:07:31 +02:00
Paulus Schoutsen
99f7b7f42d Version bump to 0.79.0dev0 2018-09-10 13:46:07 +02:00
Steven Looman
6433f2e2e3 Working on igd 2018-09-08 00:24:47 +02:00
Steven Looman
f4a54e2483 Changes after review 2018-09-03 21:16:45 +02:00
Steven Looman
85c40d29ee Linting 2018-09-02 17:03:31 +02:00
Steven Looman
a4a175440b Move ensure_domain_data 2018-09-02 16:40:39 +02:00
Steven Looman
8bec4a55d1 Working on igd 2018-09-01 21:20:15 +02:00
Steven Looman
50f63ed4c5 Fix not being able to re-add IGD when removed 2018-09-01 18:13:45 +02:00
Steven Looman
c9e34e236d Prevent error message when component is actually ok 2018-09-01 10:14:21 +02:00
Steven Looman
38318ed15f Ensure config_flow is imported 2018-09-01 10:09:22 +02:00
Steven Looman
553d3c0179 Merge remote-tracking branch 'upstream/dev' into igd 2018-09-01 10:01:12 +02:00
Steven Looman
20879726b0 Working on IGD 2018-08-30 17:41:11 +02:00
Steven Looman
3db766e2ec Merge remote-tracking branch 'upstream/dev' into igd 2018-08-29 21:19:27 +02:00
Steven Looman
1eac6408f5 Working on IGD 2018-08-29 21:19:04 +02:00
Steven Looman
e73f31d829 Merge remote-tracking branch 'upstream/dev' into igd 2018-08-24 15:25:07 +02:00
Steven Looman
839b58c600 Working on IGD 2018-08-17 21:28:29 +02:00
Steven Looman
71d00062e5 Upgrade to async_upnp_client 0.12.4 2018-08-17 21:25:08 +02:00
Steven Looman
80f98b9ea2 Fix message "Updating dlna_dmr media_player took longer than ..." 2018-08-16 22:14:13 +02:00
6870 changed files with 417528 additions and 268233 deletions

272
.circleci/config.yml Normal file
View File

@@ -0,0 +1,272 @@
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2.1
executors:
python:
parameters:
tag:
type: string
default: latest
docker:
- image: circleci/python:<< parameters.tag >>
- image: circleci/buildpack-deps:stretch
working_directory: ~/repo
commands:
docker-prereqs:
description: Set up docker prerequisite requirement
steps:
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends
libudev-dev libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev
libswscale-dev libswresample-dev libavfilter-dev
install-requirements:
description: Set up venv and install requirements python packages with cache support
parameters:
python:
type: string
default: latest
all:
description: pip install -r requirements_all.txt
type: boolean
default: false
test:
description: pip install -r requirements_test.txt
type: boolean
default: false
test_all:
description: pip install -r requirements_test_all.txt
type: boolean
default: false
steps:
- restore_cache:
keys:
- v1-<< parameters.python >>-{{ checksum "homeassistant/package_constraints.txt" }}-<<# parameters.all >>{{ checksum "requirements_all.txt" }}<</ parameters.all>>-<<# parameters.test >>{{ checksum "requirements_test.txt" }}<</ parameters.test>>-<<# parameters.test_all >>{{ checksum "requirements_test_all.txt" }}<</ parameters.test_all>>
- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install -q -U pip
pip install -q -U setuptools
<<# parameters.all >>pip install -q --progress-bar off -r requirements_all.txt -c homeassistant/package_constraints.txt<</ parameters.all>>
<<# parameters.test >>pip install -q --progress-bar off -r requirements_test.txt -c homeassistant/package_constraints.txt<</ parameters.test>>
<<# parameters.test_all >>pip install -q --progress-bar off -r requirements_test_all.txt -c homeassistant/package_constraints.txt<</ parameters.test_all>>
no_output_timeout: 15m
- save_cache:
paths:
- ./venv
key: v1-<< parameters.python >>-{{ checksum "homeassistant/package_constraints.txt" }}-<<# parameters.all >>{{ checksum "requirements_all.txt" }}<</ parameters.all>>-<<# parameters.test >>{{ checksum "requirements_test.txt" }}<</ parameters.test>>-<<# parameters.test_all >>{{ checksum "requirements_test_all.txt" }}<</ parameters.test_all>>
install:
description: Install Home Assistant
steps:
- run:
name: install
command: |
. venv/bin/activate
pip install -q --progress-bar off -e .
jobs:
static-check:
executor:
name: python
tag: 3.5.5-stretch
steps:
- checkout
- docker-prereqs
- install-requirements:
python: 3.5.5-stretch
test: true
- run:
name: run static check
command: |
. venv/bin/activate
flake8 homeassistant tests script
- run:
name: run static type check
command: |
. venv/bin/activate
TYPING_FILES=$(cat mypyrc)
mypy $TYPING_FILES
- install
- run:
name: validate manifests
command: |
. venv/bin/activate
python -m script.hassfest validate
- run:
name: run gen_requirements_all
command: |
. venv/bin/activate
python script/gen_requirements_all.py validate
pre-install-all-requirements:
executor:
name: python
tag: 3.5.5-stretch
steps:
- checkout
- docker-prereqs
- install-requirements:
python: 3.5.5-stretch
all: true
test: true
pylint:
executor:
name: python
tag: 3.5.5-stretch
parallelism: 2
steps:
- checkout
- docker-prereqs
- install-requirements:
python: 3.5.5-stretch
all: true
test: true
- install
- run:
name: run pylint
command: |
. venv/bin/activate
PYFILES=$(circleci tests glob "homeassistant/**/*.py" | circleci tests split)
pylint ${PYFILES}
no_output_timeout: 15m
pre-test:
parameters:
python:
type: string
executor:
name: python
tag: << parameters.python >>
steps:
- checkout
- docker-prereqs
- install-requirements:
python: << parameters.python >>
test_all: true
test:
parameters:
python:
type: string
executor:
name: python
tag: << parameters.python >>
parallelism: 2
steps:
- checkout
- docker-prereqs
- install-requirements:
python: << parameters.python >>
test_all: true
- install
- run:
name: run tests with code coverage
command: |
. venv/bin/activate
CC_SWITCH="--cov --cov-report="
TESTFILES=$(circleci tests glob "tests/**/test_*.py" | circleci tests split --split-by=timings)
pytest --timeout=9 --durations=10 --junitxml=test-reports/homeassistant/results.xml -qq -o junit_family=xunit2 -o junit_suite_name=homeassistant -o console_output_style=count -p no:sugar $CC_SWITCH -- ${TESTFILES}
script/check_dirty
codecov
- store_test_results:
path: test-reports
- store_artifacts:
path: htmlcov
destination: cov-reports
- store_artifacts:
path: test-reports
destination: test-reports
# This job use machine executor, e.g. classic CircleCI VM because we need both lokalise-cli and a Python runtime.
# Classic CircleCI included python 2.7.12 and python 3.5.2 managed by pyenv, the Python version may need change if
# CircleCI changed its VM in future.
upload-translations:
machine: true
steps:
- checkout
- run:
name: upload english translations
command: |
pyenv versions
pyenv global 3.5.2
docker pull lokalise/lokalise-cli@sha256:2198814ebddfda56ee041a4b427521757dd57f75415ea9693696a64c550cef21
script/translations_upload
workflows:
version: 2
build:
jobs:
- static-check
- pre-install-all-requirements:
requires:
- static-check
- pylint:
requires:
- pre-install-all-requirements
- pre-test:
name: pre-test 3.5.5
requires:
- static-check
python: 3.5.5-stretch
- pre-test:
name: pre-test 3.6
requires:
- static-check
python: 3.6-stretch
- pre-test:
name: pre-test 3.7
requires:
- static-check
python: 3.7-stretch
- test:
name: test 3.5.5
requires:
- pre-test 3.5.5
python: 3.5.5-stretch
- test:
name: test 3.6
requires:
- pre-test 3.6
python: 3.6-stretch
- test:
name: test 3.7
requires:
- pre-test 3.7
python: 3.7-stretch
# CircleCI does not allow failure yet
# - test:
# name: test 3.8
# python: 3.8-rc-stretch
- upload-translations:
requires:
- static-check
filters:
branches:
only: dev

16
.codecov.yml Normal file
View File

@@ -0,0 +1,16 @@
codecov:
branch: dev
coverage:
status:
project:
default:
target: 90
threshold: 0.09
notify:
# Notify codecov room in Discord. The webhook URL (encrypted below) ends in /slack which is why we configure a Slack notification.
slack:
default:
url: "secret:TgWDUM4Jw0w7wMJxuxNF/yhSOHglIo1fGwInJnRLEVPy2P2aLimkoK1mtKCowH5TFw+baUXVXT3eAqefbdvIuM8BjRR4aRji95C6CYyD0QHy4N8i7nn1SQkWDPpS8IthYTg07rUDF7s5guurkKv2RrgoCdnnqjAMSzHoExMOF7xUmblMdhBTWJgBpWEhASJy85w/xxjlsE1xoTkzeJu9Q67pTXtRcn+5kb5/vIzPSYg="
comment:
require_changes: yes
branches: master

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,8 @@
<!-- READ THIS FIRST:
- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/home-assistant/releases
- Frontend issues should be submitted to the home-assistant-polymer repository: https://github.com/home-assistant/home-assistant-polymer/issues
- iOS issues should be submitted to the home-assistant-iOS repository: https://github.com/home-assistant/home-assistant-iOS/issues
- Do not report issues for components if you are using custom components: files in <config-dir>/custom_components
- This is for bugs only. Feature and enhancement requests should go in our community forum: https://community.home-assistant.io/c/feature-requests
- Provide as many details as possible. Paste logs, configuration sample and code into the backticks. Do not delete any text from this template!

View File

@@ -7,6 +7,8 @@ about: Create a report to help us improve
<!-- READ THIS FIRST:
- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/home-assistant/releases
- Frontend issues should be submitted to the home-assistant-polymer repository: https://github.com/home-assistant/home-assistant-polymer/issues
- iOS issues should be submitted to the home-assistant-iOS repository: https://github.com/home-assistant/home-assistant-iOS/issues
- Do not report issues for components if you are using custom components: files in <config-dir>/custom_components
- This is for bugs only. Feature and enhancement requests should go in our community forum: https://community.home-assistant.io/c/feature-requests
- Provide as many details as possible. Paste logs, configuration sample and code into the backticks. Do not delete any text from this template!

View File

@@ -1,9 +1,13 @@
## Breaking Change:
<!-- What is breaking and why we have to break it. Remove this section only if it was NOT a breaking change. -->
## Description:
**Related issue (if applicable):** fixes #<home-assistant issue number goes here>
**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#<home-assistant.io PR number goes here>
**Pull request with documentation for [home-assistant.io](https://github.com/home-assistant/home-assistant.io) (if applicable):** home-assistant/home-assistant.io#<home-assistant.io PR number goes here>
## Example entry for `configuration.yaml` (if applicable):
```yaml
@@ -13,18 +17,19 @@
## Checklist:
- [ ] The code change is tested and works locally.
- [ ] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
- [ ] There is no commented out code in this PR.
- [ ] I have followed the [development checklist][dev-checklist]
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)
If the code communicates with devices, web services, or third-party tools:
- [ ] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
- [ ] New dependencies are only imported inside functions that use them ([example][ex-import]).
- [ ] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
- [ ] New files were added to `.coveragerc`.
- [ ] [_The manifest file_][manifest-docs] has all fields filled out correctly. Update and include derived files by running `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt` by running `python3 -m script.gen_requirements_all`.
- [ ] Untested files have been added to `.coveragerc`.
If the code does not interact with devices:
- [ ] Tests have been added to verify that the new code works.
[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L54
[dev-checklist]: https://developers.home-assistant.io/docs/en/development_checklist.html
[manifest-docs]: https://developers.home-assistant.io/docs/en/creating_integration_manifest.html

5
.gitignore vendored
View File

@@ -1,4 +1,5 @@
config/*
config2/*
tests/testing_config/deps
tests/testing_config/home-assistant.log
@@ -55,6 +56,7 @@ pip-log.txt
.tox
nosetests.xml
htmlcov/
test-reports/
# Translations
*.mo
@@ -78,11 +80,12 @@ venv
.venv
Pipfile*
share/*
Scripts/
# vimmy stuff
*.swp
*.swo
tags
ctags.tmp
# vagrant stuff

View File

@@ -1,2 +0,0 @@
[settings]
multi_line_output=4

10
.readthedocs.yml Normal file
View File

@@ -0,0 +1,10 @@
# .readthedocs.yml
build:
image: latest
python:
version: 3.6
setup_py_install: true
requirements_file: requirements_docs.txt

View File

@@ -1,8 +1,18 @@
sudo: false
dist: xenial
addons:
apt:
sources:
- sourceline: "ppa:jonathonf/ffmpeg-4"
packages:
- libudev-dev
- libavformat-dev
- libavcodec-dev
- libavdevice-dev
- libavutil-dev
- libswscale-dev
- libswresample-dev
- libavfilter-dev
matrix:
fast_finish: true
include:
@@ -13,36 +23,11 @@ matrix:
- python: "3.5.3"
env: TOXENV=typing
- python: "3.5.3"
env: TOXENV=cov
after_success: coveralls
- python: "3.6"
env: TOXENV=py36
env: TOXENV=py35
- python: "3.7"
env: TOXENV=py37
dist: xenial
- python: "3.8-dev"
env: TOXENV=py38
dist: xenial
if: branch = dev AND type = push
allow_failures:
- python: "3.8-dev"
env: TOXENV=py38
dist: xenial
cache:
directories:
- $HOME/.cache/pip
install: pip install -U tox coveralls
cache: pip
install: pip install -U tox
language: python
script: travis_wait 30 tox --develop
services:
- docker
before_deploy:
- docker pull lokalise/lokalise-cli@sha256:2198814ebddfda56ee041a4b427521757dd57f75415ea9693696a64c550cef21
deploy:
skip_cleanup: true
provider: script
script: script/travis_deploy
on:
branch: dev
condition: $TOXENV = lint
script: travis_wait 40 tox --develop

View File

@@ -1,125 +1,279 @@
# This file is generated by script/manifest/codeowners.py
# People marked here will be automatically requested for a review
# when the code that they own is touched.
# https://github.com/blog/2392-introducing-code-owners
# Home Assistant Core
setup.py @home-assistant/core
homeassistant/*.py @home-assistant/core
homeassistant/helpers/* @home-assistant/core
homeassistant/util/* @home-assistant/core
homeassistant/components/api.py @home-assistant/core
homeassistant/components/automation/* @home-assistant/core
homeassistant/components/configurator.py @home-assistant/core
homeassistant/components/group.py @home-assistant/core
homeassistant/components/history.py @home-assistant/core
homeassistant/components/http/* @home-assistant/core
homeassistant/components/input_*.py @home-assistant/core
homeassistant/components/introduction.py @home-assistant/core
homeassistant/components/logger.py @home-assistant/core
homeassistant/components/mqtt/* @home-assistant/core
homeassistant/components/panel_custom.py @home-assistant/core
homeassistant/components/panel_iframe.py @home-assistant/core
homeassistant/components/persistent_notification.py @home-assistant/core
homeassistant/components/scene/__init__.py @home-assistant/core
homeassistant/components/scene/hass.py @home-assistant/core
homeassistant/components/script.py @home-assistant/core
homeassistant/components/shell_command.py @home-assistant/core
homeassistant/components/sun.py @home-assistant/core
homeassistant/components/updater.py @home-assistant/core
homeassistant/components/weblink.py @home-assistant/core
homeassistant/components/websocket_api.py @home-assistant/core
homeassistant/components/zone.py @home-assistant/core
# HomeAssistant developer Teams
# Virtualization
Dockerfile @home-assistant/docker
virtualization/Docker/* @home-assistant/docker
homeassistant/components/zwave/* @home-assistant/z-wave
homeassistant/components/*/zwave.py @home-assistant/z-wave
homeassistant/components/hassio.py @home-assistant/hassio
# Individual components
homeassistant/components/alarm_control_panel/egardia.py @jeroenterheerdt
homeassistant/components/alarm_control_panel/manual_mqtt.py @colinodell
homeassistant/components/binary_sensor/hikvision.py @mezz64
homeassistant/components/bmw_connected_drive.py @ChristianKuehnel
homeassistant/components/camera/yi.py @bachya
homeassistant/components/climate/ephember.py @ttroy50
homeassistant/components/climate/eq3btsmart.py @rytilahti
homeassistant/components/climate/sensibo.py @andrey-git
homeassistant/components/cover/group.py @cdce8p
homeassistant/components/cover/template.py @PhracturedBlue
homeassistant/components/device_tracker/automatic.py @armills
homeassistant/components/device_tracker/tile.py @bachya
homeassistant/components/history_graph.py @andrey-git
homeassistant/components/light/lifx.py @amelchio
homeassistant/components/light/lifx_legacy.py @amelchio
homeassistant/components/light/tplink.py @rytilahti
homeassistant/components/light/yeelight.py @rytilahti
homeassistant/components/lock/nello.py @pschmitt
homeassistant/components/lock/nuki.py @pschmitt
homeassistant/components/media_player/emby.py @mezz64
homeassistant/components/media_player/kodi.py @armills
homeassistant/components/media_player/liveboxplaytv.py @pschmitt
homeassistant/components/media_player/mediaroom.py @dgomes
homeassistant/components/media_player/monoprice.py @etsinko
homeassistant/components/media_player/sonos.py @amelchio
homeassistant/components/media_player/xiaomi_tv.py @fattdev
homeassistant/components/media_player/yamaha_musiccast.py @jalmeroth
homeassistant/components/plant.py @ChristianKuehnel
homeassistant/components/scene/lifx_cloud.py @amelchio
homeassistant/components/sensor/airvisual.py @bachya
homeassistant/components/sensor/filter.py @dgomes
homeassistant/components/sensor/gearbest.py @HerrHofrat
homeassistant/components/sensor/irish_rail_transport.py @ttroy50
homeassistant/components/sensor/miflora.py @danielhiversen @ChristianKuehnel
homeassistant/components/sensor/nsw_fuel_station.py @nickw444
homeassistant/components/sensor/pollen.py @bachya
homeassistant/components/sensor/qnap.py @colinodell
homeassistant/components/sensor/sma.py @kellerza
homeassistant/components/sensor/sql.py @dgomes
homeassistant/components/sensor/sytadin.py @gautric
homeassistant/components/sensor/tibber.py @danielhiversen
homeassistant/components/sensor/upnp.py @dgomes
homeassistant/components/sensor/waqi.py @andrey-git
homeassistant/components/switch/tplink.py @rytilahti
homeassistant/components/vacuum/roomba.py @pschmitt
homeassistant/components/xiaomi_aqara.py @danielhiversen @syssi
homeassistant/components/*/axis.py @kane610
homeassistant/components/*/bmw_connected_drive.py @ChristianKuehnel
homeassistant/components/*/broadlink.py @danielhiversen
homeassistant/components/*/deconz.py @kane610
homeassistant/components/ecovacs.py @OverloadUT
homeassistant/components/*/ecovacs.py @OverloadUT
homeassistant/components/eight_sleep.py @mezz64
homeassistant/components/*/eight_sleep.py @mezz64
homeassistant/components/hive.py @Rendili @KJonline
homeassistant/components/*/hive.py @Rendili @KJonline
homeassistant/components/homekit/* @cdce8p
homeassistant/components/knx.py @Julius2342
homeassistant/components/*/knx.py @Julius2342
homeassistant/components/konnected.py @heythisisnate
homeassistant/components/*/konnected.py @heythisisnate
homeassistant/components/matrix.py @tinloaf
homeassistant/components/*/matrix.py @tinloaf
homeassistant/components/openuv.py @bachya
homeassistant/components/*/openuv.py @bachya
homeassistant/components/qwikswitch.py @kellerza
homeassistant/components/*/qwikswitch.py @kellerza
homeassistant/components/rainmachine/* @bachya
homeassistant/components/*/rainmachine.py @bachya
homeassistant/components/*/rfxtrx.py @danielhiversen
homeassistant/components/tahoma.py @philklei
homeassistant/components/*/tahoma.py @philklei
homeassistant/components/tesla.py @zabuldon
homeassistant/components/*/tesla.py @zabuldon
homeassistant/components/tellduslive.py @molobrakos @fredrike
homeassistant/components/*/tellduslive.py @molobrakos @fredrike
homeassistant/components/*/tradfri.py @ggravlingen
homeassistant/components/velux.py @Julius2342
homeassistant/components/*/velux.py @Julius2342
homeassistant/components/*/xiaomi_aqara.py @danielhiversen @syssi
homeassistant/components/*/xiaomi_miio.py @rytilahti @syssi
# Other code
homeassistant/scripts/check_config.py @kellerza
# Integrations
homeassistant/components/airvisual/* @bachya
homeassistant/components/alarm_control_panel/* @colinodell
homeassistant/components/alpha_vantage/* @fabaff
homeassistant/components/amazon_polly/* @robbiet480
homeassistant/components/ambiclimate/* @danielhiversen
homeassistant/components/ambient_station/* @bachya
homeassistant/components/api/* @home-assistant/core
homeassistant/components/arduino/* @fabaff
homeassistant/components/arest/* @fabaff
homeassistant/components/asuswrt/* @kennedyshead
homeassistant/components/auth/* @home-assistant/core
homeassistant/components/automatic/* @armills
homeassistant/components/automation/* @home-assistant/core
homeassistant/components/aws/* @awarecan @robbiet480
homeassistant/components/axis/* @kane610
homeassistant/components/bitcoin/* @fabaff
homeassistant/components/bizkaibus/* @UgaitzEtxebarria
homeassistant/components/blink/* @fronzbot
homeassistant/components/bmw_connected_drive/* @ChristianKuehnel
homeassistant/components/braviatv/* @robbiet480
homeassistant/components/broadlink/* @danielhiversen
homeassistant/components/brunt/* @eavanvalkenburg
homeassistant/components/bt_smarthub/* @jxwolstenholme
homeassistant/components/cisco_ios/* @fbradyirl
homeassistant/components/cisco_mobility_express/* @fbradyirl
homeassistant/components/cisco_webex_teams/* @fbradyirl
homeassistant/components/ciscospark/* @fbradyirl
homeassistant/components/cloud/* @home-assistant/core
homeassistant/components/cloudflare/* @ludeeus
homeassistant/components/config/* @home-assistant/core
homeassistant/components/configurator/* @home-assistant/core
homeassistant/components/conversation/* @home-assistant/core
homeassistant/components/coolmaster/* @OnFreund
homeassistant/components/counter/* @fabaff
homeassistant/components/cover/* @home-assistant/core
homeassistant/components/cpuspeed/* @fabaff
homeassistant/components/cups/* @fabaff
homeassistant/components/daikin/* @fredrike @rofrantz
homeassistant/components/darksky/* @fabaff
homeassistant/components/deconz/* @kane610
homeassistant/components/demo/* @home-assistant/core
homeassistant/components/digital_ocean/* @fabaff
homeassistant/components/discogs/* @thibmaek
homeassistant/components/doorbird/* @oblogic7
homeassistant/components/dweet/* @fabaff
homeassistant/components/ecovacs/* @OverloadUT
homeassistant/components/edp_redy/* @abmantis
homeassistant/components/egardia/* @jeroenterheerdt
homeassistant/components/eight_sleep/* @mezz64
homeassistant/components/emby/* @mezz64
homeassistant/components/enigma2/* @fbradyirl
homeassistant/components/enocean/* @bdurrer
homeassistant/components/ephember/* @ttroy50
homeassistant/components/epsonworkforce/* @ThaStealth
homeassistant/components/eq3btsmart/* @rytilahti
homeassistant/components/esphome/* @OttoWinter
homeassistant/components/essent/* @TheLastProject
homeassistant/components/evohome/* @zxdavb
homeassistant/components/file/* @fabaff
homeassistant/components/filter/* @dgomes
homeassistant/components/fitbit/* @robbiet480
homeassistant/components/fixer/* @fabaff
homeassistant/components/flock/* @fabaff
homeassistant/components/flunearyou/* @bachya
homeassistant/components/foursquare/* @robbiet480
homeassistant/components/freebox/* @snoof85
homeassistant/components/frontend/* @home-assistant/core
homeassistant/components/gearbest/* @HerrHofrat
homeassistant/components/geniushub/* @zxdavb
homeassistant/components/gitter/* @fabaff
homeassistant/components/glances/* @fabaff
homeassistant/components/gntp/* @robbiet480
homeassistant/components/google_translate/* @awarecan
homeassistant/components/google_travel_time/* @robbiet480
homeassistant/components/googlehome/* @ludeeus
homeassistant/components/gpsd/* @fabaff
homeassistant/components/group/* @home-assistant/core
homeassistant/components/gtfs/* @robbiet480
homeassistant/components/harmony/* @ehendrix23
homeassistant/components/hassio/* @home-assistant/hass-io
homeassistant/components/heos/* @andrewsayre
homeassistant/components/hikvision/* @mezz64
homeassistant/components/hikvisioncam/* @fbradyirl
homeassistant/components/history/* @home-assistant/core
homeassistant/components/history_graph/* @andrey-git
homeassistant/components/hive/* @Rendili @KJonline
homeassistant/components/homeassistant/* @home-assistant/core
homeassistant/components/homekit/* @cdce8p
homeassistant/components/homekit_controller/* @Jc2k
homeassistant/components/homematic/* @pvizeli @danielperna84
homeassistant/components/html5/* @robbiet480
homeassistant/components/http/* @home-assistant/core
homeassistant/components/huawei_lte/* @scop
homeassistant/components/huawei_router/* @abmantis
homeassistant/components/hue/* @balloob
homeassistant/components/ign_sismologia/* @exxamalte
homeassistant/components/incomfort/* @zxdavb
homeassistant/components/influxdb/* @fabaff
homeassistant/components/input_boolean/* @home-assistant/core
homeassistant/components/input_datetime/* @home-assistant/core
homeassistant/components/input_number/* @home-assistant/core
homeassistant/components/input_select/* @home-assistant/core
homeassistant/components/input_text/* @home-assistant/core
homeassistant/components/integration/* @dgomes
homeassistant/components/ios/* @robbiet480
homeassistant/components/ipma/* @dgomes
homeassistant/components/iqvia/* @bachya
homeassistant/components/irish_rail_transport/* @ttroy50
homeassistant/components/jewish_calendar/* @tsvi
homeassistant/components/knx/* @Julius2342
homeassistant/components/kodi/* @armills
homeassistant/components/konnected/* @heythisisnate
homeassistant/components/lametric/* @robbiet480
homeassistant/components/launch_library/* @ludeeus
homeassistant/components/lifx/* @amelchio
homeassistant/components/lifx_cloud/* @amelchio
homeassistant/components/lifx_legacy/* @amelchio
homeassistant/components/linux_battery/* @fabaff
homeassistant/components/liveboxplaytv/* @pschmitt
homeassistant/components/logger/* @home-assistant/core
homeassistant/components/logi_circle/* @evanjd
homeassistant/components/lovelace/* @home-assistant/core
homeassistant/components/luci/* @fbradyirl
homeassistant/components/luftdaten/* @fabaff
homeassistant/components/mastodon/* @fabaff
homeassistant/components/matrix/* @tinloaf
homeassistant/components/mediaroom/* @dgomes
homeassistant/components/melissa/* @kennedyshead
homeassistant/components/met/* @danielhiversen
homeassistant/components/meteoalarm/* @rolfberkenbosch
homeassistant/components/miflora/* @danielhiversen @ChristianKuehnel
homeassistant/components/mill/* @danielhiversen
homeassistant/components/min_max/* @fabaff
homeassistant/components/mobile_app/* @robbiet480
homeassistant/components/monoprice/* @etsinko
homeassistant/components/moon/* @fabaff
homeassistant/components/mpd/* @fabaff
homeassistant/components/mqtt/* @home-assistant/core
homeassistant/components/mystrom/* @fabaff
homeassistant/components/nello/* @pschmitt
homeassistant/components/ness_alarm/* @nickw444
homeassistant/components/nest/* @awarecan
homeassistant/components/netdata/* @fabaff
homeassistant/components/nextbus/* @vividboarder
homeassistant/components/nissan_leaf/* @filcole
homeassistant/components/nmbs/* @thibmaek
homeassistant/components/no_ip/* @fabaff
homeassistant/components/notify/* @home-assistant/core
homeassistant/components/nsw_fuel_station/* @nickw444
homeassistant/components/nuki/* @pschmitt
homeassistant/components/ohmconnect/* @robbiet480
homeassistant/components/onboarding/* @home-assistant/core
homeassistant/components/openuv/* @bachya
homeassistant/components/openweathermap/* @fabaff
homeassistant/components/orangepi_gpio/* @pascallj
homeassistant/components/owlet/* @oblogic7
homeassistant/components/panel_custom/* @home-assistant/core
homeassistant/components/panel_iframe/* @home-assistant/core
homeassistant/components/persistent_notification/* @home-assistant/core
homeassistant/components/philips_js/* @elupus
homeassistant/components/pi_hole/* @fabaff
homeassistant/components/plant/* @ChristianKuehnel
homeassistant/components/point/* @fredrike
homeassistant/components/ps4/* @ktnrg45
homeassistant/components/ptvsd/* @swamp-ig
homeassistant/components/push/* @dgomes
homeassistant/components/pvoutput/* @fabaff
homeassistant/components/qnap/* @colinodell
homeassistant/components/quantum_gateway/* @cisasteelersfan
homeassistant/components/qwikswitch/* @kellerza
homeassistant/components/raincloud/* @vanstinator
homeassistant/components/rainmachine/* @bachya
homeassistant/components/random/* @fabaff
homeassistant/components/rfxtrx/* @danielhiversen
homeassistant/components/rmvtransport/* @cgtobi
homeassistant/components/roomba/* @pschmitt
homeassistant/components/ruter/* @ludeeus
homeassistant/components/scene/* @home-assistant/core
homeassistant/components/scrape/* @fabaff
homeassistant/components/script/* @home-assistant/core
homeassistant/components/sensibo/* @andrey-git
homeassistant/components/serial/* @fabaff
homeassistant/components/seventeentrack/* @bachya
homeassistant/components/shell_command/* @home-assistant/core
homeassistant/components/shiftr/* @fabaff
homeassistant/components/shodan/* @fabaff
homeassistant/components/simplisafe/* @bachya
homeassistant/components/sma/* @kellerza
homeassistant/components/smartthings/* @andrewsayre
homeassistant/components/smtp/* @fabaff
homeassistant/components/sonos/* @amelchio
homeassistant/components/spaceapi/* @fabaff
homeassistant/components/spider/* @peternijssen
homeassistant/components/sql/* @dgomes
homeassistant/components/statistics/* @fabaff
homeassistant/components/stiebel_eltron/* @fucm
homeassistant/components/sun/* @home-assistant/core
homeassistant/components/supla/* @mwegrzynek
homeassistant/components/swiss_hydrological_data/* @fabaff
homeassistant/components/swiss_public_transport/* @fabaff
homeassistant/components/switchbot/* @danielhiversen
homeassistant/components/switcher_kis/* @tomerfi
homeassistant/components/switchmate/* @danielhiversen
homeassistant/components/syncthru/* @nielstron
homeassistant/components/synology_srm/* @aerialls
homeassistant/components/syslog/* @fabaff
homeassistant/components/sytadin/* @gautric
homeassistant/components/tahoma/* @philklei
homeassistant/components/tautulli/* @ludeeus
homeassistant/components/tellduslive/* @fredrike
homeassistant/components/template/* @PhracturedBlue
homeassistant/components/tesla/* @zabuldon
homeassistant/components/tfiac/* @fredrike @mellado
homeassistant/components/thethingsnetwork/* @fabaff
homeassistant/components/threshold/* @fabaff
homeassistant/components/tibber/* @danielhiversen
homeassistant/components/tile/* @bachya
homeassistant/components/time_date/* @fabaff
homeassistant/components/toon/* @frenck
homeassistant/components/tplink/* @rytilahti
homeassistant/components/traccar/* @ludeeus
homeassistant/components/tradfri/* @ggravlingen
homeassistant/components/tts/* @robbiet480
homeassistant/components/twilio_call/* @robbiet480
homeassistant/components/twilio_sms/* @robbiet480
homeassistant/components/uber/* @robbiet480
homeassistant/components/unifi/* @kane610
homeassistant/components/upcloud/* @scop
homeassistant/components/updater/* @home-assistant/core
homeassistant/components/upnp/* @robbiet480
homeassistant/components/uptimerobot/* @ludeeus
homeassistant/components/utility_meter/* @dgomes
homeassistant/components/velux/* @Julius2342
homeassistant/components/version/* @fabaff
homeassistant/components/vizio/* @raman325
homeassistant/components/waqi/* @andrey-git
homeassistant/components/weather/* @fabaff
homeassistant/components/weblink/* @home-assistant/core
homeassistant/components/websocket_api/* @home-assistant/core
homeassistant/components/wemo/* @sqldiablo
homeassistant/components/worldclock/* @fabaff
homeassistant/components/xfinity/* @cisasteelersfan
homeassistant/components/xiaomi_aqara/* @danielhiversen @syssi
homeassistant/components/xiaomi_miio/* @rytilahti @syssi
homeassistant/components/xiaomi_tv/* @fattdev
homeassistant/components/xmpp/* @fabaff @flowolf
homeassistant/components/yamaha_musiccast/* @jalmeroth
homeassistant/components/yeelight/* @rytilahti @zewelor
homeassistant/components/yeelightsunflower/* @lindsaymarkward
homeassistant/components/yessssms/* @flowolf
homeassistant/components/yi/* @bachya
homeassistant/components/zeroconf/* @robbiet480
homeassistant/components/zha/* @dmulcahey @adminiuga
homeassistant/components/zone/* @home-assistant/core
homeassistant/components/zoneminder/* @rohankapoorcom
homeassistant/components/zwave/* @home-assistant/z-wave
# Individual files
homeassistant/components/group/cover @cdce8p
homeassistant/components/demo/weather @fabaff

View File

@@ -10,5 +10,5 @@ The process is straight-forward.
- Ensure tests work.
- Create a Pull Request against the [**dev**](https://github.com/home-assistant/home-assistant/tree/dev) branch of Home Assistant.
Still interested? Then you should take a peek at the [developer documentation](https://home-assistant.io/developers/) to get more details.
Still interested? Then you should take a peek at the [developer documentation](https://developers.home-assistant.io/) to get more details.

View File

@@ -2,7 +2,7 @@
# When updating this file, please also update virtualization/Docker/Dockerfile.dev
# This way, the development image and the production image are kept in sync.
FROM python:3.6
FROM python:3.7
LABEL maintainer="Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>"
# Uncomment any of the following lines to disable the installation.
@@ -11,11 +11,11 @@ LABEL maintainer="Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>"
#ENV INSTALL_FFMPEG no
#ENV INSTALL_LIBCEC no
#ENV INSTALL_SSOCR no
#ENV INSTALL_DLIB no
#ENV INSTALL_IPERF3 no
VOLUME /config
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Copy build scripts
@@ -27,7 +27,7 @@ COPY requirements_all.txt requirements_all.txt
# Uninstall enum34 because some dependencies install it but breaks Python 3.4+.
# See PR #8103 for more info.
RUN pip3 install --no-cache-dir -r requirements_all.txt && \
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet cython
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop==0.12.2 cchardet cython tensorflow
# Copy source
COPY . .

View File

@@ -1,4 +1,4 @@
Home Assistant |Build Status| |Coverage Status| |Chat Status| |Reviewed by Hound|
Home Assistant |Build Status| |CI Status| |Coverage Status| |Chat Status|
=================================================================================
Home Assistant is a home automation platform running on Python 3. It is able to track and control all devices at home and offer a platform for automating control.
@@ -21,20 +21,20 @@ Featured integrations
|screenshot-components|
The system is built using a modular approach so support for other devices or actions can be implemented easily. See also the `section on architecture <https://home-assistant.io/developers/architecture/>`__ and the `section on creating your own
components <https://home-assistant.io/developers/creating_components/>`__.
The system is built using a modular approach so support for other devices or actions can be implemented easily. See also the `section on architecture <https://developers.home-assistant.io/docs/en/architecture_index.html>`__ and the `section on creating your own
components <https://developers.home-assistant.io/docs/en/creating_component_index.html>`__.
If you run into issues while using Home Assistant or during development
of a component, check the `Home Assistant help section <https://home-assistant.io/help/>`__ of our website for further help and information.
.. |Build Status| image:: https://travis-ci.org/home-assistant/home-assistant.svg?branch=master
.. |Build Status| image:: https://travis-ci.org/home-assistant/home-assistant.svg?branch=dev
:target: https://travis-ci.org/home-assistant/home-assistant
.. |CI Status| image:: https://circleci.com/gh/home-assistant/home-assistant.svg?style=shield
:target: https://circleci.com/gh/home-assistant/home-assistant
.. |Coverage Status| image:: https://img.shields.io/coveralls/home-assistant/home-assistant.svg
:target: https://coveralls.io/r/home-assistant/home-assistant?branch=master
.. |Chat Status| image:: https://img.shields.io/discord/330944238910963714.svg
:target: https://discord.gg/c5DvZ4e
.. |Reviewed by Hound| image:: https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg
:target: https://houndci.com
.. |screenshot-states| image:: https://raw.github.com/home-assistant/home-assistant/master/docs/screenshots.png
:target: https://home-assistant.io/demo/
.. |screenshot-components| image:: https://raw.github.com/home-assistant/home-assistant/dev/docs/screenshot-components.png

186
azure-pipelines.yml Normal file
View File

@@ -0,0 +1,186 @@
# https://dev.azure.com/home-assistant
trigger:
batch: true
branches:
include:
- dev
tags:
include:
- '*'
variables:
- name: versionBuilder
value: '3.2'
- name: versionWheels
value: '0.3'
- group: docker
- group: wheels
- group: github
jobs:
- job: 'Wheels'
condition: eq(variables['Build.SourceBranchName'], 'dev')
timeoutInMinutes: 360
pool:
vmImage: 'ubuntu-16.04'
strategy:
maxParallel: 3
matrix:
amd64:
buildArch: 'amd64'
i386:
buildArch: 'i386'
armhf:
buildArch: 'armhf'
armv7:
buildArch: 'armv7'
aarch64:
buildArch: 'aarch64'
steps:
- script: |
sudo apt-get install -y --no-install-recommends \
qemu-user-static \
binfmt-support
sudo mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
sudo update-binfmts --enable qemu-arm
sudo update-binfmts --enable qemu-aarch64
displayName: 'Initial cross build'
- script: |
mkdir -p .ssh
echo -e "-----BEGIN RSA PRIVATE KEY-----\n$(wheelsSSH)\n-----END RSA PRIVATE KEY-----" >> .ssh/id_rsa
ssh-keyscan -H $(wheelsHost) >> .ssh/known_hosts
chmod 600 .ssh/*
displayName: 'Install ssh key'
- script: sudo docker pull homeassistant/$(buildArch)-wheels:$(versionWheels)
displayName: 'Install wheels builder'
- script: |
cp requirements_all.txt requirements_hassio.txt
# Enable because we can build it
sed -i "s|# pytradfri|pytradfri|g" requirements_hassio.txt
sed -i "s|# pybluez|pybluez|g" requirements_hassio.txt
sed -i "s|# bluepy|bluepy|g" requirements_hassio.txt
sed -i "s|# beacontools|beacontools|g" requirements_hassio.txt
sed -i "s|# RPi.GPIO|RPi.GPIO|g" requirements_hassio.txt
sed -i "s|# raspihats|raspihats|g" requirements_hassio.txt
sed -i "s|# rpi-rf|rpi-rf|g" requirements_hassio.txt
sed -i "s|# blinkt|blinkt|g" requirements_hassio.txt
sed -i "s|# fritzconnection|fritzconnection|g" requirements_hassio.txt
sed -i "s|# pyuserinput|pyuserinput|g" requirements_hassio.txt
sed -i "s|# evdev|evdev|g" requirements_hassio.txt
sed -i "s|# smbus-cffi|smbus-cffi|g" requirements_hassio.txt
sed -i "s|# i2csense|i2csense|g" requirements_hassio.txt
sed -i "s|# python-eq3bt|python-eq3bt|g" requirements_hassio.txt
sed -i "s|# pycups|pycups|g" requirements_hassio.txt
sed -i "s|# homekit|homekit|g" requirements_hassio.txt
sed -i "s|# decora_wifi|decora_wifi|g" requirements_hassio.txt
sed -i "s|# decora|decora|g" requirements_hassio.txt
sed -i "s|# PySwitchbot|PySwitchbot|g" requirements_hassio.txt
sed -i "s|# pySwitchmate|pySwitchmate|g" requirements_hassio.txt
# Disable because of error
sed -i "s|insteonplm|# insteonplm|g" requirements_hassio.txt
displayName: 'Prepare requirements files for Hass.io'
- script: |
sudo docker run --rm -v $(pwd):/data:ro -v $(pwd)/.ssh:/root/.ssh:rw \
homeassistant/$(buildArch)-wheels:$(versionWheels) \
--apk "build-base;cmake;git;linux-headers;bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;autoconf;automake;cups-dev;linux-headers;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev" \
--index https://wheels.hass.io \
--requirement requirements_hassio.txt \
--upload rsync \
--remote wheels@$(wheelsHost):/opt/wheels
displayName: 'Run wheels build'
- job: 'Release'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
timeoutInMinutes: 120
pool:
vmImage: 'ubuntu-16.04'
strategy:
maxParallel: 5
matrix:
amd64:
buildArch: 'amd64'
buildMachine: 'qemux86-64,intel-nuc'
i386:
buildArch: 'i386'
buildMachine: 'qemux86'
armhf:
buildArch: 'armhf'
buildMachine: 'qemuarm,raspberrypi'
armv7:
buildArch: 'armv7'
buildMachine: 'raspberrypi2,raspberrypi3,odroid-xu,tinker'
aarch64:
buildArch: 'aarch64'
buildMachine: 'qemuarm-64,raspberrypi3-64,odroid-c2,orangepi-prime'
steps:
- script: sudo docker login -u $(dockerUser) -p $(dockerPassword)
displayName: 'Docker hub login'
- script: sudo docker pull homeassistant/amd64-builder:$(versionBuilder)
displayName: 'Install Builder'
- script: |
set -e
sudo docker run --rm --privileged \
-v ~/.docker:/root/.docker \
-v /run/docker.sock:/run/docker.sock:rw \
homeassistant/amd64-builder:$(versionBuilder) \
--homeassistant $(Build.SourceBranchName) "--$(buildArch)" \
-r https://github.com/home-assistant/hassio-homeassistant \
-t generic --docker-hub homeassistant
sudo docker run --rm --privileged \
-v ~/.docker:/root/.docker \
-v /run/docker.sock:/run/docker.sock:rw \
homeassistant/amd64-builder:$(versionBuilder) \
--homeassistant-machine "$(Build.SourceBranchName)=$(buildMachine)" \
-r https://github.com/home-assistant/hassio-homeassistant \
-t machine --docker-hub homeassistant
displayName: 'Build Release'
- job: 'ReleasePublish'
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('Release'))
dependsOn:
- 'Release'
pool:
vmImage: 'ubuntu-16.04'
steps:
- script: |
sudo apt-get install -y --no-install-recommends \
git jq
git config --global user.name "Pascal Vizeli"
git config --global user.email "pvizeli@syshack.ch"
git config --global credential.helper store
echo "https://$(githubToken):x-oauth-basic@github.com" > $HOME/.git-credentials
displayName: 'Install requirements'
- script: |
set -e
version="$(Build.SourceBranchName)"
git clone https://github.com/home-assistant/hassio-version
cd hassio-version
dev_version="$(jq --raw-output '.homeassistant.default' dev.json)"
beta_version="$(jq --raw-output '.homeassistant.default' beta.json)"
stable_version="$(jq --raw-output '.homeassistant.default' stable.json)"
if [[ "$version" =~ b ]]; then
sed -i "s|$dev_version|$version|g" dev.json
sed -i "s|$beta_version|$version|g" beta.json
else
sed -i "s|$dev_version|$version|g" dev.json
sed -i "s|$beta_version|$version|g" beta.json
sed -i "s|$stable_version|$version|g" stable.json
fi
git commit -am "Bump Home Assistant $version"
git push

View File

@@ -4,6 +4,23 @@ homeassistant.helpers package
Submodules
----------
homeassistant.helpers.aiohttp_client module
-------------------------------------------
.. automodule:: homeassistant.helpers.aiohttp_client
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.area_registry module
------------------------------------------
.. automodule:: homeassistant.helpers.area_registry
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.condition module
--------------------------------------
@@ -12,6 +29,14 @@ homeassistant.helpers.condition module
:undoc-members:
:show-inheritance:
homeassistant.helpers.config_entry_flow module
----------------------------------------------
.. automodule:: homeassistant.helpers.config_entry_flow
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.config_validation module
----------------------------------------------
@@ -20,6 +45,30 @@ homeassistant.helpers.config_validation module
:undoc-members:
:show-inheritance:
homeassistant.helpers.data_entry_flow module
--------------------------------------------
.. automodule:: homeassistant.helpers.data_entry_flow
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.deprecation module
----------------------------------------
.. automodule:: homeassistant.helpers.depracation
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.device_registry module
--------------------------------------------
.. automodule:: homeassistant.helpers.device_registry
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.discovery module
--------------------------------------
@@ -28,6 +77,14 @@ homeassistant.helpers.discovery module
:undoc-members:
:show-inheritance:
homeassistant.helpers.dispatcher module
---------------------------------------
.. automodule:: homeassistant.helpers.dispatcher
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.entity module
-----------------------------------
@@ -44,6 +101,38 @@ homeassistant.helpers.entity_component module
:undoc-members:
:show-inheritance:
homeassistant.helpers.entity_platform module
--------------------------------------------
.. automodule:: homeassistant.helpers.entity_platform
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.entity_registry module
--------------------------------------------
.. automodule:: homeassistant.helpers.entity_registry
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.entity_values module
------------------------------------------
.. automodule:: homeassistant.helpers.entity_values
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.entityfilter module
-----------------------------------------
.. automodule:: homeassistant.helpers.entityfilter
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.event module
----------------------------------
@@ -52,10 +141,26 @@ homeassistant.helpers.event module
:undoc-members:
:show-inheritance:
homeassistant.helpers.event_decorators module
---------------------------------------------
homeassistant.helpers.icon module
---------------------------------
.. automodule:: homeassistant.helpers.event_decorators
.. automodule:: homeassistant.helpers.icon
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.intent module
-----------------------------------
.. automodule:: homeassistant.helpers.intent
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.json module
---------------------------------
.. automodule:: homeassistant.helpers.json
:members:
:undoc-members:
:show-inheritance:
@@ -68,6 +173,22 @@ homeassistant.helpers.location module
:undoc-members:
:show-inheritance:
homeassistant.helpers.logging module
------------------------------------
.. automodule:: homeassistant.helpers.logging
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.restore_state module
------------------------------------------
.. automodule:: homeassistant.helpers.restore_state
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.script module
-----------------------------------
@@ -84,6 +205,14 @@ homeassistant.helpers.service module
:undoc-members:
:show-inheritance:
homeassistant.helpers.signal module
-----------------------------------
.. automodule:: homeassistant.helpers.signal
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.state module
----------------------------------
@@ -92,6 +221,38 @@ homeassistant.helpers.state module
:undoc-members:
:show-inheritance:
homeassistant.helpers.storage module
------------------------------------
.. automodule:: homeassistant.helpers.storage
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.sun module
--------------------------------
.. automodule:: homeassistant.helpers.sun
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.system_info module
----------------------------------------
.. automodule:: homeassistant.helpers.system_info
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.temperature module
----------------------------------------
.. automodule:: homeassistant.helpers.temperature
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.template module
-------------------------------------
@@ -100,6 +261,14 @@ homeassistant.helpers.template module
:undoc-members:
:show-inheritance:
homeassistant.helpers.translation module
-----------------------------------------
.. automodule:: homeassistant.helpers.translation
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.typing module
-----------------------------------

View File

@@ -19,4 +19,4 @@ Indices and tables
* :ref:`modindex`
* :ref:`search`
.. _Home Assistant developers: https://home-assistant.io/developers/
.. _Home Assistant developers: https://developers.home-assistant.io/

View File

@@ -7,9 +7,9 @@ import platform
import subprocess
import sys
import threading
from typing import List, Dict, Any # noqa pylint: disable=unused-import
from typing import ( # noqa pylint: disable=unused-import
List, Dict, Any, TYPE_CHECKING
)
from homeassistant import monkey_patch
from homeassistant.const import (
@@ -19,16 +19,38 @@ from homeassistant.const import (
RESTART_EXIT_CODE,
)
if TYPE_CHECKING:
from homeassistant import core
def attempt_use_uvloop() -> None:
def set_loop() -> None:
"""Attempt to use uvloop."""
import asyncio
from asyncio.events import BaseDefaultEventLoopPolicy
try:
import uvloop
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
except ImportError:
pass
policy = None
if sys.platform == 'win32':
if hasattr(asyncio, 'WindowsProactorEventLoopPolicy'):
# pylint: disable=no-member
policy = asyncio.WindowsProactorEventLoopPolicy()
else:
class ProactorPolicy(BaseDefaultEventLoopPolicy):
"""Event loop policy to create proactor loops."""
_loop_factory = asyncio.ProactorEventLoop
policy = ProactorPolicy()
else:
try:
import uvloop
except ImportError:
pass
else:
policy = uvloop.EventLoopPolicy()
if policy is not None:
asyncio.set_event_loop_policy(policy)
def validate_python() -> None:
@@ -68,10 +90,12 @@ def ensure_config_path(config_dir: str) -> None:
sys.exit(1)
def ensure_config_file(config_dir: str) -> str:
async def ensure_config_file(hass: 'core.HomeAssistant', config_dir: str) \
-> str:
"""Ensure configuration file exists."""
import homeassistant.config as config_util
config_path = config_util.ensure_config_exists(config_dir)
config_path = await config_util.async_ensure_config_exists(
hass, config_dir)
if config_path is None:
print('Error getting configuration path')
@@ -240,51 +264,40 @@ def cmdline() -> List[str]:
return [arg for arg in sys.argv if arg != '--daemon']
def setup_and_run_hass(config_dir: str,
args: argparse.Namespace) -> int:
async def setup_and_run_hass(config_dir: str,
args: argparse.Namespace) -> int:
"""Set up HASS and run."""
from homeassistant import bootstrap
# pylint: disable=redefined-outer-name
from homeassistant import bootstrap, core
# Run a simple daemon runner process on Windows to handle restarts
if os.name == 'nt' and '--runner' not in sys.argv:
nt_args = cmdline() + ['--runner']
while True:
try:
subprocess.check_call(nt_args)
sys.exit(0)
except subprocess.CalledProcessError as exc:
if exc.returncode != RESTART_EXIT_CODE:
sys.exit(exc.returncode)
hass = core.HomeAssistant()
if args.demo_mode:
config = {
'frontend': {},
'demo': {}
} # type: Dict[str, Any]
hass = bootstrap.from_config_dict(
config, config_dir=config_dir, verbose=args.verbose,
bootstrap.async_from_config_dict(
config, hass, config_dir=config_dir, verbose=args.verbose,
skip_pip=args.skip_pip, log_rotate_days=args.log_rotate_days,
log_file=args.log_file, log_no_color=args.log_no_color)
else:
config_file = ensure_config_file(config_dir)
config_file = await ensure_config_file(hass, config_dir)
print('Config directory:', config_dir)
hass = bootstrap.from_config_file(
config_file, verbose=args.verbose, skip_pip=args.skip_pip,
await bootstrap.async_from_config_file(
config_file, hass, verbose=args.verbose, skip_pip=args.skip_pip,
log_rotate_days=args.log_rotate_days, log_file=args.log_file,
log_no_color=args.log_no_color)
if hass is None:
return -1
if args.open_ui:
# Imported here to avoid importing asyncio before monkey patch
from homeassistant.util.async_ import run_callback_threadsafe
def open_browser(_: Any) -> None:
"""Open the web interface in a browser."""
if hass.config.api is not None: # type: ignore
if hass.config.api is not None:
import webbrowser
webbrowser.open(hass.config.api.base_url) # type: ignore
webbrowser.open(hass.config.api.base_url)
run_callback_threadsafe(
hass.loop,
@@ -292,7 +305,7 @@ def setup_and_run_hass(config_dir: str,
EVENT_HOMEASSISTANT_START, open_browser
)
return hass.start()
return await hass.async_run()
def try_to_restart() -> None:
@@ -347,7 +360,20 @@ def main() -> int:
monkey_patch.disable_c_asyncio()
monkey_patch.patch_weakref_tasks()
attempt_use_uvloop()
set_loop()
# Run a simple daemon runner process on Windows to handle restarts
if os.name == 'nt' and '--runner' not in sys.argv:
nt_args = cmdline() + ['--runner']
while True:
try:
subprocess.check_call(nt_args)
sys.exit(0)
except KeyboardInterrupt:
sys.exit(0)
except subprocess.CalledProcessError as exc:
if exc.returncode != RESTART_EXIT_CODE:
sys.exit(exc.returncode)
args = get_arguments()
@@ -366,11 +392,12 @@ def main() -> int:
if args.pid_file:
write_pid(args.pid_file)
exit_code = setup_and_run_hass(config_dir, args)
from homeassistant.util.async_ import asyncio_run
exit_code = asyncio_run(setup_and_run_hass(config_dir, args))
if exit_code == RESTART_EXIT_CODE and not args.runner:
try_to_restart()
return exit_code
return exit_code # type: ignore
if __name__ == "__main__":

View File

@@ -13,9 +13,13 @@ from homeassistant.core import callback, HomeAssistant
from homeassistant.util import dt as dt_util
from . import auth_store, models
from .const import GROUP_ID_ADMIN
from .mfa_modules import auth_mfa_module_from_config, MultiFactorAuthModule
from .providers import auth_provider_from_config, AuthProvider, LoginFlow
EVENT_USER_ADDED = 'user_added'
EVENT_USER_REMOVED = 'user_removed'
_LOGGER = logging.getLogger(__name__)
_MfaModuleDict = Dict[str, MultiFactorAuthModule]
_ProviderKey = Tuple[str, Optional[str]]
@@ -74,11 +78,6 @@ class AuthManager:
hass, self._async_create_login_flow,
self._async_finish_login_flow)
@property
def active(self) -> bool:
"""Return if any auth providers are registered."""
return bool(self._providers)
@property
def support_legacy(self) -> bool:
"""
@@ -101,9 +100,21 @@ class AuthManager:
"""Return a list of available auth modules."""
return list(self._mfa_modules.values())
def get_auth_provider(self, provider_type: str, provider_id: str) \
-> Optional[AuthProvider]:
"""Return an auth provider, None if not found."""
return self._providers.get((provider_type, provider_id))
def get_auth_providers(self, provider_type: str) \
-> List[AuthProvider]:
"""Return a List of auth provider of one type, Empty if not found."""
return [provider
for (p_type, _), provider in self._providers.items()
if p_type == provider_type]
def get_auth_mfa_module(self, module_id: str) \
-> Optional[MultiFactorAuthModule]:
"""Return an multi-factor auth module, None if not found."""
"""Return a multi-factor auth module, None if not found."""
return self._mfa_modules.get(module_id)
async def async_get_users(self) -> List[models.User]:
@@ -114,6 +125,15 @@ class AuthManager:
"""Retrieve a user."""
return await self._store.async_get_user(user_id)
async def async_get_owner(self) -> Optional[models.User]:
"""Retrieve the owner."""
users = await self.async_get_users()
return next((user for user in users if user.is_owner), None)
async def async_get_group(self, group_id: str) -> Optional[models.Group]:
"""Retrieve all groups."""
return await self._store.async_get_group(group_id)
async def async_get_user_by_credentials(
self, credentials: models.Credentials) -> Optional[models.User]:
"""Get a user by credential, return None if not found."""
@@ -124,25 +144,41 @@ class AuthManager:
return None
async def async_create_system_user(self, name: str) -> models.User:
async def async_create_system_user(
self, name: str,
group_ids: Optional[List[str]] = None) -> models.User:
"""Create a system user."""
return await self._store.async_create_user(
user = await self._store.async_create_user(
name=name,
system_generated=True,
is_active=True,
group_ids=group_ids or [],
)
self.hass.bus.async_fire(EVENT_USER_ADDED, {
'user_id': user.id
})
return user
async def async_create_user(self, name: str) -> models.User:
"""Create a user."""
kwargs = {
'name': name,
'is_active': True,
'group_ids': [GROUP_ID_ADMIN]
} # type: Dict[str, Any]
if await self._user_should_be_owner():
kwargs['is_owner'] = True
return await self._store.async_create_user(**kwargs)
user = await self._store.async_create_user(**kwargs)
self.hass.bus.async_fire(EVENT_USER_ADDED, {
'user_id': user.id
})
return user
async def async_get_or_create_user(self, credentials: models.Credentials) \
-> models.User:
@@ -151,8 +187,7 @@ class AuthManager:
user = await self.async_get_user_by_credentials(credentials)
if user is None:
raise ValueError('Unable to find the user.')
else:
return user
return user
auth_provider = self._async_get_auth_provider(credentials)
@@ -162,12 +197,19 @@ class AuthManager:
info = await auth_provider.async_user_meta_for_credentials(
credentials)
return await self._store.async_create_user(
user = await self._store.async_create_user(
credentials=credentials,
name=info.name,
is_active=info.is_active,
group_ids=[GROUP_ID_ADMIN],
)
self.hass.bus.async_fire(EVENT_USER_ADDED, {
'user_id': user.id
})
return user
async def async_link_user(self, user: models.User,
credentials: models.Credentials) -> None:
"""Link credentials to an existing user."""
@@ -185,6 +227,21 @@ class AuthManager:
await self._store.async_remove_user(user)
self.hass.bus.async_fire(EVENT_USER_REMOVED, {
'user_id': user.id
})
async def async_update_user(self, user: models.User,
name: Optional[str] = None,
group_ids: Optional[List[str]] = None) -> None:
"""Update a user."""
kwargs = {} # type: Dict[str,Any]
if name is not None:
kwargs['name'] = name
if group_ids is not None:
kwargs['group_ids'] = group_ids
await self._store.async_update_user(user, **kwargs)
async def async_activate_user(self, user: models.User) -> None:
"""Activate a user."""
await self._store.async_activate_user(user)
@@ -314,7 +371,6 @@ class AuthManager:
"""Create a new access token."""
self._store.async_log_refresh_token_usage(refresh_token, remote_ip)
# pylint: disable=no-self-use
now = dt_util.utcnow()
return jwt.encode({
'iss': refresh_token.id,

View File

@@ -1,18 +1,25 @@
"""Storage for auth models."""
import asyncio
from collections import OrderedDict
from datetime import timedelta
import hmac
from logging import getLogger
from typing import Any, Dict, List, Optional # noqa: F401
import hmac
from homeassistant.auth.const import ACCESS_TOKEN_EXPIRATION
from homeassistant.core import HomeAssistant, callback
from homeassistant.util import dt as dt_util
from . import models
from .const import GROUP_ID_ADMIN, GROUP_ID_USER, GROUP_ID_READ_ONLY
from .permissions import PermissionLookup, system_policies
from .permissions.types import PolicyType # noqa: F401
STORAGE_VERSION = 1
STORAGE_KEY = 'auth'
GROUP_NAME_ADMIN = 'Administrators'
GROUP_NAME_USER = "Users"
GROUP_NAME_READ_ONLY = 'Read Only'
class AuthStore:
@@ -28,7 +35,27 @@ class AuthStore:
"""Initialize the auth store."""
self.hass = hass
self._users = None # type: Optional[Dict[str, models.User]]
self._store = hass.helpers.storage.Store(STORAGE_VERSION, STORAGE_KEY)
self._groups = None # type: Optional[Dict[str, models.Group]]
self._perm_lookup = None # type: Optional[PermissionLookup]
self._store = hass.helpers.storage.Store(STORAGE_VERSION, STORAGE_KEY,
private=True)
self._lock = asyncio.Lock()
async def async_get_groups(self) -> List[models.Group]:
"""Retrieve all users."""
if self._groups is None:
await self._async_load()
assert self._groups is not None
return list(self._groups.values())
async def async_get_group(self, group_id: str) -> Optional[models.Group]:
"""Retrieve all users."""
if self._groups is None:
await self._async_load()
assert self._groups is not None
return self._groups.get(group_id)
async def async_get_users(self) -> List[models.User]:
"""Retrieve all users."""
@@ -50,14 +77,28 @@ class AuthStore:
self, name: Optional[str], is_owner: Optional[bool] = None,
is_active: Optional[bool] = None,
system_generated: Optional[bool] = None,
credentials: Optional[models.Credentials] = None) -> models.User:
credentials: Optional[models.Credentials] = None,
group_ids: Optional[List[str]] = None) -> models.User:
"""Create a new user."""
if self._users is None:
await self._async_load()
assert self._users is not None
assert self._users is not None
assert self._groups is not None
groups = []
for group_id in (group_ids or []):
group = self._groups.get(group_id)
if group is None:
raise ValueError('Invalid group specified {}'.format(group_id))
groups.append(group)
kwargs = {
'name': name
'name': name,
# Until we get group management, we just put everyone in the
# same group.
'groups': groups,
'perm_lookup': self._perm_lookup,
} # type: Dict[str, Any]
if is_owner is not None:
@@ -97,6 +138,33 @@ class AuthStore:
self._users.pop(user.id)
self._async_schedule_save()
async def async_update_user(
self, user: models.User, name: Optional[str] = None,
is_active: Optional[bool] = None,
group_ids: Optional[List[str]] = None) -> None:
"""Update a user."""
assert self._groups is not None
if group_ids is not None:
groups = []
for grid in group_ids:
group = self._groups.get(grid)
if group is None:
raise ValueError("Invalid group specified.")
groups.append(group)
user.groups = groups
user.invalidate_permission_cache()
for attr_name, value in (
('name', name),
('is_active', is_active),
):
if value is not None:
setattr(user, attr_name, value)
self._async_schedule_save()
async def async_activate_user(self, user: models.User) -> None:
"""Activate a user."""
user.is_active = True
@@ -206,21 +274,140 @@ class AuthStore:
async def _async_load(self) -> None:
"""Load the users."""
data = await self._store.async_load()
async with self._lock:
if self._users is not None:
return
await self._async_load_task()
async def _async_load_task(self) -> None:
"""Load the users."""
[ent_reg, dev_reg, data] = await asyncio.gather(
self.hass.helpers.entity_registry.async_get_registry(),
self.hass.helpers.device_registry.async_get_registry(),
self._store.async_load(),
)
# Make sure that we're not overriding data if 2 loads happened at the
# same time
if self._users is not None:
return
users = OrderedDict() # type: Dict[str, models.User]
self._perm_lookup = perm_lookup = PermissionLookup(
ent_reg, dev_reg
)
if data is None:
self._users = users
self._set_defaults()
return
users = OrderedDict() # type: Dict[str, models.User]
groups = OrderedDict() # type: Dict[str, models.Group]
# Soft-migrating data as we load. We are going to make sure we have a
# read only group and an admin group. There are two states that we can
# migrate from:
# 1. Data from a recent version which has a single group without policy
# 2. Data from old version which has no groups
has_admin_group = False
has_user_group = False
has_read_only_group = False
group_without_policy = None
# When creating objects we mention each attribute explicitly. This
# prevents crashing if user rolls back HA version after a new property
# was added.
for group_dict in data.get('groups', []):
policy = None # type: Optional[PolicyType]
if group_dict['id'] == GROUP_ID_ADMIN:
has_admin_group = True
name = GROUP_NAME_ADMIN
policy = system_policies.ADMIN_POLICY
system_generated = True
elif group_dict['id'] == GROUP_ID_USER:
has_user_group = True
name = GROUP_NAME_USER
policy = system_policies.USER_POLICY
system_generated = True
elif group_dict['id'] == GROUP_ID_READ_ONLY:
has_read_only_group = True
name = GROUP_NAME_READ_ONLY
policy = system_policies.READ_ONLY_POLICY
system_generated = True
else:
name = group_dict['name']
policy = group_dict.get('policy')
system_generated = False
# We don't want groups without a policy that are not system groups
# This is part of migrating from state 1
if policy is None:
group_without_policy = group_dict['id']
continue
groups[group_dict['id']] = models.Group(
id=group_dict['id'],
name=name,
policy=policy,
system_generated=system_generated,
)
# If there are no groups, add all existing users to the admin group.
# This is part of migrating from state 2
migrate_users_to_admin_group = (not groups and
group_without_policy is None)
# If we find a no_policy_group, we need to migrate all users to the
# admin group. We only do this if there are no other groups, as is
# the expected state. If not expected state, not marking people admin.
# This is part of migrating from state 1
if groups and group_without_policy is not None:
group_without_policy = None
# This is part of migrating from state 1 and 2
if not has_admin_group:
admin_group = _system_admin_group()
groups[admin_group.id] = admin_group
# This is part of migrating from state 1 and 2
if not has_read_only_group:
read_only_group = _system_read_only_group()
groups[read_only_group.id] = read_only_group
if not has_user_group:
user_group = _system_user_group()
groups[user_group.id] = user_group
for user_dict in data['users']:
users[user_dict['id']] = models.User(**user_dict)
# Collect the users group.
user_groups = []
for group_id in user_dict.get('group_ids', []):
# This is part of migrating from state 1
if group_id == group_without_policy:
group_id = GROUP_ID_ADMIN
user_groups.append(groups[group_id])
# This is part of migrating from state 2
if (not user_dict['system_generated'] and
migrate_users_to_admin_group):
user_groups.append(groups[GROUP_ID_ADMIN])
users[user_dict['id']] = models.User(
name=user_dict['name'],
groups=user_groups,
id=user_dict['id'],
is_owner=user_dict['is_owner'],
is_active=user_dict['is_active'],
system_generated=user_dict['system_generated'],
perm_lookup=perm_lookup,
)
for cred_dict in data['credentials']:
users[cred_dict['user_id']].credentials.append(models.Credentials(
@@ -275,6 +462,7 @@ class AuthStore:
)
users[rt_dict['user_id']].refresh_tokens[token.id] = token
self._groups = groups
self._users = users
@callback
@@ -289,10 +477,12 @@ class AuthStore:
def _data_to_save(self) -> Dict:
"""Return the data to store."""
assert self._users is not None
assert self._groups is not None
users = [
{
'id': user.id,
'group_ids': [group.id for group in user.groups],
'is_owner': user.is_owner,
'is_active': user.is_active,
'name': user.name,
@@ -301,6 +491,19 @@ class AuthStore:
for user in self._users.values()
]
groups = []
for group in self._groups.values():
g_dict = {
'id': group.id,
# Name not read for sys groups. Kept here for backwards compat
'name': group.name
} # type: Dict[str, Any]
if not group.system_generated:
g_dict['policy'] = group.policy
groups.append(g_dict)
credentials = [
{
'id': credential.id,
@@ -337,6 +540,50 @@ class AuthStore:
return {
'users': users,
'groups': groups,
'credentials': credentials,
'refresh_tokens': refresh_tokens,
}
def _set_defaults(self) -> None:
"""Set default values for auth store."""
self._users = OrderedDict() # type: Dict[str, models.User]
groups = OrderedDict() # type: Dict[str, models.Group]
admin_group = _system_admin_group()
groups[admin_group.id] = admin_group
user_group = _system_user_group()
groups[user_group.id] = user_group
read_only_group = _system_read_only_group()
groups[read_only_group.id] = read_only_group
self._groups = groups
def _system_admin_group() -> models.Group:
"""Create system admin group."""
return models.Group(
name=GROUP_NAME_ADMIN,
id=GROUP_ID_ADMIN,
policy=system_policies.ADMIN_POLICY,
system_generated=True,
)
def _system_user_group() -> models.Group:
"""Create system user group."""
return models.Group(
name=GROUP_NAME_USER,
id=GROUP_ID_USER,
policy=system_policies.USER_POLICY,
system_generated=True,
)
def _system_read_only_group() -> models.Group:
"""Create read only group."""
return models.Group(
name=GROUP_NAME_READ_ONLY,
id=GROUP_ID_READ_ONLY,
policy=system_policies.READ_ONLY_POLICY,
system_generated=True,
)

View File

@@ -2,3 +2,8 @@
from datetime import timedelta
ACCESS_TOKEN_EXPIRATION = timedelta(minutes=30)
MFA_SESSION_EXPIRATION = timedelta(minutes=5)
GROUP_ID_ADMIN = 'system-admin'
GROUP_ID_USER = 'system-users'
GROUP_ID_READ_ONLY = 'system-read-only'

View File

@@ -1,5 +1,4 @@
"""Plugable auth modules for Home Assistant."""
from datetime import timedelta
import importlib
import logging
import types
@@ -23,8 +22,6 @@ MULTI_FACTOR_AUTH_MODULE_SCHEMA = vol.Schema({
vol.Optional(CONF_ID): str,
}, extra=vol.ALLOW_EXTRA)
SESSION_EXPIRATION = timedelta(minutes=5)
DATA_REQS = 'mfa_auth_module_reqs_processed'
_LOGGER = logging.getLogger(__name__)
@@ -34,6 +31,7 @@ class MultiFactorAuthModule:
"""Multi-factor Auth Module of validation function."""
DEFAULT_TITLE = 'Unnamed auth module'
MAX_RETRY_TIME = 3
def __init__(self, hass: HomeAssistant, config: Dict[str, Any]) -> None:
"""Initialize an auth module."""
@@ -84,7 +82,7 @@ class MultiFactorAuthModule:
"""Return whether user is setup."""
raise NotImplementedError
async def async_validation(
async def async_validate(
self, user_id: str, user_input: Dict[str, Any]) -> bool:
"""Return True if validation passed."""
raise NotImplementedError
@@ -106,7 +104,7 @@ class SetupFlow(data_entry_flow.FlowHandler):
-> Dict[str, Any]:
"""Handle the first step of setup flow.
Return self.async_show_form(step_id='init') if user_input == None.
Return self.async_show_form(step_id='init') if user_input is None.
Return self.async_create_entry(data={'result': result}) if finish.
"""
errors = {} # type: Dict[str, str]

View File

@@ -77,7 +77,7 @@ class InsecureExampleModule(MultiFactorAuthModule):
return True
return False
async def async_validation(
async def async_validate(
self, user_id: str, user_input: Dict[str, Any]) -> bool:
"""Return True if validation passed."""
for data in self._data:

View File

@@ -0,0 +1,335 @@
"""HMAC-based One-time Password auth module.
Sending HOTP through notify service
"""
import asyncio
import logging
from collections import OrderedDict
from typing import Any, Dict, Optional, List
import attr
import voluptuous as vol
from homeassistant.const import CONF_EXCLUDE, CONF_INCLUDE
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import ServiceNotFound
from homeassistant.helpers import config_validation as cv
from . import MultiFactorAuthModule, MULTI_FACTOR_AUTH_MODULES, \
MULTI_FACTOR_AUTH_MODULE_SCHEMA, SetupFlow
REQUIREMENTS = ['pyotp==2.2.7']
CONF_MESSAGE = 'message'
CONFIG_SCHEMA = MULTI_FACTOR_AUTH_MODULE_SCHEMA.extend({
vol.Optional(CONF_INCLUDE): vol.All(cv.ensure_list, [cv.string]),
vol.Optional(CONF_EXCLUDE): vol.All(cv.ensure_list, [cv.string]),
vol.Optional(CONF_MESSAGE,
default='{} is your Home Assistant login code'): str
}, extra=vol.PREVENT_EXTRA)
STORAGE_VERSION = 1
STORAGE_KEY = 'auth_module.notify'
STORAGE_USERS = 'users'
STORAGE_USER_ID = 'user_id'
INPUT_FIELD_CODE = 'code'
_LOGGER = logging.getLogger(__name__)
def _generate_secret() -> str:
"""Generate a secret."""
import pyotp
return str(pyotp.random_base32())
def _generate_random() -> int:
"""Generate a 8 digit number."""
import pyotp
return int(pyotp.random_base32(length=8, chars=list('1234567890')))
def _generate_otp(secret: str, count: int) -> str:
"""Generate one time password."""
import pyotp
return str(pyotp.HOTP(secret).at(count))
def _verify_otp(secret: str, otp: str, count: int) -> bool:
"""Verify one time password."""
import pyotp
return bool(pyotp.HOTP(secret).verify(otp, count))
@attr.s(slots=True)
class NotifySetting:
"""Store notify setting for one user."""
secret = attr.ib(type=str, factory=_generate_secret) # not persistent
counter = attr.ib(type=int, factory=_generate_random) # not persistent
notify_service = attr.ib(type=Optional[str], default=None)
target = attr.ib(type=Optional[str], default=None)
_UsersDict = Dict[str, NotifySetting]
@MULTI_FACTOR_AUTH_MODULES.register('notify')
class NotifyAuthModule(MultiFactorAuthModule):
"""Auth module send hmac-based one time password by notify service."""
DEFAULT_TITLE = 'Notify One-Time Password'
def __init__(self, hass: HomeAssistant, config: Dict[str, Any]) -> None:
"""Initialize the user data store."""
super().__init__(hass, config)
self._user_settings = None # type: Optional[_UsersDict]
self._user_store = hass.helpers.storage.Store(
STORAGE_VERSION, STORAGE_KEY, private=True)
self._include = config.get(CONF_INCLUDE, [])
self._exclude = config.get(CONF_EXCLUDE, [])
self._message_template = config[CONF_MESSAGE]
self._init_lock = asyncio.Lock()
@property
def input_schema(self) -> vol.Schema:
"""Validate login flow input data."""
return vol.Schema({INPUT_FIELD_CODE: str})
async def _async_load(self) -> None:
"""Load stored data."""
async with self._init_lock:
if self._user_settings is not None:
return
data = await self._user_store.async_load()
if data is None:
data = {STORAGE_USERS: {}}
self._user_settings = {
user_id: NotifySetting(**setting)
for user_id, setting in data.get(STORAGE_USERS, {}).items()
}
async def _async_save(self) -> None:
"""Save data."""
if self._user_settings is None:
return
await self._user_store.async_save({STORAGE_USERS: {
user_id: attr.asdict(
notify_setting, filter=attr.filters.exclude(
attr.fields(NotifySetting).secret,
attr.fields(NotifySetting).counter,
))
for user_id, notify_setting
in self._user_settings.items()
}})
@callback
def aync_get_available_notify_services(self) -> List[str]:
"""Return list of notify services."""
unordered_services = set()
for service in self.hass.services.async_services().get('notify', {}):
if service not in self._exclude:
unordered_services.add(service)
if self._include:
unordered_services &= set(self._include)
return sorted(unordered_services)
async def async_setup_flow(self, user_id: str) -> SetupFlow:
"""Return a data entry flow handler for setup module.
Mfa module should extend SetupFlow
"""
return NotifySetupFlow(
self, self.input_schema, user_id,
self.aync_get_available_notify_services())
async def async_setup_user(self, user_id: str, setup_data: Any) -> Any:
"""Set up auth module for user."""
if self._user_settings is None:
await self._async_load()
assert self._user_settings is not None
self._user_settings[user_id] = NotifySetting(
notify_service=setup_data.get('notify_service'),
target=setup_data.get('target'),
)
await self._async_save()
async def async_depose_user(self, user_id: str) -> None:
"""Depose auth module for user."""
if self._user_settings is None:
await self._async_load()
assert self._user_settings is not None
if self._user_settings.pop(user_id, None):
await self._async_save()
async def async_is_user_setup(self, user_id: str) -> bool:
"""Return whether user is setup."""
if self._user_settings is None:
await self._async_load()
assert self._user_settings is not None
return user_id in self._user_settings
async def async_validate(
self, user_id: str, user_input: Dict[str, Any]) -> bool:
"""Return True if validation passed."""
if self._user_settings is None:
await self._async_load()
assert self._user_settings is not None
notify_setting = self._user_settings.get(user_id, None)
if notify_setting is None:
return False
# user_input has been validate in caller
return await self.hass.async_add_executor_job(
_verify_otp, notify_setting.secret,
user_input.get(INPUT_FIELD_CODE, ''),
notify_setting.counter)
async def async_initialize_login_mfa_step(self, user_id: str) -> None:
"""Generate code and notify user."""
if self._user_settings is None:
await self._async_load()
assert self._user_settings is not None
notify_setting = self._user_settings.get(user_id, None)
if notify_setting is None:
raise ValueError('Cannot find user_id')
def generate_secret_and_one_time_password() -> str:
"""Generate and send one time password."""
assert notify_setting
# secret and counter are not persistent
notify_setting.secret = _generate_secret()
notify_setting.counter = _generate_random()
return _generate_otp(
notify_setting.secret, notify_setting.counter)
code = await self.hass.async_add_executor_job(
generate_secret_and_one_time_password)
await self.async_notify_user(user_id, code)
async def async_notify_user(self, user_id: str, code: str) -> None:
"""Send code by user's notify service."""
if self._user_settings is None:
await self._async_load()
assert self._user_settings is not None
notify_setting = self._user_settings.get(user_id, None)
if notify_setting is None:
_LOGGER.error('Cannot find user %s', user_id)
return
await self.async_notify( # type: ignore
code, notify_setting.notify_service, notify_setting.target)
async def async_notify(self, code: str, notify_service: str,
target: Optional[str] = None) -> None:
"""Send code by notify service."""
data = {'message': self._message_template.format(code)}
if target:
data['target'] = [target]
await self.hass.services.async_call('notify', notify_service, data)
class NotifySetupFlow(SetupFlow):
"""Handler for the setup flow."""
def __init__(self, auth_module: NotifyAuthModule,
setup_schema: vol.Schema,
user_id: str,
available_notify_services: List[str]) -> None:
"""Initialize the setup flow."""
super().__init__(auth_module, setup_schema, user_id)
# to fix typing complaint
self._auth_module = auth_module # type: NotifyAuthModule
self._available_notify_services = available_notify_services
self._secret = None # type: Optional[str]
self._count = None # type: Optional[int]
self._notify_service = None # type: Optional[str]
self._target = None # type: Optional[str]
async def async_step_init(
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
"""Let user select available notify services."""
errors = {} # type: Dict[str, str]
hass = self._auth_module.hass
if user_input:
self._notify_service = user_input['notify_service']
self._target = user_input.get('target')
self._secret = await hass.async_add_executor_job(_generate_secret)
self._count = await hass.async_add_executor_job(_generate_random)
return await self.async_step_setup()
if not self._available_notify_services:
return self.async_abort(reason='no_available_service')
schema = OrderedDict() # type: Dict[str, Any]
schema['notify_service'] = vol.In(self._available_notify_services)
schema['target'] = vol.Optional(str)
return self.async_show_form(
step_id='init',
data_schema=vol.Schema(schema),
errors=errors
)
async def async_step_setup(
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
"""Verify user can recevie one-time password."""
errors = {} # type: Dict[str, str]
hass = self._auth_module.hass
if user_input:
verified = await hass.async_add_executor_job(
_verify_otp, self._secret, user_input['code'], self._count)
if verified:
await self._auth_module.async_setup_user(
self._user_id, {
'notify_service': self._notify_service,
'target': self._target,
})
return self.async_create_entry(
title=self._auth_module.name,
data={}
)
errors['base'] = 'invalid_code'
# generate code every time, no retry logic
assert self._secret and self._count
code = await hass.async_add_executor_job(
_generate_otp, self._secret, self._count)
assert self._notify_service
try:
await self._auth_module.async_notify(
code, self._notify_service, self._target)
except ServiceNotFound:
return self.async_abort(reason='notify_service_not_exist')
return self.async_show_form(
step_id='setup',
data_schema=self._setup_schema,
description_placeholders={'notify_service': self._notify_service},
errors=errors,
)

View File

@@ -1,4 +1,5 @@
"""Time-based One Time Password auth module."""
import asyncio
import logging
from io import BytesIO
from typing import Any, Dict, Optional, Tuple # noqa: F401
@@ -11,7 +12,7 @@ from homeassistant.core import HomeAssistant
from . import MultiFactorAuthModule, MULTI_FACTOR_AUTH_MODULES, \
MULTI_FACTOR_AUTH_MODULE_SCHEMA, SetupFlow
REQUIREMENTS = ['pyotp==2.2.6', 'PyQRCode==1.2.1']
REQUIREMENTS = ['pyotp==2.2.7', 'PyQRCode==1.2.1']
CONFIG_SCHEMA = MULTI_FACTOR_AUTH_MODULE_SCHEMA.extend({
}, extra=vol.PREVENT_EXTRA)
@@ -60,13 +61,15 @@ class TotpAuthModule(MultiFactorAuthModule):
"""Auth module validate time-based one time password."""
DEFAULT_TITLE = 'Time-based One Time Password'
MAX_RETRY_TIME = 5
def __init__(self, hass: HomeAssistant, config: Dict[str, Any]) -> None:
"""Initialize the user data store."""
super().__init__(hass, config)
self._users = None # type: Optional[Dict[str, str]]
self._user_store = hass.helpers.storage.Store(
STORAGE_VERSION, STORAGE_KEY)
STORAGE_VERSION, STORAGE_KEY, private=True)
self._init_lock = asyncio.Lock()
@property
def input_schema(self) -> vol.Schema:
@@ -75,12 +78,16 @@ class TotpAuthModule(MultiFactorAuthModule):
async def _async_load(self) -> None:
"""Load stored data."""
data = await self._user_store.async_load()
async with self._init_lock:
if self._users is not None:
return
if data is None:
data = {STORAGE_USERS: {}}
data = await self._user_store.async_load()
self._users = data.get(STORAGE_USERS, {})
if data is None:
data = {STORAGE_USERS: {}}
self._users = data.get(STORAGE_USERS, {})
async def _async_save(self) -> None:
"""Save data."""
@@ -130,7 +137,7 @@ class TotpAuthModule(MultiFactorAuthModule):
return user_id in self._users # type: ignore
async def async_validation(
async def async_validate(
self, user_id: str, user_input: Dict[str, Any]) -> bool:
"""Return True if validation passed."""
if self._users is None:
@@ -149,10 +156,10 @@ class TotpAuthModule(MultiFactorAuthModule):
if ota_secret is None:
# even we cannot find user, we still do verify
# to make timing the same as if user was found.
pyotp.TOTP(DUMMY_SECRET).verify(code)
pyotp.TOTP(DUMMY_SECRET).verify(code, valid_window=1)
return False
return bool(pyotp.TOTP(ota_secret).verify(code))
return bool(pyotp.TOTP(ota_secret).verify(code, valid_window=1))
class TotpSetupFlow(SetupFlow):
@@ -175,7 +182,7 @@ class TotpSetupFlow(SetupFlow):
-> Dict[str, Any]:
"""Handle the first step of setup flow.
Return self.async_show_form(step_id='init') if user_input == None.
Return self.async_show_form(step_id='init') if user_input is None.
Return self.async_create_entry(data={'result': result}) if finish.
"""
import pyotp

View File

@@ -7,6 +7,8 @@ import attr
from homeassistant.util import dt as dt_util
from . import permissions as perm_mdl
from .const import GROUP_ID_ADMIN
from .util import generate_secret
TOKEN_TYPE_NORMAL = 'normal'
@@ -14,26 +16,77 @@ TOKEN_TYPE_SYSTEM = 'system'
TOKEN_TYPE_LONG_LIVED_ACCESS_TOKEN = 'long_lived_access_token'
@attr.s(slots=True)
class Group:
"""A group."""
name = attr.ib(type=str) # type: Optional[str]
policy = attr.ib(type=perm_mdl.PolicyType)
id = attr.ib(type=str, factory=lambda: uuid.uuid4().hex)
system_generated = attr.ib(type=bool, default=False)
@attr.s(slots=True)
class User:
"""A user."""
name = attr.ib(type=str) # type: Optional[str]
id = attr.ib(type=str, default=attr.Factory(lambda: uuid.uuid4().hex))
perm_lookup = attr.ib(
type=perm_mdl.PermissionLookup, cmp=False,
) # type: perm_mdl.PermissionLookup
id = attr.ib(type=str, factory=lambda: uuid.uuid4().hex)
is_owner = attr.ib(type=bool, default=False)
is_active = attr.ib(type=bool, default=False)
system_generated = attr.ib(type=bool, default=False)
groups = attr.ib(type=List, factory=list, cmp=False) # type: List[Group]
# List of credentials of a user.
credentials = attr.ib(
type=list, default=attr.Factory(list), cmp=False
type=list, factory=list, cmp=False
) # type: List[Credentials]
# Tokens associated with a user.
refresh_tokens = attr.ib(
type=dict, default=attr.Factory(dict), cmp=False
type=dict, factory=dict, cmp=False
) # type: Dict[str, RefreshToken]
_permissions = attr.ib(
type=Optional[perm_mdl.PolicyPermissions],
init=False,
cmp=False,
default=None,
)
@property
def permissions(self) -> perm_mdl.AbstractPermissions:
"""Return permissions object for user."""
if self.is_owner:
return perm_mdl.OwnerPermissions
if self._permissions is not None:
return self._permissions
self._permissions = perm_mdl.PolicyPermissions(
perm_mdl.merge_policies([
group.policy for group in self.groups]),
self.perm_lookup)
return self._permissions
@property
def is_admin(self) -> bool:
"""Return if user is part of the admin group."""
if self.is_owner:
return True
return self.is_active and any(
gr.id == GROUP_ID_ADMIN for gr in self.groups)
def invalidate_permission_cache(self) -> None:
"""Invalidate permission cache."""
self._permissions = None
@attr.s(slots=True)
class RefreshToken:
@@ -48,12 +101,10 @@ class RefreshToken:
validator=attr.validators.in_((
TOKEN_TYPE_NORMAL, TOKEN_TYPE_SYSTEM,
TOKEN_TYPE_LONG_LIVED_ACCESS_TOKEN)))
id = attr.ib(type=str, default=attr.Factory(lambda: uuid.uuid4().hex))
created_at = attr.ib(type=datetime, default=attr.Factory(dt_util.utcnow))
token = attr.ib(type=str,
default=attr.Factory(lambda: generate_secret(64)))
jwt_key = attr.ib(type=str,
default=attr.Factory(lambda: generate_secret(64)))
id = attr.ib(type=str, factory=lambda: uuid.uuid4().hex)
created_at = attr.ib(type=datetime, factory=dt_util.utcnow)
token = attr.ib(type=str, factory=lambda: generate_secret(64))
jwt_key = attr.ib(type=str, factory=lambda: generate_secret(64))
last_used_at = attr.ib(type=Optional[datetime], default=None)
last_used_ip = attr.ib(type=Optional[str], default=None)
@@ -69,7 +120,7 @@ class Credentials:
# Allow the auth provider to store data to represent their auth.
data = attr.ib(type=dict)
id = attr.ib(type=str, default=attr.Factory(lambda: uuid.uuid4().hex))
id = attr.ib(type=str, factory=lambda: uuid.uuid4().hex)
is_new = attr.ib(type=bool, default=True)

View File

@@ -0,0 +1,86 @@
"""Permissions for Home Assistant."""
import logging
from typing import ( # noqa: F401
cast, Any, Callable, Dict, List, Mapping, Set, Tuple, Union,
TYPE_CHECKING)
import voluptuous as vol
from .const import CAT_ENTITIES
from .models import PermissionLookup
from .types import PolicyType
from .entities import ENTITY_POLICY_SCHEMA, compile_entities
from .merge import merge_policies # noqa
from .util import test_all
POLICY_SCHEMA = vol.Schema({
vol.Optional(CAT_ENTITIES): ENTITY_POLICY_SCHEMA
})
_LOGGER = logging.getLogger(__name__)
class AbstractPermissions:
"""Default permissions class."""
_cached_entity_func = None
def _entity_func(self) -> Callable[[str, str], bool]:
"""Return a function that can test entity access."""
raise NotImplementedError
def access_all_entities(self, key: str) -> bool:
"""Check if we have a certain access to all entities."""
raise NotImplementedError
def check_entity(self, entity_id: str, key: str) -> bool:
"""Check if we can access entity."""
entity_func = self._cached_entity_func
if entity_func is None:
entity_func = self._cached_entity_func = self._entity_func()
return entity_func(entity_id, key)
class PolicyPermissions(AbstractPermissions):
"""Handle permissions."""
def __init__(self, policy: PolicyType,
perm_lookup: PermissionLookup) -> None:
"""Initialize the permission class."""
self._policy = policy
self._perm_lookup = perm_lookup
def access_all_entities(self, key: str) -> bool:
"""Check if we have a certain access to all entities."""
return test_all(self._policy.get(CAT_ENTITIES), key)
def _entity_func(self) -> Callable[[str, str], bool]:
"""Return a function that can test entity access."""
return compile_entities(self._policy.get(CAT_ENTITIES),
self._perm_lookup)
def __eq__(self, other: Any) -> bool:
"""Equals check."""
# pylint: disable=protected-access
return (isinstance(other, PolicyPermissions) and
other._policy == self._policy)
class _OwnerPermissions(AbstractPermissions):
"""Owner permissions."""
# pylint: disable=no-self-use
def access_all_entities(self, key: str) -> bool:
"""Check if we have a certain access to all entities."""
return True
def _entity_func(self) -> Callable[[str, str], bool]:
"""Return a function that can test entity access."""
return lambda entity_id, key: True
OwnerPermissions = _OwnerPermissions() # pylint: disable=invalid-name

View File

@@ -0,0 +1,8 @@
"""Permission constants."""
CAT_ENTITIES = 'entities'
CAT_CONFIG_ENTRIES = 'config_entries'
SUBCAT_ALL = 'all'
POLICY_READ = 'read'
POLICY_CONTROL = 'control'
POLICY_EDIT = 'edit'

View File

@@ -0,0 +1,91 @@
"""Entity permissions."""
from collections import OrderedDict
from typing import Callable, Optional # noqa: F401
import voluptuous as vol
from .const import SUBCAT_ALL, POLICY_READ, POLICY_CONTROL, POLICY_EDIT
from .models import PermissionLookup
from .types import CategoryType, SubCategoryDict, ValueType
# pylint: disable=unused-import
from .util import SubCatLookupType, lookup_all, compile_policy # noqa
SINGLE_ENTITY_SCHEMA = vol.Any(True, vol.Schema({
vol.Optional(POLICY_READ): True,
vol.Optional(POLICY_CONTROL): True,
vol.Optional(POLICY_EDIT): True,
}))
ENTITY_DOMAINS = 'domains'
ENTITY_AREAS = 'area_ids'
ENTITY_DEVICE_IDS = 'device_ids'
ENTITY_ENTITY_IDS = 'entity_ids'
ENTITY_VALUES_SCHEMA = vol.Any(True, vol.Schema({
str: SINGLE_ENTITY_SCHEMA
}))
ENTITY_POLICY_SCHEMA = vol.Any(True, vol.Schema({
vol.Optional(SUBCAT_ALL): SINGLE_ENTITY_SCHEMA,
vol.Optional(ENTITY_AREAS): ENTITY_VALUES_SCHEMA,
vol.Optional(ENTITY_DEVICE_IDS): ENTITY_VALUES_SCHEMA,
vol.Optional(ENTITY_DOMAINS): ENTITY_VALUES_SCHEMA,
vol.Optional(ENTITY_ENTITY_IDS): ENTITY_VALUES_SCHEMA,
}))
def _lookup_domain(perm_lookup: PermissionLookup,
domains_dict: SubCategoryDict,
entity_id: str) -> Optional[ValueType]:
"""Look up entity permissions by domain."""
return domains_dict.get(entity_id.split(".", 1)[0])
def _lookup_area(perm_lookup: PermissionLookup, area_dict: SubCategoryDict,
entity_id: str) -> Optional[ValueType]:
"""Look up entity permissions by area."""
entity_entry = perm_lookup.entity_registry.async_get(entity_id)
if entity_entry is None or entity_entry.device_id is None:
return None
device_entry = perm_lookup.device_registry.async_get(
entity_entry.device_id
)
if device_entry is None or device_entry.area_id is None:
return None
return area_dict.get(device_entry.area_id)
def _lookup_device(perm_lookup: PermissionLookup,
devices_dict: SubCategoryDict,
entity_id: str) -> Optional[ValueType]:
"""Look up entity permissions by device."""
entity_entry = perm_lookup.entity_registry.async_get(entity_id)
if entity_entry is None or entity_entry.device_id is None:
return None
return devices_dict.get(entity_entry.device_id)
def _lookup_entity_id(perm_lookup: PermissionLookup,
entities_dict: SubCategoryDict,
entity_id: str) -> Optional[ValueType]:
"""Look up entity permission by entity id."""
return entities_dict.get(entity_id)
def compile_entities(policy: CategoryType, perm_lookup: PermissionLookup) \
-> Callable[[str, str], bool]:
"""Compile policy into a function that tests policy."""
subcategories = OrderedDict() # type: SubCatLookupType
subcategories[ENTITY_ENTITY_IDS] = _lookup_entity_id
subcategories[ENTITY_DEVICE_IDS] = _lookup_device
subcategories[ENTITY_AREAS] = _lookup_area
subcategories[ENTITY_DOMAINS] = _lookup_domain
subcategories[SUBCAT_ALL] = lookup_all
return compile_policy(policy, subcategories, perm_lookup)

View File

@@ -0,0 +1,65 @@
"""Merging of policies."""
from typing import ( # noqa: F401
cast, Dict, List, Set)
from .types import PolicyType, CategoryType
def merge_policies(policies: List[PolicyType]) -> PolicyType:
"""Merge policies."""
new_policy = {} # type: Dict[str, CategoryType]
seen = set() # type: Set[str]
for policy in policies:
for category in policy:
if category in seen:
continue
seen.add(category)
new_policy[category] = _merge_policies([
policy.get(category) for policy in policies])
cast(PolicyType, new_policy)
return new_policy
def _merge_policies(sources: List[CategoryType]) -> CategoryType:
"""Merge a policy."""
# When merging policies, the most permissive wins.
# This means we order it like this:
# True > Dict > None
#
# True: allow everything
# Dict: specify more granular permissions
# None: no opinion
#
# If there are multiple sources with a dict as policy, we recursively
# merge each key in the source.
policy = None # type: CategoryType
seen = set() # type: Set[str]
for source in sources:
if source is None:
continue
# A source that's True will always win. Shortcut return.
if source is True:
return True
assert isinstance(source, dict)
if policy is None:
policy = cast(CategoryType, {})
assert isinstance(policy, dict)
for key in source:
if key in seen:
continue
seen.add(key)
key_sources = []
for src in sources:
if isinstance(src, dict):
key_sources.append(src.get(key))
policy[key] = _merge_policies(key_sources)
return policy

View File

@@ -0,0 +1,21 @@
"""Models for permissions."""
from typing import TYPE_CHECKING
import attr
if TYPE_CHECKING:
# pylint: disable=unused-import
from homeassistant.helpers import ( # noqa
entity_registry as ent_reg,
)
from homeassistant.helpers import ( # noqa
device_registry as dev_reg,
)
@attr.s(slots=True)
class PermissionLookup:
"""Class to hold data for permission lookups."""
entity_registry = attr.ib(type='ent_reg.EntityRegistry')
device_registry = attr.ib(type='dev_reg.DeviceRegistry')

View File

@@ -0,0 +1,18 @@
"""System policies."""
from .const import CAT_ENTITIES, SUBCAT_ALL, POLICY_READ
ADMIN_POLICY = {
CAT_ENTITIES: True,
}
USER_POLICY = {
CAT_ENTITIES: True,
}
READ_ONLY_POLICY = {
CAT_ENTITIES: {
SUBCAT_ALL: {
POLICY_READ: True
}
}
}

View File

@@ -0,0 +1,32 @@
"""Common code for permissions."""
from typing import Mapping, Union
# MyPy doesn't support recursion yet. So writing it out as far as we need.
ValueType = Union[
# Example: entities.all = { read: true, control: true }
Mapping[str, bool],
bool,
None
]
# Example: entities.domains = { light: … }
SubCategoryDict = Mapping[str, ValueType]
SubCategoryType = Union[
SubCategoryDict,
bool,
None
]
CategoryType = Union[
# Example: entities.domains
Mapping[str, SubCategoryType],
# Example: entities.all
Mapping[str, ValueType],
bool,
None
]
# Example: { entities: … }
PolicyType = Mapping[str, CategoryType]

View File

@@ -0,0 +1,112 @@
"""Helpers to deal with permissions."""
from functools import wraps
from typing import Callable, Dict, List, Optional, Union, cast # noqa: F401
from .const import SUBCAT_ALL
from .models import PermissionLookup
from .types import CategoryType, SubCategoryDict, ValueType
LookupFunc = Callable[[PermissionLookup, SubCategoryDict, str],
Optional[ValueType]]
SubCatLookupType = Dict[str, LookupFunc]
def lookup_all(perm_lookup: PermissionLookup, lookup_dict: SubCategoryDict,
object_id: str) -> ValueType:
"""Look up permission for all."""
# In case of ALL category, lookup_dict IS the schema.
return cast(ValueType, lookup_dict)
def compile_policy(
policy: CategoryType, subcategories: SubCatLookupType,
perm_lookup: PermissionLookup
) -> Callable[[str, str], bool]: # noqa
"""Compile policy into a function that tests policy.
Subcategories are mapping key -> lookup function, ordered by highest
priority first.
"""
# None, False, empty dict
if not policy:
def apply_policy_deny_all(entity_id: str, key: str) -> bool:
"""Decline all."""
return False
return apply_policy_deny_all
if policy is True:
def apply_policy_allow_all(entity_id: str, key: str) -> bool:
"""Approve all."""
return True
return apply_policy_allow_all
assert isinstance(policy, dict)
funcs = [] # type: List[Callable[[str, str], Union[None, bool]]]
for key, lookup_func in subcategories.items():
lookup_value = policy.get(key)
# If any lookup value is `True`, it will always be positive
if isinstance(lookup_value, bool):
return lambda object_id, key: True
if lookup_value is not None:
funcs.append(_gen_dict_test_func(
perm_lookup, lookup_func, lookup_value))
if len(funcs) == 1:
func = funcs[0]
@wraps(func)
def apply_policy_func(object_id: str, key: str) -> bool:
"""Apply a single policy function."""
return func(object_id, key) is True
return apply_policy_func
def apply_policy_funcs(object_id: str, key: str) -> bool:
"""Apply several policy functions."""
for func in funcs:
result = func(object_id, key)
if result is not None:
return result
return False
return apply_policy_funcs
def _gen_dict_test_func(
perm_lookup: PermissionLookup,
lookup_func: LookupFunc,
lookup_dict: SubCategoryDict
) -> Callable[[str, str], Optional[bool]]: # noqa
"""Generate a lookup function."""
def test_value(object_id: str, key: str) -> Optional[bool]:
"""Test if permission is allowed based on the keys."""
schema = lookup_func(
perm_lookup, lookup_dict, object_id) # type: ValueType
if schema is None or isinstance(schema, bool):
return schema
assert isinstance(schema, dict)
return schema.get(key)
return test_value
def test_all(policy: CategoryType, key: str) -> bool:
"""Test if a policy has an ALL access for a specific key."""
if not isinstance(policy, dict):
return bool(policy)
all_policy = policy.get(SUBCAT_ALL)
if not isinstance(all_policy, dict):
return bool(all_policy)
return all_policy.get(key, False)

View File

@@ -15,8 +15,8 @@ from homeassistant.util import dt as dt_util
from homeassistant.util.decorator import Registry
from ..auth_store import AuthStore
from ..const import MFA_SESSION_EXPIRATION
from ..models import Credentials, User, UserMeta # noqa: F401
from ..mfa_modules import SESSION_EXPIRATION
_LOGGER = logging.getLogger(__name__)
DATA_REQS = 'auth_prov_reqs_processed'
@@ -171,6 +171,7 @@ class LoginFlow(data_entry_flow.FlowHandler):
self._auth_manager = auth_provider.hass.auth # type: ignore
self.available_mfa_modules = {} # type: Dict[str, str]
self.created_at = dt_util.utcnow()
self.invalid_mfa_times = 0
self.user = None # type: Optional[User]
async def async_step_init(
@@ -178,7 +179,7 @@ class LoginFlow(data_entry_flow.FlowHandler):
-> Dict[str, Any]:
"""Handle the first step of login flow.
Return self.async_show_form(step_id='init') if user_input == None.
Return self.async_show_form(step_id='init') if user_input is None.
Return await self.async_finish(flow_result) if login init step pass.
"""
raise NotImplementedError
@@ -212,6 +213,8 @@ class LoginFlow(data_entry_flow.FlowHandler):
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
"""Handle the step of mfa validation."""
assert self.user
errors = {}
auth_module = self._auth_manager.get_auth_mfa_module(
@@ -221,25 +224,38 @@ class LoginFlow(data_entry_flow.FlowHandler):
# will show invalid_auth_module error
return await self.async_step_select_mfa_module(user_input={})
if user_input is None and hasattr(auth_module,
'async_initialize_login_mfa_step'):
try:
await auth_module.async_initialize_login_mfa_step(self.user.id)
except HomeAssistantError:
_LOGGER.exception('Error initializing MFA step')
return self.async_abort(reason='unknown_error')
if user_input is not None:
expires = self.created_at + SESSION_EXPIRATION
expires = self.created_at + MFA_SESSION_EXPIRATION
if dt_util.utcnow() > expires:
return self.async_abort(
reason='login_expired'
)
result = await auth_module.async_validation(
self.user.id, user_input) # type: ignore
result = await auth_module.async_validate(
self.user.id, user_input)
if not result:
errors['base'] = 'invalid_code'
self.invalid_mfa_times += 1
if self.invalid_mfa_times >= auth_module.MAX_RETRY_TIME > 0:
return self.async_abort(
reason='too_many_retry'
)
if not errors:
return await self.async_finish(self.user)
description_placeholders = {
'mfa_module_name': auth_module.name,
'mfa_module_id': auth_module.id
} # type: Dict[str, str]
'mfa_module_id': auth_module.id,
} # type: Dict[str, Optional[str]]
return self.async_show_form(
step_id='mfa',

View File

@@ -0,0 +1,164 @@
"""Auth provider that validates credentials via an external command."""
from typing import Any, Dict, Optional, cast
import asyncio.subprocess
import collections
import logging
import os
import voluptuous as vol
from homeassistant.exceptions import HomeAssistantError
from . import AuthProvider, AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, LoginFlow
from ..models import Credentials, UserMeta
CONF_COMMAND = "command"
CONF_ARGS = "args"
CONF_META = "meta"
CONFIG_SCHEMA = AUTH_PROVIDER_SCHEMA.extend({
vol.Required(CONF_COMMAND): vol.All(
str,
os.path.normpath,
msg="must be an absolute path"
),
vol.Optional(CONF_ARGS, default=None): vol.Any(vol.DefaultTo(list), [str]),
vol.Optional(CONF_META, default=False): bool,
}, extra=vol.PREVENT_EXTRA)
_LOGGER = logging.getLogger(__name__)
class InvalidAuthError(HomeAssistantError):
"""Raised when authentication with given credentials fails."""
@AUTH_PROVIDERS.register("command_line")
class CommandLineAuthProvider(AuthProvider):
"""Auth provider validating credentials by calling a command."""
DEFAULT_TITLE = "Command Line Authentication"
# which keys to accept from a program's stdout
ALLOWED_META_KEYS = ("name",)
def __init__(self, *args: Any, **kwargs: Any) -> None:
"""Extend parent's __init__.
Adds self._user_meta dictionary to hold the user-specific
attributes provided by external programs.
"""
super().__init__(*args, **kwargs)
self._user_meta = {} # type: Dict[str, Dict[str, Any]]
async def async_login_flow(self, context: Optional[dict]) -> LoginFlow:
"""Return a flow to login."""
return CommandLineLoginFlow(self)
async def async_validate_login(self, username: str, password: str) -> None:
"""Validate a username and password."""
env = {
"username": username,
"password": password,
}
try:
# pylint: disable=no-member
process = await asyncio.subprocess.create_subprocess_exec(
self.config[CONF_COMMAND], *self.config[CONF_ARGS],
env=env,
stdout=asyncio.subprocess.PIPE
if self.config[CONF_META] else None,
)
stdout, _ = (await process.communicate())
except OSError as err:
# happens when command doesn't exist or permission is denied
_LOGGER.error("Error while authenticating %r: %s",
username, err)
raise InvalidAuthError
if process.returncode != 0:
_LOGGER.error("User %r failed to authenticate, command exited "
"with code %d.",
username, process.returncode)
raise InvalidAuthError
if self.config[CONF_META]:
meta = {} # type: Dict[str, str]
for _line in stdout.splitlines():
try:
line = _line.decode().lstrip()
if line.startswith("#"):
continue
key, value = line.split("=", 1)
except ValueError:
# malformed line
continue
key = key.strip()
value = value.strip()
if key in self.ALLOWED_META_KEYS:
meta[key] = value
self._user_meta[username] = meta
async def async_get_or_create_credentials(
self, flow_result: Dict[str, str]
) -> Credentials:
"""Get credentials based on the flow result."""
username = flow_result["username"]
for credential in await self.async_credentials():
if credential.data["username"] == username:
return credential
# Create new credentials.
return self.async_create_credentials({
"username": username,
})
async def async_user_meta_for_credentials(
self, credentials: Credentials
) -> UserMeta:
"""Return extra user metadata for credentials.
Currently, only name is supported.
"""
meta = self._user_meta.get(credentials.data["username"], {})
return UserMeta(
name=meta.get("name"),
is_active=True,
)
class CommandLineLoginFlow(LoginFlow):
"""Handler for the login flow."""
async def async_step_init(
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Handle the step of the form."""
errors = {}
if user_input is not None:
user_input["username"] = user_input["username"].strip()
try:
await cast(CommandLineAuthProvider, self._auth_provider) \
.async_validate_login(
user_input["username"], user_input["password"]
)
except InvalidAuthError:
errors["base"] = "invalid_auth"
if not errors:
user_input.pop("password")
return await self.async_finish(user_input)
schema = collections.OrderedDict() # type: Dict[str, type]
schema["username"] = str
schema["password"] = str
return self.async_show_form(
step_id="init",
data_schema=vol.Schema(schema),
errors=errors,
)

View File

@@ -1,9 +1,10 @@
"""Home Assistant auth provider."""
import asyncio
import base64
from collections import OrderedDict
import hashlib
import hmac
from typing import Any, Dict, List, Optional, cast
import logging
from typing import Any, Dict, List, Optional, Set, cast # noqa: F401
import bcrypt
import voluptuous as vol
@@ -11,12 +12,10 @@ import voluptuous as vol
from homeassistant.const import CONF_ID
from homeassistant.core import callback, HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.util.async_ import run_coroutine_threadsafe
from . import AuthProvider, AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, LoginFlow
from ..models import Credentials, UserMeta
from ..util import generate_secret
STORAGE_VERSION = 1
@@ -52,8 +51,21 @@ class Data:
def __init__(self, hass: HomeAssistant) -> None:
"""Initialize the user data store."""
self.hass = hass
self._store = hass.helpers.storage.Store(STORAGE_VERSION, STORAGE_KEY)
self._store = hass.helpers.storage.Store(STORAGE_VERSION, STORAGE_KEY,
private=True)
self._data = None # type: Optional[Dict[str, Any]]
# Legacy mode will allow usernames to start/end with whitespace
# and will compare usernames case-insensitive.
# Remove in 2020 or when we launch 1.0.
self.is_legacy = False
@callback
def normalize_username(self, username: str) -> str:
"""Normalize a username based on the mode."""
if self.is_legacy:
return username
return username.strip().casefold()
async def async_load(self) -> None:
"""Load stored data."""
@@ -61,10 +73,40 @@ class Data:
if data is None:
data = {
'salt': generate_secret(),
'users': []
}
seen = set() # type: Set[str]
for user in data['users']:
username = user['username']
# check if we have duplicates
folded = username.casefold()
if folded in seen:
self.is_legacy = True
logging.getLogger(__name__).warning(
"Home Assistant auth provider is running in legacy mode "
"because we detected usernames that are case-insensitive"
"equivalent. Please change the username: '%s'.", username)
break
seen.add(folded)
# check if we have unstripped usernames
if username != username.strip():
self.is_legacy = True
logging.getLogger(__name__).warning(
"Home Assistant auth provider is running in legacy mode "
"because we detected usernames that start or end in a "
"space. Please change the username: '%s'.", username)
break
self._data = data
@property
@@ -77,12 +119,13 @@ class Data:
Raises InvalidAuth if auth invalid.
"""
username = self.normalize_username(username)
dummy = b'$2b$12$CiuFGszHx9eNHxPuQcwBWez4CwDTOcLTX5CbOpV6gef2nYuXkY7BO'
found = None
# Compare all users to avoid timing attacks.
for user in self.users:
if username == user['username']:
if self.normalize_username(user['username']) == username:
found = user
if found is None:
@@ -93,39 +136,11 @@ class Data:
user_hash = base64.b64decode(found['password'])
# if the hash is not a bcrypt hash...
# provide a transparant upgrade for old pbkdf2 hash format
if not (user_hash.startswith(b'$2a$')
or user_hash.startswith(b'$2b$')
or user_hash.startswith(b'$2x$')
or user_hash.startswith(b'$2y$')):
# IMPORTANT! validate the login, bail if invalid
hashed = self.legacy_hash_password(password)
if not hmac.compare_digest(hashed, user_hash):
raise InvalidAuth
# then re-hash the valid password with bcrypt
self.change_password(found['username'], password)
run_coroutine_threadsafe(
self.async_save(), self.hass.loop
).result()
user_hash = base64.b64decode(found['password'])
# bcrypt.checkpw is timing-safe
if not bcrypt.checkpw(password.encode(),
user_hash):
raise InvalidAuth
def legacy_hash_password(self, password: str,
for_storage: bool = False) -> bytes:
"""LEGACY password encoding."""
# We're no longer storing salts in data, but if one exists we
# should be able to retrieve it.
salt = self._data['salt'].encode() # type: ignore
hashed = hashlib.pbkdf2_hmac('sha512', password.encode(), salt, 100000)
if for_storage:
hashed = base64.b64encode(hashed)
return hashed
# pylint: disable=no-self-use
def hash_password(self, password: str, for_storage: bool = False) -> bytes:
"""Encode a password."""
@@ -137,7 +152,10 @@ class Data:
def add_auth(self, username: str, password: str) -> None:
"""Add a new authenticated user/pass."""
if any(user['username'] == username for user in self.users):
username = self.normalize_username(username)
if any(self.normalize_username(user['username']) == username
for user in self.users):
raise InvalidUser
self.users.append({
@@ -148,9 +166,11 @@ class Data:
@callback
def async_remove_auth(self, username: str) -> None:
"""Remove authentication."""
username = self.normalize_username(username)
index = None
for i, user in enumerate(self.users):
if user['username'] == username:
if self.normalize_username(user['username']) == username:
index = i
break
@@ -164,8 +184,10 @@ class Data:
Raises InvalidUser if user cannot be found.
"""
username = self.normalize_username(username)
for user in self.users:
if user['username'] == username:
if self.normalize_username(user['username']) == username:
user['password'] = self.hash_password(
new_password, True).decode()
break
@@ -183,15 +205,21 @@ class HassAuthProvider(AuthProvider):
DEFAULT_TITLE = 'Home Assistant Local'
data = None
def __init__(self, *args: Any, **kwargs: Any) -> None:
"""Initialize an Home Assistant auth provider."""
super().__init__(*args, **kwargs)
self.data = None # type: Optional[Data]
self._init_lock = asyncio.Lock()
async def async_initialize(self) -> None:
"""Initialize the auth provider."""
if self.data is not None:
return
async with self._init_lock:
if self.data is not None:
return
self.data = Data(self.hass)
await self.data.async_load()
data = Data(self.hass)
await data.async_load()
self.data = data
async def async_login_flow(
self, context: Optional[Dict]) -> LoginFlow:
@@ -210,10 +238,15 @@ class HassAuthProvider(AuthProvider):
async def async_get_or_create_credentials(
self, flow_result: Dict[str, str]) -> Credentials:
"""Get credentials based on the flow result."""
username = flow_result['username']
if self.data is None:
await self.async_initialize()
assert self.data is not None
norm_username = self.data.normalize_username
username = norm_username(flow_result['username'])
for credential in await self.async_credentials():
if credential.data['username'] == username:
if norm_username(credential.data['username']) == username:
return credential
# Create new credentials.

View File

@@ -8,20 +8,19 @@ from typing import Any, Dict, Optional, cast
import voluptuous as vol
from homeassistant.components.http import HomeAssistantHTTP # noqa: F401
from homeassistant.core import callback
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
import homeassistant.helpers.config_validation as cv
from . import AuthProvider, AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, LoginFlow
from ..models import Credentials, UserMeta
USER_SCHEMA = vol.Schema({
vol.Required('username'): str,
})
from .. import AuthManager
from ..models import Credentials, UserMeta, User
AUTH_PROVIDER_TYPE = 'legacy_api_password'
CONF_API_PASSWORD = 'api_password'
CONFIG_SCHEMA = AUTH_PROVIDER_SCHEMA.extend({
vol.Required(CONF_API_PASSWORD): cv.string,
}, extra=vol.PREVENT_EXTRA)
LEGACY_USER_NAME = 'Legacy API password user'
@@ -31,22 +30,45 @@ class InvalidAuthError(HomeAssistantError):
"""Raised when submitting invalid authentication."""
@AUTH_PROVIDERS.register('legacy_api_password')
async def async_validate_password(hass: HomeAssistant, password: str)\
-> Optional[User]:
"""Return a user if password is valid. None if not."""
auth = cast(AuthManager, hass.auth) # type: ignore
providers = auth.get_auth_providers(AUTH_PROVIDER_TYPE)
if not providers:
raise ValueError('Legacy API password provider not found')
try:
provider = cast(LegacyApiPasswordAuthProvider, providers[0])
provider.async_validate_login(password)
return await auth.async_get_or_create_user(
await provider.async_get_or_create_credentials({})
)
except InvalidAuthError:
return None
@AUTH_PROVIDERS.register(AUTH_PROVIDER_TYPE)
class LegacyApiPasswordAuthProvider(AuthProvider):
"""Example auth provider based on hardcoded usernames and passwords."""
"""An auth provider support legacy api_password."""
DEFAULT_TITLE = 'Legacy API Password'
@property
def api_password(self) -> str:
"""Return api_password."""
return str(self.config[CONF_API_PASSWORD])
async def async_login_flow(self, context: Optional[Dict]) -> LoginFlow:
"""Return a flow to login."""
return LegacyLoginFlow(self)
@callback
def async_validate_login(self, password: str) -> None:
"""Validate a username and password."""
hass_http = getattr(self.hass, 'http', None) # type: HomeAssistantHTTP
"""Validate password."""
api_password = str(self.config[CONF_API_PASSWORD])
if not hmac.compare_digest(hass_http.api_password.encode('utf-8'),
if not hmac.compare_digest(api_password.encode('utf-8'),
password.encode('utf-8')):
raise InvalidAuthError
@@ -78,12 +100,6 @@ class LegacyLoginFlow(LoginFlow):
"""Handle the step of the form."""
errors = {}
hass_http = getattr(self.hass, 'http', None)
if hass_http is None or not hass_http.api_password:
return self.async_abort(
reason='no_api_password_set'
)
if user_input is not None:
try:
cast(LegacyApiPasswordAuthProvider, self._auth_provider)\

View File

@@ -3,18 +3,41 @@
It shows list of users if access from trusted network.
Abort login flow if not access from trusted network.
"""
from typing import Any, Dict, Optional, cast
from ipaddress import ip_network, IPv4Address, IPv6Address, IPv4Network,\
IPv6Network
from typing import Any, Dict, List, Optional, Union, cast
import voluptuous as vol
from homeassistant.components.http import HomeAssistantHTTP # noqa: F401
import homeassistant.helpers.config_validation as cv
from homeassistant.core import callback
from homeassistant.exceptions import HomeAssistantError
from . import AuthProvider, AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, LoginFlow
from ..models import Credentials, UserMeta
IPAddress = Union[IPv4Address, IPv6Address]
IPNetwork = Union[IPv4Network, IPv6Network]
CONF_TRUSTED_NETWORKS = 'trusted_networks'
CONF_TRUSTED_USERS = 'trusted_users'
CONF_GROUP = 'group'
CONF_ALLOW_BYPASS_LOGIN = 'allow_bypass_login'
CONFIG_SCHEMA = AUTH_PROVIDER_SCHEMA.extend({
vol.Required(CONF_TRUSTED_NETWORKS): vol.All(
cv.ensure_list, [ip_network]
),
vol.Optional(CONF_TRUSTED_USERS, default={}): vol.Schema(
# we only validate the format of user_id or group_id
{ip_network: vol.All(
cv.ensure_list,
[vol.Or(
cv.uuid4_hex,
vol.Schema({vol.Required(CONF_GROUP): cv.uuid4_hex}),
)],
)}
),
vol.Optional(CONF_ALLOW_BYPASS_LOGIN, default=False): cv.boolean,
}, extra=vol.PREVENT_EXTRA)
@@ -35,6 +58,16 @@ class TrustedNetworksAuthProvider(AuthProvider):
DEFAULT_TITLE = 'Trusted Networks'
@property
def trusted_networks(self) -> List[IPNetwork]:
"""Return trusted networks."""
return cast(List[IPNetwork], self.config[CONF_TRUSTED_NETWORKS])
@property
def trusted_users(self) -> Dict[IPNetwork, Any]:
"""Return trusted users per network."""
return cast(Dict[IPNetwork, Any], self.config[CONF_TRUSTED_USERS])
@property
def support_mfa(self) -> bool:
"""Trusted Networks auth provider does not support MFA."""
@@ -43,13 +76,34 @@ class TrustedNetworksAuthProvider(AuthProvider):
async def async_login_flow(self, context: Optional[Dict]) -> LoginFlow:
"""Return a flow to login."""
assert context is not None
ip_addr = cast(IPAddress, context.get('ip_address'))
users = await self.store.async_get_users()
available_users = {user.id: user.name
for user in users
if not user.system_generated and user.is_active}
available_users = [user for user in users
if not user.system_generated and user.is_active]
for ip_net, user_or_group_list in self.trusted_users.items():
if ip_addr in ip_net:
user_list = [user_id for user_id in user_or_group_list
if isinstance(user_id, str)]
group_list = [group[CONF_GROUP] for group in user_or_group_list
if isinstance(group, dict)]
flattened_group_list = [group for sublist in group_list
for group in sublist]
available_users = [
user for user in available_users
if (user.id in user_list or
any([group.id in flattened_group_list
for group in user.groups]))
]
break
return TrustedNetworksLoginFlow(
self, cast(str, context.get('ip_address')), available_users)
self,
ip_addr,
{
user.id: user.name for user in available_users
},
self.config[CONF_ALLOW_BYPASS_LOGIN],
)
async def async_get_or_create_credentials(
self, flow_result: Dict[str, str]) -> Credentials:
@@ -80,19 +134,17 @@ class TrustedNetworksAuthProvider(AuthProvider):
raise NotImplementedError
@callback
def async_validate_access(self, ip_address: str) -> None:
def async_validate_access(self, ip_addr: IPAddress) -> None:
"""Make sure the access from trusted networks.
Raise InvalidAuthError if not.
Raise InvalidAuthError if trusted_networks is not configured.
"""
hass_http = getattr(self.hass, 'http', None) # type: HomeAssistantHTTP
if not hass_http or not hass_http.trusted_networks:
if not self.trusted_networks:
raise InvalidAuthError('trusted_networks is not configured')
if not any(ip_address in trusted_network for trusted_network
in hass_http.trusted_networks):
if not any(ip_addr in trusted_network for trusted_network
in self.trusted_networks):
raise InvalidAuthError('Not in trusted_networks')
@@ -100,12 +152,14 @@ class TrustedNetworksLoginFlow(LoginFlow):
"""Handler for the login flow."""
def __init__(self, auth_provider: TrustedNetworksAuthProvider,
ip_address: str, available_users: Dict[str, Optional[str]]) \
-> None:
ip_addr: IPAddress,
available_users: Dict[str, Optional[str]],
allow_bypass_login: bool) -> None:
"""Initialize the login flow."""
super().__init__(auth_provider)
self._available_users = available_users
self._ip_address = ip_address
self._ip_address = ip_addr
self._allow_bypass_login = allow_bypass_login
async def async_step_init(
self, user_input: Optional[Dict[str, str]] = None) \
@@ -123,6 +177,11 @@ class TrustedNetworksLoginFlow(LoginFlow):
if user_input is not None:
return await self.async_finish(user_input)
if self._allow_bypass_login and len(self._available_users) == 1:
return await self.async_finish({
'user': next(iter(self._available_users.keys()))
})
return self.async_show_form(
step_id='init',
data_schema=vol.Schema({'user': vol.In(self._available_users)}),

View File

@@ -1,25 +1,23 @@
"""Provide methods to bootstrap a Home Assistant instance."""
import asyncio
import logging
import logging.handlers
import os
import sys
from time import time
from collections import OrderedDict
from typing import Any, Optional, Dict
from typing import Any, Optional, Dict, Set
import voluptuous as vol
from homeassistant import (
core, config as conf_util, config_entries, components as core_components)
from homeassistant.components import persistent_notification
from homeassistant import core, config as conf_util, config_entries, loader
from homeassistant.const import EVENT_HOMEASSISTANT_CLOSE
from homeassistant.setup import async_setup_component
from homeassistant.util.logging import AsyncHandler
from homeassistant.util.package import async_get_user_site, is_virtual_env
from homeassistant.util.yaml import clear_secret_cache
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.signal import async_register_signal_handling
from homeassistant.helpers import config_validation as cv
_LOGGER = logging.getLogger(__name__)
@@ -28,40 +26,15 @@ ERROR_LOG_FILENAME = 'home-assistant.log'
# hass.data key for logging information.
DATA_LOGGING = 'logging'
FIRST_INIT_COMPONENT = {'system_log', 'recorder', 'mqtt', 'mqtt_eventstream',
'logger', 'introduction', 'frontend', 'history'}
def from_config_dict(config: Dict[str, Any],
hass: Optional[core.HomeAssistant] = None,
config_dir: Optional[str] = None,
enable_log: bool = True,
verbose: bool = False,
skip_pip: bool = False,
log_rotate_days: Any = None,
log_file: Any = None,
log_no_color: bool = False) \
-> Optional[core.HomeAssistant]:
"""Try to configure Home Assistant from a configuration dictionary.
Dynamically loads required components and its dependencies.
"""
if hass is None:
hass = core.HomeAssistant()
if config_dir is not None:
config_dir = os.path.abspath(config_dir)
hass.config.config_dir = config_dir
if not is_virtual_env():
hass.loop.run_until_complete(
async_mount_local_lib_path(config_dir))
# run task
hass = hass.loop.run_until_complete(
async_from_config_dict(
config, hass, config_dir, enable_log, verbose, skip_pip,
log_rotate_days, log_file, log_no_color)
)
return hass
DEBUGGER_INTEGRATIONS = {'ptvsd', }
CORE_INTEGRATIONS = ('homeassistant', 'persistent_notification')
LOGGING_INTEGRATIONS = {'logger', 'system_log'}
STAGE_1_INTEGRATIONS = {
# To record data
'recorder',
# To make sure we forward data to other instances
'mqtt_eventstream',
}
async def async_from_config_dict(config: Dict[str, Any],
@@ -85,14 +58,18 @@ async def async_from_config_dict(config: Dict[str, Any],
async_enable_logging(hass, verbose, log_rotate_days, log_file,
log_no_color)
hass.config.skip_pip = skip_pip
if skip_pip:
_LOGGER.warning("Skipping pip installation of required modules. "
"This may cause issues")
core_config = config.get(core.DOMAIN, {})
has_api_password = bool((config.get('http') or {}).get('api_password'))
has_trusted_networks = bool((config.get('http') or {})
.get('trusted_networks'))
api_password = config.get('http', {}).get('api_password')
trusted_networks = config.get('http', {}).get('trusted_networks')
try:
await conf_util.async_process_ha_core_config(
hass, core_config, has_api_password, has_trusted_networks)
hass, core_config, api_password, trusted_networks)
except vol.Invalid as config_err:
conf_util.async_log_exception(
config_err, 'homeassistant', core_config, hass)
@@ -102,90 +79,65 @@ async def async_from_config_dict(config: Dict[str, Any],
"Further initialization aborted")
return None
await hass.async_add_executor_job(
conf_util.process_ha_config_upgrade, hass)
hass.config.skip_pip = skip_pip
if skip_pip:
_LOGGER.warning("Skipping pip installation of required modules. "
"This may cause issues")
# Make a copy because we are mutating it.
config = OrderedDict(config)
# Merge packages
conf_util.merge_packages_config(
await conf_util.merge_packages_config(
hass, config, core_config.get(conf_util.CONF_PACKAGES, {}))
# Ensure we have no None values after merge
for key, value in config.items():
if not value:
config[key] = {}
hass.config_entries = config_entries.ConfigEntries(hass, config)
await hass.config_entries.async_load()
await hass.config_entries.async_initialize()
# Filter out the repeating and common config section [homeassistant]
components = set(key.split(' ')[0] for key in config.keys()
if key != core.DOMAIN)
components.update(hass.config_entries.async_domains())
# setup components
res = await core_components.async_setup(hass, config)
if not res:
_LOGGER.error("Home Assistant core failed to initialize. "
"Further initialization aborted")
return hass
await persistent_notification.async_setup(hass, config)
_LOGGER.info("Home Assistant core initialized")
# stage 1
for component in components:
if component not in FIRST_INIT_COMPONENT:
continue
hass.async_create_task(async_setup_component(hass, component, config))
await hass.async_block_till_done()
# stage 2
for component in components:
if component in FIRST_INIT_COMPONENT:
continue
hass.async_create_task(async_setup_component(hass, component, config))
await hass.async_block_till_done()
await _async_set_up_integrations(hass, config)
stop = time()
_LOGGER.info("Home Assistant initialized in %.2fs", stop-start)
async_register_signal_handling(hass)
return hass
# TEMP: warn users for invalid slugs
# Remove after 0.94 or 1.0
if cv.INVALID_SLUGS_FOUND or cv.INVALID_ENTITY_IDS_FOUND:
msg = []
if cv.INVALID_ENTITY_IDS_FOUND:
msg.append(
"Your configuration contains invalid entity ID references. "
"Please find and update the following. "
"This will become a breaking change."
)
msg.append('\n'.join('- {} -> {}'.format(*item)
for item
in cv.INVALID_ENTITY_IDS_FOUND.items()))
def from_config_file(config_path: str,
hass: Optional[core.HomeAssistant] = None,
verbose: bool = False,
skip_pip: bool = True,
log_rotate_days: Any = None,
log_file: Any = None,
log_no_color: bool = False)\
-> Optional[core.HomeAssistant]:
"""Read the configuration file and try to start all the functionality.
if cv.INVALID_SLUGS_FOUND:
msg.append(
"Your configuration contains invalid slugs. "
"Please find and update the following. "
"This will become a breaking change."
)
msg.append('\n'.join('- {} -> {}'.format(*item)
for item in cv.INVALID_SLUGS_FOUND.items()))
Will add functionality to 'hass' parameter if given,
instantiates a new Home Assistant object if 'hass' is not given.
"""
if hass is None:
hass = core.HomeAssistant()
hass.components.persistent_notification.async_create(
'\n\n'.join(msg), "Config Warning", "config_warning"
)
# run task
hass = hass.loop.run_until_complete(
async_from_config_file(
config_path, hass, verbose, skip_pip,
log_rotate_days, log_file, log_no_color)
)
# TEMP: warn users of invalid extra keys
# Remove after 0.92
if cv.INVALID_EXTRA_KEYS_FOUND:
msg = []
msg.append(
"Your configuration contains extra keys "
"that the platform does not support (but were silently "
"accepted before 0.88). Please find and remove the following."
"This will become a breaking change."
)
msg.append('\n'.join('- {}'.format(it)
for it in cv.INVALID_EXTRA_KEYS_FOUND))
hass.components.persistent_notification.async_create(
'\n\n'.join(msg), "Config Warning", "config_warning"
)
return hass
@@ -213,6 +165,9 @@ async def async_from_config_file(config_path: str,
async_enable_logging(hass, verbose, log_rotate_days, log_file,
log_no_color)
await hass.async_add_executor_job(
conf_util.process_ha_config_upgrade, hass)
try:
config_dict = await hass.async_add_executor_job(
conf_util.load_yaml_config_file, config_path)
@@ -328,3 +283,139 @@ async def async_mount_local_lib_path(config_dir: str) -> str:
if lib_dir not in sys.path:
sys.path.insert(0, lib_dir)
return deps_dir
@core.callback
def _get_domains(hass: core.HomeAssistant, config: Dict[str, Any]) -> Set[str]:
"""Get domains of components to set up."""
# Filter out the repeating and common config section [homeassistant]
domains = set(key.split(' ')[0] for key in config.keys()
if key != core.DOMAIN)
# Add config entry domains
domains.update(hass.config_entries.async_domains()) # type: ignore
# Make sure the Hass.io component is loaded
if 'HASSIO' in os.environ:
domains.add('hassio')
return domains
async def _async_set_up_integrations(
hass: core.HomeAssistant, config: Dict[str, Any]) -> None:
"""Set up all the integrations."""
domains = _get_domains(hass, config)
# Start up debuggers. Start these first in case they want to wait.
debuggers = domains & DEBUGGER_INTEGRATIONS
if debuggers:
_LOGGER.debug("Starting up debuggers %s", debuggers)
await asyncio.gather(*[
async_setup_component(hass, domain, config)
for domain in debuggers])
domains -= DEBUGGER_INTEGRATIONS
# Resolve all dependencies of all components so we can find the logging
# and integrations that need faster initialization.
resolved_domains_task = asyncio.gather(*[
loader.async_component_dependencies(hass, domain)
for domain in domains
], return_exceptions=True)
# Set up core.
_LOGGER.debug("Setting up %s", CORE_INTEGRATIONS)
if not all(await asyncio.gather(*[
async_setup_component(hass, domain, config)
for domain in CORE_INTEGRATIONS
])):
_LOGGER.error("Home Assistant core failed to initialize. "
"Further initialization aborted")
return
_LOGGER.debug("Home Assistant core initialized")
# Finish resolving domains
for dep_domains in await resolved_domains_task:
# Result is either a set or an exception. We ignore exceptions
# It will be properly handled during setup of the domain.
if isinstance(dep_domains, set):
domains.update(dep_domains)
# setup components
logging_domains = domains & LOGGING_INTEGRATIONS
stage_1_domains = domains & STAGE_1_INTEGRATIONS
stage_2_domains = domains - logging_domains - stage_1_domains
if logging_domains:
_LOGGER.info("Setting up %s", logging_domains)
await asyncio.gather(*[
async_setup_component(hass, domain, config)
for domain in logging_domains
])
# Kick off loading the registries. They don't need to be awaited.
asyncio.gather(
hass.helpers.device_registry.async_get_registry(),
hass.helpers.entity_registry.async_get_registry(),
hass.helpers.area_registry.async_get_registry())
if stage_1_domains:
await asyncio.gather(*[
async_setup_component(hass, domain, config)
for domain in stage_1_domains
])
# Load all integrations
after_dependencies = {} # type: Dict[str, Set[str]]
for int_or_exc in await asyncio.gather(*[
loader.async_get_integration(hass, domain)
for domain in stage_2_domains
], return_exceptions=True):
# Exceptions are handled in async_setup_component.
if (isinstance(int_or_exc, loader.Integration) and
int_or_exc.after_dependencies):
after_dependencies[int_or_exc.domain] = set(
int_or_exc.after_dependencies
)
last_load = None
while stage_2_domains:
domains_to_load = set()
for domain in stage_2_domains:
after_deps = after_dependencies.get(domain)
# Load if integration has no after_dependencies or they are
# all loaded
if (not after_deps or
not after_deps-hass.config.components):
domains_to_load.add(domain)
if not domains_to_load or domains_to_load == last_load:
break
_LOGGER.debug("Setting up %s", domains_to_load)
await asyncio.gather(*[
async_setup_component(hass, domain, config)
for domain in domains_to_load
])
last_load = domains_to_load
stage_2_domains -= domains_to_load
# These are stage 2 domains that never have their after_dependencies
# satisfied.
if stage_2_domains:
_LOGGER.debug("Final set up: %s", stage_2_domains)
await asyncio.gather(*[
async_setup_component(hass, domain, config)
for domain in stage_2_domains
])
# Wrap up startup
await hass.async_block_till_done()

View File

@@ -7,26 +7,12 @@ Component design guidelines:
format "<DOMAIN>.<OBJECT_ID>".
- Each component should publish services only under its own domain.
"""
import asyncio
import itertools as it
import logging
from typing import Awaitable
import homeassistant.core as ha
import homeassistant.config as conf_util
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.service import extract_entity_ids
from homeassistant.helpers import intent
from homeassistant.const import (
ATTR_ENTITY_ID, SERVICE_TURN_ON, SERVICE_TURN_OFF, SERVICE_TOGGLE,
SERVICE_HOMEASSISTANT_STOP, SERVICE_HOMEASSISTANT_RESTART,
RESTART_EXIT_CODE)
from homeassistant.core import split_entity_id
_LOGGER = logging.getLogger(__name__)
SERVICE_RELOAD_CORE_CONFIG = 'reload_core_config'
SERVICE_CHECK_CONFIG = 'check_config'
def is_on(hass, entity_id=None):
"""Load up the module to call the is_on method.
@@ -39,7 +25,7 @@ def is_on(hass, entity_id=None):
entity_ids = hass.states.entity_ids()
for ent_id in entity_ids:
domain = ha.split_entity_id(ent_id)[0]
domain = split_entity_id(ent_id)[0]
try:
component = getattr(hass.components, domain)
@@ -57,155 +43,3 @@ def is_on(hass, entity_id=None):
return True
return False
def turn_on(hass, entity_id=None, **service_data):
"""Turn specified entity on if possible."""
if entity_id is not None:
service_data[ATTR_ENTITY_ID] = entity_id
hass.services.call(ha.DOMAIN, SERVICE_TURN_ON, service_data)
def turn_off(hass, entity_id=None, **service_data):
"""Turn specified entity off."""
if entity_id is not None:
service_data[ATTR_ENTITY_ID] = entity_id
hass.services.call(ha.DOMAIN, SERVICE_TURN_OFF, service_data)
def toggle(hass, entity_id=None, **service_data):
"""Toggle specified entity."""
if entity_id is not None:
service_data[ATTR_ENTITY_ID] = entity_id
hass.services.call(ha.DOMAIN, SERVICE_TOGGLE, service_data)
def stop(hass):
"""Stop Home Assistant."""
hass.services.call(ha.DOMAIN, SERVICE_HOMEASSISTANT_STOP)
def restart(hass):
"""Stop Home Assistant."""
hass.services.call(ha.DOMAIN, SERVICE_HOMEASSISTANT_RESTART)
def check_config(hass):
"""Check the config files."""
hass.services.call(ha.DOMAIN, SERVICE_CHECK_CONFIG)
def reload_core_config(hass):
"""Reload the core config."""
hass.services.call(ha.DOMAIN, SERVICE_RELOAD_CORE_CONFIG)
@asyncio.coroutine
def async_reload_core_config(hass):
"""Reload the core config."""
yield from hass.services.async_call(ha.DOMAIN, SERVICE_RELOAD_CORE_CONFIG)
@asyncio.coroutine
def async_setup(hass: ha.HomeAssistant, config: dict) -> Awaitable[bool]:
"""Set up general services related to Home Assistant."""
@asyncio.coroutine
def async_handle_turn_service(service):
"""Handle calls to homeassistant.turn_on/off."""
entity_ids = extract_entity_ids(hass, service)
# Generic turn on/off method requires entity id
if not entity_ids:
_LOGGER.error(
"homeassistant/%s cannot be called without entity_id",
service.service)
return
# Group entity_ids by domain. groupby requires sorted data.
by_domain = it.groupby(sorted(entity_ids),
lambda item: ha.split_entity_id(item)[0])
tasks = []
for domain, ent_ids in by_domain:
# We want to block for all calls and only return when all calls
# have been processed. If a service does not exist it causes a 10
# second delay while we're blocking waiting for a response.
# But services can be registered on other HA instances that are
# listening to the bus too. So as an in between solution, we'll
# block only if the service is defined in the current HA instance.
blocking = hass.services.has_service(domain, service.service)
# Create a new dict for this call
data = dict(service.data)
# ent_ids is a generator, convert it to a list.
data[ATTR_ENTITY_ID] = list(ent_ids)
tasks.append(hass.services.async_call(
domain, service.service, data, blocking))
yield from asyncio.wait(tasks, loop=hass.loop)
hass.services.async_register(
ha.DOMAIN, SERVICE_TURN_OFF, async_handle_turn_service)
hass.services.async_register(
ha.DOMAIN, SERVICE_TURN_ON, async_handle_turn_service)
hass.services.async_register(
ha.DOMAIN, SERVICE_TOGGLE, async_handle_turn_service)
hass.helpers.intent.async_register(intent.ServiceIntentHandler(
intent.INTENT_TURN_ON, ha.DOMAIN, SERVICE_TURN_ON, "Turned {} on"))
hass.helpers.intent.async_register(intent.ServiceIntentHandler(
intent.INTENT_TURN_OFF, ha.DOMAIN, SERVICE_TURN_OFF,
"Turned {} off"))
hass.helpers.intent.async_register(intent.ServiceIntentHandler(
intent.INTENT_TOGGLE, ha.DOMAIN, SERVICE_TOGGLE, "Toggled {}"))
@asyncio.coroutine
def async_handle_core_service(call):
"""Service handler for handling core services."""
if call.service == SERVICE_HOMEASSISTANT_STOP:
hass.async_create_task(hass.async_stop())
return
try:
errors = yield from conf_util.async_check_ha_config_file(hass)
except HomeAssistantError:
return
if errors:
_LOGGER.error(errors)
hass.components.persistent_notification.async_create(
"Config error. See dev-info panel for details.",
"Config validating", "{0}.check_config".format(ha.DOMAIN))
return
if call.service == SERVICE_HOMEASSISTANT_RESTART:
hass.async_create_task(hass.async_stop(RESTART_EXIT_CODE))
hass.services.async_register(
ha.DOMAIN, SERVICE_HOMEASSISTANT_STOP, async_handle_core_service)
hass.services.async_register(
ha.DOMAIN, SERVICE_HOMEASSISTANT_RESTART, async_handle_core_service)
hass.services.async_register(
ha.DOMAIN, SERVICE_CHECK_CONFIG, async_handle_core_service)
@asyncio.coroutine
def async_handle_reload_config(call):
"""Service handler for reloading core config."""
try:
conf = yield from conf_util.async_hass_config_yaml(hass)
except HomeAssistantError as err:
_LOGGER.error(err)
return
yield from conf_util.async_process_ha_core_config(
hass, conf.get(ha.DOMAIN) or {})
hass.services.async_register(
ha.DOMAIN, SERVICE_RELOAD_CORE_CONFIG, async_handle_reload_config)
return True

View File

@@ -1,347 +0,0 @@
"""
This component provides basic support for Abode Home Security system.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/abode/
"""
import asyncio
import logging
from functools import partial
from requests.exceptions import HTTPError, ConnectTimeout
import voluptuous as vol
from homeassistant.const import (
ATTR_ATTRIBUTION, ATTR_DATE, ATTR_TIME, ATTR_ENTITY_ID, CONF_USERNAME,
CONF_PASSWORD, CONF_EXCLUDE, CONF_NAME, CONF_LIGHTS,
EVENT_HOMEASSISTANT_STOP, EVENT_HOMEASSISTANT_START)
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers import discovery
from homeassistant.helpers.entity import Entity
REQUIREMENTS = ['abodepy==0.13.1']
_LOGGER = logging.getLogger(__name__)
CONF_ATTRIBUTION = "Data provided by goabode.com"
CONF_POLLING = 'polling'
DOMAIN = 'abode'
DEFAULT_CACHEDB = './abodepy_cache.pickle'
NOTIFICATION_ID = 'abode_notification'
NOTIFICATION_TITLE = 'Abode Security Setup'
EVENT_ABODE_ALARM = 'abode_alarm'
EVENT_ABODE_ALARM_END = 'abode_alarm_end'
EVENT_ABODE_AUTOMATION = 'abode_automation'
EVENT_ABODE_FAULT = 'abode_panel_fault'
EVENT_ABODE_RESTORE = 'abode_panel_restore'
SERVICE_SETTINGS = 'change_setting'
SERVICE_CAPTURE_IMAGE = 'capture_image'
SERVICE_TRIGGER = 'trigger_quick_action'
ATTR_DEVICE_ID = 'device_id'
ATTR_DEVICE_NAME = 'device_name'
ATTR_DEVICE_TYPE = 'device_type'
ATTR_EVENT_CODE = 'event_code'
ATTR_EVENT_NAME = 'event_name'
ATTR_EVENT_TYPE = 'event_type'
ATTR_EVENT_UTC = 'event_utc'
ATTR_SETTING = 'setting'
ATTR_USER_NAME = 'user_name'
ATTR_VALUE = 'value'
ABODE_DEVICE_ID_LIST_SCHEMA = vol.Schema([str])
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
vol.Required(CONF_USERNAME): cv.string,
vol.Required(CONF_PASSWORD): cv.string,
vol.Optional(CONF_NAME): cv.string,
vol.Optional(CONF_POLLING, default=False): cv.boolean,
vol.Optional(CONF_EXCLUDE, default=[]): ABODE_DEVICE_ID_LIST_SCHEMA,
vol.Optional(CONF_LIGHTS, default=[]): ABODE_DEVICE_ID_LIST_SCHEMA
}),
}, extra=vol.ALLOW_EXTRA)
CHANGE_SETTING_SCHEMA = vol.Schema({
vol.Required(ATTR_SETTING): cv.string,
vol.Required(ATTR_VALUE): cv.string
})
CAPTURE_IMAGE_SCHEMA = vol.Schema({
ATTR_ENTITY_ID: cv.entity_ids,
})
TRIGGER_SCHEMA = vol.Schema({
ATTR_ENTITY_ID: cv.entity_ids,
})
ABODE_PLATFORMS = [
'alarm_control_panel', 'binary_sensor', 'lock', 'switch', 'cover',
'camera', 'light', 'sensor'
]
class AbodeSystem:
"""Abode System class."""
def __init__(self, username, password, cache,
name, polling, exclude, lights):
"""Initialize the system."""
import abodepy
self.abode = abodepy.Abode(
username, password, auto_login=True, get_devices=True,
get_automations=True, cache_path=cache)
self.name = name
self.polling = polling
self.exclude = exclude
self.lights = lights
self.devices = []
def is_excluded(self, device):
"""Check if a device is configured to be excluded."""
return device.device_id in self.exclude
def is_automation_excluded(self, automation):
"""Check if an automation is configured to be excluded."""
return automation.automation_id in self.exclude
def is_light(self, device):
"""Check if a switch device is configured as a light."""
import abodepy.helpers.constants as CONST
return (device.generic_type == CONST.TYPE_LIGHT or
(device.generic_type == CONST.TYPE_SWITCH and
device.device_id in self.lights))
def setup(hass, config):
"""Set up Abode component."""
from abodepy.exceptions import AbodeException
conf = config[DOMAIN]
username = conf.get(CONF_USERNAME)
password = conf.get(CONF_PASSWORD)
name = conf.get(CONF_NAME)
polling = conf.get(CONF_POLLING)
exclude = conf.get(CONF_EXCLUDE)
lights = conf.get(CONF_LIGHTS)
try:
cache = hass.config.path(DEFAULT_CACHEDB)
hass.data[DOMAIN] = AbodeSystem(
username, password, cache, name, polling, exclude, lights)
except (AbodeException, ConnectTimeout, HTTPError) as ex:
_LOGGER.error("Unable to connect to Abode: %s", str(ex))
hass.components.persistent_notification.create(
'Error: {}<br />'
'You will need to restart hass after fixing.'
''.format(ex),
title=NOTIFICATION_TITLE,
notification_id=NOTIFICATION_ID)
return False
setup_hass_services(hass)
setup_hass_events(hass)
setup_abode_events(hass)
for platform in ABODE_PLATFORMS:
discovery.load_platform(hass, platform, DOMAIN, {}, config)
return True
def setup_hass_services(hass):
"""Home assistant services."""
from abodepy.exceptions import AbodeException
def change_setting(call):
"""Change an Abode system setting."""
setting = call.data.get(ATTR_SETTING)
value = call.data.get(ATTR_VALUE)
try:
hass.data[DOMAIN].abode.set_setting(setting, value)
except AbodeException as ex:
_LOGGER.warning(ex)
def capture_image(call):
"""Capture a new image."""
entity_ids = call.data.get(ATTR_ENTITY_ID)
target_devices = [device for device in hass.data[DOMAIN].devices
if device.entity_id in entity_ids]
for device in target_devices:
device.capture()
def trigger_quick_action(call):
"""Trigger a quick action."""
entity_ids = call.data.get(ATTR_ENTITY_ID, None)
target_devices = [device for device in hass.data[DOMAIN].devices
if device.entity_id in entity_ids]
for device in target_devices:
device.trigger()
hass.services.register(
DOMAIN, SERVICE_SETTINGS, change_setting,
schema=CHANGE_SETTING_SCHEMA)
hass.services.register(
DOMAIN, SERVICE_CAPTURE_IMAGE, capture_image,
schema=CAPTURE_IMAGE_SCHEMA)
hass.services.register(
DOMAIN, SERVICE_TRIGGER, trigger_quick_action,
schema=TRIGGER_SCHEMA)
def setup_hass_events(hass):
"""Home Assistant start and stop callbacks."""
def startup(event):
"""Listen for push events."""
hass.data[DOMAIN].abode.events.start()
def logout(event):
"""Logout of Abode."""
if not hass.data[DOMAIN].polling:
hass.data[DOMAIN].abode.events.stop()
hass.data[DOMAIN].abode.logout()
_LOGGER.info("Logged out of Abode")
if not hass.data[DOMAIN].polling:
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, startup)
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, logout)
def setup_abode_events(hass):
"""Event callbacks."""
import abodepy.helpers.timeline as TIMELINE
def event_callback(event, event_json):
"""Handle an event callback from Abode."""
data = {
ATTR_DEVICE_ID: event_json.get(ATTR_DEVICE_ID, ''),
ATTR_DEVICE_NAME: event_json.get(ATTR_DEVICE_NAME, ''),
ATTR_DEVICE_TYPE: event_json.get(ATTR_DEVICE_TYPE, ''),
ATTR_EVENT_CODE: event_json.get(ATTR_EVENT_CODE, ''),
ATTR_EVENT_NAME: event_json.get(ATTR_EVENT_NAME, ''),
ATTR_EVENT_TYPE: event_json.get(ATTR_EVENT_TYPE, ''),
ATTR_EVENT_UTC: event_json.get(ATTR_EVENT_UTC, ''),
ATTR_USER_NAME: event_json.get(ATTR_USER_NAME, ''),
ATTR_DATE: event_json.get(ATTR_DATE, ''),
ATTR_TIME: event_json.get(ATTR_TIME, ''),
}
hass.bus.fire(event, data)
events = [TIMELINE.ALARM_GROUP, TIMELINE.ALARM_END_GROUP,
TIMELINE.PANEL_FAULT_GROUP, TIMELINE.PANEL_RESTORE_GROUP,
TIMELINE.AUTOMATION_GROUP]
for event in events:
hass.data[DOMAIN].abode.events.add_event_callback(
event,
partial(event_callback, event))
class AbodeDevice(Entity):
"""Representation of an Abode device."""
def __init__(self, data, device):
"""Initialize a sensor for Abode device."""
self._data = data
self._device = device
@asyncio.coroutine
def async_added_to_hass(self):
"""Subscribe Abode events."""
self.hass.async_add_job(
self._data.abode.events.add_device_callback,
self._device.device_id, self._update_callback
)
@property
def should_poll(self):
"""Return the polling state."""
return self._data.polling
def update(self):
"""Update automation state."""
self._device.refresh()
@property
def name(self):
"""Return the name of the sensor."""
return self._device.name
@property
def device_state_attributes(self):
"""Return the state attributes."""
return {
ATTR_ATTRIBUTION: CONF_ATTRIBUTION,
'device_id': self._device.device_id,
'battery_low': self._device.battery_low,
'no_response': self._device.no_response,
'device_type': self._device.type
}
def _update_callback(self, device):
"""Update the device state."""
self.schedule_update_ha_state()
class AbodeAutomation(Entity):
"""Representation of an Abode automation."""
def __init__(self, data, automation, event=None):
"""Initialize for Abode automation."""
self._data = data
self._automation = automation
self._event = event
@asyncio.coroutine
def async_added_to_hass(self):
"""Subscribe Abode events."""
if self._event:
self.hass.async_add_job(
self._data.abode.events.add_event_callback,
self._event, self._update_callback
)
@property
def should_poll(self):
"""Return the polling state."""
return self._data.polling
def update(self):
"""Update automation state."""
self._automation.refresh()
@property
def name(self):
"""Return the name of the sensor."""
return self._automation.name
@property
def device_state_attributes(self):
"""Return the state attributes."""
return {
ATTR_ATTRIBUTION: CONF_ATTRIBUTION,
'automation_id': self._automation.automation_id,
'type': self._automation.type,
'sub_type': self._automation.sub_type
}
def _update_callback(self, device):
"""Update the device state."""
self._automation.refresh()
self.schedule_update_ha_state()

View File

@@ -0,0 +1,338 @@
"""Support for Abode Home Security system."""
import logging
from functools import partial
from requests.exceptions import HTTPError, ConnectTimeout
import voluptuous as vol
from homeassistant.const import (
ATTR_ATTRIBUTION, ATTR_DATE, ATTR_TIME, ATTR_ENTITY_ID, CONF_USERNAME,
CONF_PASSWORD, CONF_EXCLUDE, CONF_NAME, CONF_LIGHTS,
EVENT_HOMEASSISTANT_STOP, EVENT_HOMEASSISTANT_START)
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers import discovery
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
ATTRIBUTION = "Data provided by goabode.com"
CONF_POLLING = 'polling'
DOMAIN = 'abode'
DEFAULT_CACHEDB = './abodepy_cache.pickle'
NOTIFICATION_ID = 'abode_notification'
NOTIFICATION_TITLE = 'Abode Security Setup'
EVENT_ABODE_ALARM = 'abode_alarm'
EVENT_ABODE_ALARM_END = 'abode_alarm_end'
EVENT_ABODE_AUTOMATION = 'abode_automation'
EVENT_ABODE_FAULT = 'abode_panel_fault'
EVENT_ABODE_RESTORE = 'abode_panel_restore'
SERVICE_SETTINGS = 'change_setting'
SERVICE_CAPTURE_IMAGE = 'capture_image'
SERVICE_TRIGGER = 'trigger_quick_action'
ATTR_DEVICE_ID = 'device_id'
ATTR_DEVICE_NAME = 'device_name'
ATTR_DEVICE_TYPE = 'device_type'
ATTR_EVENT_CODE = 'event_code'
ATTR_EVENT_NAME = 'event_name'
ATTR_EVENT_TYPE = 'event_type'
ATTR_EVENT_UTC = 'event_utc'
ATTR_SETTING = 'setting'
ATTR_USER_NAME = 'user_name'
ATTR_VALUE = 'value'
ABODE_DEVICE_ID_LIST_SCHEMA = vol.Schema([str])
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
vol.Required(CONF_USERNAME): cv.string,
vol.Required(CONF_PASSWORD): cv.string,
vol.Optional(CONF_NAME): cv.string,
vol.Optional(CONF_POLLING, default=False): cv.boolean,
vol.Optional(CONF_EXCLUDE, default=[]): ABODE_DEVICE_ID_LIST_SCHEMA,
vol.Optional(CONF_LIGHTS, default=[]): ABODE_DEVICE_ID_LIST_SCHEMA
}),
}, extra=vol.ALLOW_EXTRA)
CHANGE_SETTING_SCHEMA = vol.Schema({
vol.Required(ATTR_SETTING): cv.string,
vol.Required(ATTR_VALUE): cv.string
})
CAPTURE_IMAGE_SCHEMA = vol.Schema({
ATTR_ENTITY_ID: cv.entity_ids,
})
TRIGGER_SCHEMA = vol.Schema({
ATTR_ENTITY_ID: cv.entity_ids,
})
ABODE_PLATFORMS = [
'alarm_control_panel', 'binary_sensor', 'lock', 'switch', 'cover',
'camera', 'light', 'sensor'
]
class AbodeSystem:
"""Abode System class."""
def __init__(self, username, password, cache,
name, polling, exclude, lights):
"""Initialize the system."""
import abodepy
self.abode = abodepy.Abode(
username, password, auto_login=True, get_devices=True,
get_automations=True, cache_path=cache)
self.name = name
self.polling = polling
self.exclude = exclude
self.lights = lights
self.devices = []
def is_excluded(self, device):
"""Check if a device is configured to be excluded."""
return device.device_id in self.exclude
def is_automation_excluded(self, automation):
"""Check if an automation is configured to be excluded."""
return automation.automation_id in self.exclude
def is_light(self, device):
"""Check if a switch device is configured as a light."""
import abodepy.helpers.constants as CONST
return (device.generic_type == CONST.TYPE_LIGHT or
(device.generic_type == CONST.TYPE_SWITCH and
device.device_id in self.lights))
def setup(hass, config):
"""Set up Abode component."""
from abodepy.exceptions import AbodeException
conf = config[DOMAIN]
username = conf.get(CONF_USERNAME)
password = conf.get(CONF_PASSWORD)
name = conf.get(CONF_NAME)
polling = conf.get(CONF_POLLING)
exclude = conf.get(CONF_EXCLUDE)
lights = conf.get(CONF_LIGHTS)
try:
cache = hass.config.path(DEFAULT_CACHEDB)
hass.data[DOMAIN] = AbodeSystem(
username, password, cache, name, polling, exclude, lights)
except (AbodeException, ConnectTimeout, HTTPError) as ex:
_LOGGER.error("Unable to connect to Abode: %s", str(ex))
hass.components.persistent_notification.create(
'Error: {}<br />'
'You will need to restart hass after fixing.'
''.format(ex),
title=NOTIFICATION_TITLE,
notification_id=NOTIFICATION_ID)
return False
setup_hass_services(hass)
setup_hass_events(hass)
setup_abode_events(hass)
for platform in ABODE_PLATFORMS:
discovery.load_platform(hass, platform, DOMAIN, {}, config)
return True
def setup_hass_services(hass):
"""Home assistant services."""
from abodepy.exceptions import AbodeException
def change_setting(call):
"""Change an Abode system setting."""
setting = call.data.get(ATTR_SETTING)
value = call.data.get(ATTR_VALUE)
try:
hass.data[DOMAIN].abode.set_setting(setting, value)
except AbodeException as ex:
_LOGGER.warning(ex)
def capture_image(call):
"""Capture a new image."""
entity_ids = call.data.get(ATTR_ENTITY_ID)
target_devices = [device for device in hass.data[DOMAIN].devices
if device.entity_id in entity_ids]
for device in target_devices:
device.capture()
def trigger_quick_action(call):
"""Trigger a quick action."""
entity_ids = call.data.get(ATTR_ENTITY_ID, None)
target_devices = [device for device in hass.data[DOMAIN].devices
if device.entity_id in entity_ids]
for device in target_devices:
device.trigger()
hass.services.register(
DOMAIN, SERVICE_SETTINGS, change_setting,
schema=CHANGE_SETTING_SCHEMA)
hass.services.register(
DOMAIN, SERVICE_CAPTURE_IMAGE, capture_image,
schema=CAPTURE_IMAGE_SCHEMA)
hass.services.register(
DOMAIN, SERVICE_TRIGGER, trigger_quick_action,
schema=TRIGGER_SCHEMA)
def setup_hass_events(hass):
"""Home Assistant start and stop callbacks."""
def startup(event):
"""Listen for push events."""
hass.data[DOMAIN].abode.events.start()
def logout(event):
"""Logout of Abode."""
if not hass.data[DOMAIN].polling:
hass.data[DOMAIN].abode.events.stop()
hass.data[DOMAIN].abode.logout()
_LOGGER.info("Logged out of Abode")
if not hass.data[DOMAIN].polling:
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, startup)
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, logout)
def setup_abode_events(hass):
"""Event callbacks."""
import abodepy.helpers.timeline as TIMELINE
def event_callback(event, event_json):
"""Handle an event callback from Abode."""
data = {
ATTR_DEVICE_ID: event_json.get(ATTR_DEVICE_ID, ''),
ATTR_DEVICE_NAME: event_json.get(ATTR_DEVICE_NAME, ''),
ATTR_DEVICE_TYPE: event_json.get(ATTR_DEVICE_TYPE, ''),
ATTR_EVENT_CODE: event_json.get(ATTR_EVENT_CODE, ''),
ATTR_EVENT_NAME: event_json.get(ATTR_EVENT_NAME, ''),
ATTR_EVENT_TYPE: event_json.get(ATTR_EVENT_TYPE, ''),
ATTR_EVENT_UTC: event_json.get(ATTR_EVENT_UTC, ''),
ATTR_USER_NAME: event_json.get(ATTR_USER_NAME, ''),
ATTR_DATE: event_json.get(ATTR_DATE, ''),
ATTR_TIME: event_json.get(ATTR_TIME, ''),
}
hass.bus.fire(event, data)
events = [TIMELINE.ALARM_GROUP, TIMELINE.ALARM_END_GROUP,
TIMELINE.PANEL_FAULT_GROUP, TIMELINE.PANEL_RESTORE_GROUP,
TIMELINE.AUTOMATION_GROUP]
for event in events:
hass.data[DOMAIN].abode.events.add_event_callback(
event,
partial(event_callback, event))
class AbodeDevice(Entity):
"""Representation of an Abode device."""
def __init__(self, data, device):
"""Initialize a sensor for Abode device."""
self._data = data
self._device = device
async def async_added_to_hass(self):
"""Subscribe Abode events."""
self.hass.async_add_job(
self._data.abode.events.add_device_callback,
self._device.device_id, self._update_callback
)
@property
def should_poll(self):
"""Return the polling state."""
return self._data.polling
def update(self):
"""Update automation state."""
self._device.refresh()
@property
def name(self):
"""Return the name of the sensor."""
return self._device.name
@property
def device_state_attributes(self):
"""Return the state attributes."""
return {
ATTR_ATTRIBUTION: ATTRIBUTION,
'device_id': self._device.device_id,
'battery_low': self._device.battery_low,
'no_response': self._device.no_response,
'device_type': self._device.type
}
def _update_callback(self, device):
"""Update the device state."""
self.schedule_update_ha_state()
class AbodeAutomation(Entity):
"""Representation of an Abode automation."""
def __init__(self, data, automation, event=None):
"""Initialize for Abode automation."""
self._data = data
self._automation = automation
self._event = event
async def async_added_to_hass(self):
"""Subscribe Abode events."""
if self._event:
self.hass.async_add_job(
self._data.abode.events.add_event_callback,
self._event, self._update_callback
)
@property
def should_poll(self):
"""Return the polling state."""
return self._data.polling
def update(self):
"""Update automation state."""
self._automation.refresh()
@property
def name(self):
"""Return the name of the sensor."""
return self._automation.name
@property
def device_state_attributes(self):
"""Return the state attributes."""
return {
ATTR_ATTRIBUTION: ATTRIBUTION,
'automation_id': self._automation.automation_id,
'type': self._automation.type,
'sub_type': self._automation.sub_type
}
def _update_callback(self, device):
"""Update the device state."""
self._automation.refresh()
self.schedule_update_ha_state()

View File

@@ -0,0 +1,78 @@
"""Support for Abode Security System alarm control panels."""
import logging
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.const import (
ATTR_ATTRIBUTION, STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME,
STATE_ALARM_DISARMED)
from . import ATTRIBUTION, DOMAIN as ABODE_DOMAIN, AbodeDevice
_LOGGER = logging.getLogger(__name__)
ICON = 'mdi:security'
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up an alarm control panel for an Abode device."""
data = hass.data[ABODE_DOMAIN]
alarm_devices = [AbodeAlarm(data, data.abode.get_alarm(), data.name)]
data.devices.extend(alarm_devices)
add_entities(alarm_devices)
class AbodeAlarm(AbodeDevice, alarm.AlarmControlPanel):
"""An alarm_control_panel implementation for Abode."""
def __init__(self, data, device, name):
"""Initialize the alarm control panel."""
super().__init__(data, device)
self._name = name
@property
def icon(self):
"""Return the icon."""
return ICON
@property
def state(self):
"""Return the state of the device."""
if self._device.is_standby:
state = STATE_ALARM_DISARMED
elif self._device.is_away:
state = STATE_ALARM_ARMED_AWAY
elif self._device.is_home:
state = STATE_ALARM_ARMED_HOME
else:
state = None
return state
def alarm_disarm(self, code=None):
"""Send disarm command."""
self._device.set_standby()
def alarm_arm_home(self, code=None):
"""Send arm home command."""
self._device.set_home()
def alarm_arm_away(self, code=None):
"""Send arm away command."""
self._device.set_away()
@property
def name(self):
"""Return the name of the alarm."""
return self._name or super().name
@property
def device_state_attributes(self):
"""Return the state attributes."""
return {
ATTR_ATTRIBUTION: ATTRIBUTION,
'device_id': self._device.device_id,
'battery_backup': self._device.battery,
'cellular_backup': self._device.is_cellular,
}

View File

@@ -0,0 +1,66 @@
"""Support for Abode Security System binary sensors."""
import logging
from homeassistant.components.binary_sensor import BinarySensorDevice
from . import DOMAIN as ABODE_DOMAIN, AbodeAutomation, AbodeDevice
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up a sensor for an Abode device."""
import abodepy.helpers.constants as CONST
import abodepy.helpers.timeline as TIMELINE
data = hass.data[ABODE_DOMAIN]
device_types = [CONST.TYPE_CONNECTIVITY, CONST.TYPE_MOISTURE,
CONST.TYPE_MOTION, CONST.TYPE_OCCUPANCY,
CONST.TYPE_OPENING]
devices = []
for device in data.abode.get_devices(generic_type=device_types):
if data.is_excluded(device):
continue
devices.append(AbodeBinarySensor(data, device))
for automation in data.abode.get_automations(
generic_type=CONST.TYPE_QUICK_ACTION):
if data.is_automation_excluded(automation):
continue
devices.append(AbodeQuickActionBinarySensor(
data, automation, TIMELINE.AUTOMATION_EDIT_GROUP))
data.devices.extend(devices)
add_entities(devices)
class AbodeBinarySensor(AbodeDevice, BinarySensorDevice):
"""A binary sensor implementation for Abode device."""
@property
def is_on(self):
"""Return True if the binary sensor is on."""
return self._device.is_on
@property
def device_class(self):
"""Return the class of the binary sensor."""
return self._device.generic_type
class AbodeQuickActionBinarySensor(AbodeAutomation, BinarySensorDevice):
"""A binary sensor implementation for Abode quick action automations."""
def trigger(self):
"""Trigger a quick automation."""
self._automation.trigger()
@property
def is_on(self):
"""Return True if the binary sensor is on."""
return self._automation.is_active

View File

@@ -0,0 +1,92 @@
"""Support for Abode Security System cameras."""
from datetime import timedelta
import logging
import requests
from homeassistant.components.camera import Camera
from homeassistant.util import Throttle
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=90)
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up Abode camera devices."""
import abodepy.helpers.constants as CONST
import abodepy.helpers.timeline as TIMELINE
data = hass.data[ABODE_DOMAIN]
devices = []
for device in data.abode.get_devices(generic_type=CONST.TYPE_CAMERA):
if data.is_excluded(device):
continue
devices.append(AbodeCamera(data, device, TIMELINE.CAPTURE_IMAGE))
data.devices.extend(devices)
add_entities(devices)
class AbodeCamera(AbodeDevice, Camera):
"""Representation of an Abode camera."""
def __init__(self, data, device, event):
"""Initialize the Abode device."""
AbodeDevice.__init__(self, data, device)
Camera.__init__(self)
self._event = event
self._response = None
async def async_added_to_hass(self):
"""Subscribe Abode events."""
await super().async_added_to_hass()
self.hass.async_add_job(
self._data.abode.events.add_timeline_callback,
self._event, self._capture_callback
)
def capture(self):
"""Request a new image capture."""
return self._device.capture()
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def refresh_image(self):
"""Find a new image on the timeline."""
if self._device.refresh_image():
self.get_image()
def get_image(self):
"""Attempt to download the most recent capture."""
if self._device.image_url:
try:
self._response = requests.get(
self._device.image_url, stream=True)
self._response.raise_for_status()
except requests.HTTPError as err:
_LOGGER.warning("Failed to get camera image: %s", err)
self._response = None
else:
self._response = None
def camera_image(self):
"""Get a camera image."""
self.refresh_image()
if self._response:
return self._response.content
return None
def _capture_callback(self, capture):
"""Update the image with the device then refresh device."""
self._device.update_image_location(capture)
self.get_image()
self.schedule_update_ha_state()

View File

@@ -0,0 +1,43 @@
"""Support for Abode Security System covers."""
import logging
from homeassistant.components.cover import CoverDevice
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up Abode cover devices."""
import abodepy.helpers.constants as CONST
data = hass.data[ABODE_DOMAIN]
devices = []
for device in data.abode.get_devices(generic_type=CONST.TYPE_COVER):
if data.is_excluded(device):
continue
devices.append(AbodeCover(data, device))
data.devices.extend(devices)
add_entities(devices)
class AbodeCover(AbodeDevice, CoverDevice):
"""Representation of an Abode cover."""
@property
def is_closed(self):
"""Return true if cover is closed, else False."""
return not self._device.is_open
def close_cover(self, **kwargs):
"""Issue close command to cover."""
self._device.close_cover()
def open_cover(self, **kwargs):
"""Issue open command to cover."""
self._device.open_cover()

View File

@@ -0,0 +1,97 @@
"""Support for Abode Security System lights."""
import logging
from math import ceil
from homeassistant.components.light import (
ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, SUPPORT_BRIGHTNESS,
SUPPORT_COLOR, SUPPORT_COLOR_TEMP, Light)
from homeassistant.util.color import (
color_temperature_kelvin_to_mired, color_temperature_mired_to_kelvin)
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up Abode light devices."""
import abodepy.helpers.constants as CONST
data = hass.data[ABODE_DOMAIN]
device_types = [CONST.TYPE_LIGHT, CONST.TYPE_SWITCH]
devices = []
# Get all regular lights that are not excluded or switches marked as lights
for device in data.abode.get_devices(generic_type=device_types):
if data.is_excluded(device) or not data.is_light(device):
continue
devices.append(AbodeLight(data, device))
data.devices.extend(devices)
add_entities(devices)
class AbodeLight(AbodeDevice, Light):
"""Representation of an Abode light."""
def turn_on(self, **kwargs):
"""Turn on the light."""
if ATTR_COLOR_TEMP in kwargs and self._device.is_color_capable:
self._device.set_color_temp(
int(color_temperature_mired_to_kelvin(
kwargs[ATTR_COLOR_TEMP])))
if ATTR_HS_COLOR in kwargs and self._device.is_color_capable:
self._device.set_color(kwargs[ATTR_HS_COLOR])
if ATTR_BRIGHTNESS in kwargs and self._device.is_dimmable:
# Convert HASS brightness (0-255) to Abode brightness (0-99)
# If 100 is sent to Abode, response is 99 causing an error
self._device.set_level(ceil(kwargs[ATTR_BRIGHTNESS] * 99 / 255.0))
else:
self._device.switch_on()
def turn_off(self, **kwargs):
"""Turn off the light."""
self._device.switch_off()
@property
def is_on(self):
"""Return true if device is on."""
return self._device.is_on
@property
def brightness(self):
"""Return the brightness of the light."""
if self._device.is_dimmable and self._device.has_brightness:
brightness = int(self._device.brightness)
# Abode returns 100 during device initialization and device refresh
if brightness == 100:
return 255
# Convert Abode brightness (0-99) to HASS brightness (0-255)
return ceil(brightness * 255 / 99.0)
@property
def color_temp(self):
"""Return the color temp of the light."""
if self._device.has_color:
return color_temperature_kelvin_to_mired(self._device.color_temp)
@property
def hs_color(self):
"""Return the color of the light."""
if self._device.has_color:
return self._device.color
@property
def supported_features(self):
"""Flag supported features."""
if self._device.is_dimmable and self._device.is_color_capable:
return SUPPORT_BRIGHTNESS | SUPPORT_COLOR | SUPPORT_COLOR_TEMP
if self._device.is_dimmable:
return SUPPORT_BRIGHTNESS
return 0

View File

@@ -0,0 +1,43 @@
"""Support for Abode Security System locks."""
import logging
from homeassistant.components.lock import LockDevice
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up Abode lock devices."""
import abodepy.helpers.constants as CONST
data = hass.data[ABODE_DOMAIN]
devices = []
for device in data.abode.get_devices(generic_type=CONST.TYPE_LOCK):
if data.is_excluded(device):
continue
devices.append(AbodeLock(data, device))
data.devices.extend(devices)
add_entities(devices)
class AbodeLock(AbodeDevice, LockDevice):
"""Representation of an Abode lock."""
def lock(self, **kwargs):
"""Lock the device."""
self._device.lock()
def unlock(self, **kwargs):
"""Unlock the device."""
self._device.unlock()
@property
def is_locked(self):
"""Return true if device is on."""
return self._device.is_locked

View File

@@ -0,0 +1,10 @@
{
"domain": "abode",
"name": "Abode",
"documentation": "https://www.home-assistant.io/components/abode",
"requirements": [
"abodepy==0.15.0"
],
"dependencies": [],
"codeowners": []
}

View File

@@ -0,0 +1,77 @@
"""Support for Abode Security System sensors."""
import logging
from homeassistant.const import (
DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_ILLUMINANCE, DEVICE_CLASS_TEMPERATURE)
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
_LOGGER = logging.getLogger(__name__)
# Sensor types: Name, icon
SENSOR_TYPES = {
'temp': ['Temperature', DEVICE_CLASS_TEMPERATURE],
'humidity': ['Humidity', DEVICE_CLASS_HUMIDITY],
'lux': ['Lux', DEVICE_CLASS_ILLUMINANCE],
}
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up a sensor for an Abode device."""
import abodepy.helpers.constants as CONST
data = hass.data[ABODE_DOMAIN]
devices = []
for device in data.abode.get_devices(generic_type=CONST.TYPE_SENSOR):
if data.is_excluded(device):
continue
for sensor_type in SENSOR_TYPES:
devices.append(AbodeSensor(data, device, sensor_type))
data.devices.extend(devices)
add_entities(devices)
class AbodeSensor(AbodeDevice):
"""A sensor implementation for Abode devices."""
def __init__(self, data, device, sensor_type):
"""Initialize a sensor for an Abode device."""
super().__init__(data, device)
self._sensor_type = sensor_type
self._name = '{0} {1}'.format(
self._device.name, SENSOR_TYPES[self._sensor_type][0])
self._device_class = SENSOR_TYPES[self._sensor_type][1]
@property
def name(self):
"""Return the name of the sensor."""
return self._name
@property
def device_class(self):
"""Return the device class."""
return self._device_class
@property
def state(self):
"""Return the state of the sensor."""
if self._sensor_type == 'temp':
return self._device.temp
if self._sensor_type == 'humidity':
return self._device.humidity
if self._sensor_type == 'lux':
return self._device.lux
@property
def unit_of_measurement(self):
"""Return the units of measurement."""
if self._sensor_type == 'temp':
return self._device.temp_unit
if self._sensor_type == 'humidity':
return self._device.humidity_unit
if self._sensor_type == 'lux':
return self._device.lux_unit

View File

@@ -0,0 +1,13 @@
capture_image:
description: Request a new image capture from a camera device.
fields:
entity_id: {description: Entity id of the camera to request an image., example: camera.downstairs_motion_camera}
change_setting:
description: Change an Abode system setting.
fields:
setting: {description: Setting to change., example: beeper_mute}
value: {description: Value of the setting., example: '1'}
trigger_quick_action:
description: Trigger an Abode quick action.
fields:
entity_id: {description: Entity id of the quick action to trigger., example: binary_sensor.home_quick_action}

View File

@@ -0,0 +1,72 @@
"""Support for Abode Security System switches."""
import logging
from homeassistant.components.switch import SwitchDevice
from . import DOMAIN as ABODE_DOMAIN, AbodeAutomation, AbodeDevice
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up Abode switch devices."""
import abodepy.helpers.constants as CONST
import abodepy.helpers.timeline as TIMELINE
data = hass.data[ABODE_DOMAIN]
devices = []
# Get all regular switches that are not excluded or marked as lights
for device in data.abode.get_devices(generic_type=CONST.TYPE_SWITCH):
if data.is_excluded(device) or data.is_light(device):
continue
devices.append(AbodeSwitch(data, device))
# Get all Abode automations that can be enabled/disabled
for automation in data.abode.get_automations(
generic_type=CONST.TYPE_AUTOMATION):
if data.is_automation_excluded(automation):
continue
devices.append(AbodeAutomationSwitch(
data, automation, TIMELINE.AUTOMATION_EDIT_GROUP))
data.devices.extend(devices)
add_entities(devices)
class AbodeSwitch(AbodeDevice, SwitchDevice):
"""Representation of an Abode switch."""
def turn_on(self, **kwargs):
"""Turn on the device."""
self._device.switch_on()
def turn_off(self, **kwargs):
"""Turn off the device."""
self._device.switch_off()
@property
def is_on(self):
"""Return true if device is on."""
return self._device.is_on
class AbodeAutomationSwitch(AbodeAutomation, SwitchDevice):
"""A switch implementation for Abode automations."""
def turn_on(self, **kwargs):
"""Turn on the device."""
self._automation.set_active(True)
def turn_off(self, **kwargs):
"""Turn off the device."""
self._automation.set_active(False)
@property
def is_on(self):
"""Return True if the binary sensor is on."""
return self._automation.is_active

View File

@@ -0,0 +1 @@
"""The acer_projector component."""

View File

@@ -0,0 +1,10 @@
{
"domain": "acer_projector",
"name": "Acer projector",
"documentation": "https://www.home-assistant.io/components/acer_projector",
"requirements": [
"pyserial==3.1.1"
],
"dependencies": [],
"codeowners": []
}

View File

@@ -0,0 +1,161 @@
"""Use serial protocol of Acer projector to obtain state of the projector."""
import logging
import re
import voluptuous as vol
from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA)
from homeassistant.const import (
STATE_ON, STATE_OFF, STATE_UNKNOWN, CONF_NAME, CONF_FILENAME)
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
CONF_TIMEOUT = 'timeout'
CONF_WRITE_TIMEOUT = 'write_timeout'
DEFAULT_NAME = 'Acer Projector'
DEFAULT_TIMEOUT = 1
DEFAULT_WRITE_TIMEOUT = 1
ECO_MODE = 'ECO Mode'
ICON = 'mdi:projector'
INPUT_SOURCE = 'Input Source'
LAMP = 'Lamp'
LAMP_HOURS = 'Lamp Hours'
MODEL = 'Model'
# Commands known to the projector
CMD_DICT = {
LAMP: '* 0 Lamp ?\r',
LAMP_HOURS: '* 0 Lamp\r',
INPUT_SOURCE: '* 0 Src ?\r',
ECO_MODE: '* 0 IR 052\r',
MODEL: '* 0 IR 035\r',
STATE_ON: '* 0 IR 001\r',
STATE_OFF: '* 0 IR 002\r',
}
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_FILENAME): cv.isdevice,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_TIMEOUT, default=DEFAULT_TIMEOUT): cv.positive_int,
vol.Optional(CONF_WRITE_TIMEOUT, default=DEFAULT_WRITE_TIMEOUT):
cv.positive_int,
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Connect with serial port and return Acer Projector."""
serial_port = config.get(CONF_FILENAME)
name = config.get(CONF_NAME)
timeout = config.get(CONF_TIMEOUT)
write_timeout = config.get(CONF_WRITE_TIMEOUT)
add_entities([AcerSwitch(serial_port, name, timeout, write_timeout)], True)
class AcerSwitch(SwitchDevice):
"""Represents an Acer Projector as a switch."""
def __init__(self, serial_port, name, timeout, write_timeout, **kwargs):
"""Init of the Acer projector."""
import serial
self.ser = serial.Serial(
port=serial_port, timeout=timeout, write_timeout=write_timeout,
**kwargs)
self._serial_port = serial_port
self._name = name
self._state = False
self._available = False
self._attributes = {
LAMP_HOURS: STATE_UNKNOWN,
INPUT_SOURCE: STATE_UNKNOWN,
ECO_MODE: STATE_UNKNOWN,
}
def _write_read(self, msg):
"""Write to the projector and read the return."""
import serial
ret = ""
# Sometimes the projector won't answer for no reason or the projector
# was disconnected during runtime.
# This way the projector can be reconnected and will still work
try:
if not self.ser.is_open:
self.ser.open()
msg = msg.encode('utf-8')
self.ser.write(msg)
# Size is an experience value there is no real limit.
# AFAIK there is no limit and no end character so we will usually
# need to wait for timeout
ret = self.ser.read_until(size=20).decode('utf-8')
except serial.SerialException:
_LOGGER.error('Problem communicating with %s', self._serial_port)
self.ser.close()
return ret
def _write_read_format(self, msg):
"""Write msg, obtain answer and format output."""
# answers are formatted as ***\answer\r***
awns = self._write_read(msg)
match = re.search(r'\r(.+)\r', awns)
if match:
return match.group(1)
return STATE_UNKNOWN
@property
def available(self):
"""Return if projector is available."""
return self._available
@property
def name(self):
"""Return name of the projector."""
return self._name
@property
def is_on(self):
"""Return if the projector is turned on."""
return self._state
@property
def state_attributes(self):
"""Return state attributes."""
return self._attributes
def update(self):
"""Get the latest state from the projector."""
msg = CMD_DICT[LAMP]
awns = self._write_read_format(msg)
if awns == 'Lamp 1':
self._state = True
self._available = True
elif awns == 'Lamp 0':
self._state = False
self._available = True
else:
self._available = False
for key in self._attributes:
msg = CMD_DICT.get(key, None)
if msg:
awns = self._write_read_format(msg)
self._attributes[key] = awns
def turn_on(self, **kwargs):
"""Turn the projector on."""
msg = CMD_DICT[STATE_ON]
self._write_read(msg)
self._state = STATE_ON
def turn_off(self, **kwargs):
"""Turn the projector off."""
msg = CMD_DICT[STATE_OFF]
self._write_read(msg)
self._state = STATE_OFF

View File

@@ -0,0 +1 @@
"""The actiontec component."""

View File

@@ -0,0 +1,115 @@
"""Support for Actiontec MI424WR (Verizon FIOS) routers."""
import logging
import re
import telnetlib
from collections import namedtuple
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
import homeassistant.util.dt as dt_util
from homeassistant.components.device_tracker import (
DOMAIN, PLATFORM_SCHEMA, DeviceScanner)
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME
_LOGGER = logging.getLogger(__name__)
_LEASES_REGEX = re.compile(
r'(?P<ip>([0-9]{1,3}[\.]){3}[0-9]{1,3})' +
r'\smac:\s(?P<mac>([0-9a-f]{2}[:-]){5}([0-9a-f]{2}))' +
r'\svalid\sfor:\s(?P<timevalid>(-?\d+))' +
r'\ssec')
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_HOST): cv.string,
vol.Required(CONF_PASSWORD): cv.string,
vol.Required(CONF_USERNAME): cv.string
})
def get_scanner(hass, config):
"""Validate the configuration and return an Actiontec scanner."""
scanner = ActiontecDeviceScanner(config[DOMAIN])
return scanner if scanner.success_init else None
Device = namedtuple('Device', ['mac', 'ip', 'last_update'])
class ActiontecDeviceScanner(DeviceScanner):
"""This class queries an actiontec router for connected devices."""
def __init__(self, config):
"""Initialize the scanner."""
self.host = config[CONF_HOST]
self.username = config[CONF_USERNAME]
self.password = config[CONF_PASSWORD]
self.last_results = []
data = self.get_actiontec_data()
self.success_init = data is not None
_LOGGER.info("canner initialized")
def scan_devices(self):
"""Scan for new devices and return a list with found device IDs."""
self._update_info()
return [client.mac for client in self.last_results]
def get_device_name(self, device):
"""Return the name of the given device or None if we don't know."""
if not self.last_results:
return None
for client in self.last_results:
if client.mac == device:
return client.ip
return None
def _update_info(self):
"""Ensure the information from the router is up to date.
Return boolean if scanning successful.
"""
_LOGGER.info("Scanning")
if not self.success_init:
return False
now = dt_util.now()
actiontec_data = self.get_actiontec_data()
if not actiontec_data:
return False
self.last_results = [Device(data['mac'], name, now)
for name, data in actiontec_data.items()
if data['timevalid'] > -60]
_LOGGER.info("Scan successful")
return True
def get_actiontec_data(self):
"""Retrieve data from Actiontec MI424WR and return parsed result."""
try:
telnet = telnetlib.Telnet(self.host)
telnet.read_until(b'Username: ')
telnet.write((self.username + '\n').encode('ascii'))
telnet.read_until(b'Password: ')
telnet.write((self.password + '\n').encode('ascii'))
prompt = telnet.read_until(
b'Wireless Broadband Router> ').split(b'\n')[-1]
telnet.write('firewall mac_cache_dump\n'.encode('ascii'))
telnet.write('\n'.encode('ascii'))
telnet.read_until(prompt)
leases_result = telnet.read_until(prompt).split(b'\n')[1:-1]
telnet.write('exit\n'.encode('ascii'))
except EOFError:
_LOGGER.exception("Unexpected response from router")
return
except ConnectionRefusedError:
_LOGGER.exception("Connection refused by router. Telnet enabled?")
return None
devices = {}
for lease in leases_result:
match = _LEASES_REGEX.search(lease.decode('utf-8'))
if match is not None:
devices[match.group('ip')] = {
'ip': match.group('ip'),
'mac': match.group('mac').upper(),
'timevalid': int(match.group('timevalid'))
}
return devices

View File

@@ -0,0 +1,8 @@
{
"domain": "actiontec",
"name": "Actiontec",
"documentation": "https://www.home-assistant.io/components/actiontec",
"requirements": [],
"dependencies": [],
"codeowners": []
}

View File

@@ -1,38 +1,43 @@
"""
Support for Automation Device Specification (ADS).
For more details about this component, please refer to the documentation.
https://home-assistant.io/components/ads/
"""
"""Support for Automation Device Specification (ADS)."""
import threading
import struct
import logging
import ctypes
from collections import namedtuple
import voluptuous as vol
from homeassistant.const import CONF_DEVICE, CONF_PORT, CONF_IP_ADDRESS, \
EVENT_HOMEASSISTANT_STOP
import homeassistant.helpers.config_validation as cv
import asyncio
import async_timeout
REQUIREMENTS = ['pyads==2.2.6']
import voluptuous as vol
from homeassistant.const import (
CONF_DEVICE, CONF_IP_ADDRESS, CONF_PORT, EVENT_HOMEASSISTANT_STOP)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
DATA_ADS = 'data_ads'
# Supported Types
ADSTYPE_INT = 'int'
ADSTYPE_UINT = 'uint'
ADSTYPE_BYTE = 'byte'
ADSTYPE_BOOL = 'bool'
ADSTYPE_BYTE = 'byte'
ADSTYPE_DINT = 'dint'
ADSTYPE_INT = 'int'
ADSTYPE_UDINT = 'udint'
ADSTYPE_UINT = 'uint'
DOMAIN = 'ads'
CONF_ADS_FACTOR = 'factor'
CONF_ADS_TYPE = 'adstype'
CONF_ADS_VALUE = 'value'
CONF_ADS_VAR = 'adsvar'
CONF_ADS_VAR_BRIGHTNESS = 'adsvar_brightness'
CONF_ADS_TYPE = 'adstype'
CONF_ADS_FACTOR = 'factor'
CONF_ADS_VALUE = 'value'
CONF_ADS_VAR_POSITION = 'adsvar_position'
STATE_KEY_STATE = 'state'
STATE_KEY_BRIGHTNESS = 'brightness'
STATE_KEY_POSITION = 'position'
DOMAIN = 'ads'
SERVICE_WRITE_DATA_BY_NAME = 'write_data_by_name'
@@ -46,8 +51,9 @@ CONFIG_SCHEMA = vol.Schema({
SCHEMA_SERVICE_WRITE_DATA_BY_NAME = vol.Schema({
vol.Required(CONF_ADS_TYPE):
vol.In([ADSTYPE_INT, ADSTYPE_UINT, ADSTYPE_BYTE]),
vol.Required(CONF_ADS_VALUE): cv.match_all,
vol.In([ADSTYPE_INT, ADSTYPE_UINT, ADSTYPE_BYTE, ADSTYPE_BOOL,
ADSTYPE_DINT, ADSTYPE_UDINT]),
vol.Required(CONF_ADS_VALUE): vol.Coerce(int),
vol.Required(CONF_ADS_VAR): cv.string,
})
@@ -66,21 +72,26 @@ def setup(hass, config):
AdsHub.ADS_TYPEMAP = {
ADSTYPE_BOOL: pyads.PLCTYPE_BOOL,
ADSTYPE_BYTE: pyads.PLCTYPE_BYTE,
ADSTYPE_DINT: pyads.PLCTYPE_DINT,
ADSTYPE_INT: pyads.PLCTYPE_INT,
ADSTYPE_UDINT: pyads.PLCTYPE_UDINT,
ADSTYPE_UINT: pyads.PLCTYPE_UINT,
}
AdsHub.ADSError = pyads.ADSError
AdsHub.PLCTYPE_BOOL = pyads.PLCTYPE_BOOL
AdsHub.PLCTYPE_BYTE = pyads.PLCTYPE_BYTE
AdsHub.PLCTYPE_DINT = pyads.PLCTYPE_DINT
AdsHub.PLCTYPE_INT = pyads.PLCTYPE_INT
AdsHub.PLCTYPE_UDINT = pyads.PLCTYPE_UDINT
AdsHub.PLCTYPE_UINT = pyads.PLCTYPE_UINT
AdsHub.ADSError = pyads.ADSError
try:
ads = AdsHub(client)
except pyads.pyads.ADSError:
except pyads.ADSError:
_LOGGER.error(
"Could not connect to ADS host (netid=%s, port=%s)", net_id, port)
"Could not connect to ADS host (netid=%s, ip=%s, port=%s)",
net_id, ip_address, port)
return False
hass.data[DATA_ADS] = ads
@@ -125,16 +136,23 @@ class AdsHub:
def shutdown(self, *args, **kwargs):
"""Shutdown ADS connection."""
import pyads
_LOGGER.debug("Shutting down ADS")
for notification_item in self._notification_items.values():
self._client.del_device_notification(
notification_item.hnotify,
notification_item.huser
)
_LOGGER.debug(
"Deleting device notification %d, %d",
notification_item.hnotify, notification_item.huser)
self._client.close()
try:
self._client.del_device_notification(
notification_item.hnotify,
notification_item.huser
)
except pyads.ADSError as err:
_LOGGER.error(err)
try:
self._client.close()
except pyads.ADSError as err:
_LOGGER.error(err)
def register_device(self, device):
"""Register a new device."""
@@ -142,31 +160,43 @@ class AdsHub:
def write_by_name(self, name, value, plc_datatype):
"""Write a value to the device."""
import pyads
with self._lock:
return self._client.write_by_name(name, value, plc_datatype)
try:
return self._client.write_by_name(name, value, plc_datatype)
except pyads.ADSError as err:
_LOGGER.error("Error writing %s: %s", name, err)
def read_by_name(self, name, plc_datatype):
"""Read a value from the device."""
import pyads
with self._lock:
return self._client.read_by_name(name, plc_datatype)
try:
return self._client.read_by_name(name, plc_datatype)
except pyads.ADSError as err:
_LOGGER.error("Error reading %s: %s", name, err)
def add_device_notification(self, name, plc_datatype, callback):
"""Add a notification to the ADS devices."""
from pyads import NotificationAttrib
attr = NotificationAttrib(ctypes.sizeof(plc_datatype))
import pyads
attr = pyads.NotificationAttrib(ctypes.sizeof(plc_datatype))
with self._lock:
hnotify, huser = self._client.add_device_notification(
name, attr, self._device_notification_callback)
hnotify = int(hnotify)
try:
hnotify, huser = self._client.add_device_notification(
name, attr, self._device_notification_callback)
except pyads.ADSError as err:
_LOGGER.error("Error subscribing to %s: %s", name, err)
else:
hnotify = int(hnotify)
self._notification_items[hnotify] = NotificationItem(
hnotify, huser, name, plc_datatype, callback)
_LOGGER.debug(
"Added device notification %d for variable %s", hnotify, name)
_LOGGER.debug(
"Added device notification %d for variable %s",
hnotify, name)
self._notification_items[hnotify] = NotificationItem(
hnotify, huser, name, plc_datatype, callback)
def _device_notification_callback(self, addr, notification, huser):
def _device_notification_callback(self, notification, name):
"""Handle device notifications."""
contents = notification.contents
@@ -175,9 +205,10 @@ class AdsHub:
data = contents.data
try:
notification_item = self._notification_items[hnotify]
with self._lock:
notification_item = self._notification_items[hnotify]
except KeyError:
_LOGGER.debug("Unknown device notification handle: %d", hnotify)
_LOGGER.error("Unknown device notification handle: %d", hnotify)
return
# Parse data to desired datatype
@@ -189,8 +220,77 @@ class AdsHub:
value = struct.unpack('<B', bytearray(data)[:1])[0]
elif notification_item.plc_datatype == self.PLCTYPE_UINT:
value = struct.unpack('<H', bytearray(data)[:2])[0]
elif notification_item.plc_datatype == self.PLCTYPE_DINT:
value = struct.unpack('<i', bytearray(data)[:4])[0]
elif notification_item.plc_datatype == self.PLCTYPE_UDINT:
value = struct.unpack('<I', bytearray(data)[:4])[0]
else:
value = bytearray(data)
_LOGGER.warning("No callback available for this datatype")
notification_item.callback(notification_item.name, value)
class AdsEntity(Entity):
"""Representation of ADS entity."""
def __init__(self, ads_hub, name, ads_var):
"""Initialize ADS binary sensor."""
self._name = name
self._unique_id = ads_var
self._state_dict = {}
self._state_dict[STATE_KEY_STATE] = None
self._ads_hub = ads_hub
self._ads_var = ads_var
self._event = None
async def async_initialize_device(
self, ads_var, plctype, state_key=STATE_KEY_STATE, factor=None):
"""Register device notification."""
def update(name, value):
"""Handle device notifications."""
_LOGGER.debug('Variable %s changed its value to %d', name, value)
if factor is None:
self._state_dict[state_key] = value
else:
self._state_dict[state_key] = value / factor
asyncio.run_coroutine_threadsafe(async_event_set(), self.hass.loop)
self.schedule_update_ha_state()
async def async_event_set():
"""Set event in async context."""
self._event.set()
self._event = asyncio.Event()
await self.hass.async_add_executor_job(
self._ads_hub.add_device_notification,
ads_var, plctype, update)
try:
with async_timeout.timeout(10):
await self._event.wait()
except asyncio.TimeoutError:
_LOGGER.debug('Variable %s: Timeout during first update',
ads_var)
@property
def name(self):
"""Return the default name of the binary sensor."""
return self._name
@property
def unique_id(self):
"""Return an unique identifier for this entity."""
return self._unique_id
@property
def should_poll(self):
"""Return False because entity pushes its state to HA."""
return False
@property
def available(self):
"""Return False if state has not been updated yet."""
return self._state_dict[STATE_KEY_STATE] is not None

View File

@@ -0,0 +1,56 @@
"""Support for ADS binary sensors."""
import logging
import voluptuous as vol
from homeassistant.components.binary_sensor import (
DEVICE_CLASSES_SCHEMA, PLATFORM_SCHEMA, BinarySensorDevice)
from homeassistant.const import CONF_DEVICE_CLASS, CONF_NAME
import homeassistant.helpers.config_validation as cv
from . import CONF_ADS_VAR, DATA_ADS, AdsEntity, STATE_KEY_STATE
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'ADS binary sensor'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_ADS_VAR): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_DEVICE_CLASS): DEVICE_CLASSES_SCHEMA,
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Binary Sensor platform for ADS."""
ads_hub = hass.data.get(DATA_ADS)
ads_var = config.get(CONF_ADS_VAR)
name = config.get(CONF_NAME)
device_class = config.get(CONF_DEVICE_CLASS)
ads_sensor = AdsBinarySensor(ads_hub, name, ads_var, device_class)
add_entities([ads_sensor])
class AdsBinarySensor(AdsEntity, BinarySensorDevice):
"""Representation of ADS binary sensors."""
def __init__(self, ads_hub, name, ads_var, device_class):
"""Initialize ADS binary sensor."""
super().__init__(ads_hub, name, ads_var)
self._device_class = device_class or 'moving'
async def async_added_to_hass(self):
"""Register device notification."""
await self.async_initialize_device(self._ads_var,
self._ads_hub.PLCTYPE_BOOL)
@property
def is_on(self):
"""Return True if the entity is on."""
return self._state_dict[STATE_KEY_STATE]
@property
def device_class(self):
"""Return the device class."""
return self._device_class

View File

@@ -0,0 +1,165 @@
"""Support for ADS covers."""
import logging
import voluptuous as vol
from homeassistant.components.cover import (
PLATFORM_SCHEMA, SUPPORT_OPEN, SUPPORT_CLOSE, SUPPORT_STOP,
SUPPORT_SET_POSITION, ATTR_POSITION, DEVICE_CLASSES_SCHEMA,
CoverDevice)
from homeassistant.const import (
CONF_NAME, CONF_DEVICE_CLASS)
import homeassistant.helpers.config_validation as cv
from . import CONF_ADS_VAR, CONF_ADS_VAR_POSITION, DATA_ADS, \
AdsEntity, STATE_KEY_STATE, STATE_KEY_POSITION
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'ADS Cover'
CONF_ADS_VAR_SET_POS = 'adsvar_set_position'
CONF_ADS_VAR_OPEN = 'adsvar_open'
CONF_ADS_VAR_CLOSE = 'adsvar_close'
CONF_ADS_VAR_STOP = 'adsvar_stop'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_ADS_VAR): cv.string,
vol.Optional(CONF_ADS_VAR_POSITION): cv.string,
vol.Optional(CONF_ADS_VAR_SET_POS): cv.string,
vol.Optional(CONF_ADS_VAR_CLOSE): cv.string,
vol.Optional(CONF_ADS_VAR_OPEN): cv.string,
vol.Optional(CONF_ADS_VAR_STOP): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_DEVICE_CLASS): DEVICE_CLASSES_SCHEMA
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the cover platform for ADS."""
ads_hub = hass.data[DATA_ADS]
ads_var_is_closed = config.get(CONF_ADS_VAR)
ads_var_position = config.get(CONF_ADS_VAR_POSITION)
ads_var_pos_set = config.get(CONF_ADS_VAR_SET_POS)
ads_var_open = config.get(CONF_ADS_VAR_OPEN)
ads_var_close = config.get(CONF_ADS_VAR_CLOSE)
ads_var_stop = config.get(CONF_ADS_VAR_STOP)
name = config[CONF_NAME]
device_class = config.get(CONF_DEVICE_CLASS)
add_entities([AdsCover(ads_hub,
ads_var_is_closed,
ads_var_position,
ads_var_pos_set,
ads_var_open,
ads_var_close,
ads_var_stop,
name,
device_class)])
class AdsCover(AdsEntity, CoverDevice):
"""Representation of ADS cover."""
def __init__(self, ads_hub,
ads_var_is_closed, ads_var_position,
ads_var_pos_set, ads_var_open,
ads_var_close, ads_var_stop, name, device_class):
"""Initialize AdsCover entity."""
super().__init__(ads_hub, name, ads_var_is_closed)
if self._ads_var is None:
if ads_var_position is not None:
self._unique_id = ads_var_position
elif ads_var_pos_set is not None:
self._unique_id = ads_var_pos_set
elif ads_var_open is not None:
self._unique_id = ads_var_open
self._state_dict[STATE_KEY_POSITION] = None
self._ads_var_position = ads_var_position
self._ads_var_pos_set = ads_var_pos_set
self._ads_var_open = ads_var_open
self._ads_var_close = ads_var_close
self._ads_var_stop = ads_var_stop
self._device_class = device_class
async def async_added_to_hass(self):
"""Register device notification."""
if self._ads_var is not None:
await self.async_initialize_device(self._ads_var,
self._ads_hub.PLCTYPE_BOOL)
if self._ads_var_position is not None:
await self.async_initialize_device(self._ads_var_position,
self._ads_hub.PLCTYPE_BYTE,
STATE_KEY_POSITION)
@property
def device_class(self):
"""Return the class of this cover."""
return self._device_class
@property
def is_closed(self):
"""Return if the cover is closed."""
if self._ads_var is not None:
return self._state_dict[STATE_KEY_STATE]
if self._ads_var_position is not None:
return self._state_dict[STATE_KEY_POSITION] == 0
return None
@property
def current_cover_position(self):
"""Return current position of cover."""
return self._state_dict[STATE_KEY_POSITION]
@property
def supported_features(self):
"""Flag supported features."""
supported_features = SUPPORT_OPEN | SUPPORT_CLOSE
if self._ads_var_stop is not None:
supported_features |= SUPPORT_STOP
if self._ads_var_pos_set is not None:
supported_features |= SUPPORT_SET_POSITION
return supported_features
def stop_cover(self, **kwargs):
"""Fire the stop action."""
if self._ads_var_stop:
self._ads_hub.write_by_name(self._ads_var_stop, True,
self._ads_hub.PLCTYPE_BOOL)
def set_cover_position(self, **kwargs):
"""Set cover position."""
position = kwargs[ATTR_POSITION]
if self._ads_var_pos_set is not None:
self._ads_hub.write_by_name(self._ads_var_pos_set, position,
self._ads_hub.PLCTYPE_BYTE)
def open_cover(self, **kwargs):
"""Move the cover up."""
if self._ads_var_open is not None:
self._ads_hub.write_by_name(self._ads_var_open, True,
self._ads_hub.PLCTYPE_BOOL)
elif self._ads_var_pos_set is not None:
self.set_cover_position(position=100)
def close_cover(self, **kwargs):
"""Move the cover down."""
if self._ads_var_close is not None:
self._ads_hub.write_by_name(self._ads_var_close, True,
self._ads_hub.PLCTYPE_BOOL)
elif self._ads_var_pos_set is not None:
self.set_cover_position(position=0)
@property
def available(self):
"""Return False if state has not been updated yet."""
if self._ads_var is not None or self._ads_var_position is not None:
return self._state_dict[STATE_KEY_STATE] is not None or \
self._state_dict[STATE_KEY_POSITION] is not None
return True

View File

@@ -0,0 +1,85 @@
"""Support for ADS light sources."""
import logging
import voluptuous as vol
from homeassistant.components.light import (
ATTR_BRIGHTNESS, PLATFORM_SCHEMA, SUPPORT_BRIGHTNESS, Light)
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
from . import CONF_ADS_VAR, CONF_ADS_VAR_BRIGHTNESS, DATA_ADS, \
AdsEntity, STATE_KEY_BRIGHTNESS, STATE_KEY_STATE
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'ADS Light'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_ADS_VAR): cv.string,
vol.Optional(CONF_ADS_VAR_BRIGHTNESS): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the light platform for ADS."""
ads_hub = hass.data.get(DATA_ADS)
ads_var_enable = config.get(CONF_ADS_VAR)
ads_var_brightness = config.get(CONF_ADS_VAR_BRIGHTNESS)
name = config.get(CONF_NAME)
add_entities([AdsLight(ads_hub, ads_var_enable, ads_var_brightness,
name)])
class AdsLight(AdsEntity, Light):
"""Representation of ADS light."""
def __init__(self, ads_hub, ads_var_enable, ads_var_brightness, name):
"""Initialize AdsLight entity."""
super().__init__(ads_hub, name, ads_var_enable)
self._state_dict[STATE_KEY_BRIGHTNESS] = None
self._ads_var_brightness = ads_var_brightness
async def async_added_to_hass(self):
"""Register device notification."""
await self.async_initialize_device(self._ads_var,
self._ads_hub.PLCTYPE_BOOL)
if self._ads_var_brightness is not None:
await self.async_initialize_device(self._ads_var_brightness,
self._ads_hub.PLCTYPE_UINT,
STATE_KEY_BRIGHTNESS)
@property
def brightness(self):
"""Return the brightness of the light (0..255)."""
return self._state_dict[STATE_KEY_BRIGHTNESS]
@property
def supported_features(self):
"""Flag supported features."""
support = 0
if self._ads_var_brightness is not None:
support = SUPPORT_BRIGHTNESS
return support
@property
def is_on(self):
"""Return True if the entity is on."""
return self._state_dict[STATE_KEY_STATE]
def turn_on(self, **kwargs):
"""Turn the light on or set a specific dimmer value."""
brightness = kwargs.get(ATTR_BRIGHTNESS)
self._ads_hub.write_by_name(self._ads_var, True,
self._ads_hub.PLCTYPE_BOOL)
if self._ads_var_brightness is not None and brightness is not None:
self._ads_hub.write_by_name(self._ads_var_brightness, brightness,
self._ads_hub.PLCTYPE_UINT)
def turn_off(self, **kwargs):
"""Turn the light off."""
self._ads_hub.write_by_name(self._ads_var, False,
self._ads_hub.PLCTYPE_BOOL)

View File

@@ -0,0 +1,10 @@
{
"domain": "ads",
"name": "Ads",
"documentation": "https://www.home-assistant.io/components/ads",
"requirements": [
"pyads==3.0.7"
],
"dependencies": [],
"codeowners": []
}

View File

@@ -0,0 +1,71 @@
"""Support for ADS sensors."""
import logging
import voluptuous as vol
from homeassistant.components import ads
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import CONF_NAME, CONF_UNIT_OF_MEASUREMENT
import homeassistant.helpers.config_validation as cv
from . import CONF_ADS_FACTOR, CONF_ADS_TYPE, CONF_ADS_VAR, \
AdsEntity, STATE_KEY_STATE
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = "ADS sensor"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_ADS_VAR): cv.string,
vol.Optional(CONF_ADS_FACTOR): cv.positive_int,
vol.Optional(CONF_ADS_TYPE, default=ads.ADSTYPE_INT):
vol.In([ads.ADSTYPE_INT, ads.ADSTYPE_UINT, ads.ADSTYPE_BYTE,
ads.ADSTYPE_DINT, ads.ADSTYPE_UDINT]),
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_UNIT_OF_MEASUREMENT, default=''): cv.string,
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up an ADS sensor device."""
ads_hub = hass.data.get(ads.DATA_ADS)
ads_var = config.get(CONF_ADS_VAR)
ads_type = config.get(CONF_ADS_TYPE)
name = config.get(CONF_NAME)
unit_of_measurement = config.get(CONF_UNIT_OF_MEASUREMENT)
factor = config.get(CONF_ADS_FACTOR)
entity = AdsSensor(
ads_hub, ads_var, ads_type, name, unit_of_measurement, factor)
add_entities([entity])
class AdsSensor(AdsEntity):
"""Representation of an ADS sensor entity."""
def __init__(self, ads_hub, ads_var, ads_type, name, unit_of_measurement,
factor):
"""Initialize AdsSensor entity."""
super().__init__(ads_hub, name, ads_var)
self._unit_of_measurement = unit_of_measurement
self._ads_type = ads_type
self._factor = factor
async def async_added_to_hass(self):
"""Register device notification."""
await self.async_initialize_device(
self._ads_var,
self._ads_hub.ADS_TYPEMAP[self._ads_type],
STATE_KEY_STATE,
self._factor)
@property
def state(self):
"""Return the state of the device."""
return self._state_dict[STATE_KEY_STATE]
@property
def unit_of_measurement(self):
"""Return the unit of measurement."""
return self._unit_of_measurement

View File

@@ -0,0 +1,53 @@
"""Support for ADS switch platform."""
import logging
import voluptuous as vol
from homeassistant.components.switch import SwitchDevice, PLATFORM_SCHEMA
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
from . import CONF_ADS_VAR, DATA_ADS, AdsEntity, STATE_KEY_STATE
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'ADS Switch'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_ADS_VAR): cv.string,
vol.Optional(CONF_NAME): cv.string,
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up switch platform for ADS."""
ads_hub = hass.data.get(DATA_ADS)
name = config.get(CONF_NAME)
ads_var = config.get(CONF_ADS_VAR)
add_entities([AdsSwitch(ads_hub, name, ads_var)])
class AdsSwitch(AdsEntity, SwitchDevice):
"""Representation of an ADS switch device."""
async def async_added_to_hass(self):
"""Register device notification."""
await self.async_initialize_device(self._ads_var,
self._ads_hub.PLCTYPE_BOOL)
@property
def is_on(self):
"""Return True if the entity is on."""
return self._state_dict[STATE_KEY_STATE]
def turn_on(self, **kwargs):
"""Turn the switch on."""
self._ads_hub.write_by_name(
self._ads_var, True, self._ads_hub.PLCTYPE_BOOL)
def turn_off(self, **kwargs):
"""Turn the switch off."""
self._ads_hub.write_by_name(
self._ads_var, False, self._ads_hub.PLCTYPE_BOOL)

View File

@@ -0,0 +1 @@
"""The aftership component."""

View File

@@ -0,0 +1,2 @@
"""Constants for the Aftership integration."""
DOMAIN = 'aftership'

View File

@@ -0,0 +1,10 @@
{
"domain": "aftership",
"name": "Aftership",
"documentation": "https://www.home-assistant.io/components/aftership",
"requirements": [
"pyaftership==0.1.2"
],
"dependencies": [],
"codeowners": []
}

View File

@@ -0,0 +1,204 @@
"""Support for non-delivered packages recorded in AfterShip."""
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import ATTR_ATTRIBUTION, CONF_API_KEY, CONF_NAME
from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
ATTRIBUTION = 'Information provided by AfterShip'
ATTR_TRACKINGS = 'trackings'
BASE = 'https://track.aftership.com/'
CONF_SLUG = 'slug'
CONF_TITLE = 'title'
CONF_TRACKING_NUMBER = 'tracking_number'
DEFAULT_NAME = 'aftership'
UPDATE_TOPIC = DOMAIN + '_update'
ICON = 'mdi:package-variant-closed'
MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=5)
SERVICE_ADD_TRACKING = 'add_tracking'
SERVICE_REMOVE_TRACKING = 'remove_tracking'
ADD_TRACKING_SERVICE_SCHEMA = vol.Schema(
{
vol.Required(CONF_TRACKING_NUMBER): cv.string,
vol.Optional(CONF_TITLE): cv.string,
vol.Optional(CONF_SLUG): cv.string,
}
)
REMOVE_TRACKING_SERVICE_SCHEMA = vol.Schema(
{vol.Required(CONF_SLUG): cv.string,
vol.Required(CONF_TRACKING_NUMBER): cv.string}
)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_API_KEY): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
})
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up the AfterShip sensor platform."""
from pyaftership.tracker import Tracking
apikey = config[CONF_API_KEY]
name = config[CONF_NAME]
session = async_get_clientsession(hass)
aftership = Tracking(hass.loop, session, apikey)
await aftership.get_trackings()
if not aftership.meta or aftership.meta['code'] != 200:
_LOGGER.error("No tracking data found. Check API key is correct: %s",
aftership.meta)
return
instance = AfterShipSensor(aftership, name)
async_add_entities([instance], True)
async def handle_add_tracking(call):
"""Call when a user adds a new Aftership tracking from HASS."""
title = call.data.get(CONF_TITLE)
slug = call.data.get(CONF_SLUG)
tracking_number = call.data[CONF_TRACKING_NUMBER]
await aftership.add_package_tracking(tracking_number, title, slug)
async_dispatcher_send(hass, UPDATE_TOPIC)
hass.services.async_register(
DOMAIN,
SERVICE_ADD_TRACKING,
handle_add_tracking,
schema=ADD_TRACKING_SERVICE_SCHEMA,
)
async def handle_remove_tracking(call):
"""Call when a user removes an Aftership tracking from HASS."""
slug = call.data[CONF_SLUG]
tracking_number = call.data[CONF_TRACKING_NUMBER]
await aftership.remove_package_tracking(slug, tracking_number)
async_dispatcher_send(hass, UPDATE_TOPIC)
hass.services.async_register(
DOMAIN,
SERVICE_REMOVE_TRACKING,
handle_remove_tracking,
schema=REMOVE_TRACKING_SERVICE_SCHEMA,
)
class AfterShipSensor(Entity):
"""Representation of a AfterShip sensor."""
def __init__(self, aftership, name):
"""Initialize the sensor."""
self._attributes = {}
self._name = name
self._state = None
self.aftership = aftership
@property
def name(self):
"""Return the name of the sensor."""
return self._name
@property
def state(self):
"""Return the state of the sensor."""
return self._state
@property
def unit_of_measurement(self):
"""Return the unit of measurement of this entity, if any."""
return 'packages'
@property
def device_state_attributes(self):
"""Return attributes for the sensor."""
return self._attributes
@property
def icon(self):
"""Icon to use in the frontend."""
return ICON
async def async_added_to_hass(self):
"""Register callbacks."""
self.hass.helpers.dispatcher.async_dispatcher_connect(
UPDATE_TOPIC, self.force_update)
async def force_update(self):
"""Force update of data."""
await self.async_update(no_throttle=True)
await self.async_update_ha_state()
@Throttle(MIN_TIME_BETWEEN_UPDATES)
async def async_update(self, **kwargs):
"""Get the latest data from the AfterShip API."""
await self.aftership.get_trackings()
if not self.aftership.meta:
_LOGGER.error("Unknown errors when querying")
return
if self.aftership.meta['code'] != 200:
_LOGGER.error(
"Errors when querying AfterShip. %s", str(self.aftership.meta))
return
status_to_ignore = {'delivered'}
status_counts = {}
trackings = []
not_delivered_count = 0
for track in self.aftership.trackings['trackings']:
status = track['tag'].lower()
name = (
track['tracking_number']
if track['title'] is None
else track['title']
)
status_counts[status] = status_counts.get(status, 0) + 1
trackings.append({
'name': name,
'tracking_number': track['tracking_number'],
'slug': track['slug'],
'link': '%s%s/%s' %
(BASE, track['slug'], track['tracking_number']),
'last_update': track['updated_at'],
'expected_delivery': track['expected_delivery'],
'status': track['tag'],
'last_checkpoint': track['checkpoints'][-1]
})
if status not in status_to_ignore:
not_delivered_count += 1
else:
_LOGGER.debug("Ignoring %s as it has status: %s", name, status)
self._attributes = {
ATTR_ATTRIBUTION: ATTRIBUTION,
**status_counts,
ATTR_TRACKINGS: trackings,
}
self._state = not_delivered_count

View File

@@ -0,0 +1,24 @@
# Describes the format for available aftership services
add_tracking:
description: Add new tracking to Aftership.
fields:
tracking_number:
description: Tracking number for the new tracking
example: '123456789'
title:
description: A custom title for the new tracking
example: 'Laptop'
slug:
description: Slug (carrier) of the new tracking
example: 'USPS'
remove_tracking:
description: Remove a tracking from Aftership.
fields:
tracking_number:
description: Tracking number of the tracking to remove
example: '123456789'
slug:
description: Slug (carrier) of the tracking to remove
example: 'USPS'

View File

@@ -0,0 +1,143 @@
"""Component for handling Air Quality data for your location."""
from datetime import timedelta
import logging
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.config_validation import ( # noqa
PLATFORM_SCHEMA, PLATFORM_SCHEMA_BASE)
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
ATTR_AQI = 'air_quality_index'
ATTR_ATTRIBUTION = 'attribution'
ATTR_CO2 = 'carbon_dioxide'
ATTR_CO = 'carbon_monoxide'
ATTR_N2O = 'nitrogen_oxide'
ATTR_NO = 'nitrogen_monoxide'
ATTR_NO2 = 'nitrogen_dioxide'
ATTR_OZONE = 'ozone'
ATTR_PM_0_1 = 'particulate_matter_0_1'
ATTR_PM_10 = 'particulate_matter_10'
ATTR_PM_2_5 = 'particulate_matter_2_5'
ATTR_SO2 = 'sulphur_dioxide'
DOMAIN = 'air_quality'
ENTITY_ID_FORMAT = DOMAIN + '.{}'
SCAN_INTERVAL = timedelta(seconds=30)
PROP_TO_ATTR = {
'air_quality_index': ATTR_AQI,
'attribution': ATTR_ATTRIBUTION,
'carbon_dioxide': ATTR_CO2,
'carbon_monoxide': ATTR_CO,
'nitrogen_oxide': ATTR_N2O,
'nitrogen_monoxide': ATTR_NO,
'nitrogen_dioxide': ATTR_NO2,
'ozone': ATTR_OZONE,
'particulate_matter_0_1': ATTR_PM_0_1,
'particulate_matter_10': ATTR_PM_10,
'particulate_matter_2_5': ATTR_PM_2_5,
'sulphur_dioxide': ATTR_SO2,
}
async def async_setup(hass, config):
"""Set up the air quality component."""
component = hass.data[DOMAIN] = EntityComponent(
_LOGGER, DOMAIN, hass, SCAN_INTERVAL)
await component.async_setup(config)
return True
async def async_setup_entry(hass, entry):
"""Set up a config entry."""
return await hass.data[DOMAIN].async_setup_entry(entry)
async def async_unload_entry(hass, entry):
"""Unload a config entry."""
return await hass.data[DOMAIN].async_unload_entry(entry)
class AirQualityEntity(Entity):
"""ABC for air quality data."""
@property
def particulate_matter_2_5(self):
"""Return the particulate matter 2.5 level."""
raise NotImplementedError()
@property
def particulate_matter_10(self):
"""Return the particulate matter 10 level."""
return None
@property
def particulate_matter_0_1(self):
"""Return the particulate matter 0.1 level."""
return None
@property
def air_quality_index(self):
"""Return the Air Quality Index (AQI)."""
return None
@property
def ozone(self):
"""Return the O3 (ozone) level."""
return None
@property
def carbon_monoxide(self):
"""Return the CO (carbon monoxide) level."""
return None
@property
def carbon_dioxide(self):
"""Return the CO2 (carbon dioxide) level."""
return None
@property
def attribution(self):
"""Return the attribution."""
return None
@property
def sulphur_dioxide(self):
"""Return the SO2 (sulphur dioxide) level."""
return None
@property
def nitrogen_oxide(self):
"""Return the N2O (nitrogen oxide) level."""
return None
@property
def nitrogen_monoxide(self):
"""Return the NO (nitrogen monoxide) level."""
return None
@property
def nitrogen_dioxide(self):
"""Return the NO2 (nitrogen dioxide) level."""
return None
@property
def state_attributes(self):
"""Return the state attributes."""
data = {}
for prop, attr in PROP_TO_ATTR.items():
value = getattr(self, prop)
if value is not None:
data[attr] = value
return data
@property
def state(self):
"""Return the current state."""
return self.particulate_matter_2_5

View File

@@ -0,0 +1,8 @@
{
"domain": "air_quality",
"name": "Air quality",
"documentation": "https://www.home-assistant.io/components/air_quality",
"requirements": [],
"dependencies": [],
"codeowners": []
}

View File

@@ -0,0 +1 @@
"""The airvisual component."""

View File

@@ -0,0 +1,12 @@
{
"domain": "airvisual",
"name": "Airvisual",
"documentation": "https://www.home-assistant.io/components/airvisual",
"requirements": [
"pyairvisual==3.0.1"
],
"dependencies": [],
"codeowners": [
"@bachya"
]
}

View File

@@ -0,0 +1,294 @@
"""Support for AirVisual air quality sensors."""
from logging import getLogger
from datetime import timedelta
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
ATTR_ATTRIBUTION, ATTR_LATITUDE, ATTR_LONGITUDE, CONF_API_KEY,
CONF_LATITUDE, CONF_LONGITUDE, CONF_MONITORED_CONDITIONS,
CONF_SCAN_INTERVAL, CONF_STATE, CONF_SHOW_ON_MAP)
from homeassistant.helpers import aiohttp_client, config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle
_LOGGER = getLogger(__name__)
ATTR_CITY = 'city'
ATTR_COUNTRY = 'country'
ATTR_POLLUTANT_SYMBOL = 'pollutant_symbol'
ATTR_POLLUTANT_UNIT = 'pollutant_unit'
ATTR_REGION = 'region'
CONF_CITY = 'city'
CONF_COUNTRY = 'country'
DEFAULT_ATTRIBUTION = "Data provided by AirVisual"
DEFAULT_SCAN_INTERVAL = timedelta(minutes=10)
MASS_PARTS_PER_MILLION = 'ppm'
MASS_PARTS_PER_BILLION = 'ppb'
VOLUME_MICROGRAMS_PER_CUBIC_METER = 'µg/m3'
SENSOR_TYPE_LEVEL = 'air_pollution_level'
SENSOR_TYPE_AQI = 'air_quality_index'
SENSOR_TYPE_POLLUTANT = 'main_pollutant'
SENSORS = [
(SENSOR_TYPE_LEVEL, 'Air Pollution Level', 'mdi:gauge', None),
(SENSOR_TYPE_AQI, 'Air Quality Index', 'mdi:chart-line', 'AQI'),
(SENSOR_TYPE_POLLUTANT, 'Main Pollutant', 'mdi:chemical-weapon', None),
]
POLLUTANT_LEVEL_MAPPING = [{
'label': 'Good',
'icon': 'mdi:emoticon-excited',
'minimum': 0,
'maximum': 50
}, {
'label': 'Moderate',
'icon': 'mdi:emoticon-happy',
'minimum': 51,
'maximum': 100
}, {
'label': 'Unhealthy for sensitive groups',
'icon': 'mdi:emoticon-neutral',
'minimum': 101,
'maximum': 150
}, {
'label': 'Unhealthy',
'icon': 'mdi:emoticon-sad',
'minimum': 151,
'maximum': 200
}, {
'label': 'Very Unhealthy',
'icon': 'mdi:emoticon-dead',
'minimum': 201,
'maximum': 300
}, {
'label': 'Hazardous',
'icon': 'mdi:biohazard',
'minimum': 301,
'maximum': 10000
}]
POLLUTANT_MAPPING = {
'co': {
'label': 'Carbon Monoxide',
'unit': MASS_PARTS_PER_MILLION
},
'n2': {
'label': 'Nitrogen Dioxide',
'unit': MASS_PARTS_PER_BILLION
},
'o3': {
'label': 'Ozone',
'unit': MASS_PARTS_PER_BILLION
},
'p1': {
'label': 'PM10',
'unit': VOLUME_MICROGRAMS_PER_CUBIC_METER
},
'p2': {
'label': 'PM2.5',
'unit': VOLUME_MICROGRAMS_PER_CUBIC_METER
},
's2': {
'label': 'Sulfur Dioxide',
'unit': MASS_PARTS_PER_BILLION
},
}
SENSOR_LOCALES = {'cn': 'Chinese', 'us': 'U.S.'}
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_API_KEY): cv.string,
vol.Required(CONF_MONITORED_CONDITIONS, default=list(SENSOR_LOCALES)):
vol.All(cv.ensure_list, [vol.In(SENSOR_LOCALES)]),
vol.Inclusive(CONF_CITY, 'city'): cv.string,
vol.Inclusive(CONF_COUNTRY, 'city'): cv.string,
vol.Inclusive(CONF_LATITUDE, 'coords'): cv.latitude,
vol.Inclusive(CONF_LONGITUDE, 'coords'): cv.longitude,
vol.Optional(CONF_SHOW_ON_MAP, default=True): cv.boolean,
vol.Inclusive(CONF_STATE, 'city'): cv.string,
vol.Optional(CONF_SCAN_INTERVAL, default=DEFAULT_SCAN_INTERVAL):
cv.time_period
})
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Configure the platform and add the sensors."""
from pyairvisual import Client
city = config.get(CONF_CITY)
state = config.get(CONF_STATE)
country = config.get(CONF_COUNTRY)
latitude = config.get(CONF_LATITUDE, hass.config.latitude)
longitude = config.get(CONF_LONGITUDE, hass.config.longitude)
websession = aiohttp_client.async_get_clientsession(hass)
if city and state and country:
_LOGGER.debug(
"Using city, state, and country: %s, %s, %s", city, state, country)
location_id = ','.join((city, state, country))
data = AirVisualData(
Client(websession, api_key=config[CONF_API_KEY]),
city=city,
state=state,
country=country,
show_on_map=config[CONF_SHOW_ON_MAP],
scan_interval=config[CONF_SCAN_INTERVAL])
else:
_LOGGER.debug(
"Using latitude and longitude: %s, %s", latitude, longitude)
location_id = ','.join((str(latitude), str(longitude)))
data = AirVisualData(
Client(websession, api_key=config[CONF_API_KEY]),
latitude=latitude,
longitude=longitude,
show_on_map=config[CONF_SHOW_ON_MAP],
scan_interval=config[CONF_SCAN_INTERVAL])
await data.async_update()
sensors = []
for locale in config[CONF_MONITORED_CONDITIONS]:
for kind, name, icon, unit in SENSORS:
sensors.append(
AirVisualSensor(
data, kind, name, icon, unit, locale, location_id))
async_add_entities(sensors, True)
class AirVisualSensor(Entity):
"""Define an AirVisual sensor."""
def __init__(self, airvisual, kind, name, icon, unit, locale, location_id):
"""Initialize."""
self._attrs = {ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION}
self._icon = icon
self._locale = locale
self._location_id = location_id
self._name = name
self._state = None
self._type = kind
self._unit = unit
self.airvisual = airvisual
@property
def device_state_attributes(self):
"""Return the device state attributes."""
if self.airvisual.show_on_map:
self._attrs[ATTR_LATITUDE] = self.airvisual.latitude
self._attrs[ATTR_LONGITUDE] = self.airvisual.longitude
else:
self._attrs['lati'] = self.airvisual.latitude
self._attrs['long'] = self.airvisual.longitude
return self._attrs
@property
def available(self):
"""Return True if entity is available."""
return bool(self.airvisual.pollution_info)
@property
def icon(self):
"""Return the icon."""
return self._icon
@property
def name(self):
"""Return the name."""
return '{0} {1}'.format(SENSOR_LOCALES[self._locale], self._name)
@property
def state(self):
"""Return the state."""
return self._state
@property
def unique_id(self):
"""Return a unique, HASS-friendly identifier for this entity."""
return '{0}_{1}_{2}'.format(
self._location_id, self._locale, self._type)
@property
def unit_of_measurement(self):
"""Return the unit the value is expressed in."""
return self._unit
async def async_update(self):
"""Update the sensor."""
await self.airvisual.async_update()
data = self.airvisual.pollution_info
if not data:
return
if self._type == SENSOR_TYPE_LEVEL:
aqi = data['aqi{0}'.format(self._locale)]
[level] = [
i for i in POLLUTANT_LEVEL_MAPPING
if i['minimum'] <= aqi <= i['maximum']
]
self._state = level['label']
self._icon = level['icon']
elif self._type == SENSOR_TYPE_AQI:
self._state = data['aqi{0}'.format(self._locale)]
elif self._type == SENSOR_TYPE_POLLUTANT:
symbol = data['main{0}'.format(self._locale)]
self._state = POLLUTANT_MAPPING[symbol]['label']
self._attrs.update({
ATTR_POLLUTANT_SYMBOL: symbol,
ATTR_POLLUTANT_UNIT: POLLUTANT_MAPPING[symbol]['unit']
})
class AirVisualData:
"""Define an object to hold sensor data."""
def __init__(self, client, **kwargs):
"""Initialize."""
self._client = client
self.city = kwargs.get(CONF_CITY)
self.country = kwargs.get(CONF_COUNTRY)
self.latitude = kwargs.get(CONF_LATITUDE)
self.longitude = kwargs.get(CONF_LONGITUDE)
self.pollution_info = {}
self.show_on_map = kwargs.get(CONF_SHOW_ON_MAP)
self.state = kwargs.get(CONF_STATE)
self.async_update = Throttle(
kwargs[CONF_SCAN_INTERVAL])(self._async_update)
async def _async_update(self):
"""Update AirVisual data."""
from pyairvisual.errors import AirVisualError
try:
if self.city and self.state and self.country:
resp = await self._client.api.city(
self.city, self.state, self.country)
self.longitude, self.latitude = resp['location']['coordinates']
else:
resp = await self._client.api.nearest_city(
self.latitude, self.longitude)
_LOGGER.debug("New data retrieved: %s", resp)
self.pollution_info = resp['current']['pollution']
except (KeyError, AirVisualError) as err:
if self.city and self.state and self.country:
location = (self.city, self.state, self.country)
else:
location = (self.latitude, self.longitude)
_LOGGER.error(
"Can't retrieve data for location: %s (%s)", location,
err)
self.pollution_info = {}

View File

@@ -0,0 +1 @@
"""The aladdin_connect component."""

View File

@@ -0,0 +1,113 @@
"""Platform for the Aladdin Connect cover component."""
import logging
import voluptuous as vol
from homeassistant.components.cover import (CoverDevice, PLATFORM_SCHEMA,
SUPPORT_OPEN, SUPPORT_CLOSE)
from homeassistant.const import (CONF_USERNAME, CONF_PASSWORD, STATE_CLOSED,
STATE_OPENING, STATE_CLOSING, STATE_OPEN)
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
NOTIFICATION_ID = 'aladdin_notification'
NOTIFICATION_TITLE = 'Aladdin Connect Cover Setup'
STATES_MAP = {
'open': STATE_OPEN,
'opening': STATE_OPENING,
'closed': STATE_CLOSED,
'closing': STATE_CLOSING
}
SUPPORTED_FEATURES = SUPPORT_OPEN | SUPPORT_CLOSE
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_USERNAME): cv.string,
vol.Required(CONF_PASSWORD): cv.string
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Aladdin Connect platform."""
from aladdin_connect import AladdinConnectClient
username = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
acc = AladdinConnectClient(username, password)
try:
if not acc.login():
raise ValueError("Username or Password is incorrect")
add_entities(AladdinDevice(acc, door) for door in acc.get_doors())
except (TypeError, KeyError, NameError, ValueError) as ex:
_LOGGER.error("%s", ex)
hass.components.persistent_notification.create(
'Error: {}<br />'
'You will need to restart hass after fixing.'
''.format(ex),
title=NOTIFICATION_TITLE,
notification_id=NOTIFICATION_ID)
class AladdinDevice(CoverDevice):
"""Representation of Aladdin Connect cover."""
def __init__(self, acc, device):
"""Initialize the cover."""
self._acc = acc
self._device_id = device['device_id']
self._number = device['door_number']
self._name = device['name']
self._status = STATES_MAP.get(device['status'])
@property
def device_class(self):
"""Define this cover as a garage door."""
return 'garage'
@property
def supported_features(self):
"""Flag supported features."""
return SUPPORTED_FEATURES
@property
def unique_id(self):
"""Return a unique ID."""
return '{}-{}'.format(self._device_id, self._number)
@property
def name(self):
"""Return the name of the garage door."""
return self._name
@property
def is_opening(self):
"""Return if the cover is opening or not."""
return self._status == STATE_OPENING
@property
def is_closing(self):
"""Return if the cover is closing or not."""
return self._status == STATE_CLOSING
@property
def is_closed(self):
"""Return None if status is unknown, True if closed, else False."""
if self._status is None:
return None
return self._status == STATE_CLOSED
def close_cover(self, **kwargs):
"""Issue close command to cover."""
self._acc.close_door(self._device_id, self._number)
def open_cover(self, **kwargs):
"""Issue open command to cover."""
self._acc.open_door(self._device_id, self._number)
def update(self):
"""Update status of cover."""
acc_status = self._acc.get_door_status(self._device_id, self._number)
self._status = STATES_MAP.get(acc_status)

View File

@@ -0,0 +1,10 @@
{
"domain": "aladdin_connect",
"name": "Aladdin connect",
"documentation": "https://www.home-assistant.io/components/aladdin_connect",
"requirements": [
"aladdin_connect==0.3"
],
"dependencies": [],
"codeowners": []
}

View File

@@ -1,10 +1,4 @@
"""
Component to interface with an alarm control panel.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel/
"""
import asyncio
"""Component to interface with an alarm control panel."""
from datetime import timedelta
import logging
@@ -14,8 +8,8 @@ from homeassistant.const import (
ATTR_CODE, ATTR_CODE_FORMAT, ATTR_ENTITY_ID, SERVICE_ALARM_TRIGGER,
SERVICE_ALARM_DISARM, SERVICE_ALARM_ARM_HOME, SERVICE_ALARM_ARM_AWAY,
SERVICE_ALARM_ARM_NIGHT, SERVICE_ALARM_ARM_CUSTOM_BYPASS)
from homeassistant.loader import bind_hass
from homeassistant.helpers.config_validation import PLATFORM_SCHEMA # noqa
from homeassistant.helpers.config_validation import ( # noqa
PLATFORM_SCHEMA, PLATFORM_SCHEMA_BASE)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_component import EntityComponent
@@ -23,94 +17,23 @@ from homeassistant.helpers.entity_component import EntityComponent
DOMAIN = 'alarm_control_panel'
SCAN_INTERVAL = timedelta(seconds=30)
ATTR_CHANGED_BY = 'changed_by'
FORMAT_TEXT = 'text'
FORMAT_NUMBER = 'number'
ENTITY_ID_FORMAT = DOMAIN + '.{}'
ALARM_SERVICE_SCHEMA = vol.Schema({
vol.Optional(ATTR_ENTITY_ID): cv.entity_ids,
vol.Optional(ATTR_ENTITY_ID): cv.comp_entity_ids,
vol.Optional(ATTR_CODE): cv.string,
})
@bind_hass
def alarm_disarm(hass, code=None, entity_id=None):
"""Send the alarm the command for disarm."""
data = {}
if code:
data[ATTR_CODE] = code
if entity_id:
data[ATTR_ENTITY_ID] = entity_id
hass.services.call(DOMAIN, SERVICE_ALARM_DISARM, data)
@bind_hass
def alarm_arm_home(hass, code=None, entity_id=None):
"""Send the alarm the command for arm home."""
data = {}
if code:
data[ATTR_CODE] = code
if entity_id:
data[ATTR_ENTITY_ID] = entity_id
hass.services.call(DOMAIN, SERVICE_ALARM_ARM_HOME, data)
@bind_hass
def alarm_arm_away(hass, code=None, entity_id=None):
"""Send the alarm the command for arm away."""
data = {}
if code:
data[ATTR_CODE] = code
if entity_id:
data[ATTR_ENTITY_ID] = entity_id
hass.services.call(DOMAIN, SERVICE_ALARM_ARM_AWAY, data)
@bind_hass
def alarm_arm_night(hass, code=None, entity_id=None):
"""Send the alarm the command for arm night."""
data = {}
if code:
data[ATTR_CODE] = code
if entity_id:
data[ATTR_ENTITY_ID] = entity_id
hass.services.call(DOMAIN, SERVICE_ALARM_ARM_NIGHT, data)
@bind_hass
def alarm_trigger(hass, code=None, entity_id=None):
"""Send the alarm the command for trigger."""
data = {}
if code:
data[ATTR_CODE] = code
if entity_id:
data[ATTR_ENTITY_ID] = entity_id
hass.services.call(DOMAIN, SERVICE_ALARM_TRIGGER, data)
@bind_hass
def alarm_arm_custom_bypass(hass, code=None, entity_id=None):
"""Send the alarm the command for arm custom bypass."""
data = {}
if code:
data[ATTR_CODE] = code
if entity_id:
data[ATTR_ENTITY_ID] = entity_id
hass.services.call(DOMAIN, SERVICE_ALARM_ARM_CUSTOM_BYPASS, data)
@asyncio.coroutine
def async_setup(hass, config):
async def async_setup(hass, config):
"""Track states and offer events for sensors."""
component = hass.data[DOMAIN] = EntityComponent(
logging.getLogger(__name__), DOMAIN, hass, SCAN_INTERVAL)
yield from component.async_setup(config)
await component.async_setup(config)
component.async_register_entity_service(
SERVICE_ALARM_DISARM, ALARM_SERVICE_SCHEMA,

View File

@@ -1,85 +0,0 @@
"""
This component provides HA alarm_control_panel support for Abode System.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.abode/
"""
import logging
from homeassistant.components.abode import CONF_ATTRIBUTION, AbodeDevice
from homeassistant.components.abode import DOMAIN as ABODE_DOMAIN
from homeassistant.components.alarm_control_panel import AlarmControlPanel
from homeassistant.const import (
ATTR_ATTRIBUTION, STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME,
STATE_ALARM_DISARMED)
DEPENDENCIES = ['abode']
_LOGGER = logging.getLogger(__name__)
ICON = 'mdi:security'
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up an alarm control panel for an Abode device."""
data = hass.data[ABODE_DOMAIN]
alarm_devices = [AbodeAlarm(data, data.abode.get_alarm(), data.name)]
data.devices.extend(alarm_devices)
add_entities(alarm_devices)
class AbodeAlarm(AbodeDevice, AlarmControlPanel):
"""An alarm_control_panel implementation for Abode."""
def __init__(self, data, device, name):
"""Initialize the alarm control panel."""
super().__init__(data, device)
self._name = name
@property
def icon(self):
"""Return the icon."""
return ICON
@property
def state(self):
"""Return the state of the device."""
if self._device.is_standby:
state = STATE_ALARM_DISARMED
elif self._device.is_away:
state = STATE_ALARM_ARMED_AWAY
elif self._device.is_home:
state = STATE_ALARM_ARMED_HOME
else:
state = None
return state
def alarm_disarm(self, code=None):
"""Send disarm command."""
self._device.set_standby()
def alarm_arm_home(self, code=None):
"""Send arm home command."""
self._device.set_home()
def alarm_arm_away(self, code=None):
"""Send arm away command."""
self._device.set_away()
@property
def name(self):
"""Return the name of the alarm."""
return self._name or super().name
@property
def device_state_attributes(self):
"""Return the state attributes."""
return {
ATTR_ATTRIBUTION: CONF_ATTRIBUTION,
'device_id': self._device.device_id,
'battery_backup': self._device.battery,
'cellular_backup': self._device.is_cellular,
}

View File

@@ -1,144 +0,0 @@
"""
Support for AlarmDecoder-based alarm control panels (Honeywell/DSC).
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.alarmdecoder/
"""
import asyncio
import logging
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarmdecoder import DATA_AD, SIGNAL_PANEL_MESSAGE
from homeassistant.const import (
ATTR_CODE, STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME,
STATE_ALARM_DISARMED, STATE_ALARM_TRIGGERED)
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['alarmdecoder']
SERVICE_ALARM_TOGGLE_CHIME = 'alarmdecoder_alarm_toggle_chime'
ALARM_TOGGLE_CHIME_SCHEMA = vol.Schema({
vol.Required(ATTR_CODE): cv.string,
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up for AlarmDecoder alarm panels."""
device = AlarmDecoderAlarmPanel()
add_entities([device])
def alarm_toggle_chime_handler(service):
"""Register toggle chime handler."""
code = service.data.get(ATTR_CODE)
device.alarm_toggle_chime(code)
hass.services.register(
alarm.DOMAIN, SERVICE_ALARM_TOGGLE_CHIME, alarm_toggle_chime_handler,
schema=ALARM_TOGGLE_CHIME_SCHEMA)
class AlarmDecoderAlarmPanel(alarm.AlarmControlPanel):
"""Representation of an AlarmDecoder-based alarm panel."""
def __init__(self):
"""Initialize the alarm panel."""
self._display = ""
self._name = "Alarm Panel"
self._state = None
self._ac_power = None
self._backlight_on = None
self._battery_low = None
self._check_zone = None
self._chime = None
self._entry_delay_off = None
self._programming_mode = None
self._ready = None
self._zone_bypassed = None
@asyncio.coroutine
def async_added_to_hass(self):
"""Register callbacks."""
self.hass.helpers.dispatcher.async_dispatcher_connect(
SIGNAL_PANEL_MESSAGE, self._message_callback)
def _message_callback(self, message):
"""Handle received messages."""
if message.alarm_sounding or message.fire_alarm:
self._state = STATE_ALARM_TRIGGERED
elif message.armed_away:
self._state = STATE_ALARM_ARMED_AWAY
elif message.armed_home:
self._state = STATE_ALARM_ARMED_HOME
else:
self._state = STATE_ALARM_DISARMED
self._ac_power = message.ac_power
self._backlight_on = message.backlight_on
self._battery_low = message.battery_low
self._check_zone = message.check_zone
self._chime = message.chime_on
self._entry_delay_off = message.entry_delay_off
self._programming_mode = message.programming_mode
self._ready = message.ready
self._zone_bypassed = message.zone_bypassed
self.schedule_update_ha_state()
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def should_poll(self):
"""Return the polling state."""
return False
@property
def code_format(self):
"""Return one or more digits/characters."""
return 'Number'
@property
def state(self):
"""Return the state of the device."""
return self._state
@property
def device_state_attributes(self):
"""Return the state attributes."""
return {
'ac_power': self._ac_power,
'backlight_on': self._backlight_on,
'battery_low': self._battery_low,
'check_zone': self._check_zone,
'chime': self._chime,
'entry_delay_off': self._entry_delay_off,
'programming_mode': self._programming_mode,
'ready': self._ready,
'zone_bypassed': self._zone_bypassed,
}
def alarm_disarm(self, code=None):
"""Send disarm command."""
if code:
self.hass.data[DATA_AD].send("{!s}1".format(code))
def alarm_arm_away(self, code=None):
"""Send arm away command."""
if code:
self.hass.data[DATA_AD].send("{!s}2".format(code))
def alarm_arm_home(self, code=None):
"""Send arm home command."""
if code:
self.hass.data[DATA_AD].send("{!s}3".format(code))
def alarm_toggle_chime(self, code=None):
"""Send toggle chime command."""
if code:
self.hass.data[DATA_AD].send("{!s}9".format(code))

View File

@@ -1,132 +0,0 @@
"""
Interfaces with Alarm.com alarm control panels.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.alarmdotcom/
"""
import asyncio
import logging
import re
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_CODE, CONF_NAME, CONF_PASSWORD, CONF_USERNAME, STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, STATE_UNKNOWN)
from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['pyalarmdotcom==0.3.2']
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'Alarm.com'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_PASSWORD): cv.string,
vol.Required(CONF_USERNAME): cv.string,
vol.Optional(CONF_CODE): cv.positive_int,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
})
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
"""Set up a Alarm.com control panel."""
name = config.get(CONF_NAME)
code = config.get(CONF_CODE)
username = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
alarmdotcom = AlarmDotCom(hass, name, code, username, password)
yield from alarmdotcom.async_login()
async_add_entities([alarmdotcom])
class AlarmDotCom(alarm.AlarmControlPanel):
"""Representation of an Alarm.com status."""
def __init__(self, hass, name, code, username, password):
"""Initialize the Alarm.com status."""
from pyalarmdotcom import Alarmdotcom
_LOGGER.debug('Setting up Alarm.com...')
self._hass = hass
self._name = name
self._code = str(code) if code else None
self._username = username
self._password = password
self._websession = async_get_clientsession(self._hass)
self._state = STATE_UNKNOWN
self._alarm = Alarmdotcom(
username, password, self._websession, hass.loop)
@asyncio.coroutine
def async_login(self):
"""Login to Alarm.com."""
yield from self._alarm.async_login()
@asyncio.coroutine
def async_update(self):
"""Fetch the latest state."""
yield from self._alarm.async_update()
return self._alarm.state
@property
def name(self):
"""Return the name of the alarm."""
return self._name
@property
def code_format(self):
"""Return one or more digits/characters."""
if self._code is None:
return None
if isinstance(self._code, str) and re.search('^\\d+$', self._code):
return 'Number'
return 'Any'
@property
def state(self):
"""Return the state of the device."""
if self._alarm.state.lower() == 'disarmed':
return STATE_ALARM_DISARMED
if self._alarm.state.lower() == 'armed stay':
return STATE_ALARM_ARMED_HOME
if self._alarm.state.lower() == 'armed away':
return STATE_ALARM_ARMED_AWAY
return STATE_UNKNOWN
@property
def device_state_attributes(self):
"""Return the state attributes."""
return {
'sensor_status': self._alarm.sensor_status
}
@asyncio.coroutine
def async_alarm_disarm(self, code=None):
"""Send disarm command."""
if self._validate_code(code):
yield from self._alarm.async_alarm_disarm()
@asyncio.coroutine
def async_alarm_arm_home(self, code=None):
"""Send arm hom command."""
if self._validate_code(code):
yield from self._alarm.async_alarm_arm_home()
@asyncio.coroutine
def async_alarm_arm_away(self, code=None):
"""Send arm away command."""
if self._validate_code(code):
yield from self._alarm.async_alarm_arm_away()
def _validate_code(self, code):
"""Validate given code."""
check = self._code is None or code == self._code
if not check:
_LOGGER.warning("Wrong code entered")
return check

View File

@@ -1,131 +0,0 @@
"""
Support for Arlo Alarm Control Panels.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.arlo/
"""
import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.components.alarm_control_panel import (
AlarmControlPanel, PLATFORM_SCHEMA)
from homeassistant.components.arlo import (
DATA_ARLO, CONF_ATTRIBUTION, SIGNAL_UPDATE_ARLO)
from homeassistant.const import (
ATTR_ATTRIBUTION, STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME,
STATE_ALARM_DISARMED)
_LOGGER = logging.getLogger(__name__)
ARMED = 'armed'
CONF_HOME_MODE_NAME = 'home_mode_name'
CONF_AWAY_MODE_NAME = 'away_mode_name'
DEPENDENCIES = ['arlo']
DISARMED = 'disarmed'
ICON = 'mdi:security'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_HOME_MODE_NAME, default=ARMED): cv.string,
vol.Optional(CONF_AWAY_MODE_NAME, default=ARMED): cv.string,
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Arlo Alarm Control Panels."""
arlo = hass.data[DATA_ARLO]
if not arlo.base_stations:
return
home_mode_name = config.get(CONF_HOME_MODE_NAME)
away_mode_name = config.get(CONF_AWAY_MODE_NAME)
base_stations = []
for base_station in arlo.base_stations:
base_stations.append(ArloBaseStation(base_station, home_mode_name,
away_mode_name))
add_entities(base_stations, True)
class ArloBaseStation(AlarmControlPanel):
"""Representation of an Arlo Alarm Control Panel."""
def __init__(self, data, home_mode_name, away_mode_name):
"""Initialize the alarm control panel."""
self._base_station = data
self._home_mode_name = home_mode_name
self._away_mode_name = away_mode_name
self._state = None
@property
def icon(self):
"""Return icon."""
return ICON
async def async_added_to_hass(self):
"""Register callbacks."""
async_dispatcher_connect(
self.hass, SIGNAL_UPDATE_ARLO, self._update_callback)
@callback
def _update_callback(self):
"""Call update method."""
self.async_schedule_update_ha_state(True)
@property
def state(self):
"""Return the state of the device."""
return self._state
def update(self):
"""Update the state of the device."""
_LOGGER.debug("Updating Arlo Alarm Control Panel %s", self.name)
mode = self._base_station.mode
if mode:
self._state = self._get_state_from_mode(mode)
else:
self._state = None
async def async_alarm_disarm(self, code=None):
"""Send disarm command."""
self._base_station.mode = DISARMED
async def async_alarm_arm_away(self, code=None):
"""Send arm away command. Uses custom mode."""
self._base_station.mode = self._away_mode_name
async def async_alarm_arm_home(self, code=None):
"""Send arm home command. Uses custom mode."""
self._base_station.mode = self._home_mode_name
@property
def name(self):
"""Return the name of the base station."""
return self._base_station.name
@property
def device_state_attributes(self):
"""Return the state attributes."""
return {
ATTR_ATTRIBUTION: CONF_ATTRIBUTION,
'device_id': self._base_station.device_id
}
def _get_state_from_mode(self, mode):
"""Convert Arlo mode to Home Assistant state."""
if mode == ARMED:
return STATE_ALARM_ARMED_AWAY
if mode == DISARMED:
return STATE_ALARM_DISARMED
if mode == self._home_mode_name:
return STATE_ALARM_ARMED_HOME
if mode == self._away_mode_name:
return STATE_ALARM_ARMED_AWAY
return mode

View File

@@ -1,91 +0,0 @@
"""
Support for Canary alarm.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.canary/
"""
import logging
from homeassistant.components.alarm_control_panel import AlarmControlPanel
from homeassistant.components.canary import DATA_CANARY
from homeassistant.const import STATE_ALARM_DISARMED, STATE_ALARM_ARMED_AWAY, \
STATE_ALARM_ARMED_NIGHT, STATE_ALARM_ARMED_HOME
DEPENDENCIES = ['canary']
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Canary alarms."""
data = hass.data[DATA_CANARY]
devices = []
for location in data.locations:
devices.append(CanaryAlarm(data, location.location_id))
add_entities(devices, True)
class CanaryAlarm(AlarmControlPanel):
"""Representation of a Canary alarm control panel."""
def __init__(self, data, location_id):
"""Initialize a Canary security camera."""
self._data = data
self._location_id = location_id
@property
def name(self):
"""Return the name of the alarm."""
location = self._data.get_location(self._location_id)
return location.name
@property
def state(self):
"""Return the state of the device."""
from canary.api import LOCATION_MODE_AWAY, LOCATION_MODE_HOME, \
LOCATION_MODE_NIGHT
location = self._data.get_location(self._location_id)
if location.is_private:
return STATE_ALARM_DISARMED
mode = location.mode
if mode.name == LOCATION_MODE_AWAY:
return STATE_ALARM_ARMED_AWAY
if mode.name == LOCATION_MODE_HOME:
return STATE_ALARM_ARMED_HOME
if mode.name == LOCATION_MODE_NIGHT:
return STATE_ALARM_ARMED_NIGHT
return None
@property
def device_state_attributes(self):
"""Return the state attributes."""
location = self._data.get_location(self._location_id)
return {
'private': location.is_private
}
def alarm_disarm(self, code=None):
"""Send disarm command."""
location = self._data.get_location(self._location_id)
self._data.set_location_mode(self._location_id, location.mode.name,
True)
def alarm_arm_home(self, code=None):
"""Send arm home command."""
from canary.api import LOCATION_MODE_HOME
self._data.set_location_mode(self._location_id, LOCATION_MODE_HOME)
def alarm_arm_away(self, code=None):
"""Send arm away command."""
from canary.api import LOCATION_MODE_AWAY
self._data.set_location_mode(self._location_id, LOCATION_MODE_AWAY)
def alarm_arm_night(self, code=None):
"""Send arm night command."""
from canary.api import LOCATION_MODE_NIGHT
self._data.set_location_mode(self._location_id, LOCATION_MODE_NIGHT)

View File

@@ -1,124 +0,0 @@
"""
Support for Concord232 alarm control panels.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.concord232/
"""
import datetime
from datetime import timedelta
import logging
import requests
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_HOST, CONF_NAME, CONF_PORT, STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, STATE_UNKNOWN)
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['concord232==0.15']
_LOGGER = logging.getLogger(__name__)
DEFAULT_HOST = 'localhost'
DEFAULT_NAME = 'CONCORD232'
DEFAULT_PORT = 5007
SCAN_INTERVAL = timedelta(seconds=10)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Concord232 alarm control panel platform."""
name = config.get(CONF_NAME)
host = config.get(CONF_HOST)
port = config.get(CONF_PORT)
url = 'http://{}:{}'.format(host, port)
try:
add_entities([Concord232Alarm(hass, url, name)])
except requests.exceptions.ConnectionError as ex:
_LOGGER.error("Unable to connect to Concord232: %s", str(ex))
return
class Concord232Alarm(alarm.AlarmControlPanel):
"""Representation of the Concord232-based alarm panel."""
def __init__(self, hass, url, name):
"""Initialize the Concord232 alarm panel."""
from concord232 import client as concord232_client
self._state = STATE_UNKNOWN
self._hass = hass
self._name = name
self._url = url
try:
client = concord232_client.Client(self._url)
except requests.exceptions.ConnectionError as ex:
_LOGGER.error("Unable to connect to Concord232: %s", str(ex))
self._alarm = client
self._alarm.partitions = self._alarm.list_partitions()
self._alarm.last_partition_update = datetime.datetime.now()
self.update()
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def code_format(self):
"""Return the characters if code is defined."""
return 'Number'
@property
def state(self):
"""Return the state of the device."""
return self._state
def update(self):
"""Update values from API."""
try:
part = self._alarm.list_partitions()[0]
except requests.exceptions.ConnectionError as ex:
_LOGGER.error("Unable to connect to %(host)s: %(reason)s",
dict(host=self._url, reason=ex))
newstate = STATE_UNKNOWN
except IndexError:
_LOGGER.error("Concord232 reports no partitions")
newstate = STATE_UNKNOWN
if part['arming_level'] == 'Off':
newstate = STATE_ALARM_DISARMED
elif 'Home' in part['arming_level']:
newstate = STATE_ALARM_ARMED_HOME
else:
newstate = STATE_ALARM_ARMED_AWAY
if not newstate == self._state:
_LOGGER.info("State change from %s to %s", self._state, newstate)
self._state = newstate
return self._state
def alarm_disarm(self, code=None):
"""Send disarm command."""
self._alarm.disarm(code)
def alarm_arm_home(self, code=None):
"""Send arm home command."""
self._alarm.arm('stay')
def alarm_arm_away(self, code=None):
"""Send arm away command."""
self._alarm.arm('away')

View File

@@ -1,48 +0,0 @@
"""
Demo platform that has two fake alarm control panels.
For more details about this platform, please refer to the documentation
https://home-assistant.io/components/demo/
"""
import datetime
from homeassistant.components.alarm_control_panel import manual
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_CUSTOM_BYPASS,
STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT,
STATE_ALARM_DISARMED, STATE_ALARM_TRIGGERED, CONF_DELAY_TIME,
CONF_PENDING_TIME, CONF_TRIGGER_TIME)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Demo alarm control panel platform."""
add_entities([
manual.ManualAlarm(hass, 'Alarm', '1234', None, False, {
STATE_ALARM_ARMED_AWAY: {
CONF_DELAY_TIME: datetime.timedelta(seconds=0),
CONF_PENDING_TIME: datetime.timedelta(seconds=5),
CONF_TRIGGER_TIME: datetime.timedelta(seconds=10),
},
STATE_ALARM_ARMED_HOME: {
CONF_DELAY_TIME: datetime.timedelta(seconds=0),
CONF_PENDING_TIME: datetime.timedelta(seconds=5),
CONF_TRIGGER_TIME: datetime.timedelta(seconds=10),
},
STATE_ALARM_ARMED_NIGHT: {
CONF_DELAY_TIME: datetime.timedelta(seconds=0),
CONF_PENDING_TIME: datetime.timedelta(seconds=5),
CONF_TRIGGER_TIME: datetime.timedelta(seconds=10),
},
STATE_ALARM_DISARMED: {
CONF_DELAY_TIME: datetime.timedelta(seconds=0),
CONF_TRIGGER_TIME: datetime.timedelta(seconds=10),
},
STATE_ALARM_ARMED_CUSTOM_BYPASS: {
CONF_DELAY_TIME: datetime.timedelta(seconds=0),
CONF_PENDING_TIME: datetime.timedelta(seconds=5),
CONF_TRIGGER_TIME: datetime.timedelta(seconds=10),
},
STATE_ALARM_TRIGGERED: {
CONF_PENDING_TIME: datetime.timedelta(seconds=5),
},
}),
])

View File

@@ -1,144 +0,0 @@
"""
Interfaces with Egardia/Woonveilig alarm control panel.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.egardia/
"""
import asyncio
import logging
import requests
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.const import (
STATE_ALARM_DISARMED, STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARMED_AWAY, STATE_ALARM_TRIGGERED,
STATE_ALARM_ARMED_NIGHT)
from homeassistant.components.egardia import (
EGARDIA_DEVICE, EGARDIA_SERVER,
REPORT_SERVER_CODES_IGNORE, CONF_REPORT_SERVER_CODES,
CONF_REPORT_SERVER_ENABLED, CONF_REPORT_SERVER_PORT
)
DEPENDENCIES = ['egardia']
_LOGGER = logging.getLogger(__name__)
STATES = {
'ARM': STATE_ALARM_ARMED_AWAY,
'DAY HOME': STATE_ALARM_ARMED_HOME,
'DISARM': STATE_ALARM_DISARMED,
'ARMHOME': STATE_ALARM_ARMED_HOME,
'HOME': STATE_ALARM_ARMED_HOME,
'NIGHT HOME': STATE_ALARM_ARMED_NIGHT,
'TRIGGERED': STATE_ALARM_TRIGGERED
}
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Egardia platform."""
if discovery_info is None:
return
device = EgardiaAlarm(
discovery_info['name'],
hass.data[EGARDIA_DEVICE],
discovery_info[CONF_REPORT_SERVER_ENABLED],
discovery_info.get(CONF_REPORT_SERVER_CODES),
discovery_info[CONF_REPORT_SERVER_PORT])
# add egardia alarm device
add_entities([device], True)
class EgardiaAlarm(alarm.AlarmControlPanel):
"""Representation of a Egardia alarm."""
def __init__(self, name, egardiasystem,
rs_enabled=False, rs_codes=None, rs_port=52010):
"""Initialize the Egardia alarm."""
self._name = name
self._egardiasystem = egardiasystem
self._status = None
self._rs_enabled = rs_enabled
self._rs_codes = rs_codes
self._rs_port = rs_port
@asyncio.coroutine
def async_added_to_hass(self):
"""Add Egardiaserver callback if enabled."""
if self._rs_enabled:
_LOGGER.debug("Registering callback to Egardiaserver")
self.hass.data[EGARDIA_SERVER].register_callback(
self.handle_status_event)
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def state(self):
"""Return the state of the device."""
return self._status
@property
def should_poll(self):
"""Poll if no report server is enabled."""
if not self._rs_enabled:
return True
return False
def handle_status_event(self, event):
"""Handle the Egardia system status event."""
statuscode = event.get('status')
if statuscode is not None:
status = self.lookupstatusfromcode(statuscode)
self.parsestatus(status)
self.schedule_update_ha_state()
def lookupstatusfromcode(self, statuscode):
"""Look at the rs_codes and returns the status from the code."""
status = next((
status_group.upper() for status_group, codes
in self._rs_codes.items() for code in codes
if statuscode == code), 'UNKNOWN')
return status
def parsestatus(self, status):
"""Parse the status."""
_LOGGER.debug("Parsing status %s", status)
# Ignore the statuscode if it is IGNORE
if status.lower().strip() != REPORT_SERVER_CODES_IGNORE:
_LOGGER.debug("Not ignoring status %s", status)
newstatus = STATES.get(status.upper())
_LOGGER.debug("newstatus %s", newstatus)
self._status = newstatus
else:
_LOGGER.error("Ignoring status")
def update(self):
"""Update the alarm status."""
status = self._egardiasystem.getstate()
self.parsestatus(status)
def alarm_disarm(self, code=None):
"""Send disarm command."""
try:
self._egardiasystem.alarm_disarm()
except requests.exceptions.RequestException as err:
_LOGGER.error("Egardia device exception occurred when "
"sending disarm command: %s", err)
def alarm_arm_home(self, code=None):
"""Send arm home command."""
try:
self._egardiasystem.alarm_arm_home()
except requests.exceptions.RequestException as err:
_LOGGER.error("Egardia device exception occurred when "
"sending arm home command: %s", err)
def alarm_arm_away(self, code=None):
"""Send arm away command."""
try:
self._egardiasystem.alarm_arm_away()
except requests.exceptions.RequestException as err:
_LOGGER.error("Egardia device exception occurred when "
"sending arm away command: %s", err)

View File

@@ -1,171 +0,0 @@
"""
Support for Envisalink-based alarm control panels (Honeywell/DSC).
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.envisalink/
"""
import asyncio
import logging
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
import homeassistant.components.alarm_control_panel as alarm
import homeassistant.helpers.config_validation as cv
from homeassistant.components.envisalink import (
DATA_EVL, EnvisalinkDevice, PARTITION_SCHEMA, CONF_CODE, CONF_PANIC,
CONF_PARTITIONNAME, SIGNAL_KEYPAD_UPDATE, SIGNAL_PARTITION_UPDATE)
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED,
STATE_UNKNOWN, STATE_ALARM_TRIGGERED, STATE_ALARM_PENDING, ATTR_ENTITY_ID)
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['envisalink']
SERVICE_ALARM_KEYPRESS = 'envisalink_alarm_keypress'
ATTR_KEYPRESS = 'keypress'
ALARM_KEYPRESS_SCHEMA = vol.Schema({
vol.Required(ATTR_ENTITY_ID): cv.entity_ids,
vol.Required(ATTR_KEYPRESS): cv.string
})
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
"""Perform the setup for Envisalink alarm panels."""
configured_partitions = discovery_info['partitions']
code = discovery_info[CONF_CODE]
panic_type = discovery_info[CONF_PANIC]
devices = []
for part_num in configured_partitions:
device_config_data = PARTITION_SCHEMA(configured_partitions[part_num])
device = EnvisalinkAlarm(
hass,
part_num,
device_config_data[CONF_PARTITIONNAME],
code,
panic_type,
hass.data[DATA_EVL].alarm_state['partition'][part_num],
hass.data[DATA_EVL]
)
devices.append(device)
async_add_entities(devices)
@callback
def alarm_keypress_handler(service):
"""Map services to methods on Alarm."""
entity_ids = service.data.get(ATTR_ENTITY_ID)
keypress = service.data.get(ATTR_KEYPRESS)
target_devices = [device for device in devices
if device.entity_id in entity_ids]
for device in target_devices:
device.async_alarm_keypress(keypress)
hass.services.async_register(
alarm.DOMAIN, SERVICE_ALARM_KEYPRESS, alarm_keypress_handler,
schema=ALARM_KEYPRESS_SCHEMA)
return True
class EnvisalinkAlarm(EnvisalinkDevice, alarm.AlarmControlPanel):
"""Representation of an Envisalink-based alarm panel."""
def __init__(self, hass, partition_number, alarm_name, code, panic_type,
info, controller):
"""Initialize the alarm panel."""
self._partition_number = partition_number
self._code = code
self._panic_type = panic_type
_LOGGER.debug("Setting up alarm: %s", alarm_name)
super().__init__(alarm_name, info, controller)
@asyncio.coroutine
def async_added_to_hass(self):
"""Register callbacks."""
async_dispatcher_connect(
self.hass, SIGNAL_KEYPAD_UPDATE, self._update_callback)
async_dispatcher_connect(
self.hass, SIGNAL_PARTITION_UPDATE, self._update_callback)
@callback
def _update_callback(self, partition):
"""Update Home Assistant state, if needed."""
if partition is None or int(partition) == self._partition_number:
self.async_schedule_update_ha_state()
@property
def code_format(self):
"""Regex for code format or None if no code is required."""
if self._code:
return None
return 'Number'
@property
def state(self):
"""Return the state of the device."""
state = STATE_UNKNOWN
if self._info['status']['alarm']:
state = STATE_ALARM_TRIGGERED
elif self._info['status']['armed_away']:
state = STATE_ALARM_ARMED_AWAY
elif self._info['status']['armed_stay']:
state = STATE_ALARM_ARMED_HOME
elif self._info['status']['exit_delay']:
state = STATE_ALARM_PENDING
elif self._info['status']['entry_delay']:
state = STATE_ALARM_PENDING
elif self._info['status']['alpha']:
state = STATE_ALARM_DISARMED
return state
@asyncio.coroutine
def async_alarm_disarm(self, code=None):
"""Send disarm command."""
if code:
self.hass.data[DATA_EVL].disarm_partition(
str(code), self._partition_number)
else:
self.hass.data[DATA_EVL].disarm_partition(
str(self._code), self._partition_number)
@asyncio.coroutine
def async_alarm_arm_home(self, code=None):
"""Send arm home command."""
if code:
self.hass.data[DATA_EVL].arm_stay_partition(
str(code), self._partition_number)
else:
self.hass.data[DATA_EVL].arm_stay_partition(
str(self._code), self._partition_number)
@asyncio.coroutine
def async_alarm_arm_away(self, code=None):
"""Send arm away command."""
if code:
self.hass.data[DATA_EVL].arm_away_partition(
str(code), self._partition_number)
else:
self.hass.data[DATA_EVL].arm_away_partition(
str(self._code), self._partition_number)
@asyncio.coroutine
def async_alarm_trigger(self, code=None):
"""Alarm trigger command. Will be used to trigger a panic alarm."""
self.hass.data[DATA_EVL].panic_alarm(self._panic_type)
@callback
def async_alarm_keypress(self, keypress=None):
"""Send custom keypress."""
if keypress:
self.hass.data[DATA_EVL].keypresses_to_partition(
self._partition_number, keypress)

View File

@@ -1,83 +0,0 @@
"""
Support for HomematicIP Cloud alarm control panel.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.homematicip_cloud/
"""
import logging
from homeassistant.components.alarm_control_panel import AlarmControlPanel
from homeassistant.components.homematicip_cloud import (
HMIPC_HAPID, HomematicipGenericDevice)
from homeassistant.components.homematicip_cloud import DOMAIN as HMIPC_DOMAIN
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED,
STATE_ALARM_TRIGGERED)
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['homematicip_cloud']
HMIP_ZONE_AWAY = 'EXTERNAL'
HMIP_ZONE_HOME = 'INTERNAL'
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up the HomematicIP Cloud alarm control devices."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the HomematicIP alarm control panel from a config entry."""
from homematicip.aio.group import AsyncSecurityZoneGroup
home = hass.data[HMIPC_DOMAIN][config_entry.data[HMIPC_HAPID]].home
devices = []
for group in home.groups:
if isinstance(group, AsyncSecurityZoneGroup):
devices.append(HomematicipSecurityZone(home, group))
if devices:
async_add_entities(devices)
class HomematicipSecurityZone(HomematicipGenericDevice, AlarmControlPanel):
"""Representation of an HomematicIP Cloud security zone group."""
def __init__(self, home, device):
"""Initialize the security zone group."""
device.modelType = 'Group-SecurityZone'
device.windowState = ''
super().__init__(home, device)
@property
def state(self):
"""Return the state of the device."""
from homematicip.base.enums import WindowState
if self._device.active:
if (self._device.sabotage or self._device.motionDetected or
self._device.windowState == WindowState.OPEN):
return STATE_ALARM_TRIGGERED
active = self._home.get_security_zones_activation()
if active == (True, True):
return STATE_ALARM_ARMED_AWAY
if active == (False, True):
return STATE_ALARM_ARMED_HOME
return STATE_ALARM_DISARMED
async def async_alarm_disarm(self, code=None):
"""Send disarm command."""
await self._home.set_security_zones_activation(False, False)
async def async_alarm_arm_home(self, code=None):
"""Send arm home command."""
await self._home.set_security_zones_activation(True, False)
async def async_alarm_arm_away(self, code=None):
"""Send arm away command."""
await self._home.set_security_zones_activation(True, True)

View File

@@ -1,107 +0,0 @@
"""
Interfaces with iAlarm control panels.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.ialarm/
"""
import logging
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_HOST, CONF_NAME, CONF_PASSWORD, CONF_USERNAME, STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED)
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['pyialarm==0.2']
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'iAlarm'
def no_application_protocol(value):
"""Validate that value is without the application protocol."""
protocol_separator = "://"
if not value or protocol_separator in value:
raise vol.Invalid(
'Invalid host, {} is not allowed'.format(protocol_separator))
return value
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_HOST): vol.All(cv.string, no_application_protocol),
vol.Required(CONF_PASSWORD): cv.string,
vol.Required(CONF_USERNAME): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up an iAlarm control panel."""
name = config.get(CONF_NAME)
username = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
host = config.get(CONF_HOST)
url = 'http://{}'.format(host)
ialarm = IAlarmPanel(name, username, password, url)
add_entities([ialarm], True)
class IAlarmPanel(alarm.AlarmControlPanel):
"""Representation of an iAlarm status."""
def __init__(self, name, username, password, url):
"""Initialize the iAlarm status."""
from pyialarm import IAlarm
self._name = name
self._username = username
self._password = password
self._url = url
self._state = None
self._client = IAlarm(username, password, url)
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def state(self):
"""Return the state of the device."""
return self._state
def update(self):
"""Return the state of the device."""
status = self._client.get_status()
_LOGGER.debug('iAlarm status: %s', status)
if status:
status = int(status)
if status == self._client.DISARMED:
state = STATE_ALARM_DISARMED
elif status == self._client.ARMED_AWAY:
state = STATE_ALARM_ARMED_AWAY
elif status == self._client.ARMED_STAY:
state = STATE_ALARM_ARMED_HOME
else:
state = None
self._state = state
def alarm_disarm(self, code=None):
"""Send disarm command."""
self._client.disarm()
def alarm_arm_away(self, code=None):
"""Send arm away command."""
self._client.arm_away()
def alarm_arm_home(self, code=None):
"""Send arm home command."""
self._client.arm_stay()

View File

@@ -1,175 +0,0 @@
"""
Interfaces with alarm control panels that have to be controlled through IFTTT.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.ifttt/
"""
import logging
import re
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import (
DOMAIN, PLATFORM_SCHEMA)
from homeassistant.components.ifttt import (
ATTR_EVENT, DOMAIN as IFTTT_DOMAIN, SERVICE_TRIGGER)
from homeassistant.const import (
ATTR_ENTITY_ID, ATTR_STATE, CONF_NAME, CONF_CODE,
CONF_OPTIMISTIC, STATE_ALARM_DISARMED, STATE_ALARM_ARMED_NIGHT,
STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_AWAY)
import homeassistant.helpers.config_validation as cv
DEPENDENCIES = ['ifttt']
_LOGGER = logging.getLogger(__name__)
ALLOWED_STATES = [
STATE_ALARM_DISARMED, STATE_ALARM_ARMED_NIGHT,
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME]
DATA_IFTTT_ALARM = 'ifttt_alarm'
DEFAULT_NAME = "Home"
CONF_EVENT_AWAY = "event_arm_away"
CONF_EVENT_HOME = "event_arm_home"
CONF_EVENT_NIGHT = "event_arm_night"
CONF_EVENT_DISARM = "event_disarm"
DEFAULT_EVENT_AWAY = "alarm_arm_away"
DEFAULT_EVENT_HOME = "alarm_arm_home"
DEFAULT_EVENT_NIGHT = "alarm_arm_night"
DEFAULT_EVENT_DISARM = "alarm_disarm"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_CODE): cv.string,
vol.Optional(CONF_EVENT_AWAY, default=DEFAULT_EVENT_AWAY): cv.string,
vol.Optional(CONF_EVENT_HOME, default=DEFAULT_EVENT_HOME): cv.string,
vol.Optional(CONF_EVENT_NIGHT, default=DEFAULT_EVENT_NIGHT): cv.string,
vol.Optional(CONF_EVENT_DISARM, default=DEFAULT_EVENT_DISARM): cv.string,
vol.Optional(CONF_OPTIMISTIC, default=False): cv.boolean,
})
SERVICE_PUSH_ALARM_STATE = "ifttt_push_alarm_state"
PUSH_ALARM_STATE_SERVICE_SCHEMA = vol.Schema({
vol.Required(ATTR_ENTITY_ID): cv.entity_ids,
vol.Required(ATTR_STATE): cv.string,
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up a control panel managed through IFTTT."""
if DATA_IFTTT_ALARM not in hass.data:
hass.data[DATA_IFTTT_ALARM] = []
name = config.get(CONF_NAME)
code = config.get(CONF_CODE)
event_away = config.get(CONF_EVENT_AWAY)
event_home = config.get(CONF_EVENT_HOME)
event_night = config.get(CONF_EVENT_NIGHT)
event_disarm = config.get(CONF_EVENT_DISARM)
optimistic = config.get(CONF_OPTIMISTIC)
alarmpanel = IFTTTAlarmPanel(name, code, event_away, event_home,
event_night, event_disarm, optimistic)
hass.data[DATA_IFTTT_ALARM].append(alarmpanel)
add_entities([alarmpanel])
async def push_state_update(service):
"""Set the service state as device state attribute."""
entity_ids = service.data.get(ATTR_ENTITY_ID)
state = service.data.get(ATTR_STATE)
devices = hass.data[DATA_IFTTT_ALARM]
if entity_ids:
devices = [d for d in devices if d.entity_id in entity_ids]
for device in devices:
device.push_alarm_state(state)
device.async_schedule_update_ha_state()
hass.services.register(DOMAIN, SERVICE_PUSH_ALARM_STATE, push_state_update,
schema=PUSH_ALARM_STATE_SERVICE_SCHEMA)
class IFTTTAlarmPanel(alarm.AlarmControlPanel):
"""Representation of an alarm control panel controlled through IFTTT."""
def __init__(self, name, code, event_away, event_home, event_night,
event_disarm, optimistic):
"""Initialize the alarm control panel."""
self._name = name
self._code = code
self._event_away = event_away
self._event_home = event_home
self._event_night = event_night
self._event_disarm = event_disarm
self._optimistic = optimistic
self._state = None
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def state(self):
"""Return the state of the device."""
return self._state
@property
def assumed_state(self):
"""Notify that this platform return an assumed state."""
return True
@property
def code_format(self):
"""Return one or more digits/characters."""
if self._code is None:
return None
if isinstance(self._code, str) and re.search('^\\d+$', self._code):
return 'Number'
return 'Any'
def alarm_disarm(self, code=None):
"""Send disarm command."""
if not self._check_code(code):
return
self.set_alarm_state(self._event_disarm, STATE_ALARM_DISARMED)
def alarm_arm_away(self, code=None):
"""Send arm away command."""
if not self._check_code(code):
return
self.set_alarm_state(self._event_away, STATE_ALARM_ARMED_AWAY)
def alarm_arm_home(self, code=None):
"""Send arm home command."""
if not self._check_code(code):
return
self.set_alarm_state(self._event_home, STATE_ALARM_ARMED_HOME)
def alarm_arm_night(self, code=None):
"""Send arm night command."""
if not self._check_code(code):
return
self.set_alarm_state(self._event_night, STATE_ALARM_ARMED_NIGHT)
def set_alarm_state(self, event, state):
"""Call the IFTTT trigger service to change the alarm state."""
data = {ATTR_EVENT: event}
self.hass.services.call(IFTTT_DOMAIN, SERVICE_TRIGGER, data)
_LOGGER.debug("Called IFTTT component to trigger event %s", event)
if self._optimistic:
self._state = state
def push_alarm_state(self, value):
"""Push the alarm state to the given value."""
if value in ALLOWED_STATES:
_LOGGER.debug("Pushed the alarm state to %s", value)
self._state = value
def _check_code(self, code):
return self._code is None or self._code == code

View File

@@ -0,0 +1,10 @@
{
"domain": "alarm_control_panel",
"name": "Alarm control panel",
"documentation": "https://www.home-assistant.io/components/alarm_control_panel",
"requirements": [],
"dependencies": [],
"codeowners": [
"@colinodell"
]
}

View File

@@ -1,308 +0,0 @@
"""
Support for manual alarms.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.manual/
"""
import copy
import datetime
import logging
import re
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.const import (
CONF_CODE, CONF_DELAY_TIME, CONF_DISARM_AFTER_TRIGGER, CONF_NAME,
CONF_PENDING_TIME, CONF_PLATFORM, CONF_TRIGGER_TIME,
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_CUSTOM_BYPASS,
STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT, STATE_ALARM_DISARMED,
STATE_ALARM_PENDING, STATE_ALARM_TRIGGERED)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import track_point_in_time
import homeassistant.util.dt as dt_util
_LOGGER = logging.getLogger(__name__)
CONF_CODE_TEMPLATE = 'code_template'
DEFAULT_ALARM_NAME = 'HA Alarm'
DEFAULT_DELAY_TIME = datetime.timedelta(seconds=0)
DEFAULT_PENDING_TIME = datetime.timedelta(seconds=60)
DEFAULT_TRIGGER_TIME = datetime.timedelta(seconds=120)
DEFAULT_DISARM_AFTER_TRIGGER = False
SUPPORTED_STATES = [STATE_ALARM_DISARMED, STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT,
STATE_ALARM_ARMED_CUSTOM_BYPASS, STATE_ALARM_TRIGGERED]
SUPPORTED_PRETRIGGER_STATES = [state for state in SUPPORTED_STATES
if state != STATE_ALARM_TRIGGERED]
SUPPORTED_PENDING_STATES = [state for state in SUPPORTED_STATES
if state != STATE_ALARM_DISARMED]
ATTR_PRE_PENDING_STATE = 'pre_pending_state'
ATTR_POST_PENDING_STATE = 'post_pending_state'
def _state_validator(config):
"""Validate the state."""
config = copy.deepcopy(config)
for state in SUPPORTED_PRETRIGGER_STATES:
if CONF_DELAY_TIME not in config[state]:
config[state][CONF_DELAY_TIME] = config[CONF_DELAY_TIME]
if CONF_TRIGGER_TIME not in config[state]:
config[state][CONF_TRIGGER_TIME] = config[CONF_TRIGGER_TIME]
for state in SUPPORTED_PENDING_STATES:
if CONF_PENDING_TIME not in config[state]:
config[state][CONF_PENDING_TIME] = config[CONF_PENDING_TIME]
return config
def _state_schema(state):
"""Validate the state."""
schema = {}
if state in SUPPORTED_PRETRIGGER_STATES:
schema[vol.Optional(CONF_DELAY_TIME)] = vol.All(
cv.time_period, cv.positive_timedelta)
schema[vol.Optional(CONF_TRIGGER_TIME)] = vol.All(
cv.time_period, cv.positive_timedelta)
if state in SUPPORTED_PENDING_STATES:
schema[vol.Optional(CONF_PENDING_TIME)] = vol.All(
cv.time_period, cv.positive_timedelta)
return vol.Schema(schema)
PLATFORM_SCHEMA = vol.Schema(vol.All({
vol.Required(CONF_PLATFORM): 'manual',
vol.Optional(CONF_NAME, default=DEFAULT_ALARM_NAME): cv.string,
vol.Exclusive(CONF_CODE, 'code validation'): cv.string,
vol.Exclusive(CONF_CODE_TEMPLATE, 'code validation'): cv.template,
vol.Optional(CONF_DELAY_TIME, default=DEFAULT_DELAY_TIME):
vol.All(cv.time_period, cv.positive_timedelta),
vol.Optional(CONF_PENDING_TIME, default=DEFAULT_PENDING_TIME):
vol.All(cv.time_period, cv.positive_timedelta),
vol.Optional(CONF_TRIGGER_TIME, default=DEFAULT_TRIGGER_TIME):
vol.All(cv.time_period, cv.positive_timedelta),
vol.Optional(CONF_DISARM_AFTER_TRIGGER,
default=DEFAULT_DISARM_AFTER_TRIGGER): cv.boolean,
vol.Optional(STATE_ALARM_ARMED_AWAY, default={}):
_state_schema(STATE_ALARM_ARMED_AWAY),
vol.Optional(STATE_ALARM_ARMED_HOME, default={}):
_state_schema(STATE_ALARM_ARMED_HOME),
vol.Optional(STATE_ALARM_ARMED_NIGHT, default={}):
_state_schema(STATE_ALARM_ARMED_NIGHT),
vol.Optional(STATE_ALARM_ARMED_CUSTOM_BYPASS, default={}):
_state_schema(STATE_ALARM_ARMED_CUSTOM_BYPASS),
vol.Optional(STATE_ALARM_DISARMED, default={}):
_state_schema(STATE_ALARM_DISARMED),
vol.Optional(STATE_ALARM_TRIGGERED, default={}):
_state_schema(STATE_ALARM_TRIGGERED),
}, _state_validator))
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the manual alarm platform."""
add_entities([ManualAlarm(
hass,
config[CONF_NAME],
config.get(CONF_CODE),
config.get(CONF_CODE_TEMPLATE),
config.get(CONF_DISARM_AFTER_TRIGGER, DEFAULT_DISARM_AFTER_TRIGGER),
config
)])
class ManualAlarm(alarm.AlarmControlPanel):
"""
Representation of an alarm status.
When armed, will be pending for 'pending_time', after that armed.
When triggered, will be pending for the triggering state's 'delay_time'
plus the triggered state's 'pending_time'.
After that will be triggered for 'trigger_time', after that we return to
the previous state or disarm if `disarm_after_trigger` is true.
A trigger_time of zero disables the alarm_trigger service.
"""
def __init__(self, hass, name, code, code_template,
disarm_after_trigger, config):
"""Init the manual alarm panel."""
self._state = STATE_ALARM_DISARMED
self._hass = hass
self._name = name
if code_template:
self._code = code_template
self._code.hass = hass
else:
self._code = code or None
self._disarm_after_trigger = disarm_after_trigger
self._previous_state = self._state
self._state_ts = None
self._delay_time_by_state = {
state: config[state][CONF_DELAY_TIME]
for state in SUPPORTED_PRETRIGGER_STATES}
self._trigger_time_by_state = {
state: config[state][CONF_TRIGGER_TIME]
for state in SUPPORTED_PRETRIGGER_STATES}
self._pending_time_by_state = {
state: config[state][CONF_PENDING_TIME]
for state in SUPPORTED_PENDING_STATES}
@property
def should_poll(self):
"""Return the polling state."""
return False
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def state(self):
"""Return the state of the device."""
if self._state == STATE_ALARM_TRIGGERED:
if self._within_pending_time(self._state):
return STATE_ALARM_PENDING
trigger_time = self._trigger_time_by_state[self._previous_state]
if (self._state_ts + self._pending_time(self._state) +
trigger_time) < dt_util.utcnow():
if self._disarm_after_trigger:
return STATE_ALARM_DISARMED
self._state = self._previous_state
return self._state
if self._state in SUPPORTED_PENDING_STATES and \
self._within_pending_time(self._state):
return STATE_ALARM_PENDING
return self._state
@property
def _active_state(self):
"""Get the current state."""
if self.state == STATE_ALARM_PENDING:
return self._previous_state
return self._state
def _pending_time(self, state):
"""Get the pending time."""
pending_time = self._pending_time_by_state[state]
if state == STATE_ALARM_TRIGGERED:
pending_time += self._delay_time_by_state[self._previous_state]
return pending_time
def _within_pending_time(self, state):
"""Get if the action is in the pending time window."""
return self._state_ts + self._pending_time(state) > dt_util.utcnow()
@property
def code_format(self):
"""Return one or more digits/characters."""
if self._code is None:
return None
if isinstance(self._code, str) and re.search('^\\d+$', self._code):
return 'Number'
return 'Any'
def alarm_disarm(self, code=None):
"""Send disarm command."""
if not self._validate_code(code, STATE_ALARM_DISARMED):
return
self._state = STATE_ALARM_DISARMED
self._state_ts = dt_util.utcnow()
self.schedule_update_ha_state()
def alarm_arm_home(self, code=None):
"""Send arm home command."""
if not self._validate_code(code, STATE_ALARM_ARMED_HOME):
return
self._update_state(STATE_ALARM_ARMED_HOME)
def alarm_arm_away(self, code=None):
"""Send arm away command."""
if not self._validate_code(code, STATE_ALARM_ARMED_AWAY):
return
self._update_state(STATE_ALARM_ARMED_AWAY)
def alarm_arm_night(self, code=None):
"""Send arm night command."""
if not self._validate_code(code, STATE_ALARM_ARMED_NIGHT):
return
self._update_state(STATE_ALARM_ARMED_NIGHT)
def alarm_arm_custom_bypass(self, code=None):
"""Send arm custom bypass command."""
if not self._validate_code(code, STATE_ALARM_ARMED_CUSTOM_BYPASS):
return
self._update_state(STATE_ALARM_ARMED_CUSTOM_BYPASS)
def alarm_trigger(self, code=None):
"""
Send alarm trigger command.
No code needed, a trigger time of zero for the current state
disables the alarm.
"""
if not self._trigger_time_by_state[self._active_state]:
return
self._update_state(STATE_ALARM_TRIGGERED)
def _update_state(self, state):
"""Update the state."""
if self._state == state:
return
self._previous_state = self._state
self._state = state
self._state_ts = dt_util.utcnow()
self.schedule_update_ha_state()
pending_time = self._pending_time(state)
if state == STATE_ALARM_TRIGGERED:
track_point_in_time(
self._hass, self.async_update_ha_state,
self._state_ts + pending_time)
trigger_time = self._trigger_time_by_state[self._previous_state]
track_point_in_time(
self._hass, self.async_update_ha_state,
self._state_ts + pending_time + trigger_time)
elif state in SUPPORTED_PENDING_STATES and pending_time:
track_point_in_time(
self._hass, self.async_update_ha_state,
self._state_ts + pending_time)
def _validate_code(self, code, state):
"""Validate given code."""
if self._code is None:
return True
if isinstance(self._code, str):
alarm_code = self._code
else:
alarm_code = self._code.render(from_state=self._state,
to_state=state)
check = not alarm_code or code == alarm_code
if not check:
_LOGGER.warning("Invalid code given for %s", state)
return check
@property
def device_state_attributes(self):
"""Return the state attributes."""
state_attr = {}
if self.state == STATE_ALARM_PENDING:
state_attr[ATTR_PRE_PENDING_STATE] = self._previous_state
state_attr[ATTR_POST_PENDING_STATE] = self._state
return state_attr

View File

@@ -1,370 +0,0 @@
"""
Support for manual alarms controllable via MQTT.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.manual_mqtt/
"""
import asyncio
import copy
import datetime
import logging
import re
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
import homeassistant.util.dt as dt_util
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT,
STATE_ALARM_DISARMED, STATE_ALARM_PENDING, STATE_ALARM_TRIGGERED,
CONF_PLATFORM, CONF_NAME, CONF_CODE, CONF_DELAY_TIME, CONF_PENDING_TIME,
CONF_TRIGGER_TIME, CONF_DISARM_AFTER_TRIGGER)
from homeassistant.components import mqtt
from homeassistant.helpers.event import async_track_state_change
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import track_point_in_time
_LOGGER = logging.getLogger(__name__)
CONF_CODE_TEMPLATE = 'code_template'
CONF_PAYLOAD_DISARM = 'payload_disarm'
CONF_PAYLOAD_ARM_HOME = 'payload_arm_home'
CONF_PAYLOAD_ARM_AWAY = 'payload_arm_away'
CONF_PAYLOAD_ARM_NIGHT = 'payload_arm_night'
DEFAULT_ALARM_NAME = 'HA Alarm'
DEFAULT_DELAY_TIME = datetime.timedelta(seconds=0)
DEFAULT_PENDING_TIME = datetime.timedelta(seconds=60)
DEFAULT_TRIGGER_TIME = datetime.timedelta(seconds=120)
DEFAULT_DISARM_AFTER_TRIGGER = False
DEFAULT_ARM_AWAY = 'ARM_AWAY'
DEFAULT_ARM_HOME = 'ARM_HOME'
DEFAULT_ARM_NIGHT = 'ARM_NIGHT'
DEFAULT_DISARM = 'DISARM'
SUPPORTED_STATES = [STATE_ALARM_DISARMED, STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT,
STATE_ALARM_TRIGGERED]
SUPPORTED_PRETRIGGER_STATES = [state for state in SUPPORTED_STATES
if state != STATE_ALARM_TRIGGERED]
SUPPORTED_PENDING_STATES = [state for state in SUPPORTED_STATES
if state != STATE_ALARM_DISARMED]
ATTR_PRE_PENDING_STATE = 'pre_pending_state'
ATTR_POST_PENDING_STATE = 'post_pending_state'
def _state_validator(config):
"""Validate the state."""
config = copy.deepcopy(config)
for state in SUPPORTED_PRETRIGGER_STATES:
if CONF_DELAY_TIME not in config[state]:
config[state][CONF_DELAY_TIME] = config[CONF_DELAY_TIME]
if CONF_TRIGGER_TIME not in config[state]:
config[state][CONF_TRIGGER_TIME] = config[CONF_TRIGGER_TIME]
for state in SUPPORTED_PENDING_STATES:
if CONF_PENDING_TIME not in config[state]:
config[state][CONF_PENDING_TIME] = config[CONF_PENDING_TIME]
return config
def _state_schema(state):
"""Validate the state."""
schema = {}
if state in SUPPORTED_PRETRIGGER_STATES:
schema[vol.Optional(CONF_DELAY_TIME)] = vol.All(
cv.time_period, cv.positive_timedelta)
schema[vol.Optional(CONF_TRIGGER_TIME)] = vol.All(
cv.time_period, cv.positive_timedelta)
if state in SUPPORTED_PENDING_STATES:
schema[vol.Optional(CONF_PENDING_TIME)] = vol.All(
cv.time_period, cv.positive_timedelta)
return vol.Schema(schema)
DEPENDENCIES = ['mqtt']
PLATFORM_SCHEMA = vol.Schema(vol.All(mqtt.MQTT_BASE_PLATFORM_SCHEMA.extend({
vol.Required(CONF_PLATFORM): 'manual_mqtt',
vol.Optional(CONF_NAME, default=DEFAULT_ALARM_NAME): cv.string,
vol.Exclusive(CONF_CODE, 'code validation'): cv.string,
vol.Exclusive(CONF_CODE_TEMPLATE, 'code validation'): cv.template,
vol.Optional(CONF_DELAY_TIME, default=DEFAULT_DELAY_TIME):
vol.All(cv.time_period, cv.positive_timedelta),
vol.Optional(CONF_PENDING_TIME, default=DEFAULT_PENDING_TIME):
vol.All(cv.time_period, cv.positive_timedelta),
vol.Optional(CONF_TRIGGER_TIME, default=DEFAULT_TRIGGER_TIME):
vol.All(cv.time_period, cv.positive_timedelta),
vol.Optional(CONF_DISARM_AFTER_TRIGGER,
default=DEFAULT_DISARM_AFTER_TRIGGER): cv.boolean,
vol.Optional(STATE_ALARM_ARMED_AWAY, default={}):
_state_schema(STATE_ALARM_ARMED_AWAY),
vol.Optional(STATE_ALARM_ARMED_HOME, default={}):
_state_schema(STATE_ALARM_ARMED_HOME),
vol.Optional(STATE_ALARM_ARMED_NIGHT, default={}):
_state_schema(STATE_ALARM_ARMED_NIGHT),
vol.Optional(STATE_ALARM_DISARMED, default={}):
_state_schema(STATE_ALARM_DISARMED),
vol.Optional(STATE_ALARM_TRIGGERED, default={}):
_state_schema(STATE_ALARM_TRIGGERED),
vol.Required(mqtt.CONF_COMMAND_TOPIC): mqtt.valid_publish_topic,
vol.Required(mqtt.CONF_STATE_TOPIC): mqtt.valid_subscribe_topic,
vol.Optional(CONF_PAYLOAD_ARM_AWAY, default=DEFAULT_ARM_AWAY): cv.string,
vol.Optional(CONF_PAYLOAD_ARM_HOME, default=DEFAULT_ARM_HOME): cv.string,
vol.Optional(CONF_PAYLOAD_ARM_NIGHT, default=DEFAULT_ARM_NIGHT): cv.string,
vol.Optional(CONF_PAYLOAD_DISARM, default=DEFAULT_DISARM): cv.string,
}), _state_validator))
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the manual MQTT alarm platform."""
add_entities([ManualMQTTAlarm(
hass,
config[CONF_NAME],
config.get(CONF_CODE),
config.get(CONF_CODE_TEMPLATE),
config.get(CONF_DISARM_AFTER_TRIGGER, DEFAULT_DISARM_AFTER_TRIGGER),
config.get(mqtt.CONF_STATE_TOPIC),
config.get(mqtt.CONF_COMMAND_TOPIC),
config.get(mqtt.CONF_QOS),
config.get(CONF_PAYLOAD_DISARM),
config.get(CONF_PAYLOAD_ARM_HOME),
config.get(CONF_PAYLOAD_ARM_AWAY),
config.get(CONF_PAYLOAD_ARM_NIGHT),
config)])
class ManualMQTTAlarm(alarm.AlarmControlPanel):
"""
Representation of an alarm status.
When armed, will be pending for 'pending_time', after that armed.
When triggered, will be pending for the triggering state's 'delay_time'
plus the triggered state's 'pending_time'.
After that will be triggered for 'trigger_time', after that we return to
the previous state or disarm if `disarm_after_trigger` is true.
A trigger_time of zero disables the alarm_trigger service.
"""
def __init__(self, hass, name, code, code_template, disarm_after_trigger,
state_topic, command_topic, qos, payload_disarm,
payload_arm_home, payload_arm_away, payload_arm_night,
config):
"""Init the manual MQTT alarm panel."""
self._state = STATE_ALARM_DISARMED
self._hass = hass
self._name = name
if code_template:
self._code = code_template
self._code.hass = hass
else:
self._code = code or None
self._disarm_after_trigger = disarm_after_trigger
self._previous_state = self._state
self._state_ts = None
self._delay_time_by_state = {
state: config[state][CONF_DELAY_TIME]
for state in SUPPORTED_PRETRIGGER_STATES}
self._trigger_time_by_state = {
state: config[state][CONF_TRIGGER_TIME]
for state in SUPPORTED_PRETRIGGER_STATES}
self._pending_time_by_state = {
state: config[state][CONF_PENDING_TIME]
for state in SUPPORTED_PENDING_STATES}
self._state_topic = state_topic
self._command_topic = command_topic
self._qos = qos
self._payload_disarm = payload_disarm
self._payload_arm_home = payload_arm_home
self._payload_arm_away = payload_arm_away
self._payload_arm_night = payload_arm_night
@property
def should_poll(self):
"""Return the polling state."""
return False
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def state(self):
"""Return the state of the device."""
if self._state == STATE_ALARM_TRIGGERED:
if self._within_pending_time(self._state):
return STATE_ALARM_PENDING
trigger_time = self._trigger_time_by_state[self._previous_state]
if (self._state_ts + self._pending_time(self._state) +
trigger_time) < dt_util.utcnow():
if self._disarm_after_trigger:
return STATE_ALARM_DISARMED
self._state = self._previous_state
return self._state
if self._state in SUPPORTED_PENDING_STATES and \
self._within_pending_time(self._state):
return STATE_ALARM_PENDING
return self._state
@property
def _active_state(self):
"""Get the current state."""
if self.state == STATE_ALARM_PENDING:
return self._previous_state
return self._state
def _pending_time(self, state):
"""Get the pending time."""
pending_time = self._pending_time_by_state[state]
if state == STATE_ALARM_TRIGGERED:
pending_time += self._delay_time_by_state[self._previous_state]
return pending_time
def _within_pending_time(self, state):
"""Get if the action is in the pending time window."""
return self._state_ts + self._pending_time(state) > dt_util.utcnow()
@property
def code_format(self):
"""Return one or more digits/characters."""
if self._code is None:
return None
if isinstance(self._code, str) and re.search('^\\d+$', self._code):
return 'Number'
return 'Any'
def alarm_disarm(self, code=None):
"""Send disarm command."""
if not self._validate_code(code, STATE_ALARM_DISARMED):
return
self._state = STATE_ALARM_DISARMED
self._state_ts = dt_util.utcnow()
self.schedule_update_ha_state()
def alarm_arm_home(self, code=None):
"""Send arm home command."""
if not self._validate_code(code, STATE_ALARM_ARMED_HOME):
return
self._update_state(STATE_ALARM_ARMED_HOME)
def alarm_arm_away(self, code=None):
"""Send arm away command."""
if not self._validate_code(code, STATE_ALARM_ARMED_AWAY):
return
self._update_state(STATE_ALARM_ARMED_AWAY)
def alarm_arm_night(self, code=None):
"""Send arm night command."""
if not self._validate_code(code, STATE_ALARM_ARMED_NIGHT):
return
self._update_state(STATE_ALARM_ARMED_NIGHT)
def alarm_trigger(self, code=None):
"""
Send alarm trigger command.
No code needed, a trigger time of zero for the current state
disables the alarm.
"""
if not self._trigger_time_by_state[self._active_state]:
return
self._update_state(STATE_ALARM_TRIGGERED)
def _update_state(self, state):
"""Update the state."""
if self._state == state:
return
self._previous_state = self._state
self._state = state
self._state_ts = dt_util.utcnow()
self.schedule_update_ha_state()
pending_time = self._pending_time(state)
if state == STATE_ALARM_TRIGGERED:
track_point_in_time(
self._hass, self.async_update_ha_state,
self._state_ts + pending_time)
trigger_time = self._trigger_time_by_state[self._previous_state]
track_point_in_time(
self._hass, self.async_update_ha_state,
self._state_ts + pending_time + trigger_time)
elif state in SUPPORTED_PENDING_STATES and pending_time:
track_point_in_time(
self._hass, self.async_update_ha_state,
self._state_ts + pending_time)
def _validate_code(self, code, state):
"""Validate given code."""
if self._code is None:
return True
if isinstance(self._code, str):
alarm_code = self._code
else:
alarm_code = self._code.render(from_state=self._state,
to_state=state)
check = not alarm_code or code == alarm_code
if not check:
_LOGGER.warning("Invalid code given for %s", state)
return check
@property
def device_state_attributes(self):
"""Return the state attributes."""
state_attr = {}
if self.state == STATE_ALARM_PENDING:
state_attr[ATTR_PRE_PENDING_STATE] = self._previous_state
state_attr[ATTR_POST_PENDING_STATE] = self._state
return state_attr
def async_added_to_hass(self):
"""Subscribe to MQTT events.
This method must be run in the event loop and returns a coroutine.
"""
async_track_state_change(
self.hass, self.entity_id, self._async_state_changed_listener
)
@callback
def message_received(topic, payload, qos):
"""Run when new MQTT message has been received."""
if payload == self._payload_disarm:
self.async_alarm_disarm(self._code)
elif payload == self._payload_arm_home:
self.async_alarm_arm_home(self._code)
elif payload == self._payload_arm_away:
self.async_alarm_arm_away(self._code)
elif payload == self._payload_arm_night:
self.async_alarm_arm_night(self._code)
else:
_LOGGER.warning("Received unexpected payload: %s", payload)
return
return mqtt.async_subscribe(
self.hass, self._command_topic, message_received, self._qos)
@asyncio.coroutine
def _async_state_changed_listener(self, entity_id, old_state, new_state):
"""Publish state change to MQTT."""
mqtt.async_publish(
self.hass, self._state_topic, new_state.state, self._qos, True)

View File

@@ -1,175 +0,0 @@
"""
This platform enables the possibility to control a MQTT alarm.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.mqtt/
"""
import asyncio
import logging
import re
import voluptuous as vol
from homeassistant.core import callback
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components import mqtt
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED,
STATE_ALARM_PENDING, STATE_ALARM_TRIGGERED, STATE_UNKNOWN,
CONF_NAME, CONF_CODE)
from homeassistant.components.mqtt import (
CONF_AVAILABILITY_TOPIC, CONF_STATE_TOPIC, CONF_COMMAND_TOPIC,
CONF_PAYLOAD_AVAILABLE, CONF_PAYLOAD_NOT_AVAILABLE, CONF_QOS,
CONF_RETAIN, MqttAvailability)
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
CONF_PAYLOAD_DISARM = 'payload_disarm'
CONF_PAYLOAD_ARM_HOME = 'payload_arm_home'
CONF_PAYLOAD_ARM_AWAY = 'payload_arm_away'
DEFAULT_ARM_AWAY = 'ARM_AWAY'
DEFAULT_ARM_HOME = 'ARM_HOME'
DEFAULT_DISARM = 'DISARM'
DEFAULT_NAME = 'MQTT Alarm'
DEPENDENCIES = ['mqtt']
PLATFORM_SCHEMA = mqtt.MQTT_BASE_PLATFORM_SCHEMA.extend({
vol.Required(CONF_COMMAND_TOPIC): mqtt.valid_publish_topic,
vol.Required(CONF_STATE_TOPIC): mqtt.valid_subscribe_topic,
vol.Optional(CONF_CODE): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_PAYLOAD_ARM_AWAY, default=DEFAULT_ARM_AWAY): cv.string,
vol.Optional(CONF_PAYLOAD_ARM_HOME, default=DEFAULT_ARM_HOME): cv.string,
vol.Optional(CONF_PAYLOAD_DISARM, default=DEFAULT_DISARM): cv.string,
}).extend(mqtt.MQTT_AVAILABILITY_SCHEMA.schema)
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
"""Set up the MQTT Alarm Control Panel platform."""
if discovery_info is not None:
config = PLATFORM_SCHEMA(discovery_info)
async_add_entities([MqttAlarm(
config.get(CONF_NAME),
config.get(CONF_STATE_TOPIC),
config.get(CONF_COMMAND_TOPIC),
config.get(CONF_QOS),
config.get(CONF_RETAIN),
config.get(CONF_PAYLOAD_DISARM),
config.get(CONF_PAYLOAD_ARM_HOME),
config.get(CONF_PAYLOAD_ARM_AWAY),
config.get(CONF_CODE),
config.get(CONF_AVAILABILITY_TOPIC),
config.get(CONF_PAYLOAD_AVAILABLE),
config.get(CONF_PAYLOAD_NOT_AVAILABLE))])
class MqttAlarm(MqttAvailability, alarm.AlarmControlPanel):
"""Representation of a MQTT alarm status."""
def __init__(self, name, state_topic, command_topic, qos, retain,
payload_disarm, payload_arm_home, payload_arm_away, code,
availability_topic, payload_available, payload_not_available):
"""Init the MQTT Alarm Control Panel."""
super().__init__(availability_topic, qos, payload_available,
payload_not_available)
self._state = STATE_UNKNOWN
self._name = name
self._state_topic = state_topic
self._command_topic = command_topic
self._qos = qos
self._retain = retain
self._payload_disarm = payload_disarm
self._payload_arm_home = payload_arm_home
self._payload_arm_away = payload_arm_away
self._code = code
@asyncio.coroutine
def async_added_to_hass(self):
"""Subscribe mqtt events."""
yield from super().async_added_to_hass()
@callback
def message_received(topic, payload, qos):
"""Run when new MQTT message has been received."""
if payload not in (STATE_ALARM_DISARMED, STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARMED_AWAY, STATE_ALARM_PENDING,
STATE_ALARM_TRIGGERED):
_LOGGER.warning("Received unexpected payload: %s", payload)
return
self._state = payload
self.async_schedule_update_ha_state()
yield from mqtt.async_subscribe(
self.hass, self._state_topic, message_received, self._qos)
@property
def should_poll(self):
"""No polling needed."""
return False
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def state(self):
"""Return the state of the device."""
return self._state
@property
def code_format(self):
"""Return one or more digits/characters."""
if self._code is None:
return None
if isinstance(self._code, str) and re.search('^\\d+$', self._code):
return 'Number'
return 'Any'
@asyncio.coroutine
def async_alarm_disarm(self, code=None):
"""Send disarm command.
This method is a coroutine.
"""
if not self._validate_code(code, 'disarming'):
return
mqtt.async_publish(
self.hass, self._command_topic, self._payload_disarm, self._qos,
self._retain)
@asyncio.coroutine
def async_alarm_arm_home(self, code=None):
"""Send arm home command.
This method is a coroutine.
"""
if not self._validate_code(code, 'arming home'):
return
mqtt.async_publish(
self.hass, self._command_topic, self._payload_arm_home, self._qos,
self._retain)
@asyncio.coroutine
def async_alarm_arm_away(self, code=None):
"""Send arm away command.
This method is a coroutine.
"""
if not self._validate_code(code, 'arming away'):
return
mqtt.async_publish(
self.hass, self._command_topic, self._payload_arm_away, self._qos,
self._retain)
def _validate_code(self, code, state):
"""Validate given code."""
check = self._code is None or code == self._code
if not check:
_LOGGER.warning('Wrong code entered for %s', state)
return check

View File

@@ -1,120 +0,0 @@
"""
Support for NX584 alarm control panels.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.nx584/
"""
import logging
import requests
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_HOST, CONF_NAME, CONF_PORT, STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, STATE_UNKNOWN)
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['pynx584==0.4']
_LOGGER = logging.getLogger(__name__)
DEFAULT_HOST = 'localhost'
DEFAULT_NAME = 'NX584'
DEFAULT_PORT = 5007
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the NX584 platform."""
name = config.get(CONF_NAME)
host = config.get(CONF_HOST)
port = config.get(CONF_PORT)
url = 'http://{}:{}'.format(host, port)
try:
add_entities([NX584Alarm(hass, url, name)])
except requests.exceptions.ConnectionError as ex:
_LOGGER.error("Unable to connect to NX584: %s", str(ex))
return False
class NX584Alarm(alarm.AlarmControlPanel):
"""Representation of a NX584-based alarm panel."""
def __init__(self, hass, url, name):
"""Init the nx584 alarm panel."""
from nx584 import client
self._hass = hass
self._name = name
self._url = url
self._alarm = client.Client(self._url)
# Do an initial list operation so that we will try to actually
# talk to the API and trigger a requests exception for setup_platform()
# to catch
self._alarm.list_zones()
self._state = STATE_UNKNOWN
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def code_format(self):
"""Return one or more digits/characters."""
return 'Number'
@property
def state(self):
"""Return the state of the device."""
return self._state
def update(self):
"""Process new events from panel."""
try:
part = self._alarm.list_partitions()[0]
zones = self._alarm.list_zones()
except requests.exceptions.ConnectionError as ex:
_LOGGER.error("Unable to connect to %(host)s: %(reason)s",
dict(host=self._url, reason=ex))
self._state = STATE_UNKNOWN
zones = []
except IndexError:
_LOGGER.error("NX584 reports no partitions")
self._state = STATE_UNKNOWN
zones = []
bypassed = False
for zone in zones:
if zone['bypassed']:
_LOGGER.debug("Zone %(zone)s is bypassed, assuming HOME",
dict(zone=zone['number']))
bypassed = True
break
if not part['armed']:
self._state = STATE_ALARM_DISARMED
elif bypassed:
self._state = STATE_ALARM_ARMED_HOME
else:
self._state = STATE_ALARM_ARMED_AWAY
def alarm_disarm(self, code=None):
"""Send disarm command."""
self._alarm.disarm(code)
def alarm_arm_home(self, code=None):
"""Send arm home command."""
self._alarm.arm('stay')
def alarm_arm_away(self, code=None):
"""Send arm away command."""
self._alarm.arm('exit')

View File

@@ -1,94 +0,0 @@
"""
Support for Satel Integra alarm, using ETHM module: https://www.satel.pl/en/ .
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.satel_integra/
"""
import asyncio
import logging
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.satel_integra import (
CONF_ARM_HOME_MODE, DATA_SATEL, SIGNAL_PANEL_MESSAGE)
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['satel_integra']
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
"""Set up for Satel Integra alarm panels."""
if not discovery_info:
return
device = SatelIntegraAlarmPanel(
"Alarm Panel", discovery_info.get(CONF_ARM_HOME_MODE))
async_add_entities([device])
class SatelIntegraAlarmPanel(alarm.AlarmControlPanel):
"""Representation of an AlarmDecoder-based alarm panel."""
def __init__(self, name, arm_home_mode):
"""Initialize the alarm panel."""
self._name = name
self._state = None
self._arm_home_mode = arm_home_mode
@asyncio.coroutine
def async_added_to_hass(self):
"""Register callbacks."""
async_dispatcher_connect(
self.hass, SIGNAL_PANEL_MESSAGE, self._message_callback)
@callback
def _message_callback(self, message):
"""Handle received messages."""
if message != self._state:
self._state = message
self.async_schedule_update_ha_state()
else:
_LOGGER.warning("Ignoring alarm status message, same state")
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def should_poll(self):
"""Return the polling state."""
return False
@property
def code_format(self):
"""Return the regex for code format or None if no code is required."""
return 'Number'
@property
def state(self):
"""Return the state of the device."""
return self._state
@asyncio.coroutine
def async_alarm_disarm(self, code=None):
"""Send disarm command."""
if code:
yield from self.hass.data[DATA_SATEL].disarm(code)
@asyncio.coroutine
def async_alarm_arm_away(self, code=None):
"""Send arm away command."""
if code:
yield from self.hass.data[DATA_SATEL].arm(code)
@asyncio.coroutine
def async_alarm_arm_home(self, code=None):
"""Send arm home command."""
if code:
yield from self.hass.data[DATA_SATEL].arm(
code, self._arm_home_mode)

View File

@@ -79,3 +79,55 @@ ifttt_push_alarm_state:
state:
description: The state to which the alarm control panel has to be set.
example: 'armed_night'
elkm1_alarm_arm_vacation:
description: Arm the ElkM1 in vacation mode.
fields:
entity_id:
description: Name of alarm control panel to arm.
example: 'alarm_control_panel.main'
code:
description: An code to arm the alarm control panel.
example: 1234
elkm1_alarm_arm_home_instant:
description: Arm the ElkM1 in home instant mode.
fields:
entity_id:
description: Name of alarm control panel to arm.
example: 'alarm_control_panel.main'
code:
description: An code to arm the alarm control panel.
example: 1234
elkm1_alarm_arm_night_instant:
description: Arm the ElkM1 in night instant mode.
fields:
entity_id:
description: Name of alarm control panel to arm.
example: 'alarm_control_panel.main'
code:
description: An code to arm the alarm control panel.
example: 1234
elkm1_alarm_display_message:
description: Display a message on all of the ElkM1 keypads for an area.
fields:
entity_id:
description: Name of alarm control panel to display messages on.
example: 'alarm_control_panel.main'
clear:
description: 0=clear message, 1=clear message with * key, 2=Display until timeout; default 2
example: 1
beep:
description: 0=no beep, 1=beep; default 0
example: 1
timeout:
description: Time to display message, 0=forever, max 65535, default 0
example: 4242
line1:
description: Up to 16 characters of text (truncated if too long). Default blank.
example: The answer to life,
line2:
description: Up to 16 characters of text (truncated if too long). Default blank.
example: the universe, and everything.

View File

@@ -1,145 +0,0 @@
"""
Interfaces with SimpliSafe alarm control panel.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.simplisafe/
"""
import logging
import re
import voluptuous as vol
from homeassistant.components.alarm_control_panel import (
PLATFORM_SCHEMA, AlarmControlPanel)
from homeassistant.const import (
CONF_CODE, CONF_NAME, CONF_PASSWORD, CONF_USERNAME,
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME,
STATE_ALARM_DISARMED, STATE_UNKNOWN)
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['simplisafe-python==2.0.2']
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'SimpliSafe'
ATTR_ALARM_ACTIVE = "alarm_active"
ATTR_TEMPERATURE = "temperature"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_PASSWORD): cv.string,
vol.Required(CONF_USERNAME): cv.string,
vol.Optional(CONF_CODE): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the SimpliSafe platform."""
from simplipy.api import SimpliSafeApiInterface, SimpliSafeAPIException
name = config.get(CONF_NAME)
code = config.get(CONF_CODE)
username = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
try:
simplisafe = SimpliSafeApiInterface(username, password)
except SimpliSafeAPIException:
_LOGGER.error("Failed to set up SimpliSafe")
return
systems = []
for system in simplisafe.get_systems():
systems.append(SimpliSafeAlarm(system, name, code))
add_entities(systems)
class SimpliSafeAlarm(AlarmControlPanel):
"""Representation of a SimpliSafe alarm."""
def __init__(self, simplisafe, name, code):
"""Initialize the SimpliSafe alarm."""
self.simplisafe = simplisafe
self._name = name
self._code = str(code) if code else None
@property
def unique_id(self):
"""Return the unique ID."""
return self.simplisafe.location_id
@property
def name(self):
"""Return the name of the device."""
if self._name is not None:
return self._name
return 'Alarm {}'.format(self.simplisafe.location_id)
@property
def code_format(self):
"""Return one or more digits/characters."""
if self._code is None:
return None
if isinstance(self._code, str) and re.search('^\\d+$', self._code):
return 'Number'
return 'Any'
@property
def state(self):
"""Return the state of the device."""
status = self.simplisafe.state
if status.lower() == 'off':
state = STATE_ALARM_DISARMED
elif status.lower() == 'home' or status.lower() == 'home_count':
state = STATE_ALARM_ARMED_HOME
elif (status.lower() == 'away' or status.lower() == 'exitDelay' or
status.lower() == 'away_count'):
state = STATE_ALARM_ARMED_AWAY
else:
state = STATE_UNKNOWN
return state
@property
def device_state_attributes(self):
"""Return the state attributes."""
attributes = {}
attributes[ATTR_ALARM_ACTIVE] = self.simplisafe.alarm_active
if self.simplisafe.temperature is not None:
attributes[ATTR_TEMPERATURE] = self.simplisafe.temperature
return attributes
def update(self):
"""Update alarm status."""
self.simplisafe.update()
def alarm_disarm(self, code=None):
"""Send disarm command."""
if not self._validate_code(code, 'disarming'):
return
self.simplisafe.set_state('off')
_LOGGER.info("SimpliSafe alarm disarming")
def alarm_arm_home(self, code=None):
"""Send arm home command."""
if not self._validate_code(code, 'arming home'):
return
self.simplisafe.set_state('home')
_LOGGER.info("SimpliSafe alarm arming home")
def alarm_arm_away(self, code=None):
"""Send arm away command."""
if not self._validate_code(code, 'arming away'):
return
self.simplisafe.set_state('away')
_LOGGER.info("SimpliSafe alarm arming away")
def _validate_code(self, code, state):
"""Validate given code."""
check = self._code is None or code == self._code
if not check:
_LOGGER.warning("Wrong code entered for %s", state)
return check

Some files were not shown because too many files have changed in this diff Show More