Compare commits

...

5516 Commits

Author SHA1 Message Date
Paulus Schoutsen
88e3e73bb4 Merge pull request #32964 from home-assistant/rc
0.107.1
2020-03-18 22:14:25 -07:00
Paulus Schoutsen
3aa1bcbb77 Fix mobile app test 2020-03-18 22:13:49 -07:00
Paulus Schoutsen
f973b35cef Bumped version to 0.107.1 2020-03-18 18:19:33 -07:00
Paulus Schoutsen
4e08aa8b05 Fix zone config (#32963)
* Fix zone config

* Add zone as dependency again to device tracker

* Fix tests
2020-03-18 18:18:57 -07:00
Paulus Schoutsen
8e917ccf73 Add device automation as frontend dependency (#32962) 2020-03-18 18:17:11 -07:00
Bram Kragten
0b62011626 Updated frontend to 20200318.1 (#32957) 2020-03-18 18:17:11 -07:00
Franck Nijhof
d520a02b8c Merge pull request #32932 from home-assistant/rc
0.107.0
2020-03-18 15:35:44 +01:00
SukramJ
1e469b39ad Fix flaky tests for HMIPC (#32806) 2020-03-18 14:44:29 +01:00
Franck Nijhof
c2f615839d Bumped version to 0.107.0 2020-03-18 13:31:02 +01:00
Bram Kragten
657bf33e32 Updated frontend to 20200318.0 (#32931) 2020-03-18 13:27:21 +01:00
Paulus Schoutsen
0ca87007fd Bumped version to 0.107.0b8 2020-03-17 17:56:18 -07:00
Paulus Schoutsen
d0d9d853f2 Fix hassio panel load (#32922)
* Fix loading hassio panel

* Remove blacklist
2020-03-17 17:55:57 -07:00
Hans Oischinger
8348878e7e Introduce safe scan_interval for vicare (#32915) 2020-03-17 17:55:56 -07:00
Paulus Schoutsen
b70be5f2f2 Blacklist auto_backup (#32912)
* Blacklist auto_backup

* Mock with a set
2020-03-17 17:55:55 -07:00
Bram Kragten
fddb565e4c Fix input text reload (#32911)
* Fix input text reload

* FIx schema instead
2020-03-17 17:55:54 -07:00
Rami Mosleh
f3e6820042 Fix setting up options due to config data freeze (#32872) 2020-03-17 17:55:54 -07:00
Paulus Schoutsen
ae98f13181 Bumped version to 0.107.0b7 2020-03-17 10:36:59 -07:00
Paulus Schoutsen
ab38e7d98a Bump cast to 4.2.0 (#32906) 2020-03-17 10:35:39 -07:00
brubaked
9797b09d44 Changed Sensor icons to be more emotionally sensitive (#32904)
The existing sensor icons, while descriptive - dead = dead - are perhaps too matter of fact and don't accurately convey the tragedy. I changed emoticon-dead-outline to emoticon-cry-outline, as I think it better conveys the reality of the situation along with the emotions tied to the statistic.
2020-03-17 10:35:39 -07:00
Quentame
4908d4358c Bump iCloud to 0.9.5 (#32901) 2020-03-17 10:35:38 -07:00
Paulus Schoutsen
67d728fc50 Make zone dependency of device tracker an after dep (#32880)
* Make zone dependency of device tracker an after dep

* Fix test
2020-03-17 10:34:34 -07:00
Jason Lachowsky
912409ed0c Corrected minor misspellings (#32857) 2020-03-17 10:32:01 -07:00
Paolo Tuninetto
ac8c889b0f Add default port to samsung tv (#32820)
* Default port for websocket tv

* Update config entry

* move bridge creation

* fix indent

* remove loop
2020-03-17 10:32:00 -07:00
Quentame
67a721d39b Fix iCloud init while pending (#32750)
* Fix iCloud init while pending

Continue if device is pending while setup
Create devices and fetch 15s if pending, otherwise determine interval to fetch.

* Add retried_fetch guard
2020-03-17 10:32:00 -07:00
Paulus Schoutsen
d196fd136d Bumped version to 0.107.0b6 2020-03-16 14:53:13 -07:00
Bram Kragten
4f78674a4c Updated frontend to 20200316.1 (#32878) 2020-03-16 14:53:05 -07:00
Bram Kragten
a7aca10668 Lovelace: storage key based on id instead of url_path (#32873)
* Fix storage key based on url_path

* Fix test
2020-03-16 14:53:04 -07:00
Paulus Schoutsen
03b1c6ddee Remove group as a dependency from entity integrations (#32870)
* remove group dependency

* Update device sun light trigger

* Add zone dep back to device tracker
2020-03-16 14:53:03 -07:00
David F. Mulcahey
661f1b69f2 Bump ZHA quirks to 0.0.37 (#32867) 2020-03-16 14:53:03 -07:00
Bram Kragten
ccb34083fe Add lovelace reload service for yaml resources (#32865)
* Lovelace add reload service for yaml resources

* Clean up imports

* Comments
2020-03-16 14:53:02 -07:00
Bram Kragten
7f6b3c1130 Bumped version to 0.107.0b5 2020-03-16 13:59:27 +01:00
Bram Kragten
f2c3f76b8e Updated frontend to 20200316.0 (#32866) 2020-03-16 13:49:50 +01:00
Pascal Vizeli
b6a3bcf87f Update pyozw 0.1.9 (#32864) 2020-03-16 13:49:49 +01:00
Tom Harris
65423bb62b Bump insteonplm to 0.16.8 (#32847) 2020-03-16 13:49:48 +01:00
Kit Klein
104665d849 Ignore the ignored konnected config entries (#32845)
* ignore the ignored konnected config entries

* key off data instead of source
2020-03-16 13:49:47 +01:00
Alan Tse
fb1ba86b08 Bump teslajsonpy to 0.5.1 (#32827) 2020-03-16 13:49:47 +01:00
David Bonnes
cee72724b6 Ensure unique_ids for all evohome thermostats (#32604)
* initial commit

* small tweak
2020-03-16 13:49:46 +01:00
Paulus Schoutsen
a3d74651a8 Bumped version to 0.107.0b4 2020-03-15 11:56:56 -07:00
Paulus Schoutsen
d88275d6d2 Make sure panel_custom won't crash on invalid data (#32835)
* Make sure panel_custom won't crash on invalid data

* Add a test
2020-03-15 11:52:54 -07:00
SukramJ
42998f898b Add SF transition to HmIP-BSL and remove obsolete code in HMIPC (#32833) 2020-03-15 11:52:53 -07:00
Daniel Høyer Iversen
875671cc2b Add Netatmo Home Coach as model (#32829) 2020-03-15 11:52:53 -07:00
Bram Kragten
3b84b6e6d5 Require a hyphen in lovelace dashboard url (#32816)
* Require a hyphen in lovelace dashboard url

* Keep storage dashboards working

* register during startup again

* Update homeassistant/components/lovelace/dashboard.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>

* Comments

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-03-15 11:52:52 -07:00
Chris Talkington
3b1fb2f416 Remove extra logging from directv init. (#32809) 2020-03-15 11:52:51 -07:00
Chris Talkington
226a0bcaad Fix directv location of unknown error string (#32807)
* Update strings.json

* Update en.json
2020-03-15 11:52:50 -07:00
Greg
57dd45318d Bump eagle_reader API version to v0.2.4 (#32789) 2020-03-15 11:52:50 -07:00
Franck Nijhof
e666485ea9 Fix brightness_pct in light device turn_on action (#32787) 2020-03-15 11:52:49 -07:00
Aidan Timson
b5c8b5b91f Fix onvif error with non ptz cameras (#32783) 2020-03-15 11:52:48 -07:00
David F. Mulcahey
706607f1d2 Fix handling of attribute reports in ZHA sensors and binary sensors (#32776)
* Update sensor tests.

* Update light tests.

* Update binary_sensor tests.

* Update cover tests.

* Update device tracker tests.

* Update fan tests.

* Update lock tests.

* Update switch tests.

* add sensor attr to sensors

* add sensor attr to binary sensors

* cleanup extra var

Co-authored-by: Alexei Chetroi <alexei.chetroi@outlook.com>
2020-03-15 11:52:47 -07:00
Steven Looman
0788bbd629 Add log message on timeout and update less often for upnp devices (#32740)
* Catch asyncio.TimeoutError, show a proper message instead

* Throttle updates to max once per 30s

* Change code owner

* Fix CODEOWNERS + linting

* Warn on connection timeout
2020-03-15 11:52:46 -07:00
Chris Talkington
1b622925a1 Optimize directv client initialization (#32706)
* Optimize directv client initialization.

* Update config_flow.py

* Update media_player.py

* Update media_player.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update test_media_player.py

* Update __init__.py

* Update media_player.py

* Update test_media_player.py

* Update media_player.py

* Update test_media_player.py

* Update config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update __init__.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_media_player.py

* Update test_media_player.py

* Update __init__.py

* Update __init__.py

* Update __init__.py
2020-03-15 11:52:45 -07:00
Slava
86c4fa0fc5 Add brightness state to emulated hue when devices support only color temp and brightness (#31834) 2020-03-15 11:52:45 -07:00
Jc2k
e365dc398b Fix homekit_controller beta connectivity issues (#32810) 2020-03-14 15:43:09 -04:00
Bram Kragten
dfd29e6d73 Bumped version to 0.107.0b3 2020-03-13 22:23:34 +01:00
Bram Kragten
6780bded7e Updated frontend to 20200313.0 (#32777) 2020-03-13 22:19:22 +01:00
Paulus Schoutsen
56686dd14c Bumped version to 0.107.0b2 2020-03-13 12:16:55 -07:00
Bram Kragten
7268bcd9be Check if panel url used and delay dashboard reg till start (#32771)
* Check if panel url used and delay dashboard reg till start

* move storage_dashboard_changed

* fix tests
2020-03-13 12:16:49 -07:00
J. Nick Koston
4f78e04315 Bump py-august to 0.25.0 (#32769)
Fixes a bug in the conversion to async where code validation failed.
2020-03-13 12:16:49 -07:00
Austin Mroczek
7bdac8ef2e Bump total-connect-client to 0.54.1 #32758) 2020-03-13 12:16:48 -07:00
Paulus Schoutsen
a66f4ca4ec Bumped version to 0.107.0b1 2020-03-12 17:02:38 -07:00
Bram Kragten
3345d85dca Updated frontend to 20200312.0 (#32741) 2020-03-12 17:02:29 -07:00
Raman Gupta
9ad776e55d Set self._current_app to None when vizio device is off (#32725) 2020-03-12 17:02:29 -07:00
escoand
2f2a908573 Fix legacy Samsung TV (#32719)
* Update bridge.py

* Update test_init.py
2020-03-12 17:02:28 -07:00
J. Nick Koston
9f76a8c12d Resolve Home Assistant fails to start when Sense integration i… (#32716)
* Bump sense_energy 0.7.1 which also fixes throwing ConfigEntryNotReady
2020-03-12 17:02:27 -07:00
Raman Gupta
fe6ca522e8 Update Vizio source property to only return current app if i… (#32713)
* only return current app for source if current app is set

* check for None specifically

* make sure current app isn't called for speaker
2020-03-12 17:02:26 -07:00
Paulus Schoutsen
c46d0e4a49 Sonos idle (#32712)
* Sonos idle

* F-string

* Add to properties

* Fixes
2020-03-12 17:02:26 -07:00
Aaron Bach
8db426e5da Broaden exception handling for IQVIA (#32708) 2020-03-12 17:02:25 -07:00
Franck Nijhof
bfacd9a1c3 Remove deprecated hide_if_away from device trackers (#32705) 2020-03-12 17:02:24 -07:00
Barry Williams
943c7ee11a If device has volume disabled, the volume will be None. However in these (#32702)
instances whenever the volume was requested a division calculation was made
resulting in a TypeError. The volume adjustment from `0-100` to `0-1` is now
calculated during the `update()` method.
2020-03-12 17:02:23 -07:00
Franck Nijhof
71155f548f Bumped version to 0.107.0b0 2020-03-11 20:54:27 +01:00
Chris Talkington
180bcad477 Add codeowner for roku. (#32695) 2020-03-11 12:52:27 -07:00
Quentame
01dc81d8fb Fetch iCloud family devices only when wanted (#32644)
* Fetch iCloud family devices only when wanted

* Review: form data_schema as init schema
2020-03-11 20:43:37 +01:00
Chris Talkington
cea5cac6e2 Update directpy==0.7 for directv. (#32694) 2020-03-11 20:33:02 +01:00
Chris Talkington
bb666b9ac6 Add config flow to directv (#32162)
* initial work on config flow.

* more work on config flow.

* work on config flow and add tests. other cleanup.

* cleanup tests.

* fix test.

* isort

* Update .coveragerc

* Update test_init.py

* Update test_init.py

* Update test_init.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* correct upnp serial format.

* improve config flow coverage.

* review tweaks.

* further review tweaks

* simplify dtv data gathering job

* lint

* black

* Update test_init.py

* Update test_init.py

* Simplify exception handling.

* Simplify exception handling.

* Update media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* fix failing test.

* restore change made during debug.

* isort.

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-11 12:28:38 -07:00
Bram Kragten
c9a9bd16fe Updated frontend to 20200311.1 (#32691) 2020-03-11 12:18:11 -07:00
chiefdragon
3e8728ad5f Fix issue #23758 - Restore Canary sensors and ensure alarm con… (#32627)
* Fixed missing Canary sensors and Canary alarm control panel that was not updating correctly

* Resolved pylinting warnings in original tests
2020-03-11 11:58:42 -07:00
Paulus Schoutsen
d28d1ff657 Add JSON benchmark (#32690)
* Add JSON benchmark

* Fix logbook benchmarks

* Move logbook import back
2020-03-11 11:50:16 -07:00
jjlawren
44c7743351 Rewrite and add Plex tests (#32633)
* Rewrite and add Plex tests

* Remove unnecessary mocks

* Explicitly import constants for readability
2020-03-11 09:37:02 -07:00
Erik Montnemery
f7ddbc7e1e Remove duplicated config from MQTT tests (#32689) 2020-03-11 09:34:19 -07:00
Florian Werner
5216dc0ae1 Fix rate of change calculation of statistics sensor (#32597)
* Fix rate of change of statistics sensor

* Fix test
2020-03-11 09:33:00 -07:00
Alexei Chetroi
440c837eb6 Allow sw_version update of a device registry entry. (#32630) 2020-03-11 09:31:02 -07:00
Jc2k
ffe8b94d75 Simplfy homekit_controller characteristic writes (#32683) 2020-03-11 09:27:20 -07:00
Penny Wood
c56530a712 Connect to more recent versions of IZone (#32552)
* Update to new version of python-izone

* Improve disconnection handling.

* Update requirements-all

* Lint fix
2020-03-11 09:26:16 -07:00
cgtobi
50c32d57f5 Remove Netatmo binary sensor (#32673)
* Clean up for access scope review

* Remove deleted from coverage omit list
2020-03-11 09:25:19 -07:00
Robert Svensson
015e779d56 UniFi - Client tracker schedules update on disconnect event (#32655) 2020-03-11 09:24:52 -07:00
Franck Nijhof
01d0e70f44 Merge branch 'master' into dev 2020-03-11 17:03:36 +01:00
Bram Kragten
4c4e5f3fa9 Fix demos (#32086)
* Fixes for demos

* Update vacuum.py

* Comment

* Fix tests
2020-03-11 08:16:22 -07:00
David F. Mulcahey
7127492767 Additional ZHA cleanup (#32678)
* fix double device loading in tests

* change imports

* None is default
2020-03-11 13:37:28 +01:00
Jc2k
365578d053 Update homekit_controller to use CharacteristicPermissions constants (#32679) 2020-03-11 12:34:19 +00:00
Jc2k
647d137daa Refactor homekit_controller entity update to work more like update coordinator (#32670)
* Clean up use of get_characteristic_types

* Get rid of get_hk_char_value helper

* Get rid of _update_fn callbacks

* Call async_write_has_state directly as async_state_changed doesnt do anything any more
2020-03-11 07:40:47 -04:00
David F. Mulcahey
4248893007 Clean up custom polling in ZHA device and light (#32653)
* cleanup timer handle when device is removed

* separate unavailable times for mains vs battery

* better name

* remove light refresh handle when removing light

* remove unused parallel updates

* don't steal HA const for different purpose

* don't flood network every hour for lights

* update test to test both intervals

* add test for light refresh interval

* fix tests

* update test

* put parallel updates back for now...

* fix async_schedule_update_ha_state usage

* review comment

* review comment

* update test - review conversation

* review comments

* await count not call count

* flip some state
2020-03-11 07:17:53 -04:00
Bram Kragten
99109d162b Updated frontend to 20200311.0 (#32675) 2020-03-11 12:10:00 +01:00
Diogo Gomes
16336bf902 Add entity_service calibrate_meter to utility_meter (#32658)
* add calibrate service
2020-03-11 09:42:22 +01:00
Chris Talkington
69b19d54e8 Add codeowner for directv. (#32661) 2020-03-11 07:43:44 +01:00
Paul Madden
61acf944c0 Use bomradarloop v0.1.4 (#32660) 2020-03-11 07:27:07 +01:00
jjlawren
836b077bcc Bump python-ecobee-api to 0.2.2 (#32667) 2020-03-11 07:26:50 +01:00
Jc2k
1b5c9e922d Bump aiohomekit for more reconnect fixes (#32657) 2020-03-10 20:38:06 -04:00
J. Nick Koston
048f9e7daa Throw ConfigEntryNotReady when august servers are offline or u… (#32635)
* Throw ConfigEntryNotReady when august servers are offline

* august has tests now and its nearing 100%

* Adjust per review

* define in init
2020-03-10 17:10:00 -07:00
J. Nick Koston
ae147fd9c7 Lock operation sensors for August (#32593)
* adkj

* reduce

* Convert august to async

Async io was added to py-august 0.24

* Fix lint

* Lock operation sensors for august

* Tracking lock operation method allows user presence detection at the lock

* revert lock changes

* fix activity count merge conflict reversion

* Fix revert that come back with the conflict
2020-03-10 17:09:49 -07:00
cgtobi
b9a9a92145 Refactor netatmo webhooks (#32195)
* Start webhook implementation

* Add webhook implementation

* Bump pyatmo 3.2.5

* Fire event after data evaluation

* Setup webhooks after components

* Fix logging

* Wrap non async call

* Wrap non async call

* Add smoke detector and door tag webhook support

* Catch when webhook registration fails

* Log to debug

* Fix persons lookup

* Add dependency

* Remove false requirements

* Fix requirements

* Replace netatmo events by a single one

* Slim down code

* Clean up code

* Address review vomments

* Undo attribute removal

* Bump pyatmo to v3.3.0

* Only create webhook id once and reuse

* Store and reuse cloudhook url

* Wait for hass core to be up and running

* Register webhook once HA is ready

* Delay webhook registration
2020-03-10 17:08:59 -07:00
springstan
ba0aaeeddb Use f-strings in integrations starting with "M" (#32271)
* Use f-strings in integrations starting with "M"

* Format mqtt light init with black

* Fix lint error

* Fix pylint error

* Restore constants

* Update homeassistant/components/mqtt/discovery.py

* Update homeassistant/components/mqtt/discovery.py

* Update homeassistant/components/mqtt/discovery.py

* Update homeassistant/components/mqtt/discovery.py

* Format with Black
2020-03-10 23:34:54 +01:00
Bram Kragten
bbe0f75336 input_datetime guard for unexpected state on restore (#32652)
* input_datetime guard for unexpected state

If state is a time and has_date = true, or the other way around, restore state would error

* Update __init__.py

* Add test
2020-03-10 15:15:11 -07:00
Gerard
765882fc4d Fix bmw connected drive door_lock_state attribute error (#32074)
* Fix for door_lock_state attribute error

* Updates based on review comments

* Remove update_time

* Remove update time in lock

* Remove update time in sensor

* Remove unused variable

* Change return for device_state_attributes
2020-03-10 23:05:35 +01:00
J. Nick Koston
908ae23738 Add griddy integration (#32591)
* Add griddy integration

* Griddy is a wholesale power provider in Texas

* Supports all four load zones in Texas

* Provides real time power price which is useful for automations to handle demand response

* Update homeassistant/components/griddy/sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/griddy/config_flow.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Add ability request updated via entity update service.

* Improve error message about already configured

* Remove DEVICE_CLASS_POWER since we do not have a device class for cost

* remove setdefault that was left from previous refactor

* More detail on data naming

* Bump translation for testing

* git add the config flow tests

* s/PlatformNotReady/ConfigEntryNotReady/

* Review items

* git add the other missing file

* Patch griddypower

* reduce

* adjust target

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-10 23:00:30 +01:00
Aaron Bach
21cff003f8 Add options flow for AirVisual (#32634)
* Add options flow for AirVisual

* Code review

Co-Authored-By: Robert Svensson <Kane610@users.noreply.github.com>

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2020-03-10 14:16:25 -06:00
Paulus Schoutsen
2c1da182e2 Merge pull request #32650 from home-assistant/rc
0.106.6
2020-03-10 13:01:35 -07:00
Paulus Schoutsen
39bdb562d3 Bumped version to 0.106.6 2020-03-10 11:50:54 -07:00
Paulus Schoutsen
1d1f8df509 Upgrade to coronavirus 1.1.0 (#32648) 2020-03-10 11:49:26 -07:00
Maikel Punie
ccb8b6b9c8 Update python-velbus to fix a missing data file (#32580) 2020-03-10 11:49:25 -07:00
Paulus Schoutsen
c0dcd9c674 Send messages conforming new facebook policy (#32516) 2020-03-10 11:49:24 -07:00
Quentame
6062854666 Get pending iCloud devices when available + request again when needs an update (#32400)
* Fetch iCloud devices again if the status is pending

* Remove "No iCloud device found" double check

* fix default api_devices value

* Remove useless unitialisation declarations
2020-03-10 11:49:11 -07:00
Paulus Schoutsen
a3c55b5e96 Upgrade to coronavirus 1.1.0 (#32648) 2020-03-10 11:47:07 -07:00
Paulus Schoutsen
89fc430eec Check against Switch attr not being None (#32647) 2020-03-10 11:28:11 -07:00
Vilppu Vuorinen
b2bb9cf134 Add support for MELCloud Air-to-Water devices (#32078)
* Add support for melcloud Air-to-Water devices

* Add water_heater entity for the water heater component.

* Add individual climate entities for 0-2 supported radiator zones.

* Add sensors for zone room temperatures, outdoor temperature and tank
temperature.

* Update .coveragerc

* Use device_state_attributes

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Complete state_attributes -> device_state_attributes migration

* Move constants to top of file

* Remove async_turn_on/off

* Drop mac from ATW unique_ids

* Add MAC to device_info connections

* Remove redundant ABC inheritance

* Update homeassistant/components/melcloud/water_heater.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-10 11:00:07 -07:00
Robert Svensson
16d7f84be7 UniFi - Fix block functionality (#32625)
* Fix block functionality

* Remove unrelated changes

* Bump dependency to v15

* Run requirement script
2020-03-10 18:27:25 +01:00
Paulus Schoutsen
0a25e86fab Use callback instead of async methods in Timer (#32638) 2020-03-10 08:01:52 -04:00
Jc2k
c11a462f51 Clean up homekit_controller entity setup (#32628) 2020-03-10 12:06:44 +01:00
Paolo Tuninetto
a8758ed3a1 Add support for newer SamsungTV models (#31537)
* Added support for newer SamsungTV models

* Fixed legacy port

* store token in HA config directory

* Change token name

* rebasing and exception handling

* implement update

* fix error creating mediaplayer

* Debug logging

* Increase timeout

* Restore update timeout

* Store token_file path in config_entry

* Introduction of samsung bridge class

* Added bridge class functions

* Code cleanup

* more fixes

* Begin testing

* samsungtvws 1.2.0

* Config flow tests 0.1

* Fixed some mediaplayer tests

* Fixed fixture in media player

* use of constants and turn off

* more media player tests

* samsungtvws 1.3.1 and other fixes

* WS tv update rewritten

* more tests

* test_init

* fixed tests

* removed reset mock

* tests reset mock

* close_remote and tests

* deprecate port config

* deprecate port config 2

* deprecate port config 3

* save token only if needed

* cleanup

* better websocket protocol detection

* config removal
2020-03-10 11:48:09 +01:00
Quentame
2e802c88f8 Add devices check to iCloud config flow (#31950)
* Add devices check to iCloud config flow

* Some test rename

* Bump pyicloud to catch KeyError
2020-03-10 11:42:04 +01:00
Michaël Arnauts
8c52e2c923 Revert "Breakout tado zone code into a single place (#32564)" (#32639)
This reverts commit c2b03332a0.
2020-03-10 09:32:56 +01:00
Paul Enright
ac9c9377c2 Add tests for workday sensor (#31832)
* Workday Fix

* fix pylint errors

* Update binary_sensor.py

* Update test_binary_sensor.py

Added tests to match the document new configuration examples
2020-03-10 08:53:06 +01:00
Robert Chmielowiec
11eee43fc7 Remove facebook broadcast api (#32517)
* Remove facebook broadcast api

* Update notify.py

* Revert API Version change
2020-03-10 08:21:04 +01:00
Georgi Gardev
aed15761de Sonos: Return URI as media_content_id (#32626) 2020-03-10 08:17:07 +01:00
Erik Montnemery
324dfe07b4 Clear discovery topic for MQTT device triggers (#32617) 2020-03-09 21:59:38 -07:00
Thomas Hollstegge
f3c07a5653 Alexa: Add support for starting and cancelling timers (#32616) 2020-03-09 21:59:06 -07:00
Aaron Bach
f4561891ae Ensure AirVisual import config flow checks API key correctness (#32624)
* Add small improvements to AirVisual config flow tests

* Code review comments

* Code review comments
2020-03-09 21:39:42 -06:00
J. Nick Koston
c2b03332a0 Breakout tado zone code into a single place (#32564)
* Breakout tado zone code into a single place

* Resolve various incorrect states and add tests for known tado zone states

* Fix home and away presets

* Upgrade to PyTado 0.4.0 which improves http performance and fixes setting fan speed.

* Write state instead of calling for an update

* adjust codeowners

* Add tests for michael's tado and fix heatingPower.value

* Guards are much cleaner

* Adjust per review

* Remove hass passing
2020-03-09 17:44:34 -07:00
J. Nick Koston
3a680bf7b7 Add a commit interval setting to recorder (#32596)
* Add a commit interval setting to recorder

* Make the default every 1s instead of immediate

* See attached py-spy flamegraphs for why 1s

* This avoids disk thrashing during event storms

* Make Home Assistant significantly more responsive on busy systems

* remove debug

* Add commit forces for tests that expect commits to be immediate

* Add commit forces for tests that expect commits to be immediate

* make sure _trigger_db_commit is in the right place (all effective "wait_recording_done" calls)

* De-duplicate wait_recording_done code
2020-03-09 17:43:26 -07:00
Paulus Schoutsen
8a46d93be4 Upgrade hass_nabucasa to 0.32.2 (#32522)
* Upgrade hass_nabucasa to 32.1

* Fix tests

* Update hass-nabucasa to 0.32.2

Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-03-09 17:42:26 -07:00
Alexei Chetroi
87b770be08 Add PollControl cluster support to ZHA (#32618)
* Poll control channel

Set check-in interval to 55min.
Set long-poll interval to 6s.

* Update tests.

* Don't use magic numbers.
2020-03-09 19:55:25 -04:00
Aaron Bach
9a3c58213b Validate WWLLN window size in config schema (#32621)
* Validate WWLLN window size in config schema

* Cleanup

* Clean up imports

* Fix tests
2020-03-09 17:18:39 -06:00
Paulus Schoutsen
d4615fd432 Freeze config entry data (#32615)
* Freeze config entry data

* Fix mutating entry.data

* Fix config entry options tests
2020-03-09 14:07:50 -07:00
J. Nick Koston
3318e65948 Convert august to async (#32586)
* Convert august to async

Async io was added to py-august 0.24

* Fix lint
2020-03-09 13:54:05 -07:00
marengaz
09512e9f8b Reflect new repo name (#32611) 2020-03-09 12:46:52 -07:00
Maciej Bieniek
96a0aa3d2b Add new sensors to Brother integration (#32466)
* Add new sensors

* Suggested change
2020-03-09 11:54:43 -07:00
Erik Montnemery
4bb9f1800d Deduplicate MQTT mixin tests (#32563)
* Deduplicate MQTT mixin tests

* Remove test of not yet merged function
2020-03-09 09:40:00 -07:00
Alexei Chetroi
743833e5f3 Bump up ZHA dependencies. (#32609)
* Bump up ZHA dependencies.

* Update tests to match library changes.
2020-03-09 12:39:41 -04:00
David Nielsen
988b400a9c Fix TypeError Exception in AlexaSpeaker (#32318)
* alexa/capabilities.py: Fix TypeError Exception

    - Remove division by zero try/catch -- there is no division
    - Handle TypeError exception when current_volume = None
    - Simplify math and return logic

* Add test for Alexa.Speaker's valid volume range
2020-03-09 09:38:31 -07:00
Jc2k
19faf06ce7 homekit_controller fixes from testing with an LG TV: (#32610)
* Bump aiohomekit to get better reconnection handling and cleaner shutdowns.
 * Read the ACTIVE characteristic and set ok/problem state

Also gets test coverage to 100%.
2020-03-09 12:19:17 -04:00
Thomas Hollstegge
22b5690607 Alexa: Support vacuums without turn_on/turn_off feature (#32570)
* Alexa: Support vacuums without turn_on/turn_off feature
2020-03-09 11:58:47 -04:00
lewei50
e1d6964589 Add IamMeter integration (#30465)
* Update .coveragerc

* Update requirements_all.txt

* Create manifest.json

* Add files via upload

* add codeowner

* add codeowner.

* Update sensor.py

* Update sensor.py

* remove unused import.

* Update manifest.json

* Update sensor.py

* modify requirements_all.txt.

* order imports.

* Update sensor.py

* Use DataUpdateCoordinator rewrite code

* set should_poll to False

* remove unused code 'serial'.

* add available prop

* Update homeassistant/components/iammeter/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update homeassistant/components/iammeter/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update homeassistant/components/iammeter/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update homeassistant/components/iammeter/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/iammeter/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/iammeter/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update sensor.py

* Update sensor.py

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-09 08:39:39 -07:00
ochlocracy
fa4f27f78e Remove AlexaPowerController from device_class garage covers in… (#32607) 2020-03-09 08:25:33 -07:00
Franck Nijhof
c0c5c33b20 Fix Withings timezone test (#32602) 2020-03-09 13:45:39 +01:00
Mans Matulewicz
a6e0ab2b3a Add thinkingcleaner optional host param (#32542)
* adding support for optional host param

as thinkingcleaner backend was having issues (again)
-> https://www.thinkingsync.com/

* Update switch.py

* Update sensor.py

* Update switch.py

* Update sensor.py

* Update switch.py

* Update switch.py

* Update sensor.py
2020-03-09 12:56:26 +01:00
Kris Bennett
f7f6c47973 Add Steam game ID and screenshot paths as attributes (#32005)
* Update Steam intergration to list screenshot paths and Steam game ID

* Steam entity_picture now changed to game art when in-game

* Steam - changing API endpoints to constants

* Steam - formatting code for lint

* Update sensor.py

*Removing entity_picture image switching based on current playing game

* Steam - tidying up code

* Update homeassistant/components/steam_online/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-03-09 11:38:24 +01:00
Dave T
df86668dfc Correct grammatical error in CUSTOM_WARNING (#32569) 2020-03-09 09:40:08 +01:00
jey burrows
5ace7de171 Bump rflink to 0.0.52 (#32588) 2020-03-09 09:35:54 +01:00
seanvictory
0dd0b2fa03 Add support for Ubee Router DVW32CB (#32406)
* Update PyUbee to 0.9

Adds support for Ubee Router DVW32CB

* Add support for Ubee Router DVW32CB

* Update pyubee to 0.9

Adds support for router DVW32CB
2020-03-09 09:04:53 +01:00
Oliver
963b5db763 Bump denonavr to 0.8.0 (#32578) 2020-03-08 23:43:12 +01:00
Josef Schlehofer
f54c50fae3 Upgrade youtube_dl to version 2020.03.08 (#32581) 2020-03-08 23:37:58 +01:00
Quentame
8a878bbe72 Bump pyicloud to 0.9.3 (#32582) 2020-03-08 23:32:14 +01:00
Maikel Punie
4fbc404c47 Update python-velbus to fix a missing data file (#32580) 2020-03-08 19:10:05 +01:00
Daniel Høyer Iversen
b5118c41a6 Add Tibber retry (#32554)
* Add retry setup to Tibber

* tibber lib

* update comment

* update comment

* increase delay for every try

* Update homeassistant/components/tibber/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-08 12:20:33 +01:00
Anders Melchiorsen
17215709e1 Simplify logbook duplicate handling (#32572) 2020-03-07 20:27:51 -08:00
J. Nick Koston
a0787cd9be Bump zeroconf to 0.24.5 (#32573)
* Bump zeroconf to 0.24.5

* Empty commit to force ci re-run
2020-03-08 08:52:27 +05:30
Alexei Chetroi
7e781946fa Refactor ZHA device keep alive checker (#32561)
* Refactor zha core device _check_available().
Make it async, so we don't run it in a sync worker.

* Use random keep alive interval for zha device pings.
* Update tests.
2020-03-07 13:52:45 -05:00
David F. Mulcahey
732457745f Add guard to ZHA device triggers (#32559) 2020-03-07 12:59:18 -05:00
Ivan Belokobylskiy
1f510389b8 Fix Yandex transport after API change (#32500)
* Update Yandex transport after API change (home-assistant#32431)

* Update mocked response for test (home-assistant#32431)

* Codestyle fixes (home-assistant#32431)
2020-03-07 18:26:35 +01:00
shred86
ae2e6f9d2a Fix unnecessary method call (#32549) 2020-03-07 16:13:39 +01:00
David F. Mulcahey
e52542c4d7 Allow multiple attribute reads in ZHA (#32498)
* multi attribute reads for lights

* catch specific exceptions

* get attributes

* fix mains powered update

* add guards and use get_attributes

* use debug for read failures

* cleanup

* update return value for read_attributes

* fix on with timed off
2020-03-07 07:33:59 -05:00
Alexei Chetroi
dd91b51435 Make ZHA Scene channel an eventable channel. (#32546) 2020-03-06 17:32:26 -05:00
Raman Gupta
28a5fca7f4 fix step name in strings.json for vizio (#32536) 2020-03-06 10:56:15 -08:00
Tom Schneider
8f2567f30d Add config_flow to shopping_list (#32388)
* Add config_flow to shopping_list

* Fix pylint unused import error

* Use _abort_if_unique_id_configured

* Remove SHOPPING_LIST const

* Use const.py for DOMAIN and CONF_TYPE

* Fix tests

* Remove unchanged variable _errors

* Revert CONF_TYPE (wrong usage)

* Use consts in test

* Remove import check

* Remove data={}

* Remove parameters and default values

* Re-add data={}, because it's needed

* Unique ID checks and reverts for default parameters

* remove pylint comment

* Remove block till done

* Address change requests

* Update homeassistant/components/shopping_list/strings.json

Co-Authored-By: Quentame <polletquentin74@me.com>

* Update homeassistant/components/shopping_list/strings.json

Co-Authored-By: Quentame <polletquentin74@me.com>

* Update tests/components/shopping_list/test_config_flow.py

Co-Authored-By: Quentame <polletquentin74@me.com>

* Update tests/components/shopping_list/test_config_flow.py

Co-Authored-By: Quentame <polletquentin74@me.com>

* Update tests/components/shopping_list/test_config_flow.py

Co-Authored-By: Quentame <polletquentin74@me.com>

* Update tests/components/shopping_list/test_config_flow.py

Co-Authored-By: Quentame <polletquentin74@me.com>

* Only test config_flow

* Generate translations

* Move data to end

* @asyncio.coroutine --> async def, yield from --> await

* @asyncio.coroutine --> async def, yield from --> await (tests)

* Remove init in config flow

* remove if not hass.config_entries.async_entries(DOMAIN)

* Add DOMAIN not in config

* Fix tests

* Update homeassistant/components/shopping_list/config_flow.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Fix tests

* Update homeassistant/components/shopping_list/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Quentame <polletquentin74@me.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-06 10:17:30 -08:00
Rami Mosleh
e1cc2acdf9 Specify rtsp_transport for Onvif Camera (#31918)
* specify rtsp_transport for onvif camera

* remove used variable

* Update homeassistant/components/stream/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* change options to stream_options

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-06 09:59:57 -08:00
Bram Kragten
ac945242dc Updated frontend to 20200306.0 (#32532) 2020-03-06 17:42:19 +01:00
Jc2k
2879081772 Implement source switching for homekit_controller televisions (#32526) 2020-03-06 15:47:40 +00:00
olijouve
0d667c1bd9 Add more onvif PTZ move modes (#30152)
* Adding support for PTZ move modes

Adding support for other PTZ move modes.
Onvif intergration used to only support RelativeMove where it should also supports AbsoluteMove, ContinuousMove and Stop.
For exemple Goke GK7102 based IP camera only support ContinuousMove mode.

This commit add those new modes with avaibility to select mode and params in service call.

* Adding support for PTZ move modes

Adding support for other PTZ move modes.
Onvif intergration used to only support RelativeMove where it should also supports AbsoluteMove, ContinuousMove and Stop.
For exemple Goke GK7102 based IP camera only support ContinuousMove mode.

Update service helper for new avaibility to select mode and params in service call.

* RelativeMode as default move_mode to avoid breakchange

RelativeMode as default move_mode to avoid breakchange

* add missing attribute

add missing continuous_duration attribute

* change service attribute label for continuous_duration

* update description

fix wrong assertion for move_mode attr description

* Update services.yaml

* Update services.yaml

fix wrong wording for move_mode

* Update camera.py

Using defined constants instead of  raw strings in conditions

* Update camera.py

Replace integer to floating point in logger debug PTZ values

* Update services.yaml

* Update services.yaml

* Update camera.py

* Update camera.py

* use dict[key] for required schema keys and keys with default schema values

* remove async for setup_ptz method

* lint error

* remove unecessary PTZ_NONE = "NONE"

changed request by @MartinHjelmare

* addressing @ MartinHjelmare comments

- Remove None in defaluts and dicts
- Replace long if blocks

* remove NONE

* lint issue

* Update camera.py

* Fix lint error - typo

* rename onvif_ptz service to just ptz

* rename onvif_ptz service to just ptz

* use dict[key] when default values are set

use service.data[key] instead of service.data.get[key] when default value is set in service schema

* adresse comment: use dict[key] for pan tilt zoom

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-06 15:14:01 +01:00
Chris Talkington
3b75fdccfd Add availability to roku media player entities (#32484)
* track if roku is available based on update errors.

* Update media_player.py

* Update media_player.py
2020-03-06 13:55:32 +01:00
Josef Schlehofer
5f6158f656 Upgrade youtube_dl to version 2020.03.06 (#32521) 2020-03-06 07:30:04 +01:00
Paulus Schoutsen
e02042b33e Send messages conforming new facebook policy (#32516) 2020-03-05 17:19:30 -08:00
Paulus Schoutsen
19254eee30 Upgrade hass-nabucasa to 0.32 (#32508) 2020-03-05 13:34:24 -08:00
Paulus Schoutsen
a579fcf248 Add app support for TVs to Vizio integration (#32432)
* add app support

* code cleanup, add additional test, add CONF_APPS storage logic for import

* simplify schema defaults logic

* remove unnecessary lower() and fix docstring

* remove default return for popping CONF_APPS during import update because we know entry data has CONF_APPS due to if statement

* further simplification

* even more simplification

* fix type hints

* move app configuration to separate step, fix tests, and only make app updates if device_type == tv

* remove errors variable from tv_apps and move tv_apps schema out of ConfigFlow for consistency

* slight refactor

* remove unused error from strings.json

* set unique id as early as possible

* correct which dictionary to use to set unique id in pair_tv step
2020-03-05 13:34:12 -08:00
Paulus Schoutsen
873bf887a5 Add OwnTracks Friends via person integration (#27303)
* Returns an unencrypted location of all persons with device trackers

* Handle encrypted messages and exclude the poster's location

* Friends is by default False. Reformats with Black

* Updates the context init to account for the Friends option

* Fix Linter error

* Remove  as a config option

* No longer imports encyrption-related functions in encrypt_message

* Fix initialization in test

* Test the friends functionality

* Bugfix for persons not having a location

* Better way to return the timestamp

* Update homeassistant/components/owntracks/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Linting and tid generation

* Fix test

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-05 12:55:48 -08:00
David F. Mulcahey
b5022f5bcb guard against invalid trigger and action scenarios (#32512) 2020-03-05 15:52:09 -05:00
David Bonnes
ae0ea0f088 Bugfix evohome converting non-UTC timezones (#32120)
* bugfix: correctly handle non-UTC TZs
* bugfix: system mode is always permanent
* bugfix: handle where until is none
* tweak: improve logging to support above fixes
2020-03-05 20:42:52 +00:00
Paulus Schoutsen
4717d072c9 Remove discovery and legacy config file loading for Plex (#32510) 2020-03-05 12:36:18 -08:00
Paulus Schoutsen
8aea538662 Allow teaching logbook about events (#32444)
* Allow teaching logbook about events

* Use async_add_executor_job

* Fix tests
2020-03-05 11:55:50 -08:00
Paulus Schoutsen
7c51318861 Require title, separate show sidebar option (#32479)
* Require title, separate show sidebar option

* Fix list command not updating

* Some more test checks
2020-03-05 11:52:12 -08:00
Paulus Schoutsen
d885853b35 Make it possible to fetch proxy media player album art (#32471) 2020-03-05 11:45:36 -08:00
Paulus Schoutsen
6a21afa2a8 Improve script validation (#32461) 2020-03-05 11:44:42 -08:00
Ville Skyttä
da7c5518f3 Add Huawei LTE operator and network related sensors (#32485)
* Add Huawei LTE operator and network related sensors

Adds "Operator search mode", "Operator name", "Operator code", and "Preferred mode" sensors

* Blackify

* Blackify "Add Huawei LTE operator and network related sensors"
2020-03-05 21:29:53 +02:00
Jc2k
007d934214 Initial support for HomeKit enabled televisions (#32404)
* Initial support for HomeKit enabled televisions

* Fix nit from review
2020-03-05 13:49:56 +00:00
Quentame
85ba4692a9 Get pending iCloud devices when available + request again when needs an update (#32400)
* Fetch iCloud devices again if the status is pending

* Remove "No iCloud device found" double check

* fix default api_devices value

* Remove useless unitialisation declarations
2020-03-05 08:50:39 +01:00
Paulus Schoutsen
521cc7247d Add Dynalite switch platform (#32389)
* added presets for switch devices

* added channel type to __init and const

* ran pylint on library so needed a few changes in names

* removed callback

* bool -> cv.boolean
2020-03-04 22:05:39 -08:00
Paulus Schoutsen
d216c1f2ac UniFi - Add block network access control to config option (#32004)
* Add block network access control to config option

* Clean up
2020-03-04 21:55:56 -08:00
Paulus Schoutsen
1615a5ee81 Use unique_id in Plex config entries (#32489) 2020-03-04 21:42:48 -08:00
Paulus Schoutsen
81f99efda1 Mock all invocations of coronavirus.get_cases (#32487) 2020-03-04 21:42:07 -08:00
Paulus Schoutsen
81810dd920 Modernize WWLLN config flow (#32194)
* Modernize WWLLN config flow

* Code review

* Update tests
2020-03-04 18:23:00 -08:00
Paulus Schoutsen
56cf4e54a9 Add github sensor latest tag attribute (#32360)
* Add attribute 

latest release tag

* add attrs = 

and only create attr Tag if exists
made requested changes

* change condition for _latest_release_tag

to use self._github_data.latest_release_url

* Correct changes

* Update sensor.py

* blackify
2020-03-04 18:14:45 -08:00
Paulus Schoutsen
9a4aad1777 Add async_setup_entry/async_unload_entry for remote platform (#31974)
* add async_setup_entry for remote platform

* add async_unload_entry for remote platform

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Type

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-04 18:09:17 -08:00
Paulus Schoutsen
daff87fe5d Emoncms API now provides a Unit of Measurement (#32042)
* Emoncms API provides a Unit

The EmonCMS API has been amended to include a 'unit' as part of it's payload.  By using this information, all the sensors can be created without the need for individual sensors to be setup by type.

The change is backward compatible so if a unit type has been specified in the configuration, this will be used by default.

If no unit is pecified either by the Home Assistant configuration, or the Emoncms API, then the default of W will be used as before.

* Update sensor.py

Check the 'unit' key is in the API call. Older systems may not have that key in the payload.

* Modified approach with new configuration item

* Removed new config item

Removed the configuration item. The integration attempts to get the unit from the API.

If this fails *or* the unit key of the API is blank, either the specified unit, or the default will be used.

If approved, documentation will be updated.

* Update homeassistant/components/emoncms/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update homeassistant/components/emoncms/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review v2

* Update homeassistant/components/emoncms/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update sensor.py

Update `config_unit`

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-03-04 18:03:51 -08:00
Paulus Schoutsen
bfe1e8fef3 fix double tab and match events. (#32108)
this propose makes some logic to the device triggers, matching the events for the aqara cube.
this also fixes the double tap function on side 2
2020-03-04 17:54:00 -08:00
Paulus Schoutsen
b848c97211 Add soundtouch attributes exposing multiroom zone info (#28298)
* [soundtouch] workaround for API bug when removing multiple slaves from a zone at once

* [soundtouch] added additional attributes exposing multiroom zone info

* Fix update with slave entities

* Add zone attributes test

* Fix and clean up tests

* Fix typo

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-04 17:53:15 -08:00
Paulus Schoutsen
2316f7ace4 Add edl21 component for SML-based smart meters (#27962)
* Add edl21 component for SML-based smart meters

* edl21: Remove unused variable

* [edl21] Add 1 minute throttle to the sensor

* Update homeassistant/components/edl21/manifest.json

Fix documentation URL

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* edl21: Move imports to top

* edl21: Remove special case for STATE_UNKNOWN, which replicated default behavior

* edl21: Implement blacklist for and warn about unhandled OBIS values

* edl21: Make blacklist global

* edl21: Add filter to issues URL

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* edl21: Rename device to entity

* edl21: Don't schedule async_add_entities

* edl21: Use dispatcher, implement own throttling mechanism

* edl21: Simplify keeping track of known obis

* edl21: Use whitelist for state attributes

* edl21: Remove dispatcher on shutdown

* edl21: Convert state attributes to snakecase

* edl21: Annotate handle_telegram with @callback

* edl21: Call async_write_ha_state instead of schedule_update_ha_state

Co-authored-by: David Straub <straub@protonmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-04 17:43:12 -08:00
Paulus Schoutsen
c4ed2ecb61 Add node_def_id for ISY994i wrapped X10 modules (#31815) 2020-03-04 17:42:18 -08:00
Paulus Schoutsen
eac1f029e5 Allow string values on zwave.set_node_value (#31061)
* Allow string values on zwave.set_node_value

This allows for:

* Accessing longer value_ids. In some cases, value ids in z-wave nodes are very large (17 digits in my case). Passing them as int does not seem to work well (python probably truncates the number), but passing them as string works fine
* Changing color values, which are represented as hex string

reformat test

* update services.yaml with string set_node_value
2020-03-04 17:40:58 -08:00
Paulus Schoutsen
1d3647e6a1 Make gen_requirements_all.py case insensitive for ignored pack… (#30885) 2020-03-04 17:39:59 -08:00
Paulus Schoutsen
2d3b117cb8 Use SCAN_INTERVAL instead of Throttle for google travel time (#31420)
The documentation for google_travel_time was at odds with the
implementation. The documentation stated a default scan time of
5 minutes, but the implementation was using Throttle which resulted
in the sensor updating at a maximum rate of one API call every
5 minutes. This was especially at odds with a given example at
the end of the documentation, which showed updating the sensor
every 2 minutes during commute times.

This change brings the implementation in line with the docs by
adopting the `SCAN_INTERVAL` constant set to the stated default
of 5 minutes and removing the Throttle.
2020-03-04 17:39:28 -08:00
Paulus Schoutsen
7b5b909f0a ZHA Dependencies bump (#32483)
* ZHA Dependencies bump.

* Bump up ZHA dependencies.
2020-03-04 17:35:07 -08:00
Paulus Schoutsen
3ca97a0517 Add sighthound timestamped file (#32202)
* Update image_processing.py

Adds save timestamp file and adds last_detection attribute

* Update test_image_processing.py

Adds test

* Adds assert pil_img.save.call_args

* Test timestamp filename

* Add test bad data

* Update test_image_processing.py

* Fix bad image data test

* Update homeassistant/components/sighthound/image_processing.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-04 17:31:54 -08:00
Alexei Chetroi
e416f17e4d ZHA: Successful pairing feedback (#32456) 2020-03-04 19:27:37 -05:00
Paulus Schoutsen
76fec90fec Reduce log level for initial error and bump library version (#32381)
* Reduce log level for initial error and bump library version

  * Use new buienradar library version which reduces the log level
    for some types of warnings.
  * Initially logs at a lower level and only logs at WARN for repeated
    errors.

This should serve to reduce confusion with users such as in
issue #32301.

* Fix linter error with new linter settings.

* Fix linter warning

* Update homeassistant/components/buienradar/util.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-04 15:32:44 -08:00
Quentame
15a5cebd5f Add icons to Coronavirus (#32480)
* Add icons to Coronavirus

* Update homeassistant/components/coronavirus/sensor.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-05 00:02:22 +01:00
Paulus Schoutsen
9a8017aadd Add more Huawei LTE sensors (#32123)
* Add Huawei LTE WiFi client count and DNS server sensors

* Add Huawei LTE current month statistics sensors
2020-03-04 14:56:37 -08:00
Paulus Schoutsen
d1beb92c5d Add abode support for CUE automations (#32296)
* Add support for CUE automations

* Update requirements

* Minor update to string name
2020-03-04 14:54:28 -08:00
Paulus Schoutsen
2abdfc9da6 GeoNet NZ Quakes code improvements (#32338)
* code quality improvements

* code quality improvements and fixed tests

* explicitly set unique ids

* improve unique id creation

* remove entities from entity registry

* added test for removing entities from entity registry

* revert entity registry handling from sensor and test code

* check for entity registry removal in geolocation test case

* make import absolute; isort

* change quality scale
2020-03-04 14:52:16 -08:00
Paulus Schoutsen
dd7d8d4792 Remove 'show all controls' option for Plex (#32391) 2020-03-04 14:42:50 -08:00
Paulus Schoutsen
0e436ac80e add const file for roku (#32470) 2020-03-04 14:24:59 -08:00
springstan
c7d983fd44 Catch an extra error for Ring (#32477) 2020-03-04 23:09:54 +01:00
Daniel Høyer Iversen
0c0d4c460f Upgrade Tibber library to 0.13.2 (#32478) 2020-03-04 22:48:00 +01:00
Pascal Vizeli
9aaab41985 Deprecate camera WS API (#32473) 2020-03-04 21:58:07 +01:00
Paulus Schoutsen
0763dc6089 Fix filter sensor processing states that aren't numbers (#32453)
* lint

* only_numbers flag
2020-03-04 12:47:53 -08:00
Martin Hjelmare
e9978e77bd Upgrade huawei-lte-api to 1.4.10 (#32472)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.8
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.9
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.10
2020-03-04 20:51:56 +01:00
HomeAssistant Azure
104350265d [ci skip] Translation update 2020-03-04 18:13:24 +00:00
Alexei Chetroi
20333703c5 Remove ZHA attribute listening channel (#32468)
* remove AttributeListeningChannel
* pull sleeps
* update signature to fix pylint
2020-03-04 13:11:53 -05:00
J. Nick Koston
7f91501a36 Use a requests Session for rest sensors (#32463)
This avoids the ssl setup overhead for each request
2020-03-04 08:32:38 -08:00
Paulus Schoutsen
b27c46750c Update error handling in update coordinator (#32452) 2020-03-04 08:05:46 -08:00
z0p
f62322cfb4 Add set_speed to smarty fan (#32255) 2020-03-04 10:09:33 +01:00
Raman Gupta
4f619691df Add is_volume_muted property to vizio integration (#32332)
* add is_muted property and update tests

* black

* manually set is_muted on async_mute_volume calls to set state early

* combine two lines into one

* set is_muted to None when device is not on
2020-03-04 10:04:52 +01:00
Alan Tse
6a6bf517fe Add energy added attribute to Tesla charging rate sensor (#32368)
* Add charge_energy_added attribute

* Bump teslajsonpy
2020-03-04 10:00:34 +01:00
Paulus Schoutsen
7678d66464 Fix device tracker TrackerEntity defaults (#32459) 2020-03-04 09:43:52 +01:00
Philipp Schmitt
af76a336af Update roombapy to 1.4.3 (#32462) 2020-03-04 09:41:34 +01:00
Austin Mroczek
d666b15689 Bump total-connect-client to 0.53 (#32460) 2020-03-04 08:08:31 +01:00
Paulus Schoutsen
4be9766498 Merge pull request #32457 from home-assistant/rc
0.106.5
2020-03-03 20:19:14 -08:00
Paulus Schoutsen
4080d6a822 Bumped version to 0.106.5 2020-03-03 18:26:19 -08:00
Robert Svensson
6d06844318 UniFi - Fix websocket bug (#32449) 2020-03-03 18:26:11 -08:00
Paulus Schoutsen
a150d6dcf3 Remove hassfest blacklisted rest (#32441)
* Remove blacklisted deps from hassfest deps

* Whitelist all internal integrations
2020-03-03 18:26:10 -08:00
Achilleas Pipinellis
a0390783bb Fix pushover's ATTR_RETRY env variable typo (#32440) 2020-03-03 18:26:10 -08:00
J. Nick Koston
91b10e875f Properly define dependency for pvoutput integration on rest in… (#32435) 2020-03-03 18:26:09 -08:00
Paulus Schoutsen
f04969cf30 Filter out duplicate logbook states (#32427) 2020-03-03 18:26:08 -08:00
Alan Tse
cdde5a37cd Fix too many device tracker updates in log for Tesla (#32426)
* Fix Tesla too many device tracker updates in log

* Empty commit to re-trigger build

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-03-03 18:26:07 -08:00
Alan Tse
f0c7a7c1bf Fix too many device tracker updates in log for Tesla (#32426)
* Fix Tesla too many device tracker updates in log

* Empty commit to re-trigger build

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-03-03 18:25:32 -08:00
Achilleas Pipinellis
7e3e4c1668 Fix pushover's ATTR_RETRY env variable typo (#32440) 2020-03-03 17:36:28 -08:00
Robert Svensson
02c8cd07f3 UniFi - Fix websocket bug (#32449) 2020-03-03 17:32:13 -08:00
Paulus Schoutsen
4cf86262af Numeric state trigger: validate that above is not above below (#32421)
* Numeric state trigger: validate that above is not above below

* Lint
2020-03-03 17:26:44 -08:00
Paulus Schoutsen
db7d0eb9b9 Remove hassfest blacklisted rest (#32441)
* Remove blacklisted deps from hassfest deps

* Whitelist all internal integrations
2020-03-03 13:57:09 -08:00
Paulus Schoutsen
fed23030d6 Filter out duplicate logbook states (#32427) 2020-03-03 13:56:32 -08:00
Paulus Schoutsen
8f6651af3d Update system log grouping (#32367) 2020-03-03 13:55:15 -08:00
Alexei Chetroi
896df9267a Fix ZHA device healthcheck pings (#32425) 2020-03-03 13:37:17 -05:00
J. Nick Koston
cfa61a6b74 Properly define dependency for pvoutput integration on rest in… (#32435) 2020-03-03 09:25:50 -08:00
J. Nick Koston
1119da7e8a Flume Cleanups (unique id, fix missing timeout, http session,… (#32384)
* Flume Cleanups

* Sensors now show the name

* include_devices and exclude_devices are now available in the config.

* Address review items

* bump as 0.3.0 is published
2020-03-03 09:22:26 -08:00
Jeff Irion
59b4e42f8b Remove SUPPORT_PLAY_MEDIA from Roku (#32378) 2020-03-03 16:59:32 +01:00
Maciej Bieniek
2f8381b1bf Bump brother library (#32436) 2020-03-03 16:59:02 +01:00
Pascal Vizeli
5bbbe60635 Disable codecov because it stop working after renaming.
Come back with GitHub action migration
2020-03-03 16:06:17 +01:00
Bram Kragten
558da56d75 Update config.yml 2020-03-03 11:11:38 +01:00
Paulus Schoutsen
a0403a8864 Merge pull request #32424 from home-assistant/rc
0.106.4
2020-03-02 19:41:01 -08:00
Paulus Schoutsen
bfaad97318 Add unique ID to coronavirus (#32423) 2020-03-02 18:10:51 -08:00
Paulus Schoutsen
c62961f40c Add unique ID to coronavirus (#32423) 2020-03-02 18:10:38 -08:00
Paulus Schoutsen
d6c15d2f45 Bumped version to 0.106.4 2020-03-02 18:04:07 -08:00
Paulus Schoutsen
815502044e Coronavirus updates (#32417)
* Sort countries alphabetically

* Update sensor name

* Add migration to stable unique IDs

* Update sensor.py
2020-03-02 18:04:01 -08:00
mezz64
08f5b49dc4 Catch Eight Sleep API errors, don't round None type (#32410)
* Catch API errors, don't round None type

* Specify error type
2020-03-02 18:04:00 -08:00
mezz64
fab55b0ea2 Bump pyeight to 0.1.4 (#32363) 2020-03-02 18:03:59 -08:00
elmurato
649ec2fc8e Fixed TypeError with old server versions (#32329) 2020-03-02 18:03:59 -08:00
mezz64
aacdc1bc2d Catch Eight Sleep API errors, don't round None type (#32410)
* Catch API errors, don't round None type

* Specify error type
2020-03-02 18:01:39 -08:00
Paulus Schoutsen
fcbea47c74 Coronavirus updates (#32417)
* Sort countries alphabetically

* Update sensor name

* Add migration to stable unique IDs

* Update sensor.py
2020-03-02 17:59:32 -08:00
Matt Snyder
ee7ce47860 Add QVR Pro integration (#31173)
* Initial working commit

* Create const file.  Load camera from component.

* Handle failed authentication.  Bump library version.

* Remove line break

* Camera attributes and recording services

* Add services, manifest, constant update, and exclude_channels.  Prefix channel name.  Update service argument.

* Update codeowners

* Update coveragerc

* Remove codeowners line

* Update codeowners again from python3 -m script.hassfest

* Update homeassistant/components/qvrpro/__init__.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Requested changes

* Fix typo

* Update to use exception. Bump library version.

* Support stream component

* Update module header

* Missing property wrapper

* Partial requested changes

* Update coveragerc and codeowners

* Move constants to const file.  Add SHORT_NAME

* Add conf variable

* Use camera domain

* More requested changes

* Requested changes

* Requested changes

* Update prefix

* Handle error condition when camera is not configured to support live streaming

* Move method to camera setup.  Disable stream component support.

* Move auth string to library to prevent private member access

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-03-03 01:10:02 +01:00
Paulus Schoutsen
a25b94cd2d Update azure-pipelines-wheels.yml 2020-03-02 14:01:40 -08:00
Bram Kragten
21e0df42ac Update azure-pipelines-release.yml for Azure Pipelines 2020-03-02 13:59:21 -08:00
Bram Kragten
66d70195c9 Update azure-pipelines-release.yml for Azure Pipelines 2020-03-02 22:55:57 +01:00
Paulus Schoutsen
f7f9126610 Merge pull request #32414 from home-assistant/rc
0.106.3
2020-03-02 13:43:02 -08:00
Paulus Schoutsen
52809396d4 Bumped version to 0.106.3 2020-03-02 13:40:57 -08:00
Paulus Schoutsen
121d967732 Add coronavirus integration (#32413)
* Add coronavirus integration

* Update homeassistant/components/coronavirus/manifest.json

Co-Authored-By: Franck Nijhof <git@frenck.dev>

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-03-02 13:40:51 -08:00
Paulus Schoutsen
1603f7ac21 Add coronavirus integration (#32413)
* Add coronavirus integration

* Update homeassistant/components/coronavirus/manifest.json

Co-Authored-By: Franck Nijhof <git@frenck.dev>

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-03-02 13:40:11 -08:00
David F. Mulcahey
2ba514253c Bump ZHA Quirks to 0.0.34 (#32401)
* bump zha quirks version

* add required parts to support alt opple remote
2020-03-02 11:26:37 -05:00
Pascal Vizeli
87abd193ee Update azure-pipelines-ci.yml for Azure Pipelines 2020-03-02 16:33:39 +01:00
Pascal Vizeli
049897365c Update azure-pipelines-ci.yml for Azure Pipelines 2020-03-02 16:33:11 +01:00
jjlawren
df3f7687d4 Refactor Certificate Expiry Sensor (#32066)
* Cert Expiry refactor

* Unused parameter

* Reduce delay

* Deprecate 'name' config

* Use config entry unique_id

* Fix logic bugs found with tests

* Rewrite tests to use config flow core interfaces, validate created sensors

* Update strings

* Minor consistency fix

* Review fixes, complete test coverage

* Move error handling to helper

* Subclass exceptions

* Better tests

* Use first object reference

* Fix docstring
2020-03-02 07:44:24 -06:00
kuchel77
eb90cefd84 Keeping adding in Github repositories after error (#32393) 2020-03-02 13:59:11 +01:00
J. Nick Koston
7ca4665711 Move keypad battery implementation details into py-august (#32349)
* Move keypad battery implementation details into py-august

* Upgrade to py-august 0.22.0 which also adds gen2 doorbell battery data

* remove cruft from previous refactor
2020-03-01 23:22:28 -08:00
J. Nick Koston
924c313c8a Add application/xml as an XML to JSON auto converted mime type… (#32289)
* Resolves issue #32280
2020-03-01 23:22:01 -08:00
HomeAssistant Azure
da959c8f7b [ci skip] Translation update 2020-03-02 00:31:47 +00:00
Daniel Høyer Iversen
c361358c6d Upgrade Tibber library to 0.13.0 (#32369) 2020-03-01 22:56:31 +01:00
Ziv
e13d5bdc10 Refactor dynalite integration for multi-platform (#32335)
* refactoring for multi platform

* adopted test_bridge to refactoring

* refactoring tests for multi-platform
additional coverage in config and init

* comment for clarity

* more specific imports from lib

* library version bump

* removed async_update

* changed parameter order to start with hass

* removed pylint disable

* unsubscribe from signal dispatcher
inherit from Entity

* use device.unique_id

* changed hass_obj to hass

* added test for remove entity
bug fix from the test

* removed the polling try_connect. hate polling... it is now part of the async_setup()
significantly makes the code clearer and simplifies the tests

* removed leftover debug logs in the library

* changed tests to get the entry_id from hass

* changed place to assign hass.data only after success

* fixes for test_init

* removed assert

* removed device_info

* removed bridge internal from common

* modified test_bridge to work without the bridge directly

* removed bridge from test_existing_update

* changed update to not use bridge internals

* dyn_bridge fixture no longer used - removed
2020-03-01 22:44:24 +01:00
David Nielsen
fc98faa425 Add Media Stop Support to BraviaTV Mediaplayer (#32220)
* Add media_stop to braviatv mediaplayer

* Fix typo in media_stop()

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-03-01 22:07:44 +01:00
AJ Schmidt
9da5bc9dce Fix AlarmDecoder Integration to use Instant Mode for alarm_arm_night (#32292) 2020-03-01 20:25:16 +01:00
guillempages
f53c94ed2a Add Tankerkoenig integration (#28661)
* Initial version

Parse configuration, but return a fixed value

* Add basic functionality

Request real data from the server
Currently the prices are not getting updated, but the petrol station
data is real

* Update values regularly

The tankerkoenig values get updated regularly with real data.

* Move base functionality for the sensor to a base class

And move that to an own file, so that it can be inherited

* Reduce calls to tankerkoenig api

Use a master/slave concept for sensors; one master gets the data and
updates it into the slaves.

* Update requirements files

* Update all gas stations at once

* Remove tests directory

Currently there are no tests for the integration; will be added in
a future commit.

* Fix slaves not being updated

Let the base class regularly poll, so that slaves are also updated

* Refactor entity creation

Create an auxiliary method to add a station to the entity list,
in preparation to allowing extra stations.

* Add possibility to manually add stations

Add a new configuration option "stations" to manually add extra stations

* Fix style issues

Make the code more pythonic

* Remove redundant code

Implement suggestions from the code review

* Change to platform component

Remove the master/slave concept, in favor of a platform with dummy sensors.
The platform takes care of contacting the server and fetching updates
atomically, and updating the data on the sensors.

* Rename ATTR_STATE

Rename the attribute to "IS_OPEN", to avoid confusion with the sensor state.

* Minor updates

Combine two consecutive error logs into a single one.
Update the sensor's icon

* Separate address into different fields

* Style updates

Use "[]" syntax instead of ".get()" for required parameters
Use warning log level for not available fuel types

* Implement review comments

Fix style issues
Improve error messages
Remove redundant options

* Refactor using DataUpdateCoordinator

Use the new DataUpdateCoordinator to fetch the global data from
the API, instead of implementing an own method.
Also fix comments from the PR

* Implement PR comments

Implement suggestions to improve code readability and keep the Home Assistant style.
Also separate fetching data to an async thread
2020-03-01 16:49:07 +01:00
Colin Robbins
0431b983d2 Add optimistic mode for somfy covers that do not support position (#31407)
* Add a shadow for covers that do not support postion

* Rename shadow as optimistic

* Set optimisic default mode

* fix black error

* Remove redundant check

* optimisitc variable name consistency with config
2020-03-01 16:42:26 +01:00
Josef Schlehofer
a9a523b05c Upgrade youtube_dl to version 2020.03.01 (#32376) 2020-03-01 15:13:56 +01:00
Sébastien RAMAGE
7a7fdc5de6 Add sms support to pushbullet notification (#32347)
* add sms support

* fix formating

* fix formating

* fix whitespace

* fix format
2020-03-01 15:07:14 +01:00
mezz64
e9206b26ad Bump pyeight to 0.1.4 (#32363) 2020-03-01 15:05:37 +01:00
Tim van Cann
f0b5e132af Bump avri api version (#32373)
* Bump avri api version

* Trigger CI
2020-03-01 15:04:18 +01:00
Paulus Schoutsen
c6e85cac0b Require IFTTT to send data as dictionary (#32317)
* Require IFTTT to send data as dictionary

* Update logging
2020-02-29 20:37:06 -08:00
Robert Chmielowiec
8e3492d4f5 ZHA: Support light flashing (#32234) 2020-02-29 18:37:06 -05:00
Marius
3ab04118f6 Fix github sensor short SHA (#32316) 2020-02-29 14:35:28 +01:00
Erik Montnemery
c4ac3155e4 Add brightness to light device turn_on action (#32219)
* Add support for setting brightness

* Remove default brightness
2020-02-29 13:33:20 +01:00
J. Nick Koston
be14b94705 Restore august lock changed_by state on restart (#32340)
* Various code review items from previous PRs

* Add a test for fetching the doorbell camera image

* Switch to using UNIT_PERCENTAGE for battery charge unit

* Add tests for changed_by
2020-02-29 12:12:50 +01:00
Aaron Bach
e9a7b66df6 Add config entry for AirVisual (#32072)
* Add config entry for AirVisual

* Update coverage

* Catch invalid API key from config schema

* Rename geographies to stations

* Revert "Rename geographies to stations"

This reverts commit 5477f89c24cb3f58965351985b1021fc5fc794a5.

* Update strings

* Update CONNECTION_CLASS

* Remove options (subsequent PR)

* Handle import step separately

* Code review comments and simplification

* Move default geography logic to config flow

* Register domain in config flow init

* Add tests

* Update strings

* Bump requirements

* Update homeassistant/components/airvisual/config_flow.py

* Update homeassistant/components/airvisual/config_flow.py

* Make schemas stricter

* Linting

* Linting

* Code review comments

* Put config flow unique ID logic into a method

* Fix tests

* Streamline

* Linting

* show_on_map in options with default value

* Code review comments

* Default options

* Update tests

* Test update

* Move config entry into data object (in prep for options flow)

* Empty commit to re-trigger build
2020-02-28 20:14:17 -07:00
Diogo Gomes
bf33144c2b Bump pyipma to 2.0.5 (#32337)
* bump pyipma version to 2.0.5

* bump pyipma version to 2.0.5
2020-02-28 17:37:34 -08:00
Bram Kragten
3ea29635a0 Updated frontend to 20200228.0 (#32334) 2020-02-29 01:55:27 +01:00
HomeAssistant Azure
2d4ee01c1a [ci skip] Translation update 2020-02-29 00:31:43 +00:00
Alexei Chetroi
5fbaaf41dc Bump up ZHA depdendency (#32336) 2020-02-28 19:13:49 -05:00
Alexei Chetroi
0670b4f457 Use collection helpers for counter integration (#32295)
* Refactor counter to use config dict.

* Use collection helpers for counter integration.

* Update tests.

* Use callbacks were applicable.
2020-02-28 14:06:39 -08:00
elmurato
4a95eee40f Fixed TypeError with old server versions (#32329) 2020-02-28 13:39:46 -08:00
Paulus Schoutsen
deda2f86e7 Allow managing Lovelace storage dashboards (#32241)
* Allow managing Lovelace storage dashboards

* Make sure we do not allow duplicate url paths

* Allow setting sidebar to None

* Fix tests

* Delete storage file on delete

* List all dashboards
2020-02-28 12:43:17 -08:00
Paulus Schoutsen
ede39454a2 Merge remote-tracking branch 'origin/master' into dev 2020-02-28 12:42:02 -08:00
Paulus Schoutsen
3b147bcbf7 Merge pull request #32327 from home-assistant/rc
0.106.2
2020-02-28 12:40:20 -08:00
springstan
f1a0ca7cd3 Add and use percentage constant (#32094)
* Add and use percentage constant

* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00
J. Nick Koston
ca81c6e684 Ensure rest sensors are marked unavailable when http requests… (#32309) 2020-02-28 11:43:00 -08:00
J. Nick Koston
c7f128f286 Ensure rest sensors are marked unavailable when http requests… (#32309) 2020-02-28 11:41:41 -08:00
Paulus Schoutsen
e62ba49979 Bumped version to 0.106.2 2020-02-28 11:38:53 -08:00
Robert Svensson
6ea20090a4 UniFi - Temporary workaround to get device tracker to mark cli… (#32321) 2020-02-28 11:38:37 -08:00
Paulus Schoutsen
c43b7d10d8 revent saving/deleting Lovelace config in safe mode (#32319) 2020-02-28 11:37:57 -08:00
Bram Kragten
430fa24acd Updated frontend to 20200220.5 (#32312) 2020-02-28 11:36:39 -08:00
Paulus Schoutsen
601f2c693d Prevent saving/deleting Lovelace config in safe mode (#32319) 2020-02-28 11:12:16 -08:00
Robert Svensson
f17462b159 UniFi - Temporary workaround to get device tracker to mark cli… (#32321) 2020-02-28 10:28:03 -08:00
Bram Kragten
3dc1ece33c Updated frontend to 20200220.5 (#32312) 2020-02-28 07:56:39 -08:00
Malte Franken
6852ccd8de change log level (#32244) 2020-02-28 12:41:21 +01:00
springstan
157f972d72 Use f-strings in integrations starting with "H" - "L" (#32265)
* Use f-strings in integrations starting with "H"

* Use f-strings in integrations starting with "I"

* Use f-strings in integrations starting with "J"

* Use f-strings in integrations starting with "K"

* Use f-strings in integrations starting with "L"

* Fix lint error

* Use join instead of f-string in homekit_controller

* Use local variables with f-strings

* Fix lint error

* Escape the characters in f-string

* Sort imports with isort in homeworks light

* Fix pylint error

* Fix broken tests

* Fix broken tests v2
2020-02-28 12:39:29 +01:00
Marius
7714160f4c Change github sensor state to short commit sha (#31581)
* change state to latest_release_url

to have a meaningful frontend representation.
self._github_data.latest_commit_sha is still available in the attributes, so no info is lost

* template state to show only the tag

and not the full url to the tag

* add guard to update(self) for state

* add empty line 150

black...

* Update sensor.py

* add SHA if no release url

* Correct sha to 7 digits

* take out fallback on state
2020-02-28 12:34:39 +01:00
Malte Franken
adb3bb3653 Explicitly set unique ids for GDACS integration (#32203)
* explicitly set unique ids

* use config flow's unique id

* use config's unique id
2020-02-28 11:47:49 +01:00
Franck Nijhof
2390a7f365 Pass in aiohttp session for onvif (#32045) 2020-02-28 11:46:06 +01:00
Petro31
2c1c395c28 Set min and max temp only if it is not None (#32262) 2020-02-28 09:49:47 +01:00
Tim van Cann
1d962aeb65 Add Avri waste collection sensor (#31134)
* Add Avri waste collection sensor

* Apply black formatting

* Update manifest

* Add requirements

* Add sensor to coverage

* Update import order

* Bump dependency to include todays pickup

* Bump avri version in requirements_all.txt

* Code review comments

* Reduce scan interval to 4 hours

This makes sure that no matter what happens, in
the morning the correct dates have been pulled
without the old ones lingering for too long.

* Better logging

* Made scan interval a timedelta

* Fix import order

* Update homeassistant/components/avri/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update homeassistant/components/avri/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Use filter instead of break statement

* Use positive int for house number extension

* Switch voluptuous types for house number and house number extension

* Update homeassistant/components/avri/sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Implement `available`

* Bump avri api

* Code review comments

* Replace `postcode` with `zip_code`

* Update logic for `available`

* Remove variable for delimiter

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-27 22:12:01 -08:00
Ziv
02c170b961 Dynalite listener for config entry update (#32116)
* added entry listener that reloads the component

* fixed update with existing entry

* fixed import in test

* fixes

* library version

* removed unique_id

* fix

* fixed for no entries in hass.data

* fixed return value on abort

* moved to use async_entries

* removed unused import
2020-02-27 22:05:55 -08:00
Raman Gupta
b9fa32444a Support vizio pairing through config flow (#31520)
* support pairing through config flow

* simplify import failure log messages

* remove unnecessary list comprehension

* bump pyvizio to add passing ClientSession in where it was missed

* show different message if user completes pairing through import

* remove dupe failure message since reasons for failure are the same in both instances

* remove extra constant

* add host reachability check during pairing workflow

* revert redundant connection check since check is implicitly done during pairing process

* fix rebase errors

* fix string

* updates based on review

* update docstring

* missed commit

* update import confirmation message to be less wordy

* use ConfigFlow _abort_if_unique_id_configured

* fix test
2020-02-27 22:04:59 -08:00
Aaron Bach
03d8abe1ba Fix unhandled exception in Ambient PWS_URL (#32238)
* Fix unhandled exception in Ambient PWS_URL

* Comment update

* Be more explicit
2020-02-27 21:40:51 -08:00
J. Nick Koston
0364cd8db5 Add usage sensors for each device sense detects that show powe… (#32206)
* init

* const

* update docs string

* update docs string

* restore binary sensors

* Restore binary sensors

* match name

* pylint

* Fix bug in conf migration

* Fix refactoring error

* Address review items

Imporve performance

* Fix devices never turning back off
2020-02-27 21:23:47 -08:00
Erik Montnemery
3b17e570df Add device actions to cover (#28064)
* Add device actions to cover

* Remove toggle action, improve tests

* lint

* lint

* Simplify actions

* Update homeassistant/components/cover/device_action.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Improve tests

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-27 21:05:43 -08:00
J. Nick Koston
223c01d842 Coordinate all august detail and activity updates (#32249)
* Removing polling from august

* Now using subscribers to the detail and activity

* Fix hash to list keys

* continue to the next house if one fails

* Add async_signal_device_id_update

* Fix double initial update

* Handle self.hass not being available until after async_added_to_hass

* Remove not needed await

* Fix regression with device name
2020-02-27 19:44:22 -08:00
Paulus Schoutsen
d51b2ad675 Merge pull request #32282 from home-assistant/rc
0.106.1
2020-02-27 16:37:35 -08:00
HomeAssistant Azure
fefbe02d44 [ci skip] Translation update 2020-02-28 00:31:47 +00:00
Aaron Bach
9329bc4ca0 Remove ability to configure monitored conditions in IQVIA (#32223)
* Remove ability to configure monitored conditions in IQVIA

* Deprecate instead of removing (until 0.108.0)

* Simplify imports

* Update version
2020-02-27 17:24:14 -07:00
Diogo Gomes
b8fbe758d8 Bump pyipma dependency (fixes bug in 0.106) (#32286)
* Bump version

* Bump PyIPMA version
2020-02-27 14:44:22 -08:00
Diogo Gomes
5bdf450f78 Bump pyipma dependency (fixes bug in 0.106) (#32286)
* Bump version

* Bump PyIPMA version
2020-02-27 14:44:02 -08:00
Paulus Schoutsen
61476f4f2c Fix dsmr test 2020-02-27 14:41:35 -08:00
Paulus Schoutsen
cab60bcd0c Bumped version to 0.106.1 2020-02-27 14:03:07 -08:00
Paulus Schoutsen
c0394232f3 Catch more Hue errors (#32275) 2020-02-27 14:03:00 -08:00
Robert Svensson
a5d9e89d08 deCONZ - Race condition on slower systems (#32274)
When battery sensors gets created before other platforms loading deconz sensors gets created first the other platform would not create entities related to those battery sensors
2020-02-27 14:02:59 -08:00
Aaron Bach
f43b26f250 Bump simplisafe-python to 9.0.2 (#32273) 2020-02-27 14:02:59 -08:00
Aaron Bach
58b32bbeff Bump simplisafe-python to 9.0.0 (#32215) 2020-02-27 14:02:58 -08:00
dupondje
6d0a465390 Fix DSMR 5 (#32233)
DSMR 5 was broken because some wrong if.
if dsmr_version in ("5B"):
-> this checks dsmr_version against 5 and B. Not if its 5B.
2020-02-27 14:00:51 -08:00
Jens Nistler
a5d334bbf7 Mark clients away if they have never been seen. (#32222) 2020-02-27 14:00:51 -08:00
Erik Montnemery
a77fd4892e Add missing translations for light actions (#32216) 2020-02-27 14:00:50 -08:00
Balazs Sandor
75e8d49af1 Show kernel version on linux (#32276) 2020-02-27 13:59:30 -08:00
Paulus Schoutsen
5a56d0ec1d Catch more Hue errors (#32275) 2020-02-27 12:53:36 -08:00
Jens Nistler
ecd076c5e4 Mark clients away if they have never been seen. (#32222) 2020-02-27 11:50:34 -08:00
Robert Svensson
e695bb55c8 deCONZ - Race condition on slower systems (#32274)
When battery sensors gets created before other platforms loading deconz sensors gets created first the other platform would not create entities related to those battery sensors
2020-02-27 20:48:01 +01:00
Aaron Bach
aab2fd5ec3 Bump simplisafe-python to 9.0.2 (#32273) 2020-02-27 12:18:26 -07:00
Yuki Ueda
0eb5ca67cd Make heos and transmission config flow tests more robust (#31783)
* async_step_user to async_configure

* fix for lint

* fix for pylint

* fix isort and black

* fix miss-fixed black

* fixing for the python37 coverage

* fix transmission definition

* fix for Black formatting

* fix type to abort

* clean up

* clean up for the test

* fix for the test

* refactor

* split test_flow_works to three tests

* revert the assert

* remove whitespaces for flake8

* apply patch function

* fix for the patch

* fix for the black

* remove mock_coro

* fix for the black

* hue to heos

* try to fix import

* fix for the black

* revert try to fix import

* Add a pytest fixture

* fix for the black
2020-02-27 12:19:54 +01:00
Aaron Bach
df04fe3258 Bump simplisafe-python to 9.0.0 (#32215) 2020-02-26 18:52:07 -08:00
J. Nick Koston
4c5e364d90 Centralize august activity updates (#32197)
* Reduce August doorbell detail updates

* Doorbell images now get updates from the activity feed

* Tests for activity updates

* py-august now provides bridge_is_online for available state

* py-august now provides is_standby for available state

* py-august now provides get_doorbell_image (eliminate requests)

* remove debug

* black after merge conflict

* Centralize august activity updates

* Updates appear significantly more responsive

* Should address the community complaints about "lag"

* Reduce detail updates (device end points) to one hour interval

* Signal entities to update via dispatcher when new activity arrives

* Resolves out of sync state (skipped test is now unskipped)

* pylint

* fix merge conflict

* review comments

* Remove stray

* Address review items that can be done without refactor
2020-02-26 18:48:44 -08:00
Jc2k
d207c37c33 Address homekit_controller feedback on #32212 and #32213 (#32228) 2020-02-26 17:10:05 -08:00
dupondje
f26826d949 Fix DSMR 5 (#32233)
DSMR 5 was broken because some wrong if.
if dsmr_version in ("5B"):
-> this checks dsmr_version against 5 and B. Not if its 5B.
2020-02-26 17:02:42 -08:00
Paulus Schoutsen
483d822272 Lovelace resource mgmt (#32224)
* Add websockets commands for resource management

* Add LL resource management

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-02-26 16:43:34 -08:00
HomeAssistant Azure
92988d60a7 [ci skip] Translation update 2020-02-27 00:31:50 +00:00
Franck Nijhof
16dba3fa85 Merge branch 'master' into dev 2020-02-26 21:01:29 +01:00
Paulus Schoutsen
2a88ae559e Improve debounce cooldown (#32161) 2020-02-26 11:27:37 -08:00
Jc2k
853d6cda25 Make homekit_controller a local push integration (#32213) 2020-02-26 10:35:53 -08:00
Erik Montnemery
c92aa30663 Add missing translations for light actions (#32216) 2020-02-26 10:24:43 -08:00
Jc2k
92a47f14bb homekit_controller test cleanups (#32212) 2020-02-26 09:44:04 -08:00
Franck Nijhof
2d68b37dd5 Merge pull request #32211 from home-assistant/rc
0.106.0
2020-02-26 14:30:57 +01:00
Paulus Schoutsen
4de3871a78 Fix hue test 2020-02-26 12:54:19 +01:00
Franck Nijhof
9c755d8fd4 Remove deprecated Hue options (fixes CI) (#32027) 2020-02-26 12:53:44 +01:00
Franck Nijhof
1e5f0a5136 Bumped version to 0.106.0 2020-02-26 12:34:38 +01:00
Bram Kragten
897433ecba Updated frontend to 20200220.4 (#32205) 2020-02-26 12:31:50 +01:00
Aaron Bach
89625010e5 Fix error where SimpliSafe websocket would disconnect and not reconnect (#32199)
* Fix error where SimpliSafe websocket would disconnect and not reconnect

* Await
2020-02-26 12:31:44 +01:00
Aaron Bach
e435f6eb67 Fix error where SimpliSafe websocket would disconnect and not reconnect (#32199)
* Fix error where SimpliSafe websocket would disconnect and not reconnect

* Await
2020-02-26 12:19:14 +01:00
Bram Kragten
5a67d73a37 Updated frontend to 20200220.4 (#32205) 2020-02-26 11:32:15 +01:00
J. Nick Koston
638a3025df Reduce August doorbell detail updates (#32193)
* Reduce August doorbell detail updates

* Doorbell images now get updates from the activity feed

* Tests for activity updates

* py-august now provides bridge_is_online for available state

* py-august now provides is_standby for available state

* py-august now provides get_doorbell_image (eliminate requests)

* remove debug

* black after merge conflict
2020-02-26 08:43:41 +01:00
Aaron Bach
b5c1afcb84 Make SimpliSafe entities unavailable when wifi is lost (#32154)
* Make SimpliSafe entities unavailable when wifi is lost

* Remove online status from REST API

* Comments

* Mispelling
2020-02-25 20:03:41 -07:00
J. Nick Koston
4c33a9d732 Add model to august device_info (#32187)
* Add model to august device_info

* Address review comments from PR#32125

* Fix test name
2020-02-25 18:34:31 -08:00
springstan
58de7fe9a3 Fix name of emby media player (#32183)
* Fix name of emby media player

* Remove client name from entity_id
2020-02-25 17:30:03 -08:00
HomeAssistant Azure
ed461a0ad8 [ci skip] Translation update 2020-02-26 00:31:47 +00:00
J. Nick Koston
3e702c8ca4 Add Config Flow for sense (#32160)
* Config Flow for sense

* Fix unique ids so they are actually unique (and migrate the old ones)

* Fix missing solar production

* Do not mark sensors available until they have data

* Address review items

* Address review round #2
2020-02-25 16:37:41 -07:00
Paulus Schoutsen
7391aa2d7e Bumped version to 0.106.0b5 2020-02-25 14:17:32 -08:00
Paulus Schoutsen
0e7e0086cd Update translations 2020-02-25 14:17:28 -08:00
Jenny
6f8380b442 Bump socialbladeclient to 0.5 (#32191) 2020-02-25 14:16:52 -08:00
Paulus Schoutsen
e60a6cfa19 Fix Arlo doing I/O in event loop (#32190) 2020-02-25 14:16:52 -08:00
Bram Kragten
ff6d415c67 Updated frontend to 20200220.3 (#32189) 2020-02-25 14:16:51 -08:00
Michaël Arnauts
d3629d9f32 Bump python-tado to 0.3.0 (#32186) 2020-02-25 14:16:50 -08:00
Kit Klein
61e2ce5faf Dedup and clarify imported konnected config flows (#32138)
* dedup config flows

* use default (imported) options until user goes thru options flow

* address pr feedback

* correct key used to distinguish pro model
2020-02-25 14:16:49 -08:00
Bram Kragten
b0fdbebd56 Updated frontend to 20200220.3 (#32189) 2020-02-25 23:15:25 +01:00
Paulus Schoutsen
fc0278c91f Fix Arlo doing I/O in event loop (#32190) 2020-02-25 23:10:43 +01:00
Jenny
1f23361a5d Bump socialbladeclient to 0.5 (#32191) 2020-02-25 23:01:18 +01:00
Jc2k
4a89fba6f9 Add homekit_controller occupancy sensor (#32188) 2020-02-25 22:01:03 +00:00
Jc2k
dd13e99967 Add missing device class attributes to homekit_controller sensors (#32175)
* Add some missing device class attributes to homekit_controller sensors

* Add classes for binary sensors
2020-02-25 21:43:14 +01:00
Michaël Arnauts
24652d82ab Bump python-tado to 0.3.0 (#32186) 2020-02-25 21:29:45 +01:00
Jc2k
1ddc1ebc6b Refactor away deprecated homekit_controller test helpers (#32177) 2020-02-25 21:19:04 +01:00
Paulus Schoutsen
7d8da47309 Revert "Use orjson to parse json faster (#32153)" (#32185)
This reverts commit 2365e2e8cf.
2020-02-25 21:07:16 +01:00
Franck Nijhof
ceb3985a99 Remove hide_entity property from automation integration (#32038)
* Remove hidden property from automation integration

* Allow configuration options untils 0.110
2020-02-25 11:21:05 -08:00
Paulus Schoutsen
536b31305a Support multiple Lovelace dashboards (#32134)
* Support multiple Lovelace dashboards

* Mark collection maintenance as unfinished

* Fix import

* Add websockets commands for resource management

* Revert "Add websockets commands for resource management"

This reverts commit 7d140b2bcc.

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-02-25 11:18:21 -08:00
Erik Montnemery
2d6b80470f Improve error handling (#32182) 2020-02-25 10:44:24 -08:00
Ruslan Sayfutdinov
2365e2e8cf Use orjson to parse json faster (#32153)
* [recorder] Use orjson to parse json faster

* Remove from http manifest

* Bump to orjson 2.5.1

* Empty commit to trigger CI

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-25 10:20:51 -08:00
springstan
5c12fa0daa Fix description of fan service set_direction (#32181) 2020-02-25 19:18:44 +01:00
J. Nick Koston
2925e0617c Add Config flow to august (#32133)
* Add battery sensors for August devices

* Additional tests and cleanup in prep for config flow
  and device registry

* pylint

* update name for new style guidelines - https://developers.home-assistant.io/docs/development_guidelines/#use-new-style-string-formatting

* Config Flow for august push

* Update homeassistant/components/august/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Address review items

* Update tests

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-25 10:18:15 -08:00
Paulus Schoutsen
900714a3ee Do not report state when closing down (#32168) 2020-02-25 09:05:36 -08:00
Kit Klein
5488389244 Dedup and clarify imported konnected config flows (#32138)
* dedup config flows

* use default (imported) options until user goes thru options flow

* address pr feedback

* correct key used to distinguish pro model
2020-02-25 13:55:06 +01:00
Jc2k
438c4acf07 Deprecate homekit_controller .homekit folder (#32158)
* homekit_controller: Deprecate .homekit folder

* Tweaks from review

* Delay it a release
2020-02-25 12:09:04 +01:00
Jc2k
c9d78aa78c Refactor homekit_controller config flow tests (#32141)
* Config flow test refactor

* Add a service and characteristic to the accessory so its more realistic

* Feedback from review

* Missing apostrophe
2020-02-25 12:06:35 +01:00
Aaron Bach
ba4cc373c8 Modernize Ambient PWS config flow (#32164)
* Modernize Ambient PWS config flow

* Linting
2020-02-24 21:37:38 -08:00
Aaron Bach
c97b1c60b0 Modernize Notion config flow (#32167)
* Modernize Notion config flow

* Linting
2020-02-24 21:36:58 -08:00
paolog89
0e6a48c688 Add observed entities to bayesian sensor (#27721)
* Add observed entities to bayesian sensor

* Update binary_sensor.py to comply with style guidelines and test_binary_sensor.py to verify the entity_id

* Update binary_sensor.py and test_binary_sensor.py to include an additional attribute for observed entities

* Use of ATTR_ENTITY_ID and numeric key of observed entity

* Update binary_sensor.py

* Update test_binary_sensor.py to verify behavior

* Update to return a list without duplicates in the state attribute

* Update binary_sensor.py: rename of ATTR_ENTITY_ID into ATTR_OBSERVED_ENTITIES

* Rename new attribute into ATTR_OCCURRED_OBSERVATION_ENTITIES and fix test
2020-02-24 21:27:59 -08:00
Paulus Schoutsen
5776b9f17d Fix flaky coverage in UK transport test (#32053) 2020-02-24 21:27:07 -08:00
Paulus Schoutsen
9007d37de1 Bumped version to 0.106.0b4 2020-02-24 21:05:10 -08:00
Aaron Bach
7c2765fbff Remove unused SimpliSafe config flow function (#32166)
* Remove unused SimpliSafe config flow function

* Code review comments from other PR

* Linting
2020-02-24 22:02:20 -07:00
Aaron Bach
75f465bf7e Remove unused RainMachine config flow function (#32165)
* Remove unused RainMachine config flow function

* Remove test we don't need

* Code review comments

* Linting
2020-02-24 22:01:55 -07:00
Erik Montnemery
7e387f93d6 Add MQTT WS command to remove device (#31989)
* Add MQTT WS command to remove device

* Review comments, fix test

* Fix tests
2020-02-24 20:46:02 -08:00
Paulus Schoutsen
9e832aaaa6 Bumped version to 0.106.0b3 2020-02-24 19:36:26 -08:00
Raman Gupta
5dc93aeeb1 Improve Vizio fix to avoid KeyError (#32163)
* dont set default volume_step on import check

* ensure config entry data['volume_step'] is set

* consolidate entry update during entry setup
2020-02-24 19:36:15 -08:00
Raman Gupta
45d63e22d5 Fix vizio bug to use 'get' to get volume_step since it is optional (#32151)
* use get to get volume_step since it is optional

* always set volume_step to default in options and data if its not included
2020-02-24 19:36:14 -08:00
Paulus Schoutsen
6edef444a7 Properly define depenency for Scrape integration on Rest integ… (#32136) 2020-02-24 19:36:14 -08:00
Kit Klein
6f1f9bdd45 0.106 Beta - provide correctly formatted placeholders (#32119) 2020-02-24 19:36:13 -08:00
Tom
1d075a7dd0 Fix Plugwise climate issues for new firmware #32080 (#32109)
* Fix Plugwise climate issue firmare 3.1.11 (#32080)

* Submit checklist actions
2020-02-24 19:36:12 -08:00
Raman Gupta
4236d62b44 Improve Vizio fix to avoid KeyError (#32163)
* dont set default volume_step on import check

* ensure config entry data['volume_step'] is set

* consolidate entry update during entry setup
2020-02-24 19:35:28 -08:00
Mike
71a6ea1c10 Add shopping_list_item_added event_type (#28334)
* Update __init__.py

Added event_type "shopping_list_item_added" with an item tied to it.

* Update __init__.py

* Update __init__.py

Black formatting style

* Modified global event variables

* Typo fix

* Update __init__.py

* Formatting changes

* More formatting changes

* Update __init__.py

* Black formatting

* Update __init__.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-24 18:43:27 -08:00
SukramJ
e0586df602 Migrate HomematicIP Cloud services to admin services (#32107)
* Migrate HomematicIP Cloud services to admin services

* remove unused dict

* vacation and eco mode are usable by users

* add verify_domain_control, make service user accessible
2020-02-24 18:16:57 -08:00
springstan
88df9c8ab4 Remove friendly_name attribute from twitch sensor (#32067)
* Remove friendly_name attribute twitch sensor

* Use deepcopy to only copy the content

* Update homeassistant/components/twitch/sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/twitch/sensor.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-25 02:55:31 +01:00
springstan
ad102b3840 Use f-strings in integrations starting with "F"and"G" (#32150)
* Use f-strings in integrations starting with F

* Use f-strings in tests for integrations starting with F

* Use f-strings in integrations starting with G

* Use f-strings in tests for integrations starting with G

* Fix pylint error

* Fix broken test
2020-02-24 17:54:20 -08:00
Ville Skyttä
496bd3dddf Add and use more unit constants (#32122)
* Add and use speed constants

* Add and use meter based volume and area constants

* Add and use more mass unit constants

* Add and use concentration unit constants

* Add and use watts per square meter constant

* Use more time constants

* Use more data constants
2020-02-24 17:52:14 -08:00
Franck Nijhof
c98f50115d Upgrade pre-commit to 2.1.1 (#32159) 2020-02-25 02:16:23 +01:00
Ville Skyttä
9b2544c923 Remove some unneeded pylint suppressions (#32152) 2020-02-24 16:47:15 -08:00
HomeAssistant Azure
a9e061270b [ci skip] Translation update 2020-02-25 00:32:13 +00:00
Chris Talkington
3f49f6c047 Add constants file for directv (#32157) 2020-02-25 01:30:00 +01:00
Phil Bruckner
b2d7bc40dc Add support for simultaneous runs of Script helper (#31937)
* Add tests for legacy Script helper behavior

* Add Script helper if_running and run_mode options

- if_running controls what happens if Script run while previous run
  has not completed. Can be:
  - error: Raise an exception
  - ignore: Return without doing anything (previous run continues as-is)
  - parallel: Start run in new task
  - restart: Stop previous run before starting new run
- run_mode controls when call to async_run will return. Can be:
  - background: Returns immediately
  - legacy: Implements previous behavior, which is to return when done,
            or when suspended by delay or wait_template
  - blocking: Returns when run has completed
- If neither is specified, default is run_mode=legacy (and if_running
  is not used.) Otherwise, defaults are if_running=parallel and
  run_mode=background. If run_mode is set to legacy then if_running must
  be None.
- Caller may supply a logger which will be used throughout instead of
  default module logger.
- Move Script running state into new helper classes, comprised of an
  abstract base class and two concrete clases, one for legacy behavior
  and one for new behavior.
- Remove some non-async methods, as well as call_from_config which has
  only been used in tests.
- Adjust tests accordingly.

* Change per review

- Change run_mode default from background to blocking.
- Make sure change listener is called, even when there's an unexpected
  exception.
- Make _ScriptRun.async_stop more graceful by using an asyncio.Event for
  signaling instead of simply cancelling Task.
- Subclass _ScriptRun for background & blocking behavior.

Also:

- Fix timeouts in _ScriptRun by converting timedeltas to float seconds.
- General cleanup.

* Change per review 2

- Don't propagate exceptions if call from user has already returned
  (i.e., for background runs or legacy runs that have suspended.)
- Allow user to specify if exceptions should be logged. They will still
  be logged regardless if exception is not propagated.
- Rename _start_script_delay and _start_wait_template_delay for
  clarity.
- Remove return value from Script.async_run.
- Fix missing await.
- Change call to self.is_running in Script.async_run to direct test of
  self._runs.

* Change per review 3 and add tests

- Remove Script.set_logger().
- Enhance existing tests to check all run modes.
- Add tests for new features.
- Fix a few minor bugs found by tests.
2020-02-24 14:56:00 -08:00
Raman Gupta
309989be89 Fix vizio bug to use 'get' to get volume_step since it is optional (#32151)
* use get to get volume_step since it is optional

* always set volume_step to default in options and data if its not included
2020-02-24 23:37:54 +01:00
Colin O'Dell
90859b82e2 Upgrade qnapstats to 0.3.0 (#32148) 2020-02-24 22:46:07 +01:00
Aaron Bach
6b0d7c77f0 Clean up RainMachine config entry data (#32132) 2020-02-24 13:07:18 -07:00
Aaron Bach
edf44f4158 Modernize RainMachine config flow (#32131)
* Modernize RainMachine config flow

* Update strings
2020-02-24 13:05:54 -07:00
Aaron Bach
f7e336eaa6 Modernize SimpliSafe config flow (#32130)
* Modernize SimpliSafe config flow

* Fix tests
2020-02-24 13:03:08 -07:00
Aaron Bach
db40b2fc32 Handle unhandled IQVIA data update exception (#32144)
* Handle unhandled IQVIA data update exception

* Cleanup

* Ask for forgiveness, not permission

* Use warning-level logs

* Fix log messages
2020-02-24 13:02:33 -07:00
springstan
9801810552 Use f-strings in integrations starting with "B"-"E" (#32121)
* Use f-strings in integrations starting with B

* Use f-strings in integrations starting with C

* Use f-strings in integrations starting with D

* Use f-strings in integrations starting with E

* Fix pylint errors

* Fix pylint errors v2

* Fix tests

* Fix tests v2
2020-02-24 08:47:52 -08:00
Paulus Schoutsen
07fa844c43 Speed up validate_entity_id (#32137)
* Speed up validate_entity_id

* Add some more invalid entity IDs

* Adjust regular expression

* Extend and sort test cases

* Update regular expression, more cases, faster

* Adjust tests, allow start with number, disallow double underscore

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-02-24 08:35:02 -08:00
Ruslan Sayfutdinov
15b4975681 Use ciso8601 library to parse datetime faster (#32128) 2020-02-24 08:33:10 -08:00
Rocik
d996a4a9a9 Add Supla gate (#31643)
* Add support for Supla gate with sensor

* Fix Supla switch module description and state access

* Add docs to methods of Supla gate

* Add missing comma

* Remove unused import

* Sort imports of Supla cover

* Add returning availability for every Supla device

* Use direct access to dict

* Remove deprecated property "hidden"

* Remove unused constant

* Revert using get function on dict
2020-02-24 15:34:53 +01:00
Jc2k
df9363610c Refactor homekit_controller to be fully asynchronous (#32111)
* Port homekit_controller to aiohomekit

* Remove succeed() test helper

* Remove fail() test helper
2020-02-24 10:55:33 +01:00
Pierre
a1a835cf54 Add platform Ezviz (#30378)
* hookid : isort fix

* New platform: Ezviz

* updated CODEOWNERS for ezviz

* proper test requirements

* resolved conflict

* regenerated requirements

* removed stale comments, only one call to add_entities, removed unnecessary attributes

* setup is sync, not async. Removed stale comments

* Compatible with pyezviz 0.1.4

* pyezviz 0.1.4 is now requiredf

* Added PTZ + switch management

* added services.yaml

* proper requirement

* PTZ working in async mode

* Now updates the entity

* Compatible with pyezviz 0.1.5.1

* Fixed switch ir service registering

* now requires pyezviz 0.1.5.2

* now requires pyezviz 0.1.5.2

* Revert "regenerated requirements"

This reverts commit 848b317cf9.

* Rollbacked to a simpler version

* snake_case names everywhere, logging sanatizing, voluptuous proper check

* pyezviz 0.1.5, reworked the PR so that it's intelligible

* no need for services.yaml for now

* proper voluptuous validation

* Removed stale code, use proper conf variable, describe attributes

* regenerated requirements

* stale

* removed status from attributes, since we use it for available we don't need it here then.

* Fixed log message
2020-02-24 10:39:55 +01:00
Paulus Schoutsen
ca01e9a537 Improve condition validation error msg (#32135) 2020-02-24 09:59:34 +01:00
Paulus Schoutsen
270758417b Properly define depenency for Scrape integration on Rest integ… (#32136) 2020-02-24 00:03:33 -08:00
Aaron Bach
6e6625e1ab Remove no-longer-needed SimpliSafe websocket watchdog (#32129)
* Fix SimpliSafe reconnection issue upon websocket error

* Rename listener cancelation properties

* Remove watchdog
2020-02-23 20:47:19 -07:00
HomeAssistant Azure
5ec7d07283 [ci skip] Translation update 2020-02-24 00:31:49 +00:00
J. Nick Koston
693441e56f Deduplicate code in the august integration (#32101)
* Deduplicate code in the august integration

* Add additional tests for august (more coming)

* Door state is now updated when a lock or unlock call returns
  as the state is contained in the response which avoids
  the confusing out of sync state

* revert

* document known issue with doorsense and lock getting out of sync (pre-existing)

* Address review comments

* Additional review comments
2020-02-23 13:54:34 -08:00
Kit Klein
d2d788631e 0.106 Beta - provide correctly formatted placeholders (#32119) 2020-02-23 13:54:18 -08:00
springstan
524a1a7587 Use f-strings in integrations starting with "A" (#32110)
* Use f-strings in integrations starting with A

* Use f-strings in tests for integrations starting with A

* Fix pylint by renaming variable

* Fix nested for loop in f-string for aprs device_tracker

* Break long lines into multiple short lines

* Break long lines into multiple short lines v2
2020-02-23 13:38:05 -08:00
springstan
a85808e325 Add and use time related constants (#32065)
* Add and use time related constants

* Sort time constants and reuse them in data rate constants

* Fix greeneyemonitor import

* Fix greeneyemonitor import V2

* Fix failing here_travel_time test

* Add TIME_MONTHS and TIME_YEARS

* Use TIME_MINUTES in opentherm_gw and isy994

* Add and use TIME_MILLISECONDS

* Change inconsistent ones

* Add TIME_MICROSECONDS and TIME_WEEKS

* Use constants in apcupsd and travisci

* Fix import error in upnp sensor.py

* Fix isy994 sensor.py using TIME_YEARS

* Fix dyson tests

* Use TIME_SECONDS in more places

* Use TIME_DAYS in google wifi
2020-02-23 22:09:24 +02:00
Chris Talkington
8dd80e0e3c Add unique_id to directv entities (#31838)
* add unique_id to directv entities.

* add addiitional debug and fix tests.

* fix lint error.

* rework unique_id and flow a bit.

* review adjustments.

* review adjustments

* review adjustments

* review adjustments.

* review adjustments

* review adjustments

* review adjustments

* review adjustments

* lint

* use serial number for host unit and mac address for client units

* fix elsif

* update test with realistic client id

* lint
2020-02-23 19:26:34 +01:00
Robert Svensson
1007283da5 UniFi - Add unit of measurement to bandwidth sensors (#32114) 2020-02-23 19:17:26 +01:00
Robin
4cc4f070f5 Add sighthound save image (#32103)
* Adds save_image

* Update test_image_processing.py

* Update test

* Tidy test

* update image_processing with reviewer comments

* Update test_image_processing.py

* Ammend tests

not passing

* Patch convert

* remove join

* Use valid_config_save_file
2020-02-23 19:11:05 +01:00
Martin Long
f6fbecf963 Add boost support for Hive TRVs (#31261)
* Add boost support for TRVs

* Updated pyhiveapi dependency to 0.2.20.1
2020-02-23 17:40:50 +01:00
jezcooke
a533b7a746 Fix volume control for Frontier Silicon media players (#32040)
* Fixed volume control for Frontier Silicon media players.

* Removed unnecessary else which caused pylint test to fail.

* Removed whitespace on empty line.

* Tweaks from on springstan's suggestions and other fixes

* Apply suggestions from code review

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Comment to explain why 1 is subtracted from volume_Steps

Also reformatted using black after code review changes.

* Split up the set volume functions into steps rather than all in-line as suggested.

* Renamed _volume_steps to _max_volume.

* Prevent asnyc_update from failing if we can't get the volume steps

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-02-23 17:37:31 +01:00
jezcooke
458e47f981 Add name option for Frontier Silicon devices (#32085)
* Added the option to specify the name of the device in confirguration.yaml

* Adding missing default name parameter in auto-discovery FSAPIDevice constructor.

* Fixed Black formatting.

* Removed DEFAULT_NAME constant.

* Apply suggestions from code review

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-02-23 17:05:24 +01:00
Tom
d22ee7179d Fix Plugwise climate issues for new firmware #32080 (#32109)
* Fix Plugwise climate issue firmare 3.1.11 (#32080)

* Submit checklist actions
2020-02-23 17:02:42 +01:00
Paulus Schoutsen
f975654ae7 Mock setup_entry in oauth2 tests (#32102)
* Mock setup_entry in oauth2 tests

* Fix scaffold constant
2020-02-23 12:23:21 +01:00
jezcooke
a678c6fd0b Fix Frontier Silicon player state (#32082)
The player would report itself as ‘off’ when in certain modes (e.g ‘Music player’ or ‘Spotify’) which meant HA would lose all control (it can’t change input or set volume etc. as it thinks it’s off). Now reports STATE_IDLE in these cases and only STATE_OFF if it is actually off.

This fixes issue #20728.
2020-02-22 20:33:42 -08:00
michaeldavie
bd00453cef Bump env_canada to 0.0.35 to address issue 31924 (#32077)
* Bump env_canada to 0.0.35, remove details from alerts

* Black
2020-02-22 20:32:19 -08:00
HomeAssistant Azure
8257165562 [ci skip] Translation update 2020-02-23 00:31:50 +00:00
Bram Kragten
fcaabb3d33 Change get_entity to return a extended entry, add inputs to de… (#32083)
* Change get_entity to return a extended entry + add inputs to default config

For https://github.com/home-assistant/home-assistant-polymer/pull/4940

* Fix tests, simplify code, update to return extended

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-22 15:18:10 -08:00
Franck Nijhof
edfb967b10 Add unique ID to ONVIF camera entities (#32093) 2020-02-22 22:29:49 +01:00
Paulus Schoutsen
e78449904b Bumped version to 0.106.0b2 2020-02-21 17:38:43 -08:00
jjlawren
f30ff31439 Add ConfigEntryNotReady exception to Plex (#32071) 2020-02-21 17:38:29 -08:00
Alok Saboo
9dda44ffdd Add additional logging to rest sensor (#32068) 2020-02-21 17:38:28 -08:00
Maciej Bieniek
39fd7ca5d3 Bump brother to 0.1.6 (#32054) 2020-02-21 17:38:27 -08:00
Paulus Schoutsen
ca07ae5b1e Updated frontend to 20200220.1 (#32046) 2020-02-21 17:38:26 -08:00
J. Nick Koston
cc8430ebed Fix i/o in august camera async image update (#32044)
* Fix i/o in august camera image update

* Address review comments
2020-02-21 17:38:25 -08:00
Paulus Schoutsen
a3b3ff52fc Remove YAML config from Ring integration (#32039) 2020-02-21 17:38:24 -08:00
Ziv
a102728997 Enhance Dynalite Integration after review (#31760)
* fixes per Martin Hjelmare

* pylint fix

* final fixes per request

* fixed unit tests for new config flow

* Added unit-tests to increase coverage. at 97% now

* Added unit tests for 100% coverage of component

* removed configured_host function and updated config_flow unit tests

* added a pylint directive since it tells me by mistake DOMAIN is not used

* fixed path (removed __init__)

* Update homeassistant/components/dynalite/light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/dynalite/light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* fixed the test as we moved from schedule_update_... to async_schedule

* Update homeassistant/components/dynalite/bridge.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* removed context from config_flow
changed test_init to use the core methods

* moved test_light to also use the core interfaces

* moved to config_entries.async_unload

* additional fixes for the tests

* pylint fix and removed unnecessary code

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* added break in loop

* removed last mock_coro reference
pylint fix

* added coverage for try_connect

* added check for a successful connection before bridge.async_setup succeeds
also added a "nowait" config option (default False) that avoids this check

* changed log level

* fixed accidental chmod I did

* fixed accidental change

* not storing config in bridge

* not patching asyncio

* moved CONFIG_SCHEMA into component

* moved all logs to start capitalized (and revised some of them)

* moved test_config_flow to not patch the DynaliteBridge

* also took DynaliteBridge patching out of test_init

* removed NO_WAIT

* fixes to SCHEMA

* changed _ in multi-word CONF
moved imports to component const.py

* removed tries

* removed redundant tests

* fixed some small change i broke in the library. only version update

* fixed rewuirements

* Update tests/components/dynalite/test_config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* removed HIDDEN_ENTITY
removed hass in test fixture

* black fixes

* removed final piece of hidden_entity from light
fix in the library
updated config flow so if the entry is already set but with a different config, calls async_update_entry

* removed DATA_CONFIGS - no longer necessary

* pylint fixes

* added coverage

* use abort in config_flow

* test update

* removed logs

* test that update actually updates the entry

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-02-21 17:38:23 -08:00
Paulus Schoutsen
ced870c588 Remove YAML config from Ring integration (#32039) 2020-02-21 17:36:19 -08:00
HomeAssistant Azure
dc15b9c28e [ci skip] Translation update 2020-02-22 00:31:49 +00:00
springstan
b41cbe9885 Add www. to all documentation links (#32063)
* Add www. to all documentation links

* Fix broken redirect uri test
2020-02-21 16:10:02 -08:00
Alexei Chetroi
3385893b77 ZHA device channel refactoring (#31971)
* Add ZHA core typing helper.
* Add aux_channels to ZHA rule matching.
* Add match rule claim_channels() method.
* Expose underlying zigpy device.
* Not sure we need this one.
* Move "base" channels.
* Framework for channel discovery.
* Make DEVICE_CLASS and REMOTE_DEVICE_TYPE default dicts.
* Remove attribute reporting configuration registry.
* Refactor channels.
- Refactor zha events
- Use compound IDs and unique_ids
- Refactor signal dispatching on attribute updates

* Use unique id compatible with entities unique ids.
* Refactor ZHA Entity registry.
Let match rule to check for the match.

* Refactor discovery to use new channels.
* Cleanup ZDO channel.
Remove unused zha store call.

* Handle channel configuration and initialization.
* Refactor ZHA Device to use new channels.
* Refactor ZHA Gateway to use new discovery framework.
Use hass.data for entity info intermediate store.

* Don't keep entities in hass.data.
* ZHA gateway new discovery framework.
* Refactor ZHA platform loading.
* Don't update ZHA entities, when restoring from zigpy.
* ZHA entity discover tests.
* Add AnalogInput sensor.
* Remove 0xFC02 based entity from Keen smart vents.
* Clean up IAS channels.
* Refactor entity restoration.
* Fix lumi.router entities name.
* Rename EndpointsChannel to ChannelPool.
* Make Channels.pools a list.
* Fix cover test.
* Fix FakeDevice class.
* Fix device actions.
* Fix channels typing.
* Revert update_before_add=False
* Refactor channel class matching.
* Use a helper function for adding entities.
* Make Pylint happy.
* Rebase cleanup.
* Update coverage for ZHA device type overrides.
* Use cluster_id for single output cluster registry.
* Remove ZHA typing from coverage.
* Fix tests.
* Address comments.
* Address comments.
2020-02-21 18:06:57 -05:00
Ziv
36db302cc8 Enhance Dynalite Integration after review (#31760)
* fixes per Martin Hjelmare

* pylint fix

* final fixes per request

* fixed unit tests for new config flow

* Added unit-tests to increase coverage. at 97% now

* Added unit tests for 100% coverage of component

* removed configured_host function and updated config_flow unit tests

* added a pylint directive since it tells me by mistake DOMAIN is not used

* fixed path (removed __init__)

* Update homeassistant/components/dynalite/light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/dynalite/light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* fixed the test as we moved from schedule_update_... to async_schedule

* Update homeassistant/components/dynalite/bridge.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* removed context from config_flow
changed test_init to use the core methods

* moved test_light to also use the core interfaces

* moved to config_entries.async_unload

* additional fixes for the tests

* pylint fix and removed unnecessary code

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* added break in loop

* removed last mock_coro reference
pylint fix

* added coverage for try_connect

* added check for a successful connection before bridge.async_setup succeeds
also added a "nowait" config option (default False) that avoids this check

* changed log level

* fixed accidental chmod I did

* fixed accidental change

* not storing config in bridge

* not patching asyncio

* moved CONFIG_SCHEMA into component

* moved all logs to start capitalized (and revised some of them)

* moved test_config_flow to not patch the DynaliteBridge

* also took DynaliteBridge patching out of test_init

* removed NO_WAIT

* fixes to SCHEMA

* changed _ in multi-word CONF
moved imports to component const.py

* removed tries

* removed redundant tests

* fixed some small change i broke in the library. only version update

* fixed rewuirements

* Update tests/components/dynalite/test_config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* removed HIDDEN_ENTITY
removed hass in test fixture

* black fixes

* removed final piece of hidden_entity from light
fix in the library
updated config flow so if the entry is already set but with a different config, calls async_update_entry

* removed DATA_CONFIGS - no longer necessary

* pylint fixes

* added coverage

* use abort in config_flow

* test update

* removed logs

* test that update actually updates the entry

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-02-21 23:29:59 +01:00
jjlawren
9cc47ca737 Add ConfigEntryNotReady exception to Plex (#32071) 2020-02-21 22:07:26 +01:00
Alok Saboo
2fb66fd866 Add additional logging to rest sensor (#32068) 2020-02-21 21:11:25 +01:00
Patrick Kishino
f32411e394 Add asuswrt interface and dnsmasq location configuration (#29834)
* Added interface and dnsmasq location configuration

* Updated aioasuswrt requirement to latest 1.2.1 release

* Updated to working aioasus library and fixed correct conf formatting
2020-02-21 17:01:57 +01:00
Maciej Bieniek
dd8597cb46 Bump brother to 0.1.6 (#32054) 2020-02-21 10:32:48 +01:00
J. Nick Koston
6e74ee7b64 Fix i/o in august camera async image update (#32044)
* Fix i/o in august camera image update

* Address review comments
2020-02-21 07:39:07 +01:00
J. Nick Koston
d4075fb262 Significantly reduce code in august integration (#32030)
* Significantly reduce code in august integration

* Activity updates can now be processed by py-august
  this allows us to eliminate the activity sync
  code for the door sensors and locks

* Lock and door state can now be consumed from
  the lock detail api which allows us to
  remove the status call apis and reduce
  the number of API calls to august

* Refactor the testing method for locks (part #1)

* Update homeassistant/components/august/binary_sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Switch to asynctest instead of unittest for mock.patch

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-20 21:06:24 -08:00
HomeAssistant Azure
a12c4da0ca [ci skip] Translation update 2020-02-21 00:33:51 +00:00
springstan
1ee7c483a7 Update file headers and outdated documentation links (#32022)
* Update documentation links

* Update file headers v2
2020-02-20 15:29:46 -08:00
Paulus Schoutsen
51b5796916 Updated frontend to 20200220.1 (#32046) 2020-02-20 14:51:27 -08:00
Robbie Trencheny
f0d58ab7a7 Change TTS codeowner to @pvizeli (#32041) 2020-02-20 13:36:36 -08:00
Paulus Schoutsen
ce710f1e0b Template platform tweaks (#32037)
* Remove unnecessary boolean return from platform setup

* Fix template cover validation
2020-02-20 12:14:31 -08:00
Franck Nijhof
2e35190aff Fix extra arguments of group integration (#32032) 2020-02-20 20:15:45 +01:00
Paulus Schoutsen
fbe7ec7b11 Bumped version to 0.106.0b1 2020-02-20 11:02:23 -08:00
Paulus Schoutsen
b2310d6341 Updated frontend to 20200220.0 (#32033) 2020-02-20 11:02:04 -08:00
Franck Nijhof
fdd0becd5f Add minimal version contrain to urllib3 (#32031) 2020-02-20 11:02:03 -08:00
MatthewFlamm
425e6b2b1f Add missing name to logging in DataUpdateCoordinator (#32023) 2020-02-20 11:02:03 -08:00
cgtobi
f58e5a2185 Bump pyatmo to 3.2.4 (#32018)
* Bump pyatmo to 3.2.3

* Bump pyatmo version to 3.2.4

* Update requirements_test_all.txt
2020-02-20 11:02:02 -08:00
Tsvi Mostovicz
2fb6bb2a92 Don't return coroutine in DLNA/DMR service handler (#32011)
Fixes #32010
2020-02-20 11:02:01 -08:00
Paulus Schoutsen
35e9b52e2e Fix recursion bug (#32009)
* Fix recursion bug

* Remove shield
2020-02-20 11:02:00 -08:00
Mark Coombes
1e52dd5945 Fix bug in ecobee integration (#32008)
* Bump python-ecobee-api to 0.2.1

* Update log messages for clarity

* Update requirements_all
2020-02-20 11:01:59 -08:00
David F. Mulcahey
bf92b3099d Bump ZHA quirks and add skip configuration support (#31982)
* add skip configuration
* Bump quirks
* add skip configuration to FakeDevice
2020-02-20 11:01:58 -08:00
jjlawren
16f094d4d3 Fix Plex sensor title handling (#31973)
* Fix Plex sensor title parsing

* Revert episode year for now
2020-02-20 11:01:57 -08:00
Paulus Schoutsen
1b2bb87566 Only check frontend for safe mode if frontend wanted to be loa… (#31969)
* Only check frontend for safe mode if frontend wanted to be loaded

* Update test
2020-02-20 11:01:57 -08:00
Paulus Schoutsen
20e3c91ebd Updated frontend to 20200220.0 (#32033) 2020-02-20 11:01:20 -08:00
Franck Nijhof
bf1092ec80 Add minimal version contrain to urllib3 (#32031) 2020-02-20 19:19:09 +01:00
Franck Nijhof
b2f2afaf0c Prevent committing to dev/master/rc directly (#32029)
* Prevent committing to dev/master/rc directly

* Skip pre-commit on version bump
2020-02-20 09:34:30 -08:00
Franck Nijhof
1c81e8ad68 Remove history_graph integration (#32028)
* Remove history_graph integration

* Update codeowners file
2020-02-20 09:01:29 -08:00
Paulus Schoutsen
1c2bce9292 Fix recursion bug (#32009)
* Fix recursion bug

* Remove shield
2020-02-20 08:51:00 -08:00
Franck Nijhof
5c5f839119 Remove weblink integration (#32024) 2020-02-20 08:50:40 -08:00
Robin
a7d5e898ba Add convert_to_pil_image to pil util (#31825)
* Update pil.py

* Update doods and tensorflow to use convert_to_pil_image

* Update pil.py

* Add log messages on bad data

* Drop convert_to_pil_image

Just perform conversion in the integrations without seperate convert_to_pil_image()
2020-02-20 17:50:28 +01:00
Raman Gupta
7a6b13cb0d Update vizio dependency and integration name (#31975)
* bump pyvizio version and clean up code

* fix requirements

* update parameter to optional per review in docs PR
2020-02-20 08:43:29 -08:00
Paulus Schoutsen
51b2d0b4f8 Add entity ID to input_number warning (#32012)
* Add entity ID to warning

* Input Number flexibility
2020-02-20 08:30:24 -08:00
Franck Nijhof
2ad1f7fd02 Remove states UI options in group integration (#32021) 2020-02-20 08:26:41 -08:00
cgtobi
7e3841e172 Bump pyatmo to 3.2.4 (#32018)
* Bump pyatmo to 3.2.3

* Bump pyatmo version to 3.2.4

* Update requirements_test_all.txt
2020-02-20 08:25:49 -08:00
Franck Nijhof
2ec0a504da Remove deprecated Hue options (fixes CI) (#32027) 2020-02-20 17:18:50 +01:00
Paulus Schoutsen
e71c7e1f5e Fix hue test 2020-02-20 08:11:27 -08:00
MatthewFlamm
6c9d4a6d15 Add missing name to logging in DataUpdateCoordinator (#32023) 2020-02-20 16:51:15 +01:00
Franck Nijhof
d6c185fdf4 Deprecate Xfinity Gateway integration (ADR-0004) (#32017) 2020-02-20 16:01:03 +01:00
Franck Nijhof
aae64dba62 Bumped version to 0.107.0dev0 2020-02-20 11:44:00 +01:00
Franck Nijhof
febd7e551b Upgrade requests to 2.23.0 (#32013) 2020-02-20 11:41:13 +01:00
jjlawren
047111b00f Fix Plex sensor title handling (#31973)
* Fix Plex sensor title parsing

* Revert episode year for now
2020-02-19 22:33:38 -08:00
Daniel Perna
136ed12ec5 Update pyhomematic to 0.1.65 (#32006) 2020-02-19 22:27:50 -08:00
Tsvi Mostovicz
b6d60c36a5 Don't return coroutine in DLNA/DMR service handler (#32011)
Fixes #32010
2020-02-19 22:21:09 -08:00
Mark Coombes
832337f26c Fix bug in ecobee integration (#32008)
* Bump python-ecobee-api to 0.2.1

* Update log messages for clarity

* Update requirements_all
2020-02-19 21:05:22 -08:00
HomeAssistant Azure
5839df39b5 [ci skip] Translation update 2020-02-20 00:31:46 +00:00
Pascal Vizeli
6f8f23238a Nuki: add support for unique id (#31824)
* Nuki support unique id and the battery level attribute

* Fix isort

* Address comments

* Cache attribute

* Cleanup

* Restore false

* Fix isort
2020-02-19 08:16:02 -08:00
Paulus Schoutsen
4e765398cc Only check frontend for safe mode if frontend wanted to be loa… (#31969)
* Only check frontend for safe mode if frontend wanted to be loaded

* Update test
2020-02-19 15:56:46 +01:00
David F. Mulcahey
8255bdf3d5 Bump ZHA quirks and add skip configuration support (#31982)
* add skip configuration
* Bump quirks
* add skip configuration to FakeDevice
2020-02-19 09:19:26 -05:00
Franck Nijhof
e6258ec009 Merge branch 'dev' into rc 2020-02-19 13:22:32 +01:00
Bram Kragten
e90d29ea36 Updated frontend to 20200219.0 (#31979) 2020-02-19 12:46:40 +01:00
SukramJ
da4c08de12 Fix test for HMIPC (#31981) 2020-02-19 12:41:14 +01:00
SukramJ
0d874902cc Add shutter group to HomematicIP Cloud (#31916) 2020-02-19 10:59:49 +01:00
SukramJ
f4f01cb23a Add new devices to HomematicIP Cloud (#31914)
* Add new devices to HomematicIP Cloud

Adds:
- HMIP-WTH-B (Wall Thermostat Basic)
- ALPHA-IP-RBG (Alpha IP Wall Thermostat Display)
- ALPHA-IP-RBGa (ALpha IP Wall Thermostat Display analog)

* Update homeassistant/components/homematicip_cloud/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-02-19 10:43:12 +01:00
springstan
21f8d0a80c Bump vallox-websocket-api to 2.4.0 (#31913) 2020-02-19 10:01:21 +01:00
Vladimír Záhradník
32cd58e03d Modbus remove unnecessary get calls (#31966) 2020-02-18 19:41:12 -08:00
Gerard
0dad2f8e41 Upgrade to bimmer_connected 0.7.1 to fix US and China access (#31968) 2020-02-18 19:40:34 -08:00
jjlawren
56c834b8a4 Fix Plex naming and devices for misbehaving clients (#31970) 2020-02-18 19:37:21 -08:00
jjlawren
0213f43f10 Add options to ignore shared/managed Plex clients (#31738)
* Add option to ignore shared/managed Plex clients

* Start to allow user selection

* hass object not ready during init

* Don't bother sorting

* Plex account multi-select, handle new users not matching config

* Fix/add tests

* Lint simplifications

* Review cleanup

* Oops

* Rename options attributes, fix/add tests
2020-02-18 16:46:45 -08:00
HomeAssistant Azure
4b3f9ecc2d [ci skip] Translation update 2020-02-19 00:31:49 +00:00
Paulus Schoutsen
9f830964ef Optimize find bad JSON data (#31963) 2020-02-18 16:06:13 -08:00
Robert Svensson
a745134128 deConz - Use proper mechanisms for options flow tests (#31965)
Generic clean up
2020-02-18 23:52:56 +01:00
Robert Svensson
774c892ee6 UniFi config option SSID filter (#31842)
* Draft

* Use new multi_select config validation

* Bump dependency to v13

* Improve options flow

* Add title to config options

* Add config option descriptions

* Fix martins comment
2020-02-18 23:24:21 +01:00
Erik Montnemery
60ae85564e Add support for MQTT device triggers (#31679)
* Add support for MQTT device triggers

* Fix test, tweaks

* Improve test coverage

* Address review comments, improve tests

* Tidy up exception handling

* Fix abbreviations

* Rewrite to handle update of attached triggers

* Update abbreviation test

* Refactor according to review comments

* Refactor according to review comments

* Improve trigger removal

* Further refactoring
2020-02-18 13:51:10 -08:00
Tom Harris
f6540e3002 Fix pre-commit hook issue on Windows (#31648)
* Make shebang compatable with Windows

* Prehook test

* Undo prehook test
2020-02-18 13:33:52 -08:00
Franck Nijhof
4ed7a7f2e0 Upgrade pre-commit to 2.1.0 (#31962) 2020-02-18 13:25:26 -08:00
Robert Svensson
b5df2ba853 deCONZ - Directly reflect changes to config entry options (#31661)
* Directly reflect changes to config entry options

* Remove print

* Add tests

* Add title to config options
2020-02-18 13:24:25 -08:00
J. Nick Koston
17f3332c89 Audit state handling off august bridges and sensors (#31935)
* Audit state handling of august bridges and sensors

This addresses issue #29980

* Prevent setting up august locks that do not have a bridge as they will never work

* Prevent locks showing available when their bridge is offline

* Prevent door sensors from showing available when their bridge is offline

* Prevent creating door sensors for locks that do not have them

* Prevent doorbells showing unavailable when they are in standby mode

* Set SCAN_INTERVAL for binary_sensors to 5 seconds as
  data comes in from the activity endpoint more frequently

* Update homeassistant/components/august/__init__.py

raise if the detail is missing when checking doorsense

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Handle another place where the lock detail could not exist

* Address review comments

* Handle lock detail update failing and add test

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-18 12:11:05 -08:00
Paulus Schoutsen
239dfaba4b Do not use a set for hvac modes in SmartThings (#31959) 2020-02-18 12:09:56 -08:00
Paulus Schoutsen
beee1298c5 Extend safe mode (#31927)
* Extend safe mode

* Add safe mode boolean to config JSON output and default Lovelace

* Add safe mode to frontend

* Update accent color
2020-02-18 11:52:38 -08:00
Markus Pöschl
245482d802 Add Twitch subscription and additional stats (#31122)
* add oauth functionality and additional attributes

* Add tests WIP

* Make mocks work the correct way

* Use CONF_TOKEN constant for config

* Remove twitch from .coveragerc

* Update homeassistant/components/twitch/sensor.py

Lets be consistent

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-02-18 11:51:37 -08:00
Aaron Bach
30efef3085 Add support for SimpliSafe system notifications (#31936)
* Add support for SimpliSafe system notifications

* Actually process notifications

* Code review comments
2020-02-18 11:49:36 -07:00
Vladimír Záhradník
af67bb0df3 Read Modbus climate current temp from input register (#31944) 2020-02-18 18:45:05 +01:00
Paulus Schoutsen
b73531b2fc Untag discovery as an allowed dependency (#31934) 2020-02-18 08:32:56 -08:00
Paulus Schoutsen
7be3a4cd37 Fix entity registry not saving name/icon (#31932) 2020-02-18 08:32:34 -08:00
Markus Pöschl
0ae86b022d Add pigpio remote functionality (#31667) 2020-02-18 12:52:55 +01:00
ktnrg45
f75bda7551 Bump pyps4-2ndscreen to 1.0.7 (#31943) 2020-02-18 09:50:49 +01:00
Malte Franken
e65995eb87 Bump aio_geojson_nsw_rfs_incidents to 0.3 (#31941) 2020-02-18 08:59:49 +01:00
Austin Mroczek
1fa16eefc9 Fix translations_develop (#31942) 2020-02-18 08:58:49 +01:00
HomeAssistant Azure
2e5161997f [ci skip] Translation update 2020-02-18 00:31:41 +00:00
Malte Franken
70910ecc61 Bump aio_geojson_geonetnz_quakes to 0.12 (#31930) 2020-02-17 15:30:31 -08:00
Paulus Schoutsen
7a9b2a2234 Bumped version to 0.106.0b0 2020-02-17 15:26:37 -08:00
Paulus Schoutsen
1f7e3946e8 Merge remote-tracking branch 'origin/master' into dev 2020-02-17 14:55:27 -08:00
Paulus Schoutsen
75b508e872 Merge pull request #31931 from home-assistant/rc
0.105.5
2020-02-17 14:52:02 -08:00
Paulus Schoutsen
7bc87eef6f Bumped version to 0.105.5 2020-02-17 14:15:37 -08:00
Paulus Schoutsen
8812b60f2e Report which data causes JSON serialization error (#31901) 2020-02-17 14:15:09 -08:00
Gerard
21a1186efe Upgrade bimmer_connected to 0.7.0 (#31894) 2020-02-17 14:15:09 -08:00
Bram Kragten
95bcceddf7 Add an options flow to demo (#31920)
To help test the frontend
2020-02-17 14:10:44 -08:00
Quentame
3743aaf70f Add async_unload_entry to iCloud (#31917) 2020-02-17 22:23:24 +01:00
Bram Kragten
e52adbb942 Updated frontend to 20200217.0 (#31922) 2020-02-17 22:03:42 +01:00
Franck Nijhof
4497e98ea2 Remove duke_energy integration (ADR-0004) (#31921) 2020-02-17 21:51:53 +01:00
Aaron Bach
74f0262e82 Bump simplisafe-python to 8.1.1 (#31915) 2020-02-17 13:16:24 -07:00
Paulus Schoutsen
a6b5d73f1c Report which data causes JSON serialization error (#31901) 2020-02-17 10:49:42 -08:00
J. Nick Koston
00ac7a7d70 Provide user consumable errors when lock operations fail (#31864)
* Provide user consumable errors when lock operations fail

This resolves issue #26672

* include from in raise

* pylint

* Cleanup of mocking.
2020-02-17 10:30:14 -08:00
Bram Kragten
18dfb02355 Updated frontend to 20200212.0 (#31912) 2020-02-17 10:24:11 -08:00
Victor Guimarães
93a844b1d5 Hue Group features based on the bulbs in it (#31897)
* Computes the features of a hue group as the union of the features of the bulbs in the group

* Moved create item to a function

* Added test for hue group features
2020-02-17 10:22:34 -08:00
Paulus Schoutsen
81701f7e4c Start safe mode if invalid core conf (#31904) 2020-02-17 10:20:05 -08:00
SukramJ
2366b5f6ca Bump dependency to 0.10.17 for HomematicIP Cloud (#31911) 2020-02-17 18:31:09 +01:00
Paulus Schoutsen
1b7dd6c603 Add icons to scripts (#31899) 2020-02-17 08:44:36 -08:00
Paulus Schoutsen
c788946430 Allow specifying an icon for a scene (#31898) 2020-02-17 08:41:33 -08:00
Paulus Schoutsen
3da136b034 Add logger name to system log (#31902) 2020-02-17 17:26:25 +01:00
mezz64
164e970ba0 Add POD support, sleep fitness sensor to EightSleep (#31874)
* Add POD support, sleep fitness sensor

* Black format changes

* Change dict formatting
2020-02-17 10:15:21 +01:00
Paulus Schoutsen
b77f2670a7 Upgrade aiohue (#31903) 2020-02-17 09:52:54 +01:00
Josef Schlehofer
aead5bada8 Upgrade youtube_dl to version 2020.02.16 (#31905) 2020-02-17 09:08:29 +01:00
mueslo
00b3efec89 prevent dev_id being permanently assigned as config_name (#31886) 2020-02-16 21:07:49 -08:00
Jonathan Keljo
56142ba085 Upgrade greeneye_monitor to 2.0 (#31896) 2020-02-16 20:40:34 -08:00
Jonathan Keljo
f30c636fb7 Fix bugs in greeneye_monitor voltage reporting (#31895)
* Fix #31870

* Fix voltage notifications too
2020-02-16 20:32:59 -08:00
HomeAssistant Azure
84e4ef510e [ci skip] Translation update 2020-02-17 00:31:56 +00:00
Martin Hjelmare
2ce7561343 Clean soundtouch (#31888)
* Clean up soundtouch tests

* Remove not needed updates
2020-02-16 15:34:44 -08:00
Martin Hjelmare
e3adbc336d Fix check_real location guard (#31890) 2020-02-16 15:33:09 -08:00
Gerard
4dc4f84b37 Upgrade bimmer_connected to 0.7.0 (#31894) 2020-02-16 15:32:36 -08:00
Franck Nijhof
ae78fb857e Activate Stale bot for PR's (#31837)
* Activate Stale bot for PR's

* Disable issues only
2020-02-17 00:22:51 +01:00
Martin Hjelmare
f53ae12bb6 Clean up netgear device tracker (#31861)
* Improve logging

* Clean up login

* Clean docstring

* Clean config access

* Remove default None for port

* Add not working guard

* Remove debug print
2020-02-16 23:27:19 +01:00
Laszlo Jakab
1d5d56faf8 Add timestamp to lg_netcast media_image_url to update image correctly (#30933)
* add timestamp to media_image_url to update image correctly

* applying isort on source

* apply black formatting on source

* using f strings in media_image_url property

* remove unnecessary casting
2020-02-16 23:26:41 +01:00
Squixx
2516b9474d Update nederlandse_spoorwegen to properly handle punctuality (#31741) 2020-02-16 17:24:38 +01:00
Jardi Martinez
6be0bcceff Bump adafruit-blinka and adafruit-circuitpython-mcp230xx (#31845)
* Updated MCP23017 component to use latest adafruit-blinka v-3.9.0 and Adafruit_CircuitPython_MCP230xx v-2.2.2

* Added updated dependencies to requirements_all.txt
2020-02-16 17:19:45 +01:00
Ville Skyttä
03f7fe483b Type hint improvements (#31876)
* Complete components.remote type hints

* Define ConfigType only in helpers.typing
2020-02-16 13:47:55 +01:00
Maikel Punie
e5e7c9fa25 Upgrade python-velbus to 2.0.41 (#31875) 2020-02-16 12:36:13 +01:00
SukramJ
32f25a8484 Adjust tests after speed up to restore coverage for HomematicIP Cloud (#31836)
* Adjust tests after speed up to restore coverage for HomematicIP Cloud

* Fix test data

* Fixes after review

* remove duplicate cade

* remove service marker
2020-02-16 10:09:26 +01:00
Marco
20d7c84b22 Fix mikrotik detecting capsman support (#31819)
* fix detecting capsman support

* fix isort

* moved support_capsman to update_devices()

* moved support-checks to setup method

* moved setup method to get_hub_details

* implement suggestion for device lists

* fix black formatting

* remove not needed variable wireless_devices

* fix usage of force_dhcp to seperate wireless devs

* fix black fmt
2020-02-16 09:49:13 +01:00
Paulus Schoutsen
a6eb776768 Merge remote-tracking branch 'origin/master' into dev 2020-02-15 21:39:55 -08:00
J. Nick Koston
096e7cceed Support XML conversion for RESTful sensors (#31809)
* Support XML conversion for RESTful sensors

Many devices continue to use XML for RESTful
APIs.  Interfacing with these APIs requires custom
integrations or command line fork()/exec() overhead
which many of these devices can work with as if
they were JSON using xmltojson via this spec:
https://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html

This change implements converting XML output to
JSON via xmltojson so it can work with the existing
rest sensor component.  As the attributes that
usually need to be scraped are deeper in the document
support for passing in a template to find the
JSON attributes that have been added.  JSON APIs that
do not have their attributes at the top level
can also benefit from this change.

* Auto convert xml, change out the template for jsonpath

* Address review items and potentially unexpected normalize behavior with jsonpath

* Revert "Address review items and potentially unexpected normalize behavior with jsonpath"

This reverts commit fe9e179092.

* json_dict[0] turned out to be needed
2020-02-15 21:10:23 -08:00
Joseph Albert
fee0d8dbdd Add rainforest_eagle support for legacy hardware (#28082)
* Add compatibility with Legacy EAGLE models.

* added mdns resultion via zeroconf

* Added requirements to requirements_all.txt

* Fixed model determination bug

* Fixed formatting issue for Eagle-200 responses.

* Remove mDNS resolution, IP now required.

* added pypi deps, fixed handling of optional params

manifest updates

* Fixed import order per isort.

* Two pylint fixes.

* More consistent try-fail structure to guessing hardware.  Errors actually fail.
2020-02-15 21:10:04 -08:00
J. Nick Koston
f6d9e6b6c5 Convert august to async so a token refresh lock can be used (#31848)
* Convert august to async so a token refresh lock can be used

* Update comment since we now have a lock

* Do not mock the lock

* Address review items
2020-02-15 21:08:52 -08:00
Philip Rosenberg-Watt
fb8cbc2e93 Fix CalDAV recurring events (#31805)
* Fix CalDAV parsing of recurring events

Some CaDAV servers (see: SOGo) return the original event that contains
the recurrence rules. The CalDAV calendar component sorts and filters
events based on their start and end dates, and was failing to properly
show recurring events based on these recurrence rules.

This this change checks if an event has recurrence rules and changes the
start/end dates of the event to today if the event is set to occur
today. This allows the rest of the component logic to function properly.

* Use date from nextmost occurence

* Adding unit tests

* Add endless event unit test

* Create new vevent for each event recurrence today

* Remove redundant unit test

* Add timezone to events that have none

Python cannot compare them otherwise.

* Simplify code, add comments & guard clause

* Add test for recurring all day event

* Account for all-day events

* Remove redundant code

* Remove redundant code

* Remove unnecessary deepcopy

* Add hourly recurring tests

* Add tests for hourly repeating event

* Fix unit test

* Use event.copy()
2020-02-15 19:31:36 -08:00
HomeAssistant Azure
3fb80712be [ci skip] Translation update 2020-02-16 00:31:42 +00:00
jjlawren
91018034b6 Use new custom_serializer (#31871) 2020-02-15 15:36:57 -08:00
Moshe Kaplan
7dff5e79d1 Add support for displaying Daf Yomi (#30628)
* Add support for displaying Daf Yomi

* Ran black --fast

* Added docstring to get_daf

* Further lint fixes

* Remove unnecessary else

* clarify code

* Use fstrings

* pull daf yomi from hdate

* Update manifest version for daf_yomi support

* fix variable usage

* Update requirements

* Also pass in today's date as well

* Rename date variable to daytime_date

* Add tests for daf yomi sensor

* Update stale test IDs
2020-02-16 00:00:17 +01:00
Chris Caron
481d3295a6 Bump Apprise version to v0.8.4 (#31868) 2020-02-15 23:58:42 +01:00
Daniel Høyer Iversen
8c270e6fc7 update pyTibber libary, add signal strength for Pulse and watty (#31851)
* update pyTibber libary, add signal strength for Pulse and watty

* update pyTibber libary, add signal strength for Pulse and watty
2020-02-15 13:52:56 -08:00
Massimiliano Cannarozzo
2c42e2aa79 Improve media name detection on lg_netcast (#31863)
When the tv is using an external input (e.g. HDMI1) values have to be taken from fields otherwise they'll empty
2020-02-15 13:48:30 -08:00
Paulus Schoutsen
02002ac3b9 Update codecov.yml 2020-02-15 13:06:08 -08:00
Ville Skyttä
733f1e1101 Helpers typing improvements (#31865) 2020-02-15 13:03:53 -08:00
Martin Hjelmare
588f2cd920 Revert "Check netgear device_tracker link_rate to ensure device is connected" (#31855)
This reverts commit 669844e4dd.
2020-02-15 17:21:04 +01:00
Michaël Arnauts
b8f9ff76b3 Add Tado water_heater (#30095)
* Add Tado water_heater

* Don't use climate CONSTS

* Fix logging text

* Add changes for multiple bridge support

* Address remarks

* should_poll must be False

* Remove additional async_schedule_update_ha_state()

* Not for climate
2020-02-15 17:08:21 +01:00
Ville Skyttä
1609e33030 Simplify missing Garmin Connect data handling, mark entities un/available (#31718)
* Simplify missing Garmin Connect data handling, mark entities un/available

* Remove unnecessary else
2020-02-15 17:53:10 +02:00
Robin
e38522c612 Bump pillow to 7.0 (#31847) 2020-02-15 11:59:41 +01:00
Massimiliano Cannarozzo
4e54dfa874 Add turn_on_action configuration variable (#31792)
Allow to turn on the TV using an external service
2020-02-15 10:57:04 +01:00
HomeAssistant Azure
f3a8196fb5 [ci skip] Translation update 2020-02-15 00:31:45 +00:00
Paulus Schoutsen
68d2a1107e Merge pull request #31841 from home-assistant/rc
0.105.4
2020-02-14 16:29:09 -08:00
Paulus Schoutsen
350726d938 Revert "For vizio integration, set unique ID early to prevent multiple zeroconf discovery items for the same device to appear (#31686)"
This reverts commit 295963f8e8.
2020-02-14 15:47:14 -08:00
Paulus Schoutsen
8140c033fa Bumped version to 0.105.4 2020-02-14 15:30:23 -08:00
Franck Nijhof
f26cbbdef9 Spotify integration hotfixes (#31835)
* Remove services file, incorrect info

* Guard currently playing for being a NoneType

* Revert "Guard currently playing for being a NoneType"

This reverts commit f5f56b0db0.

* Guard currently playing item is None

* Process review suggestions
2020-02-14 15:30:11 -08:00
Paulus Schoutsen
7705eb7941 Google Assistant: Remove speaker type and earlier filter out devices from being locally exposed (#31830)
* Remove speaker type

* Do not expose locks or alarms to Google Local
2020-02-14 15:30:11 -08:00
Paulus Schoutsen
af9832d468 Fix person device_trackers null (#31829) 2020-02-14 15:30:10 -08:00
Bram Kragten
f042c6f8d5 Updated frontend to 20200130.3 (#31771) 2020-02-14 15:29:41 -08:00
SukramJ
656c901f7b Fix smoke detection for HomematicIP Cloud (#31753) 2020-02-14 15:29:10 -08:00
Paulus Schoutsen
30e302a8a3 Fix person reload service (#31716) 2020-02-14 15:29:09 -08:00
cgtobi
7edf0460cc Fix missing device class in netatmo binary sensors (#31693)
* Bring back device class

* Add door tag sensors types

* Actually discover individual tags per camera
2020-02-14 15:29:08 -08:00
Raman Gupta
295963f8e8 For vizio integration, set unique ID early to prevent multiple zeroconf discovery items for the same device to appear (#31686)
* set unique ID early to prevent multiple zeroconf discovery items for the same device to appear

* add test
2020-02-14 15:29:08 -08:00
Paulus Schoutsen
966df6a411 Guard writing automation/scene/script config (#31568) 2020-02-14 15:29:07 -08:00
Paulus Schoutsen
4501471b8c Google Assistant: Remove speaker type and earlier filter out devices from being locally exposed (#31830)
* Remove speaker type

* Do not expose locks or alarms to Google Local
2020-02-14 15:28:11 -08:00
Paulus Schoutsen
52b045ed30 Fix person device_trackers null (#31829) 2020-02-14 15:27:31 -08:00
Franck Nijhof
f396f1cb18 Spotify integration hotfixes (#31835)
* Remove services file, incorrect info

* Guard currently playing for being a NoneType

* Revert "Guard currently playing for being a NoneType"

This reverts commit f5f56b0db0.

* Guard currently playing item is None

* Process review suggestions
2020-02-14 22:58:39 +01:00
Vilppu Vuorinen
614be5c1bb Remove energy sensor from incompatible Ata devices (#31831)
An AtaDevice has a boolean flag describing whether it supports energy
consumption metering. The flag was ignored resulting in sensor entities
reporting constant 0 kWh consumption.

* Update pymelcloud dependency to support the has_energy_consumed_meter
flag.

* Add ATTR_ENABLED_FN to sensor definitions for filtering out
unsupported sensors.

* Fix typing issue in sensor constructor.

* Remove unused UnitSystem constructor parameter.
2020-02-14 21:11:51 +01:00
Robert Svensson
043d36f7c6 Change multi_select config validator to class (#31828)
* Move multi_select to class

* Fix serializer and add test

* Serializer should also return options
2020-02-14 11:09:40 -08:00
Aaron Bach
d6f0c26e7f Fire HASS events on SimpliSafe events (#31811)
* Fire HASS events on SimpliSafe events

* Bump simplisafe-ptyhon to 7.3.0

* Update reqirements

* Updates

* Revert "Updates"

This reverts commit 5581889417.

* Restrict which events get fired

* Code review comments
2020-02-14 11:24:35 -07:00
Paulus Schoutsen
e019280d94 Annotate more async functions correctly (#31802) 2020-02-14 10:00:22 -08:00
Paulus Schoutsen
71a81c443f Limit translations_develop to an integration (#31804)
* limit translations_develop to english

* Convert to Python

* Limit to integration

* Add to hassfest

* Remove old bash comment
2020-02-14 09:26:50 -08:00
Abílio Costa
e6148d223a Allow hourly forecast in IPMA (#30979)
* update ipma component for pyipma 2.0
* fix wind speed; refactor forecast
* update requirements*.txt
* fix tests; update CODEOWNERS; update pyipma to 2.0.1
* minor changes as suggested in PR
* make lint happy
* fix mocking coroutines
* restore old unique id
* fix station lat/lon; update pyipma version
* add hourly forecast option to IPMA
* add forecast tests
* use for instead of lambda
2020-02-14 12:04:41 -05:00
SukramJ
9eb0415234 Speed up tests of HomematicIP Cloud (#31810)
* Speed up tests of HomematicIP Cloud

* load the json once
2020-02-13 22:56:17 -08:00
Chris Talkington
f9fda7d616 update directv to directpy==0.6 (#31812) 2020-02-13 17:47:16 -08:00
jjlawren
408b41ea02 Add device registry support for Plex (#31797)
* Add device registry support for Plex

* Fix model

* Use Plex server as sensor device identifier
2020-02-13 16:37:52 -08:00
Vladimír Záhradník
f0b2d50e41 Fix swap of min and max default values in Modbus climate (#31801) 2020-02-13 16:34:42 -08:00
jjlawren
eb3097506f Add summary attribtue for currently playing media (#31803) 2020-02-13 16:34:12 -08:00
HomeAssistant Azure
32bc94bdd6 [ci skip] Translation update 2020-02-14 00:31:49 +00:00
SukramJ
2f3ab15268 Remove force from async_schedule_update_ha_state for HMIPC (#31796)
* remove force from async_schedule_update_ha_state if HMIPC

* Fix lint
2020-02-13 16:24:43 -08:00
Paulus Schoutsen
ebeab7f44c Update codecov.yml 2020-02-13 16:15:46 -08:00
jjlawren
59932545ab Update Plex connection class to push (#31806) 2020-02-13 16:45:48 -07:00
Robbie Trencheny
f6341ed3de Add Home Assistant Companion to manifest.json so we can sugges… (#31808) 2020-02-13 15:44:45 -08:00
Ville Skyttä
3018e8ff47 Use time.monotonic instead of time.time where appropriate (#31780) 2020-02-13 22:57:07 +01:00
Paulus Schoutsen
fbbb29a6ec Catch unexpected exceptions when validating config (#31795) 2020-02-13 22:43:07 +01:00
Robert Svensson
6211a2bb98 Add multi select support to config validation and to custom serializer (#31798) 2020-02-13 13:12:09 -08:00
MrDadoo
fdfe88566b Update onewire component (#31419)
* Added some measurement points for Family 26.
Added three attriubtes for each sensor, DEVICE_FILE, RAW_VALUE and SENSOR_TYPE
Added some comments.
Updated to get config values for owserver to get owport and owhost.

* Changed to _LOGGER.debug in some places

Resorted includes

* Fixup of code to reflect review comment, comply to Black and pass tests

* Added unique_id Entity property with device file id and added device_file as attribute that takes its data from Entities unique_id-.

* Missing blank line identified by fake8 and black

* Changed to let device_state_attributes return attribute device_file from the self._device_file member variable of the entity.

* Changed from info to debug logging
2020-02-13 21:56:20 +01:00
Aaron Bach
f091e0412f Add support for real-time data from SimpliSafe (#31424)
* Add support for real-time data from SimpliSafe

* Updated requirements

* Linting

* Ensure dispatcher topic contains the domain

* Don't bother with a partial

* Websovket dataclass and other code review

* Ensure initial_event_to_use works with error

* Don't inline methods

* Don't abuse loop variable

* Simplify initial event retrieval

* Add connection lost and restored events

* Revert "Add connection lost and restored events"

This reverts commit e7ffe05938.

* Make _on_disconnect a static method

* Code review comments

* Allow entities to opt out of REST and/or websocket API updates

* Revert "Allow entities to opt out of REST and/or websocket API updates"

This reverts commit 1989f2e00e.

* Code review comments

* Fix issues with events not triggering correct entities

* Bug fixes
2020-02-13 11:30:38 -08:00
Paulus Schoutsen
9e7185c676 Write state if schedule update state from async context (#31758)
* Write state if schedule update state from async context

* Fix most tests

* Fix test and PS4 I/O in event loop

* Fix ps4 better
2020-02-13 10:22:06 -08:00
Franck Nijhof
8d1f8055dd Fix spelling of NETGEAR and CalDAV in manifests (#31790) 2020-02-13 19:20:26 +01:00
Ville Skyttä
3e23a3a860 Add and use bunch of data size and rate related constants (#31781)
Also fix a few units to match the corresponding data.
2020-02-13 08:52:57 -08:00
Franck Nijhof
0173c61fee Spelling: Config(uration) (#31782) 2020-02-13 08:27:00 -08:00
Jens Østergaard Nielsen
8356ea2616 Update to version 2.6 of ihcsdk (#31789)
* Make the set_runtime_value_int function work with template values

* Use newest version of the ihcsdk library

* Make the set_runtime_value_int function work with template values

* Use newest version of the ihcsdk library

* Updated to the newest ihcsdk 2.5.0

* Formatted changes to make it pass CI tests

* Update to version 2.6 of ihcsdk
2020-02-13 16:12:02 +01:00
Franck Nijhof
d66123cc37 Fix spelling of ASUSWRT in manifest (#31764)
* Fix spelling of ASUSWRT in manifest

* Update homeassistant/components/asuswrt/__init__.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-02-13 14:24:15 +01:00
HomeAssistant Azure
40e866a5bb [ci skip] Translation update 2020-02-13 00:31:46 +00:00
Paulus Schoutsen
52b16bf5aa Rename codecov so it will be picked up (#31775) 2020-02-12 16:16:47 -08:00
Robert Svensson
4cac0443e2 UniFi - Change handling of updated options (#31762)
* Change handling of updated options

* Add tests
2020-02-12 16:15:08 -08:00
Quentame
e0a035ce35 Implement PlatformNotReady to Linky + fix TypeError (#31768) 2020-02-12 16:12:35 -08:00
Franck Nijhof
be388a4797 Fix spelling of AVM FRITZ!Box in manifest (#31765) 2020-02-12 16:12:11 -08:00
Franck Nijhof
aa97be71a8 Fix spelling of apcupsd in manifest (#31770) 2020-02-12 15:36:15 -08:00
Franck Nijhof
78783555ea Fix spelling of VIVOTEK (#31773)
* Fix spelling of VIVOTEK in manifest

* Also adjust default name of camera to match the brand name
2020-02-12 15:36:04 -08:00
J. Nick Koston
6879105b14 Cleanup August activity processing and add tests (#31774)
* Update py-august to 0.12.0

* Upstream update also resolves issue #28960
2020-02-12 15:35:07 -08:00
Bram Kragten
834acd85d3 Updated frontend to 20200212.0 (#31772) 2020-02-12 14:54:33 -08:00
Bram Kragten
56316b1f6e Updated frontend to 20200130.3 (#31771) 2020-02-12 14:53:26 -08:00
Alexei Chetroi
52fe1328f6 ZHA tests refactoring (#31744)
* Refactor ZHA fixtures.
Patch Zigpy radio libs instead of ZHA when setting up fixtures.
Use new fixtures for binary_sensor.zha platform.

* Update ZHA api tests.
* Update ZHA channels and discovery tests.
* Update ZHA cover tests.
* Update device action/trigger tests.
* Update device_tracker.zha platform tests.
* Update fan.zha platform tests.
* Update ZHA gateway tests.
* Update lock.zha platform tests.
* Update switch.zha platform tests.
* Update sensor.zha platform tests.
* Update light.zha platform tests.
* Use MockConfigEntry.
* Address PR comments.
2020-02-12 16:12:14 -05:00
Daniel Shokouhi
43256ebd83 Add device name to sensor name for mobile_app (#31756)
* Add device name to sensor name

* Update test to include device name
2020-02-12 11:40:39 -08:00
Paulus Schoutsen
3b3e062a35 Whitelist shopping list updated event (#31742)
* Whitelist shopping list updated event

* Add ignore to hassfest
2020-02-12 10:13:07 -08:00
SukramJ
c0756948da Fix smoke detection for HomematicIP Cloud (#31753) 2020-02-12 10:12:26 -08:00
Emanuel Winblad
3e05fc1c11 Add initial version of Vilfo Router integration (#31177)
* Initial implementation of Vilfo router integration.

This commit is a combination of several commits, with commit messages in bullet form below.

* Added additional files to Vilfo integration.
* Added generated files.
* Fixed alphabetic order in generated config_flows.
* Continued implementation of config flow for Vilfo integration.
* Continued work on config_flow for Vilfo.
* Updated requirements in manifest for Vilfo Router integration.
* Some strings added to Vilfo Router integration.
* Vilfo Router integration updated with sensor support.
* Code style cleanup.
* Additional cleanup of config flow.
* Added additional UI strings for Vilfo Router
* Updated tests of config flow and fixed formatting
* Updated requirement upon vilfo-api-client.
* Sensor refactoring including support for icons
* Code style changes for Vilfo Router integration
* Code cleanup
* Fixed linting issues in Vilfo Router integration
* Fixed import order in test for Vilfo integration.

* Updates to Vilfo Router integration based on feedback

Based on the feedback received, updates have been made to the Vilfo Router integration.

A couple of the points mentioned have not been addressed yet, since the appropriate action has not yet been determined. These are:

* https://github.com/home-assistant/home-assistant/pull/31177#discussion_r371124477
* https://github.com/home-assistant/home-assistant/pull/31177#discussion_r371202896

This commit consists of:

    * Removed unused folder/submodule
    * Fixes to __init__
    * Fixes to config_flow
    * Fixes to const
    * Refactored sensors and applied fixes
    * Fix issue with wrong exception type in config flow
    * Updated tests for Vilfo integration config_flow
    * Updated dependency upon vilfo-api-client to improve testability
    * Import order fixes in test
    * Use constants instead of strings in tests

* Updated the VilfoRouterData class to only use the hostname as unique_id when it is the default one (admin.vilfo.com).

* Refactored based on feedback during review.

* Changes to constant names,
* Blocking IO separated to executor job,
* Data for uptime sensor changed from being computed to being a timestamp,
* Started refactoring uptime sensor in terms of naming and unit.
* Updated constants for boot time (previously uptime) sensor.
* Refactored test of Vilfo config flow to avoid patching code under test.
* UI naming fixes and better exception handling.

* Removed unused exception class.

* Various changes to Vilfo Router integration.

* Removed unit of measurement for boot time sensor,
* Added support for a sensor not having a unit,
* Updated the config_flow to handle when the integration is already configured,
* Updated tests to avoid mocking the code under test and also to cover the aforementioned changes.

* Exception handling in Vilfo Router config flow refactored to be more readable.

* Refactored constant usage, fixed sensor availability and fix API client library doing I/O in async context.

* Updated signature with hass first

* Update call to constructor with changed order of arguments
2020-02-12 19:11:15 +01:00
jjlawren
1b2f4fa19f Improve Plex media_player entity naming (#31755) 2020-02-12 09:55:18 -08:00
Bas Nijholt
8498ca37cd Fix moving average test for discrete derivative sensor (#31750)
* fix test_data_moving_average_for_discrete_sensor

After https://github.com/home-assistant/home-assistant/pull/31717 the test
didn't actually test anything anymore.

This fixes that.

* make the test faster
2020-02-12 09:53:06 -08:00
Vladimír Záhradník
378c432f6d Add availability status to Modbus entities and improve error handling (#31073) 2020-02-12 09:37:16 -08:00
Franck Nijhof
06f06427b6 Fix spelling of ecobee in manifest (#31751) 2020-02-12 10:29:06 -05:00
Paulus Schoutsen
cde414e1df Use set for dependency lookup in hassfest (#31746) 2020-02-12 12:59:59 +01:00
Robbie Trencheny
0700d38d1f Add new webhook action to allow enabling encryption in an exis… (#31743)
* Add new webhook action to allow enabling encryption in an existing registration

* Harden tests

* Make requested fixes
2020-02-11 23:56:22 -08:00
J. Nick Koston
f5be9ef7fb Refresh the august access token when needed (#31735)
* Refresh the august access token
when needed.

Currently august will stop working when the token
expires about every six month.

This resolves issue #23788

* Make refresh_access_token_if_needed private since we do not want additional callers

* Add init
2020-02-11 22:13:54 -08:00
cgtobi
891f13eefe Fix missing device class in netatmo binary sensors (#31693)
* Bring back device class

* Add door tag sensors types

* Actually discover individual tags per camera
2020-02-11 18:02:13 -08:00
Ville Skyttä
d1b0ab736d Improve Huawei LTE timeouting/stalling request behavior (#31710)
* Suppress data get timeout exceptions for 30s after notify attempts

At least SMS send failures may put the API in a state where it times out
some (but not all) data get operations for some time, e.g. 25s.

Closes https://github.com/home-assistant/home-assistant/issues/30827

* Do not pile up duplicate data requests

Do not add another request for a piece of data for which a previous
request is still in progress. For example failing SMS sends are known to
stall some (but not all) requests for some time, and firing up more is
not going to help.
2020-02-11 17:54:19 -08:00
J. Nick Koston
54eb740ff6 Read door open/close events from the activity log. (#31732)
As polling for lock status is every 15 minutes,
we read lock and unlock events from the activity log.

An upstream update of py-august was needed to
expose the door open and close events.

Door open and close events are now seen within
a few seconds instead of delayed 15+ minutes.
2020-02-11 17:43:56 -08:00
Diogo Gomes
787edf9417 pyipma version bump (#31739) 2020-02-11 17:37:48 -08:00
HomeAssistant Azure
9e233070a0 [ci skip] Translation update 2020-02-12 00:31:49 +00:00
Vladimír Záhradník
378bd8438b Update Modbus service manifest (#31727) 2020-02-11 22:11:02 +01:00
Massimiliano Cannarozzo
15ed086ed2 Fix set volume level (#31731)
afsapi requires an `int` in the 0-20 range but we receive a `float` in the 0.0-1.0 range so we have to cast and offset it
2020-02-11 22:10:33 +01:00
Kit Klein
3435281bd1 Support Konnected Pro alarm panel, embrace async, leverage latest HA features/architecture (#30894)
* fix unique_id computation for switches

* update konnected component to use async, config entries, registries. Pro board support and tests

* clean up formatting comments from PR

* use standard interfaces in tests

* migrate config flow to use options

* address latest pr feedback

* format for import as part of config schema validation

* address pr feedback

* lint fix

* simplify check based on pr feedback

* clarify default schema validation

* fix other schema checks

* fix translations

Co-authored-by: Nate Clark <nate@nateclark.com>
2020-02-11 22:04:42 +01:00
Paulus Schoutsen
51c35ab9a8 Entity Registry to store and restore name/icon (#31714)
* Entity Registry to store and restore name/icon

* Update test_entity_registry.py

* Add original name/icon to JSON result
2020-02-11 09:40:50 -08:00
J. Nick Koston
ecd7ec385d Significantly reduce the number of API calls that the august integration (#31685)
* Significantly reduce the number of API calls that the august integration
makes.

The poll interval for the lock status API is now 15 minutes
instead of every 10 seconds because we can use the activity
API to see changes in lock state.  The interval for the
activity API is 10 seconds which allows for the same
frequency of state monitoring without all the additional API calls.
With four locks, this change results in an ~80% reduction in the number
of API calls.

The result of the lock and unlock APIs now update the lock state instead
of waiting for the next poll.  This change also has the added benefit of
making the UI appear far more responsive.

* Convert to using UTC times
2020-02-11 17:57:26 +01:00
Paulus Schoutsen
81b159f424 Disable Hue groups for new setups (#31713) 2020-02-11 08:50:07 -08:00
Victor Vostrikov
3df2cb6b78 Add support of multiple Tado accounts (#31527)
* Added support of multiple Tado accounts
Changed geberation of sensor unique id (breaking change)

* Fixed lints

* Fixed error detecting opened window

* Changed gereration of unique id of climate

* Removed commented code and added comments
2020-02-11 08:46:02 -08:00
Paulus Schoutsen
8a6158116a Fix person reload service (#31716) 2020-02-11 09:07:46 +01:00
Paulus Schoutsen
6fcf5472a5 Limit derivative test (#31717) 2020-02-11 09:03:52 +01:00
Paulus Schoutsen
5a0f21cbe3 Adjust entity slow warning for custom component (#31711) 2020-02-10 16:32:47 -08:00
HomeAssistant Azure
2db6246244 [ci skip] Translation update 2020-02-11 00:31:53 +00:00
Paulus Schoutsen
fb6fb42f85 Merge pull request #31712 from home-assistant/rc
0.105.3
2020-02-10 15:49:08 -08:00
Rami Mosleh
c66106ee98 Add Glances sensors dynamically (#28639)
* Add temp_sensors to glances dynamically

* unsub from updates when sensor is disabled

* dynamicall add sensors

* change "device_name" to "mnt_point"

* remove unnecessary logging

* update sensor.py

* update test_config_flow.py

* remove commented code
2020-02-10 15:02:14 -08:00
SoftXperience
d55846c33a Use latest version of python-pushover (forked) to fix issue with diff… (#31647)
* Use latest version of python-pushover (forked) to fix issue with different API tokens. (https://community.home-assistant.io/t/different-applications-in-pushover/6985)

* Rewrite pushover notify to use pushover_complete library

* Remove possibility to attach urls to notifications

* Fix comment
2020-02-10 14:55:17 -08:00
Raman Gupta
284fd46ea8 For vizio integration, set unique ID early to prevent multiple zeroconf discovery items for the same device to appear (#31686)
* set unique ID early to prevent multiple zeroconf discovery items for the same device to appear

* add test
2020-02-10 14:54:52 -08:00
Paulus Schoutsen
992484fbe6 Bumped version to 0.105.3 2020-02-10 14:45:44 -08:00
cgtobi
834b0e6cf0 Fix wrong error message in netatmo integration (#31690) 2020-02-10 14:45:34 -08:00
Daniel Høyer Iversen
925fa25ac7 Fix hvac_action for mill (#31630) 2020-02-10 14:45:33 -08:00
Alexei Chetroi
fb6eedb4c2 Bump ZHA dependencies. (#31619)
Bump up zigpy-homeassistant==0.13.2
2020-02-10 14:44:25 -08:00
Ron Klinkien
881c501cef Catch garmin_connect keyerrors with unknown entity type updates (#31608)
* Catch keyerrors with unknown entity type updates

* Change debug level and removed . from log call
2020-02-10 14:44:24 -08:00
MatthewFlamm
4212fd8999 update pynws to 0.10.4 (#31591) 2020-02-10 14:44:23 -08:00
Rami Mosleh
b3aacfeb90 Fix librouteros response error handling (#31588) 2020-02-10 14:44:23 -08:00
Franck Nijhof
8da948e909 Bump adguardhome to 0.4.1 (#31565) 2020-02-10 14:44:22 -08:00
J. Nick Koston
a02bb893ef Resolve August integration makes too many requests and hits rate limits (#31558) 2020-02-10 14:44:21 -08:00
Alexei Chetroi
cc5377747f Bump ZHA dependencies. (#31555) 2020-02-10 14:44:21 -08:00
Eduard van Valkenburg
454e63b69e Fix Evohome checking override duration (#31697) 2020-02-10 14:43:39 -08:00
Vladimír Záhradník
94da129ef8 Extend Modbus binary sensor to support discrete inputs (#30004)
* Extend Modbus binary sensor to support discrete inputs

* Add backward compatibility for Modbus binary sensor
2020-02-10 13:56:39 -08:00
Ziv
4467409e5c Dynalite Integration (#27841)
* Initial commit

* ran hassfest and gen_requirements_all scripts

* fixes per request from Paulus Schoutsen

* ran gen_requirements_all

* updated library version - removed some debug leftover

* get_requirements again...

* added documentation URL

* ran isort

* changed storage in hass.data[DOMAIN] to use entry_id instead of host

* adopted unit tests to latest fix

* Update const.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-10 13:16:04 -08:00
Vilppu Vuorinen
b78d156f0e Add MELCloud integration (#30712)
* Add MELCloud integration

* Provides a climate and sensor platforms. Multiple platforms on one go
is not the best option, but it does not make sense to remove them and
commit them later either.

* Email and access token are stored to the ConfigEntry. The token can be
updated by adding the integration again with the same email address. The
config flow is aborted and the update is performed on the background.

* Run isort

* Fix pylint errors

* Run black

* Increase coverage

* Update pymelcloud dependency

* Add HVAC_MODE_OFF emulation

* Remove print

* Update pymelcloud to enable device type filtering

* Collapse except blocks and chain ClientNotReadys

* Add preliminary documentation URL

* Use list comp for creating model info

Filters out empty model names form units.

* f-string galore

Dropped 'HVAC' from AtaDevice name template.

* Delegate fan mode mapping to pymelcloud

* Fix type annotation

* Access AtaDevice through self._device

* Prefer list comprehension

* Update pymelcloud to leverage device type grouping

The updated backend lib returns devices in a dict grouped by the device
type. The devices do not necessarily need to be in a single list and
this way isinstance is not required to extract devices by type.

* Remove DOMAIN presence check

This does not seem to make much sense after all.

* Fix async_setup_entry

Entry setup used half-baked naming from few experimentations back.
The naming conventiens were unified to match the platforms.

A redundant noneness check was also removed after evaluating the
possible return values from the backend lib.

* Simplify empty model name check

* Improve config validation

* Use config_validation strings.

* Add CONF_EMAIL to config schema. The value is not strictly required
when configuring through configuration.yaml, but having it there makes
things more consistent.

* Use dict[key] to access required properties.

* Add DOMAIN in config check back to async_setup. This is required if an
integration is configured throught config_flow.

* Remove unused manifest properties

* Remove redundant ClimateDevice property override

* Add __init__.py to coverage exclusion

* Use CONF_USERNAME instead of CONF_EMAIL

* Use asyncio.gather instead of asyncio.wait

* Misc fixes

* any -> Any

* Better names for dict iterations

* Proper dict access with mandatory/known keys

* Remove unused 'name' argument

* Remove unnecessary platform info from unique_ids

* Remove redundant methods from climate platform

* Remove redundant default value from dict get

* Update ConfigFlow sub-classing

* Define sensors in a dict instead of a list

* Use _abort_if_unique_id_configured to update token

* Fix them tests

* Remove current state guards

* Fix that gather call

* Implement sensor definitions without str manipulation

* Use relative intra-package imports

* Update homeassistant/components/melcloud/config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-02-10 22:09:12 +01:00
Hans Oischinger
7e0560c7dc Vicare water_heater set_temperature fix and bump PyVicare to 0.1.7 (#31672)
* Fix ViCare water_heater set_temperature

This fixes a obvious but undiscovered bug in the water heater component:
Instead of the commanded value the prvious value was set on the API

* Bump PyVicare to 0.1.7
2020-02-10 21:23:02 +01:00
Maikel Punie
5a7e0b84ff Bump velbus version + load velbus module names into device info (#31664) 2020-02-10 21:22:09 +01:00
Quentame
9e41ee49cb Fix Météo-France I/O while testing (#31695)
* Fix Météo-France I/O while testing

* Review
2020-02-10 17:00:22 +01:00
cgtobi
7d0b50cadb Fix wrong error message in netatmo integration (#31690) 2020-02-10 12:33:07 +01:00
Paulus Schoutsen
5092971452 Add brightness light device actions (#31567) 2020-02-09 19:47:59 -08:00
Paulus Schoutsen
12de3f1e47 Clean up frontend services and events (#31654)
* Clean up frontend services and events

* Fix bug in core instead

* Add test that core works correctly with callback marked async funcs
2020-02-09 19:47:16 -08:00
Alexei Chetroi
28eeed1db3 ZHA tests refactoring (#31682)
* Fixtures for restoring/joning a device.

* binary_sensor.zha tests.

* cover.zha platform tests.

* device_tracker.zha platform tests.

* fan.zha platform tests.

* switch.zha platform tests.

* Update light.zha platform tests.

* Update sensor.zha platform tests.

* ZHA api tests refactoring.

* Update lock.zha platform tests.

* Update ZHA gateway tests.

* Update zha device action tests.

* Update zha device trigger tests.

* Cleanup.
2020-02-09 21:45:35 -05:00
HomeAssistant Azure
118ba10442 [ci skip] Translation update 2020-02-10 00:31:37 +00:00
Balazs Sandor
41f3fb291a Add ZHA Texas Instruments CC device support (#31621) 2020-02-09 12:13:22 -05:00
Ben
fb2e120563 Sure Petcare new features various improvements (#31437)
* add typing

* 100% battery_level is enough

* human-friendly datetime

* better enum usage

* add online and learning mode attrs

* use max two decimals in attrs

* use legacy style debug logging

* remove str usage of enums

* add feeder

* add feeder and adapt to new surepy version

* use ProductID instead of ThingID

* various changes and improvements

* add connectivity sensors for all devices & proper support for multiple hubs

* remove "side effects"/exception catching in attribs

* correct unique ids, reorder classes

* move Flap class from binary_sensor to sensor and add a sensore base class

* comments cleanup, minor typing and logging fixes

* remove commented code

* remove commented code

* add typing

* 100% battery_level is enough

* human-friendly datetime

* better enum usage

* add online and learning mode attrs

* use max two decimals in attrs

* use legacy style debug logging

* remove str usage of enums

* add feeder

* add feeder and adapt to new surepy version

* use ProductID instead of ThingID

* various changes and improvements

* add connectivity sensors for all devices & proper support for multiple hubs

* remove "side effects"/exception catching in attribs

* correct unique ids, reorder classes

* move Flap class from binary_sensor to sensor and add a sensore base class

* comments cleanup, minor typing and logging fixes

* remove commented code

* remove commented code

* fix spelling in comment to make the CI happy (seriously?!)

* fix manifest file

* fix requirements_all.txt file

* add missing docstrings

* fix available property

* remove typing from self

* remove commented code

* remove is_on property from sensor

* jump to new surepy version

* remove useles init methods
2020-02-09 17:46:00 +01:00
Jonathan Østrup
150b376cf9 Add recorder vars db_max_retries and db_retry_wait (#31561)
* added recorder vars db_max_retries and db_retry_wait

* fixed test_recorder_setup_failure

I failed because it was missing the two new variables. I simply added these with default values.

* fixed syntax error in test_recorder_setup_failure

* fixed formatting error in test_init_py for recorder component

* fixed typo in test case

* Updated the way the default keys for db_,max_wait and db_retry_wait is set

Implemented based on suggestions from @springstan

* Updated config_schema call to adhere to Black

* changed conf.get to conf[dict] for var retrieval

* removed 2 blank lines
2020-02-09 17:43:09 +01:00
crallian
645c673720 Added zone type Technical as power. (#31611)
*The zone type technical can be used in SPC to track status of e.g. mapping keys and outputs.
2020-02-09 17:41:43 +01:00
Paulus Schoutsen
da0ddc84ab Guard writing automation/scene/script config (#31568) 2020-02-08 17:26:58 -08:00
Josh Anderson
9987978d1a Add unique ID to edimax switches (#27984)
* Add unique ID and device info data

* Don't get power info on switch models lacking it

* Move info fetching to update, update before adding

* Upgrade pyedimax to get device info

* Remove device info

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-08 16:45:28 -08:00
HomeAssistant Azure
a2bea2cab8 [ci skip] Translation update 2020-02-09 00:31:39 +00:00
Bruno Furtado
9f58e5d6ea Only auth on enter_learning in response to errors for broadlink (#27341)
* Only auth on enter_learning in response to errors.

* Remove extra newline.

* Add missing break on successful attempt.

* Avoid logging success message when auth is unsuccessful.
2020-02-08 16:17:40 -08:00
Tom Harris
e3894d212c Bump insteonplm to 0.16.7 (#31645) 2020-02-08 22:34:22 +01:00
Paulus Schoutsen
989dd32258 Hue to retry if hub errors out (#31616)
* Respect semaphore

* Add retries when connection reset

* Also catch OSError from aiohttp when authenticating
2020-02-08 13:20:37 -08:00
J. Nick Koston
0dd151c1c3 Resolve August integration makes too many requests and hits rate limits (#31558) 2020-02-08 20:22:48 +01:00
Paulus Schoutsen
ca1319e1ef Device tracker entities based on GPS should always publish updates (#31551) 2020-02-08 19:56:48 +01:00
Ron Klinkien
1093e25a30 Catch garmin_connect keyerrors with unknown entity type updates (#31608)
* Catch keyerrors with unknown entity type updates

* Change debug level and removed . from log call
2020-02-08 18:47:54 +01:00
shred86
14e0dde055 Add Abode water valve support (#30635) 2020-02-08 16:58:07 +01:00
CHAZICLE
967b02073e Remove stray debug from unifi integration (#31634) 2020-02-08 16:07:17 +01:00
Daniel Høyer Iversen
6037f7364f Fix hvac_action for mill (#31630) 2020-02-08 16:00:20 +01:00
Yarmo Mackenbach
658c48b237 Handle missing next train from NS (#31626)
* Handle missing next train

* Ignore next attribute instead
2020-02-08 15:52:05 +01:00
springstan
83a79a434c Use slug in ping device tracker config validation (#31329)
* Use slug instead of string for config validation
2020-02-08 15:19:46 +01:00
melyux
ed3e16123e Actually enable alarmdecoder to see open/close state of bypassed RF zones when armed (#31426) 2020-02-08 14:32:52 +01:00
Oliver
a5b4f43ea5 Bump denonavr to 0.7.12 (#31629) 2020-02-08 13:46:13 +01:00
Paulus Schoutsen
111050bea9 Clean up core services (#31509)
* Clean up core services

* Fix conversation test
2020-02-08 13:10:59 +01:00
Alexei Chetroi
57ab30d534 Bump ZHA dependencies. (#31619)
Bump up zigpy-homeassistant==0.13.2
2020-02-08 06:50:50 -05:00
escoand
0823ee4385 Fix exceptions when using newer Samsung TVs (#31602)
* try to fix websocket problems

* use tuple

* catch websocket exceptions

* typo
2020-02-08 12:03:35 +01:00
SukramJ
baa9184b33 Extract services from init.py for HomematicIP Cloud (#31376)
* Extract services from init.py for HomematicIP Cloud

* add ServiceCallType
2020-02-08 10:07:20 +01:00
elmurato
699d6ad658 Add Minecraft Server Integration (#30992)
* Add Minecraft Server integration

* Add unit test for config flow

* Fixed some review findings and increased unit test coverage

* Fixed docstrings of new test cases

* Removed unnecessary debug log messages

* Added unique IDs and device infos and removed duplicate name validation

* Attempt to fix unit test on CI

* Return state OFF instead of UNAVAILABLE in case connection to server drops

* Added property decorator to server properties, even less debug messages, improved sensor dispatcher connection and other review findings fixed

* Moved special property handling to sensors, fixed name confusion in sensor entity, switch to HA const for scan_interval, simplified building players list string

* Improved periodic update, speeded up unit tests

* Added type hints, added callback decorator to entity update callback, added const.py to unit test exclusions

* Changed state sensor to binary sensor, removed empty unit test file, added constants for icons and units

* Let HA handle unknown state, check for None in description and players list sensor

* Removed periods at end of log messages, removed constant for default host

* Updated requirements_test_pre_commit.txt, fixed codespell findings

* Use localhost as default host

* Removed passing hass to entities, moved log message from init, moved host lower to vol, use proper patch library, patch library instead of own code

* Replaced server properties with global instance attributes, removed config option scan_interval, switch back to async_track_time_interval

* Removed description and players list sensors, added players list as state attributes to online players sensor, raise OSError instead of deprecated IOError, other minor review findings fixed

* Use MAC address for unique_id in case of an IP address as host, added getmac to manifest.json, added invalid_ip to strings.json, added new test cases for changes in config_flow, replace all IOError's with OSError, other review findings fixed

* Removed double assignment

* Call get_mac_address async safe

* Handle unavailable and unknown states to reach silver quality scale, added quality scale to manifest.json
2020-02-08 09:28:35 +01:00
HomeAssistant Azure
5483de7e25 [ci skip] Translation update 2020-02-08 00:31:45 +00:00
MatthewFlamm
f9e037a823 update pynws to 0.10.4 (#31591) 2020-02-07 09:16:56 -05:00
Rami Mosleh
c0eb399d54 Fix librouteros response error handling (#31588) 2020-02-07 14:03:32 +01:00
Eugenio Panadero
37205f9f61 Unregister listener for stats sensor with max_age (#31580) 2020-02-07 11:06:46 +01:00
HomeAssistant Azure
274cf23269 [ci skip] Translation update 2020-02-07 00:31:50 +00:00
Franck Nijhof
d093b5f5e8 Bump adguardhome to 0.4.1 (#31565) 2020-02-06 16:02:00 -08:00
jjlawren
3a3328dc13 Skip updates when Plex client viewing photos (#31556) 2020-02-06 14:26:34 -08:00
Alexei Chetroi
0e68ace3dd Bump ZHA dependencies. (#31555) 2020-02-06 16:34:28 -05:00
Phil Bruckner
d1e7ade6db Make amcrest integration more robust (#30843)
- Bump amcrest package to 1.5.6. Includes networking improvements, no longer
  communicates during Http.__init__(), and allows running snapshot command
  without using stream mode.
- Handle login errors better, and not just at startup.
- Increase network connect & read timeout to 6.05 seconds.
- Increase network read timeout to 20 seconds for snapshot command.
- Run snapshot command in separate task, that cannot be cancelled, to eliminate
  possibility of two snapshot commands running simultaneously (since
  AmcrestCam.async_camera_image can be cancelled.) Also makes sure any exceptions
  from the command are caught properly.
2020-02-06 14:44:48 -06:00
Paulus Schoutsen
76d2658101 Merge pull request #31550 from home-assistant/rc
0.105.2
2020-02-06 11:54:23 -08:00
Paulus Schoutsen
8ab91eb6bb Update MQTT service description 2020-02-06 11:39:55 -08:00
Paulus Schoutsen
9e87a662d5 Update MQTT service description 2020-02-06 11:39:44 -08:00
Paulus Schoutsen
4e5c74d293 Bumped version to 0.105.2 2020-02-06 11:08:26 -08:00
Paulus Schoutsen
d31eb9f352 Guard for reloading with no zone config (#31547) 2020-02-06 11:08:18 -08:00
Josh Bendavid
bb96584d6e update aiopylgtv to 0.3.3 (#31545) 2020-02-06 11:08:17 -08:00
Paulus Schoutsen
774f0f9b67 Deprecate old netatmo keys (#31544) 2020-02-06 11:08:16 -08:00
Ville Skyttä
64fc7103be Use min and m as units in Garmin Connect for consistency and correctness (#31543) 2020-02-06 11:08:16 -08:00
Franck Nijhof
080f9725dc Limit OAuth scopes for Netatmo and Home Assistant Cloud (#31538)
* Limit OAuth scopes for Netatmo and Home Assistant Cloud

* Fix tests by making order of scopes predictable
2020-02-06 11:08:15 -08:00
Quentame
bf1b78f621 Fix iCloud determine_interval: add default interval to max_interval (#31533) 2020-02-06 11:08:14 -08:00
Dougal Matthews
6b5cd74771 Only normalise Garmin connect data to minutes if the value is not None (#31526)
Otherwise this causes additional TypeError messages to be logged for
division of None.
2020-02-06 11:08:13 -08:00
Robert Chmielowiec
60c5ef5b34 Fix migrating huawei_lte entry without recipient (#31522) 2020-02-06 11:08:12 -08:00
Paulus Schoutsen
1e81d14822 Fix automation sun import (#31521) 2020-02-06 11:08:11 -08:00
Paulus Schoutsen
00c6f3cb85 Guard for reloading with no zone config (#31547) 2020-02-06 10:55:12 -08:00
Ville Skyttä
08a74ff686 Use min and m as units in Garmin Connect for consistency and correctness (#31543) 2020-02-06 10:54:01 -08:00
Josh Bendavid
eee1ca9211 update aiopylgtv to 0.3.3 (#31545) 2020-02-06 10:00:54 -08:00
Paulus Schoutsen
0d474e1183 Update the update coordinator API to make it easier to use (#31471)
* Update the update coordinator API to make it easier to use

* failed_last_update -> last_update_success
2020-02-06 09:29:29 -08:00
Paulus Schoutsen
d407b8e215 Deprecate old netatmo keys (#31544) 2020-02-06 09:26:51 -08:00
Quentame
9e4904cb21 Fix iCloud determine_interval: add default interval to max_interval (#31533) 2020-02-06 08:53:42 -08:00
Dougal Matthews
24c382d689 Only normalise Garmin connect data to minutes if the value is not None (#31526)
Otherwise this causes additional TypeError messages to be logged for
division of None.
2020-02-06 08:52:46 -08:00
Franck Nijhof
7233048fea Limit OAuth scopes for Netatmo and Home Assistant Cloud (#31538)
* Limit OAuth scopes for Netatmo and Home Assistant Cloud

* Fix tests by making order of scopes predictable
2020-02-06 17:00:27 +01:00
Robert Chmielowiec
24e9a638d5 Fix migrating huawei_lte entry without recipient (#31522) 2020-02-06 16:53:16 +02:00
P-Verbrugge
d3e99f13dd Changed website name to blockchain.com (#31528)
The name and domain of blockchain.info has been changed to blockchain.com. Updated the names in de script.
2020-02-06 15:43:52 +01:00
P-Verbrugge
4f2195101c Updated the provider name to blockchain.com (#31534)
* Updated the provider name to blockchain.com

Blockchain.info moved from .info .com. Updated the name of the service to blockchain.com

* Updated the provider name to blockchain.com

Updated the provider name to blockchain.com
2020-02-06 15:41:48 +01:00
Paulus Schoutsen
44e243039c Fix automation sun import (#31521) 2020-02-06 12:55:11 +01:00
Franck Nijhof
1cfd69d484 Remove of liveboxplaytv integration (ADR0004) (#31525) 2020-02-06 12:54:46 +01:00
Paulus Schoutsen
a3b3924e21 Update link when IO in event loop (#31519) 2020-02-06 11:37:35 +01:00
Malte Franken
8d429d7676 Add GDACS feed integration (#31235)
* initial version of gdacs integration

* updated translations

* generated files

* added abbreviation

* bumped library version

* small feed entry attribute fixes

* add unit tests

* need to use original mdi name

* bumped library version

* improved entity name for earthquakes

* round vulnerability number

* typo

* support for categories

* testing support for categories

* tie longitude and latitude together

* validating categories

* simplifying setup

* passing domain as parameter

* simplified test setup

* moved test code

* simplified test code

* removed superfluous code

* changed approach to unique identifier

* changed code structure

* simplified unit system handling

* made schema a constant

* comment added

* simplifying code

* added message if location already configured

* removed unnecessary code

* simplified test code

* avoid mocking __init__

* pylint

* simplified code

* fetch categories from integration library

* setting PARALLEL_UPDATES

* setting PARALLEL_UPDATES to zero/unlimited

* added quality scale
2020-02-06 11:32:30 +01:00
Paulus Schoutsen
05b3c1f17d Merge remote-tracking branch 'origin/master' into dev 2020-02-05 16:42:47 -08:00
Paulus Schoutsen
8b4bd95fc5 Merge pull request #31510 from home-assistant/rc
0.105.1
2020-02-05 16:41:17 -08:00
HomeAssistant Azure
6f99bac557 [ci skip] Translation update 2020-02-06 00:31:53 +00:00
Paulus Schoutsen
6246382983 Bumped version to 0.105.1 2020-02-05 15:53:11 -08:00
Paulus Schoutsen
29f17956bf Update translations 2020-02-05 15:53:04 -08:00
Paulus Schoutsen
6e0e58f6cc Sonos services to work without admin access (#31506) 2020-02-05 15:52:15 -08:00
Paulus Schoutsen
46fb73ea76 Updated frontend to 20200130.2 (#31502) 2020-02-05 15:51:49 -08:00
Andrew
08b24afc2d Move program_mode check (#31501)
Don't try to capture program_mode unless ct80
2020-02-05 15:50:49 -08:00
Paulus Schoutsen
f7f8de41e2 Check for known Hue vulnerability (#31494) 2020-02-05 15:50:48 -08:00
Paulus Schoutsen
8d2086d076 Sonos services to work without admin access (#31506) 2020-02-05 15:50:20 -08:00
Paulus Schoutsen
41c55e695e Fix typo in comment 2020-02-05 14:45:14 -08:00
Andrew
c9be201ee2 Move program_mode check (#31501)
Don't try to capture program_mode unless ct80
2020-02-05 14:44:44 -08:00
Paulus Schoutsen
ba9892e1f1 Updated frontend to 20200130.2 (#31502) 2020-02-05 14:41:01 -08:00
Paulus Schoutsen
481ea0aa5b Check for known Hue vulnerability (#31494) 2020-02-05 13:57:17 -08:00
dupondje
557f5763df Add belgian meter and rename some dsmr sensors (#30121)
* Add support for belgian meter and rename some sensors

* DSMR Fixes

* Add test

* More tests

* Adjust test to latest dev

* Remove unused code

* Depend on dsmr_parser 0.18
2020-02-05 22:14:03 +01:00
Franck Nijhof
cb2a9dfebf Merge branch 'master' into dev 2020-02-05 20:33:06 +01:00
Franck Nijhof
b2cd6707b6 0.105.0 (#31489)
0.105.0
2020-02-05 20:02:36 +01:00
Paulus Schoutsen
6a4d9d3a73 Fix Google API key test (#31492) 2020-02-05 18:57:43 +01:00
Paulus Schoutsen
472fe7a0fa Fix Google API key test (#31492) 2020-02-05 09:50:00 -08:00
Paulus Schoutsen
1ee1a43fb9 Remove tests for deprecated key (#31491) 2020-02-05 18:02:53 +01:00
Paulus Schoutsen
0f56fc75b3 Bump version to 0.106.0dev0 2020-02-05 09:00:54 -08:00
Paulus Schoutsen
84cbcb4d16 Remove tests for deprecated key (#31491) 2020-02-05 09:00:20 -08:00
Franck Nijhof
f1d5fcac75 Bumped version to 0.105.0 2020-02-05 17:01:57 +01:00
Franck Nijhof
97250d8225 Re-branding of Hass.io panel to Supervisor (#31480) 2020-02-05 16:59:29 +01:00
Paulus Schoutsen
8b6b8f1994 Automation device/entity extraction to include triggers + conditions (#31474)
* Add support for extracting triggers

* Add support for extracting triggers

* Fix test
2020-02-05 16:59:24 +01:00
Quentame
2d393b8f8b Fix iCloud device battery level can be None (#31468) 2020-02-05 16:59:19 +01:00
Paulus Schoutsen
6d79898926 Fix coordinator reference (#31467) 2020-02-05 16:59:14 +01:00
Raman Gupta
2509518950 Update vizio host check to handle entries that don't have port (#31463)
* Update vizio host check to handle entries that don't have port

* add comment explaining no_port test for future

* remove _name_is_same function and support user updating name in config

* Update strings.json

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-05 16:59:07 +01:00
Paulus Schoutsen
67680bcfa8 Automation device/entity extraction to include triggers + conditions (#31474)
* Add support for extracting triggers

* Add support for extracting triggers

* Fix test
2020-02-05 16:52:21 +01:00
Franck Nijhof
431a3a6b44 Re-branding of Hass.io panel to Supervisor (#31480) 2020-02-05 11:04:17 +01:00
Robert Svensson
fce9697591 deCONZ - Revert from using disabled_by when setting options (#31446)
* Revert from using disabled_by when setting options

* Remove signalling for changed options

* Evaluate allow group option earlier when adding a group
2020-02-04 16:37:01 -08:00
HomeAssistant Azure
3801d5adf4 [ci skip] Translation update 2020-02-05 00:31:54 +00:00
Paulus Schoutsen
c85a7934ed Add brightness_step to light.turn_on (#31452)
* Clean up light turn on service

* Add brightness_step to turn_on schema

* Fix import

* Fix imports 2

* Fix RFLink test
2020-02-04 16:13:29 -08:00
Paulus Schoutsen
e970177eeb Use entity.async_request_call in service helper (#31454)
* Use entity.async_request_call in service helper

* Clean up semaphore handling

* Address comments

* Simplify call entity service helper

* Fix stupid rflink test
2020-02-04 15:30:15 -08:00
Quentame
2c439af165 Fix iCloud device battery level can be None (#31468) 2020-02-05 00:26:47 +01:00
Paulus Schoutsen
370e2ffa5a Fix coordinator reference (#31467) 2020-02-04 14:57:15 -08:00
Paulus Schoutsen
f41623ca64 Log warning when entities referenced in service call not found (#31427)
* Raise entities not found error

* Make it a warning, not an error

* Add support for MATCH_ENTITY_NONE

* Fix lint

* Fix tests
2020-02-04 14:42:07 -08:00
Quentame
201ea2557e Add config flow to Meteo-France (#29927)
* Add config flow to Meteo-France

* Review 1

* Use config_entry.unique_id

* Fix config_flow _show_setup_form + init

* Remove empty *_setup_platform()

* Avoid HomeAssistantError: Entity id already exists: sensor.[city_name]_[sensor_type]. Platform meteo_france does not generate unique IDs

- when multiple district in one city

* Review + abort when API error

* Fix I/O

* Remove monitored_conditions

* Add async_unload_entry

* Review 3

* Fix pipe

* alert_watcher is already None

* Review 4

* Better fix for "Entity id already exists"

* Whoops, fix tests

* Fix string
2020-02-04 22:37:59 +01:00
Raman Gupta
1efea50654 Update vizio host check to handle entries that don't have port (#31463)
* Update vizio host check to handle entries that don't have port

* add comment explaining no_port test for future

* remove _name_is_same function and support user updating name in config

* Update strings.json

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-04 11:31:03 -08:00
Paulus Schoutsen
d411ae2503 Bumped version to 0.105.0b7 2020-02-04 09:29:39 -08:00
Bram Kragten
e5b6fbf374 Updated frontend to 20200130.1 (#31460) 2020-02-04 09:29:21 -08:00
etheralm
af75a4bc85 Update libpurecool upstream library to latest version (#31457)
* Update upstream library to latest version

* update version in requirements_all.txt

* update version in requirements_all.txt
2020-02-04 09:27:04 -08:00
Bas Nijholt
10d5ce24f6 Keep track of the derivative for unit_time (#31397)
* keep track of the derivative for unit_time

In this way, you will get a better estimate of the derivate during
the timescale that is relavant to the sensor.

This solved a problem where sensors have a low output resolution.
For example a temperature sensor that can only be integer numbers.

It might report many values that are the same and then suddenly go up one value.
Only in that moment (with the current implementation) the derivative will be finite.

With my proposed implementation, this problem will not occur, because it takes the average
derivative of the last `unit_time`.

* only loop as much as needed

* treat the special case of 1 entry

* add option time_window

* use cv.time_period

* fix comment

* set time_window=0 by default

* rephrase comment

* use timedelta for time_window

* fix the "G" unit_prefix and add more prefixes

https://en.wikipedia.org/wiki/Unit_prefix

* add debugging lines

* simplify logic

* fix bug where the there was a division of unit_time instead of multiplication

* simplify tests

* add test_data_moving_average_for_discrete_sensor

* fix test_dataSet6

* improve readability of the tests

* better explain the test

* remove debugging log lines
2020-02-04 09:27:03 -08:00
quthla
1008ab20ba Fix theme color (#31366) 2020-02-04 09:27:02 -08:00
escoand
2f2146c989 Samsung TV refinements (#31248)
* use st not deviceType

* show model in flow title

* Update strings.json

* add re-auth to entity

* add re-auth to config_flow

* handle auth popup better

* use media player domain const

* fix tests

* rename not_found to not_successful

* authz not authn

* Update media_player.py

* Update config_flow.py

* Update media_player.py

* Update test_media_player.py

* finalize re-auth

* fix ssd tests

* better naming

* fix ip-address-mock serialization

* fix turn_on_action serialization

* add type of hass object

* fix acces denied test

* remove half-added typing

* async get ip address

* fix pylint
2020-02-04 09:27:01 -08:00
Yarmo Mackenbach
9bb8b2bc00 Update NSAPI to 3.0.2 (#30971)
* Bump NSAPI version to 3.0.1

* Compatibility with NSAPI 3.0.1 response

* Removed commented code

* Obsolete setups receive an upgrade notification

* Bump NS-API to 3.0.2

* Assign platform values directly

* Removed obsolete config warning

* Improved reference to obsolete password
2020-02-04 09:27:00 -08:00
etheralm
8af9585f12 Update libpurecool upstream library to latest version (#31457)
* Update upstream library to latest version

* update version in requirements_all.txt

* update version in requirements_all.txt
2020-02-04 08:23:08 -08:00
Bram Kragten
9097912469 Updated frontend to 20200130.1 (#31460) 2020-02-04 17:07:09 +01:00
Raman Gupta
151f60658c Bump pyvizio version for bug fixes (#31453) 2020-02-04 09:19:14 +01:00
HomeAssistant Azure
db6449c3fb [ci skip] Translation update 2020-02-04 00:31:49 +00:00
ochlocracy
4602d7370c Remove Alexa.InputController from devices without supported inputs in Alexa (#31450)
* Yield Alexa.InputController only for supported inputs.

* Add Comment.

* Comment fix.
2020-02-03 16:19:40 -08:00
Bas Nijholt
119566f280 Keep track of the derivative for unit_time (#31397)
* keep track of the derivative for unit_time

In this way, you will get a better estimate of the derivate during
the timescale that is relavant to the sensor.

This solved a problem where sensors have a low output resolution.
For example a temperature sensor that can only be integer numbers.

It might report many values that are the same and then suddenly go up one value.
Only in that moment (with the current implementation) the derivative will be finite.

With my proposed implementation, this problem will not occur, because it takes the average
derivative of the last `unit_time`.

* only loop as much as needed

* treat the special case of 1 entry

* add option time_window

* use cv.time_period

* fix comment

* set time_window=0 by default

* rephrase comment

* use timedelta for time_window

* fix the "G" unit_prefix and add more prefixes

https://en.wikipedia.org/wiki/Unit_prefix

* add debugging lines

* simplify logic

* fix bug where the there was a division of unit_time instead of multiplication

* simplify tests

* add test_data_moving_average_for_discrete_sensor

* fix test_dataSet6

* improve readability of the tests

* better explain the test

* remove debugging log lines
2020-02-03 14:22:47 -08:00
ochlocracy
c8d9b83b24 Update StepSpeaker and Speaker interfaces in Alexa (#31444)
* Yield only one Speaker interface.

* Yield PowerController only is supported.

* Revert "Yield PowerController only is supported."

This reverts commit c0dbf7e4

* Add Alexa.Speaker interface properties.

* Refactor tests for Alexa.Speaker and Alexa.StepSpeaker.

* Code Smell Change.

* Fix R1705: Unnecessary "elif" after "return".
2020-02-03 14:20:39 -08:00
quthla
3f9dbe6845 Fix theme color (#31366) 2020-02-03 14:09:25 -08:00
Kasper Kirkegaard
f5b790054a Fix misspelled sensor names (#31344) 2020-02-03 21:31:53 +01:00
Konsts
114d48ed8b Add timeout attribute for send files (#31379)
* Add timeout attribute for send files

* Remove dublicate

Remove attribute dublicate in BASE_SERVICE_SCHEMA

* Remove duplicate

return attribute to BASE_SERVICE_SCHEMA and remove from SERVICE_SCHEMA_SEND_FILE

* Add timeout parameter description

Add timeout parameter description for "send message" and "send location"
2020-02-03 21:23:58 +01:00
escoand
4550968316 Samsung TV refinements (#31248)
* use st not deviceType

* show model in flow title

* Update strings.json

* add re-auth to entity

* add re-auth to config_flow

* handle auth popup better

* use media player domain const

* fix tests

* rename not_found to not_successful

* authz not authn

* Update media_player.py

* Update config_flow.py

* Update media_player.py

* Update test_media_player.py

* finalize re-auth

* fix ssd tests

* better naming

* fix ip-address-mock serialization

* fix turn_on_action serialization

* add type of hass object

* fix acces denied test

* remove half-added typing

* async get ip address

* fix pylint
2020-02-03 20:34:02 +01:00
SukramJ
03642d9029 Add missing await to HMIPC (#31415)
* Add missing await to HMIPC

* use callback instead

* Fix call, move callback to hap
2020-02-03 20:27:20 +01:00
Aaron Bach
bea7aae8cd Fix issues with Ambient PWS dispatcher topic (#31439)
* Correct over-broad Ambient PWS data updates

* Make sure we provide a callable

* Don't use a partial
2020-02-03 12:23:51 -07:00
Aaron Bach
30e803d70b Fix issue with WWLLN dispatcher topic (#31442) 2020-02-03 12:23:19 -07:00
Aaron Bach
e799b08215 Fix issue with IQVIA dispatcher topic (#31440)
* Fix issues with IQVIA dispatcher topic

* Use f-string
2020-02-03 12:23:06 -07:00
Aaron Bach
74fd57e23a Fix issue with Notion dispatcher topic (#31441)
* Fix issue with Notion dispatcher topic

* Use f-string
2020-02-03 12:22:50 -07:00
Vincent Le Bourlot
ad5db47618 Clean up Tahoma smartlock (#31430)
* Added lock support for tahoma

* Removed unused constant.
2020-02-03 20:21:38 +01:00
tetienne
8bc77f0421 Add color to light template (#31435)
* Add color support to light template

* Add tests about color support
2020-02-03 08:27:01 -08:00
Yarmo Mackenbach
45c997ea04 Update NSAPI to 3.0.2 (#30971)
* Bump NSAPI version to 3.0.1

* Compatibility with NSAPI 3.0.1 response

* Removed commented code

* Obsolete setups receive an upgrade notification

* Bump NS-API to 3.0.2

* Assign platform values directly

* Removed obsolete config warning

* Improved reference to obsolete password
2020-02-03 14:39:45 +01:00
Vincent Le Bourlot
f49a392188 Add guard clause for discovery_info to tahoma platforms (#31434) 2020-02-03 13:30:44 +01:00
Paulus Schoutsen
e78378d90f Pass correct config to updater (#31428) 2020-02-03 09:51:27 +01:00
Raman Gupta
ee927fbc9e Bump pyvizio version and add additional device info (#31417)
* bump pyvizio version and add additional device info

* add patches for get_model and get_version

* change keywrod argument to positional for _test_service
2020-02-03 08:41:58 +01:00
Paulus Schoutsen
13aae8b5ec Bumped version to 0.105.0b6 2020-02-02 20:31:39 -08:00
springstan
744ae82933 Replace cmp option with eq and order (#31423) 2020-02-02 20:28:52 -08:00
Rami Mosleh
04cb2e9fd5 Rework Mikrotik device scanning following Unifi (#27484)
* rework device scanning, add tests

* update requirements and coverage

* fix description comments

* update tests, fix disabled entity updates

* rework device scanning, add tests

* update requirements and coverage

* fix description comments

* update tests, fix disabled entity updates

* update librouteros to 3.0.0

* fix sorting

* fix sorting 2

* revert to 2.3.0 as 3.0.0 requires code update

* fix requirements

* apply fixes

* fix tests

* update hub.py and fix tests

* fix test_hub_setup_failed

* rebased on dev and update librouteros to 3.0.0

* fixed test_config_flow

* fixed tests

* fix test_config_flow
2020-02-02 20:25:45 -08:00
HomeAssistant Azure
787faaa508 [ci skip] Translation update 2020-02-03 00:31:45 +00:00
Aaron Bach
2610415501 Streamline SimpliSafe data and token management (#31324)
* Streamline SimpliSafe API usage

* Streamline SimpliSafe data and token management

* Correctly define self.systems

* Inline update method
2020-02-02 17:16:09 -07:00
Paulus Schoutsen
4f79ec0c78 Bumped version to 0.105.0b5 2020-02-02 15:39:51 -08:00
Josh Bendavid
9dfc00898b always call set_volume with integer values (#31418) 2020-02-02 15:39:41 -08:00
Franck Nijhof
67e7541016 Fix device name Google Assistant when using aliases (#31416)
* Fix device name Google Assistant when using aliases

* Adjust cloud tests
2020-02-02 15:39:40 -08:00
Martin
2c1b465215 Emulated Hue + Alexa: Fix devices not discovered and error response (#30013 & #29899) (#31413)
* Revert "Emulated Hue: changed the reported fallback device-type to fix Alexa compatibility issues (#30013)"

This reverts commit ddc8d9e25c.

* Revert "Emulated Hue: updated tests (#30013)"

This reverts commit 90df461e75.

* Emulated Hue + Alexa: changed the fallback device-type again to "Dimmable Light" (#30013) after collective debugging; fixed brightness for on/off-devices and scripts to prevent "device malfunction" response from Alexa (#29899)

* Emulated Hue + Alexa: lint (#30013, #29899)
2020-02-02 15:39:39 -08:00
akasma74
3cbd426c52 Fix rflink commands containing equals sign (#31412)
* new lib verson available

* new rflink lib version

* new rflink lib version
2020-02-02 15:39:38 -08:00
FrengerH
a54d5f0bc4 deCONZ - Fix magic cube awake gesture (#31403) 2020-02-02 15:39:37 -08:00
Paulus Schoutsen
5b7a65c5ea Fix service annotations (#31402)
* Fix service annotations

* Filter area_id from service data

* Fix services not accepting entities

* Typo
2020-02-02 15:39:37 -08:00
springstan
fb26dd3028 Revert "Bump alarmdecoder to 1.13.9 (#30303)" (#31385)
This reverts commit f11d39f8eb.
2020-02-02 15:39:36 -08:00
Robert Svensson
aaea55efed deCONZ - Services normalize bridge id (#31378)
* Services should also make sure to normalize bridge id since users do not know to manage themselves
2020-02-02 15:39:35 -08:00
ochlocracy
d91f9fc2f5 Filter int in fan speed_list when yielding RangeController in Alexa (#31375)
* Allow for int in fan speed_list.

* Test for int in fan speed_list.

* prevent yielding preset for int labels.
2020-02-02 15:39:35 -08:00
Paulus Schoutsen
3b93065568 Add dump service to MQTT integration (#31370)
* Add dump service to MQTT integration

* Lint
2020-02-02 15:39:34 -08:00
Robert Svensson
59a9ca71ce deCONZ - Add support for new switch type (#31362) 2020-02-02 15:39:33 -08:00
springstan
11fcb2cc7f Fix auto_bypass in alarmdecoder (#30961)
* Fix auto_bypass in alarmdecoder

* Address review comments: used dict[key] and renamed variable

* Use dict[key] for required or optional config keys with default values
2020-02-02 15:39:32 -08:00
Paulus Schoutsen
7687ac8b91 Fix service annotations (#31402)
* Fix service annotations

* Filter area_id from service data

* Fix services not accepting entities

* Typo
2020-02-02 15:36:39 -08:00
Paulus Schoutsen
81dbdc6b9c Add dump service to MQTT integration (#31370)
* Add dump service to MQTT integration

* Lint
2020-02-02 15:01:51 -08:00
Martin
af105d2d61 Emulated Hue + Alexa: Fix devices not discovered and error response (#30013 & #29899) (#31413)
* Revert "Emulated Hue: changed the reported fallback device-type to fix Alexa compatibility issues (#30013)"

This reverts commit ddc8d9e25c.

* Revert "Emulated Hue: updated tests (#30013)"

This reverts commit 90df461e75.

* Emulated Hue + Alexa: changed the fallback device-type again to "Dimmable Light" (#30013) after collective debugging; fixed brightness for on/off-devices and scripts to prevent "device malfunction" response from Alexa (#29899)

* Emulated Hue + Alexa: lint (#30013, #29899)
2020-02-02 14:52:00 -08:00
Josh Bendavid
96ede54a1b always call set_volume with integer values (#31418) 2020-02-02 14:50:30 -08:00
Franck Nijhof
826433b680 Fix device name Google Assistant when using aliases (#31416)
* Fix device name Google Assistant when using aliases

* Adjust cloud tests
2020-02-02 14:48:13 -08:00
Robert Svensson
883b8f21ce deCONZ - Library cleanup (#31410)
* Follow library changes

* Bump dependency to v70

* Fix test
2020-02-02 19:07:20 +01:00
Jean-Paul van Ravensberg
f21a058f31 Enable SUPPORT_VOLUME_STEP (#31023) 2020-02-02 17:47:48 +01:00
Gerben ten Hove
75f1e573e4 Search specific train in Nederlandse Spoorwegen (#28898)
* Nederlandse Spoorwegen: search for specific trip

* Reformatting with Black

* Resolve pylint error

* Reformat with black.
2020-02-02 17:28:36 +01:00
Fabian Affolter
f701b2245a Upgrade alpha_vantage to 2.1.3 (#31388) 2020-02-02 17:27:06 +01:00
Björn Orri
8852cd0def Add Salt Fiber Box device tracker (#30986)
* Add salt component

* Update files from development checklist

* Use warning log level when data cannot be retrieved

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Remove empty fields from manifest.json

* Remove default arguments for host and username

* Bump saltbox library version

* Refactor and improve error handling

* Dev checklist

* Fix linting errors

* Check for None and return empty list

* Log on debug level instead of info

* More compact None checks

* Remove redundant None check

* Return None on exception but store as empty list

* More compact syntax

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-02-02 17:26:51 +01:00
akasma74
61a1d8e99f Fix rflink commands containing equals sign (#31412)
* new lib verson available

* new rflink lib version

* new rflink lib version
2020-02-02 17:23:13 +01:00
Daniel Perna
0f6e2850ab Update pyhomematic to 0.1.64 (#31406) 2020-02-02 16:29:10 +01:00
Fabian Affolter
f68a6ae3b2 Upgrade numpy to 1.18.1 (#31411) 2020-02-02 16:28:37 +01:00
Paulus Schoutsen
7127310f10 Catch device not found in device automations (#31401) 2020-02-02 07:13:07 -08:00
Arjan van Balken
55aa341dab Add unique_id to essent sensors (#31408)
* Fix mix-up of sensor entities and their values

* Prevent multiple calls for the same meter
2020-02-02 15:45:04 +01:00
Fabian Affolter
48402d49dc Upgrade praw to 6.5.1 (#31393) 2020-02-02 13:06:44 +01:00
Fabian Affolter
34aed53dcd Upgrade discord.py to 1.3.1 (#31391) 2020-02-02 13:05:50 +01:00
FrengerH
704cfcf235 deCONZ - Fix magic cube awake gesture (#31403) 2020-02-02 12:54:59 +01:00
Fabian Affolter
55a1bf3832 Upgrade holidays to 0.10.1 (#31392) 2020-02-02 02:17:24 -08:00
Fabian Affolter
83480291ce Upgrade sendgrid to 6.1.1 (#31394) 2020-02-02 02:16:33 -08:00
ochlocracy
e796de6c59 Filter int in fan speed_list when yielding RangeController in Alexa (#31375)
* Allow for int in fan speed_list.

* Test for int in fan speed_list.

* prevent yielding preset for int labels.
2020-02-01 16:44:40 -08:00
HomeAssistant Azure
a958418ef1 [ci skip] Translation update 2020-02-02 00:31:45 +00:00
Fabian Affolter
399173e3b3 Upgrade importlib-metadata to 1.5.0 (#31390) 2020-02-02 00:33:17 +01:00
Bernhard B
294c6a713f Support multiple attachments in signal messenger integration (#31141)
* added support for multiple attachments to signal_messenger integration

* updated pysignalclirestapi version in requirements_all.txt

* reworked multiple attachments feature in signal_messenger integration

* stay backwards compatible by both allowing the "attachment" and
  the "attachments" attribute.

* reworked multiple attachments feature in signal_messenger integration

* stay backwards compatible by both allowing the "attachment" and
  the "attachments" attribute.

* small change in signal_messenger integration

* added deprecation warning for 'attachment' attribute

* small changes in signal_messenger integration

* use 'warning' instead of 'warn' when logging the warning message

* re-generated requirements_test_pre_commit.txt

* added tests for signal_messenger integration

* regenerated requirements_test_all.txt for signal_messenger integration

* added more signal_messenger tests

* remove signal_messenger integration files from .coveragerc
2020-02-01 14:21:16 -08:00
Fabian Affolter
29aa1463ef Add PlatformNotReady 2020-02-01 23:04:42 +01:00
springstan
3aeaf3bb96 Revert "Bump alarmdecoder to 1.13.9 (#30303)" (#31385)
This reverts commit f11d39f8eb.
2020-02-01 22:02:39 +01:00
Frank van Ierland
e8b55552a1 Add temperature and humidity to xiaomi miio air quality monitor (#31287)
* Added new attributes to the Miio airquality monitor:
- temperature
- humidity

* updated Docstrings

* docstrings updated
2020-02-01 20:52:28 +01:00
Robert Svensson
1edaae34c5 UniFi - Log better information than a backtrace when poor switch data is involved (#31382) 2020-02-01 20:48:23 +01:00
Robert Svensson
43b11f6b39 deCONZ - Improve config flow logging (#31381) 2020-02-01 20:02:57 +01:00
Robert Svensson
e0704d73cc deCONZ - Services normalize bridge id (#31378)
* Services should also make sure to normalize bridge id since users do not know to manage themselves
2020-02-01 18:11:05 +01:00
dcnielsen90
9821047d75 Replace unmaintained BraviaRC backend with new fork: (#31234)
BraviaRC is currently unmaintained for home-assistant. This commit
    swaps it out with a new fork of BraviaRC called python-bravia-tv.
    This captures all bug fixes from BraviaRC release 3.7 (previously
    linked backend) to right before BraviaRC breaks when used by home-assistant.
    The intent of forking is to be able to continue supporting home-assistant.
    This is not intended to be a one off solution; this new fork will have
    future updates and be maintain as needed.

    This initial commit of python-bravia-tv improves the import process,
    however overall preserves the original API.
    Other fixes include:

    * Fix set-volume slider
    * Better error handling
    * Increase input options

    Resolves: #26351, #30964
    See also: #12577, #14843, #17345, #18245
2020-02-01 18:04:49 +01:00
Bas Nijholt
3275987f17 Add play, pause, previous and next track to kef (#31373)
* KEF: add support for play, pause, next track, and previous track

* bump aiokef to 0.2.7

* run isort

* do not dynamically change the supported features
2020-02-01 17:38:36 +01:00
Paulus Schoutsen
c67f53dc43 Remove hour delay before checking for updates (#31368)
* Check for updates at startup

* Add 100% test coverage for update_coordinator

* Address comments
2020-02-01 08:14:28 -08:00
Robert Svensson
b373c202c9 deCONZ - Add support for new switch type (#31362) 2020-02-01 17:08:49 +01:00
Ville Skyttä
dc5ca461a9 Run mypy through a pyenv/virtualenv enabler wrapper script (#30922) 2020-02-01 07:12:46 -08:00
Vincent Le Bourlot
79495d9f3a Add Tahoma lock support (#31311)
* Added lock support for tahoma

* Fixed logging to conform with pylint W1201 and E1205.

* Implemented @springstan suggestions.

* Fixed a typo...

* Implemented @springstan suggestions (v2).

* Implemented @springstan suggestions (v3).
2020-02-01 11:40:48 +01:00
Austin Mroczek
f584df46b7 Add totalconnect zones as binary sensors (#28712)
* Bump skybellpy to 0.4.0

* Bump skybellpy to 0.4.0 in requirements_all.txt

* Added extra states for STATE_ALARM_TRIGGERED to allow users to know if
it is a burglar or fire or carbon monoxide so automations can take
appropriate actions.  Updated TotalConnect component to handle these new
states.

* Fix const import

* Fix const import

* Fix const imports

* Bump total-connect-client to 0.26.

* Catch details of alarm trigger in state attributes.

Also bumps total_connect_client to 0.27.

* Change state_attributes() to device_state_attributes()

* Move totalconnect component toward being a multi-platform integration.  Bump total_connect_client to 0.28.

* add missing total-connect alarm state mappings

* Made recommended changes of MartinHjelmare at
https://github.com/home-assistant/home-assistant/pull/24427

* Update __init__.py

* Updates per MartinHjelmare comments

* flake8/pydocstyle fixes

* removed . at end of log message

* added blank line between logging and voluptuous

* more fixes

* Adding totalconnect zones as HA binary_sensors

* fix manifest.json

* flake8/pydocstyle fixes.  Added codeowner.

* Update formatting per @springstan guidance.

* Fixed pylint

* Add zone ID to log message for easier troubleshooting

* Account for bypassed zones in update()

* More status handling fixes.

* Fixed flake8 error

* Another attempt at black/isort fixes.

* Bump total-connect-client to 0.50.  Simplify code using new functions in
total-connect-client package instead of importing constants.  Run black
and isort.

* Fix manifest file

* Another manifest fix

* one more manifest fix

* more manifest changes.

* sync up

* fix indent

* one more pylint fix

* Hopefully the last pylint fix

* make variable names understandable

* create and fill dict in one step

* Fix name and attributes

* rename to logical variable in alarm_control_panel

* Remove location_name from alarm_control_panel attributes since it is
already the name of the alarm.

* Multiple fixes to improve code per @springstan suggestions

* Update homeassistant/components/totalconnect/binary_sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Multiple changes per @MartinHjelmare review

* simplify alarm adding

* Fix binary_sensor.py is_on

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-02-01 10:09:52 +01:00
springstan
26415f6abd Fix auto_bypass in alarmdecoder (#30961)
* Fix auto_bypass in alarmdecoder

* Address review comments: used dict[key] and renamed variable

* Use dict[key] for required or optional config keys with default values
2020-02-01 10:01:42 +01:00
Paulus Schoutsen
d382b0ba42 Bumped version to 0.105.0b4 2020-02-01 00:29:29 -08:00
Dan Lehman
e1fd46d6db Updated wemo lights fix for #31360 (#31369) 2020-02-01 00:29:21 -08:00
Dan Lehman
0a90b01e77 Updated wemo lights fix for #31360 (#31369) 2020-01-31 21:42:37 -08:00
HomeAssistant Azure
0c1acc51a4 [ci skip] Translation update 2020-02-01 00:31:40 +00:00
Paulus Schoutsen
7ef352701c Bumped version to 0.105.0b3 2020-01-31 14:48:26 -08:00
Paulus Schoutsen
25d6bc348c Fix wemo device types for lights (#31360) 2020-01-31 14:48:20 -08:00
David F. Mulcahey
8f8468f016 bump quirks (#31355) 2020-01-31 14:48:19 -08:00
ochlocracy
f26cb83fd5 Protect for unknown state attributes. (#31354) 2020-01-31 14:48:18 -08:00
Franck Nijhof
7ee741d424 Partially Revert "Deprecate hide_if_away from device_tracker (#30833) (#31348) 2020-01-31 14:48:17 -08:00
Johann Kellerman
ec3dc3dd16 Upgrade pysma, fix #27154 (#31346) 2020-01-31 14:48:16 -08:00
Paulus Schoutsen
283cc5c8c3 Update Hue data fetching (#31338)
* Refactor Hue Lights to use DataCoordinator

* Redo how Hue updates data

* Address comments

* Inherit from Entity and remove pylint disable

* Add tests for debounce
2020-01-31 14:48:16 -08:00
Paulus Schoutsen
166d770ddd Update Hue data fetching (#31338)
* Refactor Hue Lights to use DataCoordinator

* Redo how Hue updates data

* Address comments

* Inherit from Entity and remove pylint disable

* Add tests for debounce
2020-01-31 14:47:40 -08:00
Malachi Soord
ae76b5be5a Let core resolve entity_id for lastfm from username (#31280)
* Sluggify user

* Simplify

* Remove unused import
2020-01-31 14:23:42 -08:00
escoand
d225fc08fe drop fritzdect (#31359) 2020-01-31 14:20:06 -08:00
ochlocracy
fa2e409abd Protect for unknown state attributes. (#31354) 2020-01-31 14:14:43 -08:00
Paulus Schoutsen
06efe3a2f6 Fix wemo device types for lights (#31360) 2020-01-31 14:01:25 -08:00
Robert Svensson
44f0728c60 Axis - Use core to start component tests (#31328)
* Fix test according to Martins comment in 31286

* Use core features rather than integration specific

* Fix populate options test
2020-01-31 20:23:51 +01:00
Robert Svensson
958a867c11 UniFi integration move to push messaging (#31086)
* Rewrite UniFi integration to use push messaging

* Add signalling for new clients/devices

* Update list of known wireless clients when we get events of them connecting

* Reconnection logic for websocket

* Fix failing tests

* Bump requirement to v12

* Add new tests

* Update homeassistant/components/unifi/controller.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
2020-01-31 20:23:25 +01:00
David F. Mulcahey
06c8e53323 bump quirks (#31355) 2020-01-31 13:55:06 -05:00
Christian Clauss
df7d2b3aeb Fix typos found by codespell (#31243)
* Fix typos found by codespell

* Fix typos found by codespell

* codespell: Furture  ==> Future

* Update test_config_flow.py

* Update __init__.py

* Spellcheck: successfull  ==> successful

* Codespell: unsuccesful  ==> unsuccessful

* Codespell: cant  ==> can't

* Codespell: firware ==> firmware

* Codespell: mimick  ==> mimic
2020-01-31 08:33:00 -08:00
Franck Nijhof
a017c26234 Partially Revert "Deprecate hide_if_away from device_tracker (#30833) (#31348) 2020-01-31 08:27:16 -08:00
Johann Kellerman
ab3157e661 Upgrade pysma, fix #27154 (#31346) 2020-01-31 08:25:54 -08:00
Raman Gupta
a0067a298a Remove Throttle on async_setup and bump pyvizio version (#31337) 2020-01-31 12:45:23 +01:00
Pascal Vizeli
1aa322f2f0 Bump version to 0.105.0b0 2020-01-31 10:26:09 +00:00
Paulus Schoutsen
7b3dc42673 Fix incorrect annotation async flock notify (#31342)
* Fix incorrect annotation async flock notify

* Update notify.py

* Update notify.py

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-01-31 09:58:54 +00:00
Paulus Schoutsen
6a7bb7b149 Fix incorrect annotation async flock notify (#31342)
* Fix incorrect annotation async flock notify

* Update notify.py

* Update notify.py

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-01-31 10:58:27 +01:00
Paulus Schoutsen
c6baf026a7 Guard for callbacks in service helper (#31339) 2020-01-31 09:24:02 +00:00
Phil Bruckner
a53c3d10fe Fix async bug in amcrest when registering services (#31334) 2020-01-31 09:24:00 +00:00
Martin
3635c4df50 Emulated Hue: changed fallback device-type to fix Alexa compatibility issues (#30013) (#31330)
* Emulated Hue: changed the reported fallback device-type to fix Alexa compatibility issues (#30013)

* Emulated Hue: updated tests (#30013)
2020-01-31 09:23:58 +00:00
Paulus Schoutsen
73f27c728c Fix wemo lights (#31323) 2020-01-31 09:23:56 +00:00
Paulus Schoutsen
6b95e98eeb Guard Z-Wave light HS conversion on None (#31320) 2020-01-31 09:23:54 +00:00
Paulus Schoutsen
d405069406 Guard for callbacks in service helper (#31339) 2020-01-31 09:32:43 +01:00
Martin
b22dfa119b Emulated Hue: changed fallback device-type to fix Alexa compatibility issues (#30013) (#31330)
* Emulated Hue: changed the reported fallback device-type to fix Alexa compatibility issues (#30013)

* Emulated Hue: updated tests (#30013)
2020-01-30 23:30:13 -08:00
Phil Bruckner
7e9507833b Fix async bug in amcrest when registering services (#31334) 2020-01-30 23:28:53 -08:00
HomeAssistant Azure
74413e07d0 [ci skip] Translation update 2020-01-31 00:31:57 +00:00
Franck Nijhof
611127a6bc Bump pytest to 5.3.5 (#31327) 2020-01-31 00:04:59 +01:00
Robert Svensson
a8374cf423 UniFi - Try to discover local controller (#31326)
* Its working

* Use "unifi" as default host if a controller can be found

* Fix tests

* Make a fixture of patching the discovery function
2020-01-30 23:06:43 +01:00
Robert Svensson
56657fa859 Axis - config flow use new helper functions (#31286)
* Make use of new config flow helpers
Simplify Axis entry config to work with config flow helpers

* Keep old device data for rollback purposes
2020-01-30 22:20:30 +01:00
SukramJ
cd1aa46404 Register on HA stop event to gracefully shutdown HomematicIP Cloud connections (#31289)
* Register on HA stop event to gracefully shutdown HomematicIP Cloud connections

* fixes after review

* Fix lint

* switch to unload_entry

* Save listener

* Switch back to hap.async_reset()
2020-01-30 22:14:43 +01:00
Raman Gupta
73ea34e417 Update media_player and add tests to qualify vizio integration for platinum quality score (#31187)
* add media player test and update media player logic to qualify vizio for platinum quality score

* add SCAN_INTERVAL and log message once when device goes from available to unavailable and vice versa

* move test constants into one file to avoid defining dupes in each test file

* move constant to shrink diff

* move pytest fixtures to conftest.py

* remove commented out code

* move unload test to test_init

* updates to tests and logging based on review

* bypass notification service

* add fixture so component setup makes it through config flow

* split failure tests into two

* fix setup and entity check for test_init and setup failures in test_media_player

* make domain references consistent across test files

* remove logging steps that were introduced to help debug

* move common patches out to new fixture and use config entry everywhere appropriate

* fix docstring

* add test for update options to increase code coverage

* add one more assert

* refactor test_media_player to move boiler plate logic out of each test into _test_init function

* final refactor of test_media_player to move repeat logic into separate function

* update docstrings

* refactor setup failure tests to move shared logic into private function

* fix last new functions code to use variable instead of static config variable

* remove trailing comma

* test that volume_step gets properly passed to Vizio volume function

* fix comment language

* assert with unittest.mock.call in _test_service and use config_entries.async_setup instead of config_entries.async_add

* replace config_entries.async_add with config_entries.async_setup everywhere

* simplify if statement for argument assertion

* fix logging based on style guide

* remove accidentally committed changes

* update scan interval to something more reasonable and add tests for availability changes

* change filter function to list comprehension, simplify log messages, remove default entity id from logs since it is user configurable, fix docstrings
2020-01-30 22:13:45 +01:00
endor
9ab6d08b97 Bump pytrafikverket to 0.1.6.1 (#30697)
* Bumped version for pytrafikverket

* Updated version for pytrafikverket

* Updated version for pytrafikverket
2020-01-30 21:46:20 +01:00
Rick
3718b25bd9 Add opening and closing states to MQTT covers (#31259)
* Added support for the opening and closing states to MQTT covers

* Processed PR feedback on MQTT cover changes

* Add missing MQTT abbreviation to fix failing tests

* Fixed typo in MQTT abbreviations

* Added mqtt set cover position optimistic test
2020-01-30 21:14:46 +01:00
Paulus Schoutsen
d5486f883d Fix wemo lights (#31323) 2020-01-30 11:40:16 -08:00
Paulus Schoutsen
d6d3feb54e Guard Z-Wave light HS conversion on None (#31320) 2020-01-30 11:13:54 -08:00
Rami Mosleh
9432054066 Rework Mikrotik device scanning following Unifi (#27484)
* rework device scanning, add tests

* update requirements and coverage

* fix description comments

* update tests, fix disabled entity updates

* rework device scanning, add tests

* update requirements and coverage

* fix description comments

* update tests, fix disabled entity updates

* update librouteros to 3.0.0

* fix sorting

* fix sorting 2

* revert to 2.3.0 as 3.0.0 requires code update

* fix requirements

* apply fixes

* fix tests

* update hub.py and fix tests

* fix test_hub_setup_failed

* rebased on dev and update librouteros to 3.0.0

* fixed test_config_flow

* fixed tests

* fix test_config_flow
2020-01-30 10:21:51 -08:00
Paulus Schoutsen
202fd4197b Bumped version to 0.105.0b1 2020-01-30 09:48:00 -08:00
Paulus Schoutsen
e91c32cb00 Fix HTTP config serialization (#31319) 2020-01-30 09:47:50 -08:00
Bram Kragten
af8b63fe31 Updated frontend to 20200130.0 (#31318) 2020-01-30 09:47:49 -08:00
Paulus Schoutsen
afe869bee9 Handle service calls that do not refer entity IDs (#31317) 2020-01-30 09:47:49 -08:00
Paulus Schoutsen
f55193c2da Add zone to defaul config (#31303) 2020-01-30 09:47:48 -08:00
Paulus Schoutsen
9db2ad1fd7 Add zones services.yaml (#31298) 2020-01-30 09:47:47 -08:00
Alexei Chetroi
268430a61d ZHA dependencies bump (#31295)
* ZHA dependencies bump.

* Bump bellows-homeassistant.
2020-01-30 09:47:47 -08:00
Paulus Schoutsen
33361f8580 Fix HTTP config serialization (#31319) 2020-01-30 09:47:16 -08:00
Bram Kragten
0a1e397119 Updated frontend to 20200130.0 (#31318) 2020-01-30 09:30:59 -08:00
Paulus Schoutsen
d24e397a80 Handle service calls that do not refer entity IDs (#31317) 2020-01-30 09:28:06 -08:00
Alexei Chetroi
24f4f53f16 ZHA dependencies bump (#31295)
* ZHA dependencies bump.

* Bump bellows-homeassistant.
2020-01-30 10:04:06 -05:00
Franck Nijhof
981d963554 Upgrade pre-commit to 2.0.1 (#31308) 2020-01-30 13:08:37 +01:00
Tom Harris
7ff30fe29d Reorganize insteon code (#31183)
* Reorganize code

* Code review
2020-01-30 10:47:44 +01:00
Paulus Schoutsen
ea666248ce Add zones services.yaml (#31298) 2020-01-30 10:09:06 +01:00
Paulus Schoutsen
cad451d2b7 Add zone to defaul config (#31303) 2020-01-30 10:06:17 +01:00
Paulus Schoutsen
da14e2927f Removes I/O from linky tests (#31299) 2020-01-29 21:59:24 -08:00
Alan Tse
cf0e467150 Change scan_interval defaults for Tesla (#31194) 2020-01-29 20:15:47 -05:00
HomeAssistant Azure
8c178adf4f [ci skip] Translation update 2020-01-30 00:31:41 +00:00
Paulus Schoutsen
6499feffa3 Bumped version to 0.105.0b0 2020-01-29 16:30:03 -08:00
Paulus Schoutsen
c4a8af06e0 Merge remote-tracking branch 'origin/master' into dev 2020-01-29 16:29:36 -08:00
Paulus Schoutsen
01dad31adc Fix service helper not handling sync methods (#31254)
* Fix service helper not handling sync methods

* Add legacy support for returning coroutine objects

* Fix tests

* Fix tests

* Convert demo cover to async
2020-01-29 16:27:25 -08:00
Robert Svensson
111fc1fa8e Use all new helper functions (#31278) 2020-01-29 16:21:23 -08:00
Paulus Schoutsen
424e15c7a7 Find related items scripts/automations (#31293)
* Find related items scripts/automations

* Update manifest
2020-01-29 16:19:13 -08:00
Paulus Schoutsen
881437c085 Catch error when searching for scenes or automations (#31288) 2020-01-29 14:46:48 -08:00
Paulus Schoutsen
e9e44dbd97 Fix callback and async (#31281)
* Fix callback and async

* Fix a return

* Fix test

* Fix mqtt tests

* Fix some more callbacks
2020-01-29 13:59:45 -08:00
ktnrg45
ee602e40a6 Add command 'ps_hold' to PS4 (#31283) 2020-01-29 22:57:40 +01:00
Bram Kragten
67b73bd74c Updated frontend to 20200129.0 (#31279) 2020-01-29 21:40:41 +01:00
Jeff Irion
31dc2ad284 Allow filtering of sources for Android TV (#30994) 2020-01-29 14:13:09 -06:00
Phil Bruckner
61e41f0ddc Add code owner for amcrest integration (#31276) 2020-01-29 11:50:18 -06:00
David F. Mulcahey
f4a4c6bea5 ZHA group and device cleanup (#31260)
* add dispatching of groups to light
* added ha device registry device id
* added zha group object
* add group event listener
* add and remove group members
* get group by name
* api cleanup
* clean up get device info
* create and remove zigpy groups
* clean up create and remove group api
* use device id
* use device id
* cleanup
* update test
* update tests to allow group events to flow
2020-01-29 12:24:43 -05:00
Pascal Vizeli
6bbb713013 Fix tests for opnsense (#31277) 2020-01-29 18:18:24 +01:00
ochlocracy
83dff16e1e Add support for rangeValueDeltaDefault in Alexa AdjustRangeValue directive (#31258)
* Update tests with rangeValue and rangeValueDelta to use int.

* Add support for rangeValueDeltaDefault for covers.

* Update tests for range changes.

* Test for AdjustRangeValue with rangeValueDeltaDefault True.

* Update tilt error.
2020-01-29 09:04:57 -08:00
ochlocracy
7116c7404a Add PowerController to covers in Alexa (#31265)
* Add PowerController to covers.

* Comment Fix.

* Update test device_class.

* Update Comment.
2020-01-29 09:03:20 -08:00
Matthew Treinish
85dbf1ffad Add OPNSense device tracker (#26834)
* Add OPNSense device_tracker

This commit adds a new component for using an OPNSense router as a
device tracker. It uses pyopnsense to query the api to look at the
arptable for a list of devices on the network.

* Run black formatting locally to appease azure

* Apply suggestions from code review

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Fix issues identified during code review

This commit updates several issues found in the module during code
review.

* Update homeassistant/components/opnsense/__init__.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update CODEOWNERS for recent changes

* Fix lint

* Apply suggestions from code review

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* More fixes from review comments

This commit fixes several issues from review comments, including
abandoning all the use of async code. This also completely reworks the
tests to be a bit clearer.

* Revert tests to previous format

* Add device detection to opnsense device_tracker test

This commit adds actual device detection to the unit test for the setup
test. A fake api response is added to mocks for both api clients so that
they will register devices as expected and asserts are added for that.

The pyopnsense import is moved from the module level to be runtime in
the class. This was done because it was the only way to make the
MockDependency() call work as expected.

* Rerun black

* Fix lint

* Move import back to module level

* Return false on configuration errors in setup

This commit updates the connection logic to return false if we're unable
to connect to the configured OPNsense API endpoint for any reason.
Previously we would not catch if an endpoint was incorrectly configured
until we first tried to use it. In this case it would raise an unhandled
exception. To handle this more gracefully this adds an api call early in
the setup and catches any exception raised by that so we can return
False to indicate the setup failed.

* Update tests

* Add pyopnsense to test requirements

* Rerun gen_requirements script

* Fix failing isort lint job step

Since opening the PR originally yet another lint/style checker was added
which failed the PR in CI. This commit makes the adjustments to have
this pass the additional tool's checks.

* Fix comment

* Update manifest.json

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-01-29 16:20:43 +01:00
Jeff Irion
9312d06fe4 Catch 'ConnectionResetError' exceptions for Android TV integra… (#31274) 2020-01-29 15:18:57 +01:00
Quentame
ec4ccb10ec Bump iCloud to 0.9.2 + fix setup log (#31273)
- pyicloud to 0.9.2
- fix log `ERROR (MainThread) [homeassistant.config_entries] icloud.async_setup_entry did not return boolean`
2020-01-29 15:16:54 +01:00
tetienne
fa15bead94 Remove useless assignment (#31272) 2020-01-29 14:08:53 +01:00
Alan Tse
a1e1610a69 Add device_class to Tesla sensors (#31231) 2020-01-29 13:22:04 +01:00
Thibault Maekelbergh
64edf2fe33 Create truly live unique id (#31078)
* Create truly live unique id

* Do not generate unique id on basis of name

* Add the station to the default station live name
2020-01-29 12:12:40 +01:00
Rafał Słota
080827fb62 Fix light.turn_on for emulated_hue (#31195)
* Fix light.turn_on for emulated_hue

HarmonyHub sends `{'xy': [0, 0], 'on': True, 'bri': 0}` when turning on lights that do not support brightness control. Unfortunately current logic always uses  brightness value to control on/off state which makes no sense for lights that don't support brightness at all. This change fixes that behavior, making light without brightness control usable with HarmonyHub and probably some other remotes.

* Test 'no_brightness' lights
2020-01-29 12:11:22 +01:00
Thomas
56c235d4f2 Fix example for set_datetime service (#31159) 2020-01-29 12:09:19 +01:00
Matthias Alphart
9ff9614d0b fix knx light turn_on with ct (#31184)
process both brightness and color_temperature in a turn_on call.
2020-01-29 12:07:25 +01:00
Franck Nijhof
c2f1d6aa19 Upgrade pre-commit to 2.0.0 (#31267) 2020-01-29 12:04:25 +01:00
Pascal Vizeli
28bfc6ae76 Update homeassistant-pyozw to 0.1.8 (#31270) 2020-01-29 12:04:05 +01:00
Daniel Perna
9902b648fb Add channel-mapping for HomeMatic (#31178)
* Update entity.py

* Fix Black

* Fix Black

* Update entity.py

* Use new style python

* Simplify

* Allow multible attribute with different channels

* Black

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-01-29 12:02:36 +01:00
Alan Tse
bcdef4e500 Fix reporting of battery sensor for Tesla (#31232)
* Fix reporting of battery sensor for Tesla

* Remove try
2020-01-29 08:58:43 +01:00
Bouwe Westerdijk
61a8618010 Fix Plugwise climate issues (#31209)
* Fix Plugwise climate issues

* Remove showing None-state for available_schemas, as requested by reviewer.
2020-01-29 08:57:25 +01:00
Bas Nijholt
89ae255de7 Bump pyhaversion to 3.2.0 (#31241)
* upgrade to pyhaversion=3.2.0

* bump to pyhaversion==3.2.0 in manifest.json
2020-01-29 08:54:21 +01:00
shred86
3ae5735e12 Bump abodepy version to 0.17.0 (#31250) 2020-01-29 08:53:30 +01:00
Robert Svensson
36675fe4fa deCONZ - New light level sensor attribute (#31255) 2020-01-29 07:40:42 +01:00
Alexei Chetroi
37af2170ec Mark device unavailable when it leaves Zigbee network. (#31264) 2020-01-28 21:21:33 -05:00
HomeAssistant Azure
2c02334c1f [ci skip] Translation update 2020-01-29 00:31:54 +00:00
Franck Nijhof
fd4f8d92d2 Upgrade dsmr_parser to 0.18, re-enable tests (#31256) 2020-01-28 23:35:28 +01:00
Franck Nijhof
747f5fd62c Upgrade iaqualink to 0.3.1 (#31257) 2020-01-28 23:33:27 +01:00
John Hollowell
c3cef7227c Add proxmoxve SSLError check and remove log spam (#30818)
* Add SSLError check and remove log spam

* Update homeassistant/components/proxmoxve/manifest.json

remove unnecessary requirement

* Remove log level change

Moved to proxmoxer library

* Update homeassistant/components/proxmoxve/__init__.py

* Update manifest.json

Update to new version of dependency which fixes log issue

* Run formatter and requires updates

* oops, tabs

* Fix quote marks

When you can't get black running, just fix whatever CI says is wrong!
2020-01-28 22:52:59 +01:00
Paulus Schoutsen
8ceef72853 Google Assistant: Track if request is local (#31226)
* Track if request is local

* Cancel early if 2FA disabled

* Allow disabling 2FA for ack

* Do not mark devices with 2FA as reachable

* Add request source to GA events
2020-01-28 10:54:39 -08:00
brefra
03954be12d Add brefra to codeowners list Velbus integration (#31245)
* Add myself to codeowners list

* Add myself to CODEOWNERS file
2020-01-28 09:25:15 -05:00
Daniel Høyer Iversen
a9c43c6c62 Mill, correct hvac_mode. Fixes #31236 (#31242) 2020-01-28 11:58:37 +01:00
Pascal Vizeli
259a7e8490 Add gammu to wheels (#31239) 2020-01-28 09:41:50 +01:00
Oscar Calvo
d813618d0d Add Gammu based local SMS notifications (#31233)
* Add sms integration

Committer: ocalvo <oscar@calvonet.com>

* Fix PyLint

* Update requirements
2020-01-28 09:35:41 +01:00
SukramJ
ec2d378a19 Add test for adding a device to HomematicIP Cloud (#31224)
* Add test for adding a hmip device

* refactor get_mock_hap to use config_entry setup

* remove unused parameters
2020-01-28 08:44:30 +01:00
Alexei Chetroi
9d8b4de09c Update ZHA entity discovery tests (#31191)
* ZHA registry test fixtures refactoring.

* Update ZHA test devices list.

* Use channel.id for event relay channels test.

* Add zigpy_device factory fixture.

* Add node descriptor to mock zigpy devices.

* Use node descriptor for ZHA device tests.

* Update ZHA discovery test.

check for unique_id and channels passed into each entity.

* Address comments.
2020-01-27 19:43:26 -05:00
HomeAssistant Azure
6daec557b4 [ci skip] Translation update 2020-01-28 00:31:59 +00:00
Paul Daumlechner
ed970797be Fix attribute in Alexa service call for cover tilt (#31223)
* Update attribute in Alexa service call for cover tilt

* Update Tests to fix Tilt Position call.

Co-authored-by: ochlocracy <5885236+ochlocracy@users.noreply.github.com>
2020-01-27 19:28:40 -05:00
aaska
1f7ab9091b Bump python-synology to 0.4.0 : Add support for DSM v5 + fix sensors unknown for 15 min (#31049)
* updating new api version

* Added new configuration option for updated API
2020-01-27 22:38:00 +01:00
SukramJ
1dbfc66669 Cleanup of HomematicIP Cloud tests (#31181)
* CleanUp tests for HomematicIP_Cloud

* Remove not required CoroutineMock

* remove None return in mocks, add asserts

* rewrite test
2020-01-27 21:34:15 +01:00
Christian Clauss
1d537ad416 Fix typo: serivce --> service (#31217) 2020-01-27 19:56:26 +01:00
Paulus Schoutsen
ab8b94382e Update Hue discovery (#31215) 2020-01-27 10:54:38 -07:00
Aaron Bach
f95a072877 Constrain SimpliSafe's check for emergency token usage (#31214) 2020-01-27 10:50:16 -07:00
Ron Klinkien
4e2737bfb7 Add Garmin Connect integration (#30792)
* Added code files

* Correctly name init file

* Update codeowners

* Update requirements

* Added code files

* Correctly name init file

* Update codeowners

* Update requirements

* Black changes, added to coveragerc

* Removed documentation location for now

* Added documentation url

* Fixed merge

* Fixed flake8 syntax

* Fixed isort

* Removed false check and double throttle, applied time format change

* Renamed email to username, used dict, deleted unused type, changed attr name

* Async and ConfigFlow code

* Fixes

* Added device_class and misc fixes

* isort and pylint fixes

* Removed from test requirements

* Fixed isort checkblack

* Removed host field

* Fixed coveragerc

* Start working test file

* Added more config_flow tests

* Enable only most used sensors by default

* Added more default enabled sensors, fixed tests

* Fixed isort

* Test config_flow  improvements

* Remove unused import

* Removed redundant patch calls

* Fixed mock return value

* Updated to garmin_connect 0.1.8 fixed exceptions

* Quick fix test patch to see if rest is error free

* Fixed mock routine

* Code improvements from PR feedback

* Fix entity indentifier

* Reverted device identifier

* Fixed abort message

* Test fix

* Fixed unique_id MockConfigEntry
2020-01-27 09:12:18 -08:00
Quentame
a73a1a4489 Use config_entry.unique_id in Linky (#31051)
* Use config_entry.unique_id in Linky

* Reviews

* _show_setup_form not async
2020-01-27 08:57:36 -08:00
ktnrg45
d3ac3e48a3 Fix ps4 errors if pin begins with a 0 (#31198)
* Fix errors if pin begins with a 0

* Test PIN leading with zero

* Edit tests
2020-01-27 10:32:14 -05:00
David F. Mulcahey
7d9c8fdfa0 update remove service (#31164) 2020-01-27 08:54:31 -05:00
Ron Klinkien
50b0e938e1 Added missing file (#31189) 2020-01-27 12:52:58 +01:00
Franck Nijhof
6be9a45333 Upgrade HAP-python to 2.7.0 (#31201) 2020-01-27 11:42:09 +01:00
Alan Tse
4f07ccd350 Fix unnecessary regeneration of access token in Tesla component (#31193)
* Fix unnecessary regeneration of access token

* Add manifest.json
2020-01-27 11:30:35 +01:00
Franck Nijhof
050e4afdc0 Disable failing dsmr tests (#31202)
* Disable failing dsmr tests

* Disable module, disable import of missing dep
2020-01-27 11:13:36 +01:00
Rohan Kapoor
52c1bc9c26 Check that documentation urls are valid (#31188)
* Check that documentation urls are valid

* Validate documentation url in pieces
2020-01-27 10:42:26 +01:00
starkillerOG
1278f32306 Add webostv sound_output capability (#31121)
* Webostv: add sound_output capability

Add the ability to read and set the sound_output

* Webostv: add sound_output capability

* Webostv: add sound_output capability

* fix blank spaces

* fix to long line

* add ,

* Import ATTR_SOUND_OUTPUT

Do not have the ability to test this change right now

* Add white space

* Create const.py

* Use const import

* Use import from const.py

* Add docstring

* Change order

* Change order

* Fix import

* Fix import

* Fix typo

* Change order again

* Change order again

* Change order of attributes
2020-01-27 10:40:48 +01:00
Paulus Schoutsen
1f0f62de7f Add unique IDs to automation/scenes (#31150)
* Add unique IDs to automation and scenes

* Fix typo
2020-01-26 23:01:35 -08:00
Ville Skyttä
8fff6462a1 Upgrade huawei-lte-api to 1.4.7 (#31155)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.7
2020-01-27 08:50:01 +02:00
Aaron Bach
ac2172333c Use non-deprecated method of instantiating RainMachine client (#31149) 2020-01-26 18:01:59 -07:00
finnysamuel
9ba1a4a91a Bump aiobotocore to 0.11.1 (#30951)
* Bumped aiobotocore version to 0.11.1
* New dependencies are added to requirements_all.txt
2020-01-26 18:25:42 -05:00
Franck Nijhof
aa390efd69 Add hassfest URL validation to documentation link (#31143) 2020-01-26 21:32:20 +01:00
Tom Harris
4311b1ae65 Bump insteonplm to 0.16.6 (#31182) 2020-01-26 19:53:31 +01:00
brefra
51e032a7ca Add counters sensors for Velbus (#31165)
* Add counter sensor

* Apply black formatting

* Move all counter logic to sensor.py

* Code cleanup
2020-01-26 18:48:20 +01:00
SukramJ
1b3c4ed4b3 Use unique_id for config_entries of HomematicIP Cloud (#31133)
* use hapid as unique_id for config_entry of HomematicIP Cloud

* Add qualita_scale to manifest

* Update config_flow

* use core interface for config_flow tests

* refactor to fail earlier

* use asynctest

* rewrite tests

* rewrite tests

* fix test

* add assert
2020-01-26 14:54:33 +01:00
Maikel Punie
3f03848a07 Fix Velbus covers (includes velbus lib upgrade) (#31153)
* Fix velbus covers

* Update python-velbus lib

* flake8 and black fixes

* Fix comments

* fix codeowner
2020-01-26 14:36:29 +01:00
Malachi Soord
bc196a3c9f Introduce unique_id for lastfm to allow changing entity_id in backwards compatible way (#31163)
* Replace . with _ for lastfm entity_id

* lint

* double quotes

* Rollback change, add unique_id

* Expose prop

* Generate unique ID from user

* Linty

* FIx linter

* Revert changes for splitting entity_id

* Simplify
2020-01-26 14:28:42 +01:00
Jeff Irion
cd72128a80 Implement 'volume_set' service for Android TV devices (#31161) 2020-01-26 10:39:19 +01:00
Aaron Bach
4c4f726323 Refactor RainMachine switch platform (#31148)
* Import constants sanely

* Linting

* Rename data constants for consistency

* Refactor RainMachine switch platform

* Comments

* Cleanup

* Refactor switch and sensor API calls to be separate

* Linting

* Make sure zones are updated in appropriate service calls

* Correctly decrement

* Linting

* Don't do weird inheritance

* Ensure service calls update data properly

* Docstring

* Docstring

* Errors can be logged without string conversion

* Code review comments
2020-01-25 20:27:35 -07:00
Aaron Bach
37d1cdc4cb Add additional alarm states to SimpliSafe (#31060)
* Add additional alarm states to SimpliSafe

* Remove unused constant

* Remove redundant local variable
2020-01-25 18:41:49 -07:00
HomeAssistant Azure
d3511a3496 [ci skip] Translation update 2020-01-26 00:33:06 +00:00
Jens Østergaard Nielsen
353a014496 Fix the ihc.set_runtime_value_int service function not working with templates (#31145)
* Make the set_runtime_value_int function work with template values

* Use newest version of the ihcsdk library

* Make the set_runtime_value_int function work with template values

* Use newest version of the ihcsdk library

* Updated to the newest ihcsdk 2.5.0

* Formatted changes to make it pass CI tests
2020-01-26 00:37:31 +01:00
Matt Snyder
e4832ee4d0 Remove Owlet component (#31160)
* Remove owlet component

* Remove owlet from requirements_all.txt
2020-01-25 21:08:36 +01:00
Quentame
c481a48e3a Separate iCloud class (#31022)
* Separate iCloud class

* Update .coveragerc

* Fix pipe
2020-01-25 13:24:50 -05:00
Josh Bendavid
6f1c45257a Fix state handling for older webos versions (#31099)
* fix state handling for older webos versions

* update aiopylgtv to 0.3.2
2020-01-25 13:24:21 -05:00
Bill Durr
e16e192b3c improvements to zha cover (#31144) 2020-01-25 13:20:59 -05:00
Alexei Chetroi
217e280f8b Update ZHA remotes registry to proper identify "remotes (#31146)
* Update ZHA remote device types.

* Remove `binary_sensor` entity from affected devices.

* Update ZHA Profiles.

Prevent DeviceType.ON_OFF_LIGHT_SWITCH from creating entities.

* Update tests and remove unused entities.
2020-01-25 12:42:19 -05:00
Ville Skyttä
80a55360dc Remove no longer used Hound config (#31154) 2020-01-25 12:48:32 +01:00
Ville Skyttä
98ac84349c Fix Huawei LTE SMS recipient setting from options UI (#31117)
* Fix Huawei LTE SMS recipient setting from options UI

Refs https://github.com/home-assistant/home-assistant/issues/30827

* Use core interfaces in tests

* ...more
2020-01-25 13:09:43 +02:00
Aaron Bach
a007835293 Fix RainMachine update action (#31147) 2020-01-24 23:42:59 -07:00
Aaron Bach
550aa6a0a5 Add smarter API usage for RainMachine (#31115)
* Make RainMachine smarter with API usage

* Remove debug statements

* Fix deregistration

* Code review comments

* Code review

* Use an asyncio.Lock

* Remove unnecessary guard clause

* Ensure registation lock per API category
2020-01-24 21:31:14 -08:00
Aaron Bach
cf165cc35f Make SimpliSafe integration more resilient to SimpliSafe cloud issues (#31116)
* Make SimpliSafe integration more resilient to SimpliSafe cloud issues

* Clear emergency refresh token

* Stop listening when appropriate

* Cleanup

* Saving refresh token should happen after all updates

* Code review
2020-01-24 21:19:40 -07:00
ochlocracy
0eee152386 Include supported states in Alexa SecurityPanelController configuration object (#31120)
* Update Security Panel Controller.

* Update Security Panel Controller.

* Sort imports.
2020-01-24 17:57:58 -08:00
HomeAssistant Azure
71ae4b2623 [ci skip] Translation update 2020-01-25 00:31:41 +00:00
Paulus Schoutsen
f4626375f3 Fix when you have two wemo devices (#31139) 2020-01-24 14:59:54 -08:00
Franck Nijhof
c0bc4bb550 Add logo & icon support to Manifest (#31131)
* Add logo & icon support to Manifest

* Add URL validation
2020-01-24 14:36:22 -08:00
Ville Skyttä
9795449d22 Make pylint fail on informational messages too (#31136)
Refs https://github.com/PyCQA/pylint/issues/3250
2020-01-24 23:27:15 +02:00
Paulus Schoutsen
98bac43228 Validate coveragerc with hassfest (#31112)
* Validate coveragerc

* Test if files exists

* Print progress

* Flush
2020-01-24 10:25:46 -08:00
Franck Nijhof
7e4b9adc3d Rewrite of Spotify integration (#30717)
* Rewrite of Spotify integration

* Update homeassistant/components/spotify/config_flow.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>

* Remove configurator dependency

* Strip whitespace from device model in case Spotify product is missing

* Ensure domain dict exists in hass data on setup entry

* Simply config validation for client id and secret

* Abort flow on any exception from spotipy

* Add tests for config flow

* Gen requirements all

* Add test package __init__

* Remove Spotify from coveragerc

* Made alias handling more robuust

* Fix supported_features for Spotify free and open accounts

* Improve error message in the logs

* Re-implement Spotify media_player

* Change media content type when play a playlist

* Process review suggestions

* Move Spotify init, static current user and supported_features

* Remove unneeded me call

* Remove playlist content type due to frontend issues

* Improve playlist handling, when context is missing

* Handle entity disabled correctly

* Handle being offline/unavailable correctly

* Bump Spotipy to 2.7.1

* Update coverage RC, mark integration silver

* Remove URI limitation, lib supports all Spotify URI's now

* Final cleanup

* Addresses Pylint error

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-24 18:47:22 +01:00
Franck Nijhof
4571cf01e2 Update Hue existing config entry with discovery data (#31087)
* Update Hue existing config entry with discovery data

* Updated method documentation comments

* Update implementation to match latest dev

* Use named argument for clarity
2020-01-24 09:07:53 -08:00
SukramJ
1effd605a5 Remove unused async_setup_platform (#31132) 2020-01-24 17:33:23 +01:00
Michael Dokolin
30249d1428 Fix Template components to process entity_id configuration option (#31084)
* Fix Template Cover component to process entity_id configuration option

* Fix Template Light component to process entity_id configuration option

* Empty commit to re-trigger build

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-01-24 12:40:00 +01:00
Desausoi Laurent
6ff572d1dd Add Buienradar camera for Belgium (#30399)
* Buienradar Camera for Belgium

* Voluptuous check for country code

* Black formatting

* Testing for Buienradar Belgium

* Changed MULTIPLE CHOICE variable name

* Changes from frenck review
2020-01-24 12:38:35 +01:00
Paulus Schoutsen
b4f3415eb9 Update cast to 4.1.1 (#31113) 2020-01-24 09:20:47 +01:00
Josef Schlehofer
ca591d591f Upgrade youtube_dl to version 2020.01.24 (#31124) 2020-01-24 00:07:36 -08:00
Raman Gupta
1de003487e Fix connection failure log message in async_setup_entry for Vizio component (#31097)
* remove connection check during setup since it is already done during config flow

* revert change and fix log message

* demote connection setup to warning
2020-01-24 07:39:28 +01:00
HomeAssistant Azure
6da2904e12 [ci skip] Translation update 2020-01-24 00:31:41 +00:00
Franck Nijhof
47b708974d Add disabled entities support to AdGuard (#31106) 2020-01-24 00:50:59 +01:00
Markus Pöschl
7fed328e1c Use speak2mary for MaryTTS integration and enable sound effects (#30805)
* Use speak2mary for MaryTTS integration and enable sound effects

* Replace static defaults for effects with user configured ones
2020-01-23 22:45:06 +01:00
Paolo Tuninetto
fc95744bb7 Change Samsung TV state detection (#30236)
* Changed Samsung TV state detection

* Trying codecov fix

* Update Rewritten

* Changed update method

* Timeout handling

* Fixed autodetect tests

* Fixed last test

* Added test to complete codecov

* Removed state settings in send_key method

* Fixed pylint

* Fixed some tests

* codecov fix
2020-01-23 21:43:30 +01:00
Franck Nijhof
b743f9b8f6 Add update_entry dict to unique ID flow abort helper (#31090)
* Add update_entry dict to unique ID flow abort helper

* Process review suggestions

* Process review suggestions

* Add additional test
2020-01-23 11:21:19 -08:00
Fabian Affolter
bdd73b03b5 Upgrade shodan to 1.21.3 (#31111) 2020-01-23 19:49:01 +01:00
uvjustin
910a0bc870 Allow framerates less than 1 (#31108) 2020-01-23 10:14:47 -08:00
tetienne
1a1ef7680d Add temperature support to light template (#30595)
* Add temperature support

* Use guard clause
2020-01-23 09:18:59 -08:00
Michael Dokolin
894b841a15 Fix HomeKit window covering to support float numbers in the position (#31081)
* Fix HomeKit window covering to support float numbers in the position

* Fix HomeKit window covering to cast current position to an integer value
2020-01-23 09:02:44 -08:00
mindigmarton
bfea9863f1 Update emulated_roku to 0.2.1 (#31100) 2020-01-23 17:12:20 +01:00
Franck Nijhof
e9eaa6536d Upgrade sqlalchemy to 1.3.13 (#31101) 2020-01-23 17:10:40 +01:00
Franck Nijhof
c563652574 Cleanup of PR and issue templates (#31070)
* Remove old issue template

* Small wording improvement

* Consistency

* Configuration fix

* Process review suggestions
2020-01-23 11:55:29 +01:00
Robin
c71ae090fc Add sighthound integration (#28824)
* Add component files

* Add test state

* Adds person detected event

* Update CODEOWNERS

* Updates requirements

* remove unused datetime

* Bump sighthound version

* Update CODEOWNERS

* Update CODEOWNERS

* Create requirements_test_all.txt

* Address reviewer comments

* Add test for bad_api_key
2020-01-23 09:30:06 +01:00
Aaron Bach
73a55825af Remove monitored conditions from RainMachine (#31066)
* Remove monitored conditions from RainMachine

* Migrate config entry

* Revert "Migrate config entry"

This reverts commit 84fcf5120f.

* Code review comments

* Disable some entities by default
2020-01-22 20:49:47 -08:00
Fredrik Erlandsson
3fc86988fa pydaikin version bump (#31080) 2020-01-22 18:09:52 -08:00
James Hilliard
d8eca8e303 Add keep-alive which is required for some hlk-sw16 variants (#31062) 2020-01-22 17:57:55 -08:00
springstan
b7678f526c Deprecate hook integration (#31046) 2020-01-22 17:50:24 -08:00
Jonathan Keljo
572b81e7e0 Add myself to owners for components I contributed (#31020)
* Add myself to owners for components I contributed

* Update CODEOWNERS
2020-01-22 17:49:00 -08:00
Aaron Bach
288574b8d1 Remove monitored conditions from OpenUV (#31019)
* Remove monitored conditions from OpenUV

* Code review comments
2020-01-22 17:48:20 -08:00
Paulus Schoutsen
80887d757a Simplify automation services (#30996)
* Simplify automation services

* Empty commit to re-trigger build

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-01-22 17:46:12 -08:00
Raman Gupta
192b656635 Code Cleanup for Vizio component (#31076)
* code cleanup

* dont use named arguments for positional arguments

* remove extra comma
2020-01-23 01:55:34 +01:00
HomeAssistant Azure
a0d2a3c6c5 [ci skip] Translation update 2020-01-23 00:31:52 +00:00
Paulus Schoutsen
0fba9e44ed Migrate zone to use collection helpers (#30774) 2020-01-22 12:36:25 -08:00
Maciej Bieniek
4c27d6b9aa Add zeroconf discovery support to Brother Printer integration (#30959)
* Add zeroconf discovery support

* Fix data for config_entry

* Add sting for zeroconf confirm dialog

* Add and fix tests

* Fix pylint errors

* Suggested changes

* Tests

* Remove unnecessary object

* Add error handling

* Remove unnecessary objects

* Suggested change

* Suggested change

* Use core interfaces for tests
2020-01-22 11:34:11 -08:00
ochlocracy
4015a046d2 Update AdjustRange Handler Service Calls. (#31016)
Add a AlexaGlobalCatalog value to all labels.
2020-01-22 11:04:31 -08:00
thoscut
93d109e524 Add DIRECTORY and PLUGIN to kodi media types (#28336) 2020-01-22 19:31:03 +01:00
Josh Bendavid
fae74f7ed7 Improve state tracking for WebOsTV (#31042)
* upgrade to aiopylgtv 0.3.0 and corresponding simplification and cleanup of webostv state tracking

* properly handle case where Live TV is not reported in list of apps

* fix tests (entity state is no longer linked to source id)

* fix pylint checks

* avoid unnecessary retrieval of channel list

* use only standard home assistant states
2020-01-22 19:06:08 +01:00
Paulus Schoutsen
e5365779fe Allow unloading mobile app (#30995) 2020-01-22 09:57:47 -08:00
David F. Mulcahey
3c44a1353a change group id creation (#31075) 2020-01-22 09:23:35 -05:00
Franck Nijhof
db76b91ffa Add disabled entities support to WLED (#31040) 2020-01-22 10:45:38 +01:00
Dougal Matthews
96dba7b91f Add the Home Assistant version as a Sentry release (#31065)
This helps make it easier to identify which version of Home Assistant
first introduces a error.
2020-01-22 10:38:24 +01:00
Raman Gupta
463d949ee0 Add zeroconf discovery support for vizio integration (#30949)
* add missing tests

* readd removed test

* add zeroconf discovery support for vizio integration

* no mock_coro_func needed

* add reasonable timeout and don't log exceptions from pyvizio due to timeout

* add test to test options update and bump pyvizio to avoid timeout issues

* update requirements_*

* fix gaps in coverage

* change return hint for async_setup_entry

* use source variables instead of strings

* only get unique ID if about to create entry

* update based on review

* Revert "update based on review"

This reverts commit 0d612a90eb7d02c92061f902973e527267e3110a.

* f-string

* fix last review

* revert cleanup changes to simplify PR

* remove unnecessary ConfigFlow object variables to simplify logic

* revert cleanup changes to make review easier, noted for future cleanup

* revert cleanup changes to make review easier, noted for future cleanup

* move zeroconf service type constant to test module
2020-01-22 10:13:35 +01:00
Raman Gupta
ee74f95371 Enhance info_from_service function in zeroconf integration (#31059)
* enhance zeroconf service info decoding to include raw bytes

* Update homeassistant/components/zeroconf/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* fix test based on last commit

* fix test based on last commit

* remove .keys() when asserting processed and raw service info properties

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-21 21:24:59 -08:00
Quentame
bc600995c1 Do not stop fetching iCloud data after service error (#31069) 2020-01-22 01:39:12 +01:00
Leon Knauer
58973d5265 Fix luftdaten broken icon for "Pressure at sealevel" (#31053) 2020-01-22 01:34:19 +01:00
HomeAssistant Azure
7e604bed7d [ci skip] Translation update 2020-01-22 00:31:43 +00:00
springstan
c3888330c1 Fix fan_modes in tuya climate (#30942) 2020-01-22 01:28:19 +01:00
Jens
15f6e28a04 Add tahoma io:AwningValanceIOComponent (#30944) 2020-01-22 01:09:59 +01:00
Joe Gross
3b4c3e6e17 Fix prometheus component to fully sanitize Unicode characters (#31037)
* Fix prometheus component to fully santize Unicode characters.

Sanitization used isdigit() to match numerics but that also matches 
Unicode "digit" characters that require special handling, like 
superscripts. Failures would look like this:

ValueError: Invalid metric name: sensor_unit_u0x23_per_m³

Changed sanitize to use string.digits, which matches only ascii digits, 
and added test.

See 
https://stackoverflow.com/questions/44891070/whats-the-difference-between-str-isdigit-isnumeric-and-isdecimal-in-python 
for discussion.

https://docs.python.org/3/library/stdtypes.html#str.isdigit

https://docs.python.org/3.7/library/string.html#string.digits

* fix formatting to comply with black
2020-01-22 01:03:42 +01:00
Franck Nijhof
ff7d2ac681 Iteration on issue and PR templates (#31058)
* Iteration on issue and PR templates

* Some small improvements to make it look better in the PR editor

* Better English

* Please keep template

* Consistency

* Adds www to website link, to make more clear it is our website

* Process review suggestion by Martin

* Added dep bump as type of change

* English
2020-01-21 23:24:01 +01:00
Franck Nijhof
e8e7e66e2b Bump pytest to 5.3.4 (#31045) 2020-01-21 15:44:39 -05:00
David Bonnes
e00388eea0 switch evohome to use a whitelist for valid zonetype (#31047) 2020-01-21 18:49:15 +00:00
Franck Nijhof
19d30f0a1b Update issue and PR templates (#31056)
* Update issue and PR templates

* Empty commit to re-trigger build
2020-01-21 18:38:50 +01:00
zhumuht
27c25b6f44 Add xiaomi miio sensors cgllc.airmonitor.s1 & cgllc.airmonitor.b1 (#30345)
* support xiaomi miio sensor: cgllc.airmonitor.s1 & cgllc.airmonitor.b1

* support xiaomi miio sensor: cgllc.airmonitor.s1 & cgllc.airmonitor.b1

* rollback sensor,  modify air_quality

* only set air_quality props

* remove set state from "zhimi.airmonitor.v1"

* unit_of_measurement return None when the pm25 isn't reported

* import libs by isort
2020-01-21 17:06:17 +01:00
Abílio Costa
2aff913d9b Update pyipma to 2.0 (#30746)
* update ipma component for pyipma 2.0

* fix wind speed; refactor forecast

* update requirements*.txt

* fix tests; update CODEOWNERS; update pyipma to 2.0.1

* minor changes as suggested in PR

* make lint happy

* fix mocking coroutines

* restore old unique id

* fix station lat/lon; update pyipma version
2020-01-21 17:04:22 +01:00
James Nimmo
c2df4f56a3 Bump pyintesishome to v1.6 (#31044) 2020-01-21 16:57:27 +01:00
Franck Nijhof
a3bcf69adf 0.104.3 (#31048)
0.104.3
2020-01-21 13:25:53 +01:00
Franck Nijhof
fb35d382e1 Remove all empty *_setup_platform() from integrations (#31025)
* Remove all empty *_setup_platform() from integrations

* Fix tests for smartthings

* Fix tests for heos
2020-01-21 12:38:38 +01:00
Franck Nijhof
cfa74039bb Bumped version to 0.104.3 2020-01-21 12:18:07 +01:00
Franck Nijhof
ccf6ce71cf Fix deCONZ update entry from Hassio discovery (#31015)
* Fix deCONZ update entry from Hassio discovery

* Empty commit to re-trigger build
2020-01-21 12:14:31 +01:00
Jeff Irion
392cf57750 Fix capability_attributes when supported_features is None (#30993)
* Fix capability_attributes when supported_features is None (water_heater)

* Fix capability_attributes when supported_features is None (media_player)
2020-01-21 12:14:28 +01:00
steve-gombos
6889816704 Ring camera fix (#30975)
* Fix ring camera entities

* Reverted test refresh interval

* Fix black errors
2020-01-21 12:14:24 +01:00
Jan De Luyck
dde6220ca5 Update emulated_roku to 0.2.0 (#30974) 2020-01-21 12:14:16 +01:00
Paulus Schoutsen
dead2fe576 Catch all Ring timeout errors (#30960)
* Catch more Ring errors

* Fix comment & Disable wifi entities by default

Signed-off-by: Franck Nijhof <git@frenck.dev>
2020-01-21 12:13:11 +01:00
David F. Mulcahey
41014d73be Allow ZHA device creation for the Zigbee coordinator (#31032)
* allow zha device creation for coordinator

* don't let coordinator get removed

* fix truthy issue in logical device type
2020-01-21 06:07:47 -05:00
Josef Schlehofer
bc6603d8d7 Upgrade pyyaml to 5.3 (#31026) 2020-01-20 21:12:16 -08:00
Josef Schlehofer
0b72587af2 Upgrade importlib-metadata to version 1.4.0 (#31027) 2020-01-20 21:11:23 -08:00
HomeAssistant Azure
692e4f27c4 [ci skip] Translation update 2020-01-21 00:33:20 +00:00
David Bonnes
8f37c843f5 Handle ghost zones gracefully (#31008) 2020-01-20 20:49:04 +00:00
Aaron Bach
662c12715e Allow OpenUV entities to be unavailable (#31018)
* Allow OpenUV entities to be unavailable

* Empty commit to re-trigger build
2020-01-20 13:33:58 -07:00
Sébastien RAMAGE
1639432463 Bump zigpy-zigate to 0.5.1 (#31004)
* Bump zigpy-zigate to 0.5.1
Improve startup and channel setting
2020-01-20 13:09:20 -05:00
Quentame
8c22858ae3 Use config_entry.unique_id in iCloud (#30984)
* Use unique_id in iCloud

* Remove missed self._configuration_exists()

* Avoid breaking change

* Almost fix tests

* Add missing test

* Fix tests
2020-01-20 18:59:29 +01:00
Ville Skyttä
5e2ba2eb77 Enable some more bandit checks (#30857)
* Enable B108 (hardcoded tmp dir), address findings

* Enable B602 (subprocess popen with shell), address findings

* Enable B604 (start process with shell), address findings

* Enable B306 (mktemp), B307 (eval), and B325 (tempnam), no issues to address
2020-01-20 18:44:55 +02:00
Franck Nijhof
6cf20fc7fa Fix deCONZ update entry from Hassio discovery (#31015)
* Fix deCONZ update entry from Hassio discovery

* Empty commit to re-trigger build
2020-01-20 08:18:10 -08:00
Franck Nijhof
f7a97dae2d Adds missing strings to Withings (#31012) 2020-01-20 16:26:44 +01:00
Franck Nijhof
d2b0031f55 Adds missing strings to Almond (#31013) 2020-01-20 16:26:06 +01:00
David Bonnes
9b02ca96ba Small tweaks for evohome (#31007) 2020-01-20 13:39:02 +00:00
Bas Nijholt
a010577d6e Add kef supports_on option (#30937)
* add supports_on_off option

* modify support_kef inplace

* all speakers support turning off remotely
2020-01-20 14:24:13 +01:00
Josh Bendavid
a634e62dfc Minor fixes for webostv (#30998)
* restore emulation of play pause toggle

* add protection to notify setup

* add state check for power off to avoid switching tv back on
2020-01-20 10:43:20 +01:00
Ronald Dehuysser
053f18d6ce Add attributes departure_minutes and delay_minutes to the nmbs sensor (#30958)
* Improve sensor for automations

I've updated the sensor so that departure time and delay can be used in automatons.

Before, the departure time and delay time were only available wrapped in strings which makes it difficult to use them in automations. Using the extra attributes, one can easily use them in automations.

* Update homeassistant/components/nmbs/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Updates based on review

Changed min to minutes as requested

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-01-20 09:51:59 +01:00
Aaron Bach
9993333bf9 Add state reproduction to remotes (#30990) 2020-01-19 23:08:32 -08:00
Jeff Irion
bb37f7bb75 Fix capability_attributes when supported_features is None (#30993)
* Fix capability_attributes when supported_features is None (water_heater)

* Fix capability_attributes when supported_features is None (media_player)
2020-01-19 23:06:35 -08:00
Faucogney Anthony
b2212ad445 Add Derivative component (#26456)
* create derivation component

based on integration component
remove left and right

* Update test

(was'n saved)

* add some functionnal point test

* Change derivation to derivative

* Continue migration from derivation to derivative

* Add codeowners info

* fix tests typo and values

* Improve code from reviewer

add test case
fix test values
still a prefix issue that should not

* create derivation component

based on integration component
remove left and right

* Update test

(was'n saved)

* add some functionnal point test

* Change derivation to derivative

* Continue migration from derivation to derivative

* Add codeowners info

* fix tests typo and values

* Improve code from reviewer

add test case
fix test values
still a prefix issue that should not

* Update homeassistant/components/derivative/sensor.py

Fix test issue with unit of measurement

Co-Authored-By: Santobert <tobhaase@gmail.com>

* Fix review

Move ValueError to SyntaxError

* precise state test

* un comment original tests and remove error tests

* Fix isort issue

* Fix review

- update doc link
- migrate to general const import

* Rollback import conf_unit, just defined localy

Co-authored-by: Santobert <tobhaase@gmail.com>
2020-01-19 22:17:06 -08:00
zhumuht
5f31b48f1d print component import error to logfile (#30346) 2020-01-19 22:05:10 -08:00
Raman Gupta
e535133016 Fix options update during import config flow step for vizio component (Bugfix for #30653) (#30977)
* fix options update logic during import

* add missing tests

* fix abort reasons and strings, add missing test

* combine steps when testing esn already exists

* readd removed test

* no mock_coro_func needed

* add block_until_done and assert entry options
2020-01-19 20:13:15 -08:00
Paulus Schoutsen
0c3ffbe282 Add foundation for integration services (#30813)
* Add foundation for integration services

* Fix tests

* Remove async_get_platform

* Migrate Sonos partially to EntityPlatform.async_register_entity_service

* Tweaks

* Move other Sonos services to media player domain

* Move other Sonos services to media player domain

* Address comments

* Remove lock

* Fix typos

* Use make_entity_service_schema

* Add area extraction to async_extract_entities

Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>
2020-01-19 17:55:18 -08:00
HomeAssistant Azure
f20b3515f2 [ci skip] Translation update 2020-01-20 00:31:55 +00:00
David Bonnes
a40a5a754b initial commit (#30968) 2020-01-19 14:29:15 -08:00
Paulus Schoutsen
ecef0f6e93 Catch all Ring timeout errors (#30960)
* Catch more Ring errors

* Fix comment & Disable wifi entities by default
2020-01-19 13:39:16 -08:00
steve-gombos
8fcd0e9a79 Ring camera fix (#30975)
* Fix ring camera entities

* Reverted test refresh interval

* Fix black errors
2020-01-19 13:18:11 -08:00
Paulus Schoutsen
765b45c81b Improve Wemo config entry support, add device info (#30963)
* Improve config entry support, add device info

* async_dispatch_connect

* Fix I/O in event loop

* Do not raise PlatformNotReady inside dispatcher

* Make main discovery process async

* Do discovery as part of set up.

* Greatly simplify set up

* Add parallel updates to fan&switch

* mini cleanup

* Address comments
2020-01-19 13:13:10 -08:00
Paulus Schoutsen
e4a53d3a08 Improve Wemo config entry support, add device info (#30963)
* Improve config entry support, add device info

* async_dispatch_connect

* Fix I/O in event loop

* Do not raise PlatformNotReady inside dispatcher

* Make main discovery process async

* Do discovery as part of set up.

* Greatly simplify set up

* Add parallel updates to fan&switch

* mini cleanup

* Address comments
2020-01-19 12:57:48 -08:00
Paulus Schoutsen
f14d34560e Improve Wemo config entry support, add device info (#30963)
* Improve config entry support, add device info

* async_dispatch_connect

* Fix I/O in event loop

* Do not raise PlatformNotReady inside dispatcher

* Make main discovery process async

* Do discovery as part of set up.

* Greatly simplify set up

* Add parallel updates to fan&switch

* mini cleanup

* Address comments
2020-01-19 12:56:31 -08:00
Jan De Luyck
90e811df20 Update emulated_roku to 0.2.0 (#30974) 2020-01-19 21:01:16 +01:00
Quentame
7c155731fc Fix can't add multiple iCloud accounts (remove account name) (#30898)
* Fix can't add multiple iCloud accounts (remove account name)

* Update tests with flow.async_init()
2020-01-19 14:19:46 +01:00
HomeAssistant Azure
6c84c126ea [ci skip] Translation update 2020-01-19 00:32:00 +00:00
David F. Mulcahey
078ce24e5a Add logical Zigbee device type to ZHA device info (#30954)
* add device type to device info
* capitalize
* use zigpy logical device type
2020-01-18 19:27:55 -05:00
ajmarks
656ef6566b Minor enhancements to jewish_calendar (#30632)
* Minor enhancement to jewish_calendar:
 - Expose more halachic times from the underlying hdate module
 - Correct and standardize some transliterations

* Undo breking name change

* Add icon for talit time

Co-authored-by: Andrew Marks <52414333+amarks-coatue@users.noreply.github.com>
2020-01-18 21:33:18 +01:00
Barry Williams
afb1b0cd3c Add play media support and Spotify control to Openhome (#28698) 2020-01-18 18:37:39 +01:00
Alexei Chetroi
26fb1ce255 Don't use unit_of_measurement in state attributes. (#30941) 2020-01-18 10:03:59 -05:00
springstan
4b67508330 Revert "Pulseaudio: Changed default port from 4712 to 4713 (#28857)" (#30939)
This reverts commit e915dd0d95.
2020-01-18 14:02:15 +01:00
David Bonnes
a037c1d788 Add services to evohome (#29816) 2020-01-18 12:21:22 +00:00
David Bonnes
bfa8cb760f Add services to geniushub (#30918)
adds:
 - `set_zone_override`, and
 - `set_zone_mode`
2020-01-18 12:14:50 +00:00
Raman Gupta
8630a076a7 Use default media player device classes for vizio component (#30802)
* use media player defined device classes instead of custom ones, add options flow test, add timeout options parameter

* make options update error more generic

* fix config flow options update logic

* simplify logic for options update during import

* use platform list for load and unload

* update private config flow function name and description

* fix grammar in strings.json

* update mock config variable names to be more accurate

* remove timeout conf option, create device_class property

* update requirements

* update .coveragerc to indicate that config_flow has tests

* fix source of device_class property and move constants to const.py

* fix grammar in error message

* remove redundant device check in async_setup_entry since device connection is checked during config flow

* revert change to async_setup_entry, raise ConfigEntryNotReady if device can't be connected to

* update error text

* add more context to error text
2020-01-18 09:15:05 +01:00
springstan
52cee84c2c Update outdated documentation links in json files (#30916) 2020-01-17 21:41:42 -08:00
Alexei Chetroi
3bf657284c Refactor rounding for ZHA electrical measurement sensor (#30923) 2020-01-17 20:53:31 -05:00
Alexei Chetroi
58520aa733 Add battery voltage state attribute for ZHA devices (#30901)
* Add battery voltage state attribute for ZHA devices.

* Pylint.
2020-01-17 19:43:02 -05:00
Paulus Schoutsen
7ef7d1dfd0 Merge pull request #30925 from home-assistant/rc
0.104.2
2020-01-17 16:32:18 -08:00
HomeAssistant Azure
4d7c8e254b [ci skip] Translation update 2020-01-18 00:31:52 +00:00
Paulus Schoutsen
2c915af348 Bumped version to 0.104.2 2020-01-17 15:48:27 -08:00
Paulus Schoutsen
2b733917a4 Fix hue accepting filename (#30924) 2020-01-17 15:48:21 -08:00
Bram Kragten
353010712f pdated frontend to 20200108.2 (#30921) 2020-01-17 15:47:58 -08:00
Robert Svensson
07a0bc4abe Fix service device refresh calling state update (#30920) 2020-01-17 15:46:10 -08:00
Paulus Schoutsen
f9b48844e6 camera endpoint likes to timeout, catch it. (#30919) 2020-01-17 15:46:10 -08:00
ochlocracy
6053d02e44 Fix Alexa semantics for covers with tilt support. (#30911)
* Fix Alexa semantics for covers with tilt support.

* Clarify wording.

* Korrect grammar.
2020-01-17 15:45:41 -08:00
Robert Svensson
6ac33e5c7b Fix issue with group unique id when normalising bridge id (#30904) 2020-01-17 15:44:09 -08:00
SukramJ
586566e6ab Fix missing switch groups of HomematicIP Cloud (#30903) 2020-01-17 15:44:08 -08:00
David F. Mulcahey
5a46adfebf add multistate back (#30889) 2020-01-17 15:44:07 -08:00
Paulus Schoutsen
9f20185cee Fix hue accepting filename (#30924) 2020-01-17 15:38:38 -08:00
Robert Svensson
c9db21ffac Fix service device refresh calling state update (#30920) 2020-01-17 15:33:46 -08:00
Robert Svensson
7b29a498c6 Fix issue with group unique id when normalising bridge id (#30904) 2020-01-17 15:28:34 -08:00
ochlocracy
1d41cf96ca Fix Alexa semantics for covers with tilt support. (#30911)
* Fix Alexa semantics for covers with tilt support.

* Clarify wording.

* Korrect grammar.
2020-01-17 15:04:46 -08:00
Bram Kragten
e33698b17d Updated frontend to 20200108.2 (#30921) 2020-01-17 14:54:53 -08:00
Paulus Schoutsen
8cacef47f3 camera endpoint likes to timeout, catch it. (#30919) 2020-01-17 14:54:32 -08:00
Joakim Sørensen
a5a69bdf71 Adds icon endpoint to NO_AUTH (#30910)
* Adds icon endpoint to NO_AUTH

* Add test for no_auth icon get

* Blackout
2020-01-17 13:54:28 -08:00
Peter Nijssen
196bf2f3a0 remove PostNL component as it is no longer working (#30902) 2020-01-17 12:51:32 -08:00
Aaron Bach
847196dbe8 Remove option to configure SimpliSafe scan interval (#30909)
* Enforce minimum scan interval for SimpliSafe

* Remove scan interval all together

* Fix tests
2020-01-17 13:43:41 -07:00
David F. Mulcahey
31996120dd add multistate back (#30889) 2020-01-17 13:06:10 -05:00
SukramJ
d913d35fc3 Fix missing switch groups of HomematicIP Cloud (#30903) 2020-01-17 18:37:32 +01:00
Alexei Chetroi
8a78b65f0d Extract collection entity registry cleaner into a helper (#30844)
* Extract entity_registry_keeper into separate helper
* Refactor input_*, timer and person to use new helper.
* Make Mypy happy.
* Better name.
2020-01-17 11:41:46 -05:00
cgtobi
da368f0cb8 Update pyatmo to 3.2.2 and add available attribute (#30882)
* Update pyatmo to 3.2.1

* Update pyatmo to 3.2.2

* Remove accidentally added requirements

* Add availability property
2020-01-17 17:08:30 +01:00
Raman Gupta
d63ea198f2 Bump pyvizio version to 0.1.1 (#30867)
* bump pyvizio version to resolve setup issue

* update requirements*.txt
2020-01-17 08:48:59 +01:00
HomeAssistant Azure
24a381456a [ci skip] Translation update 2020-01-17 00:31:45 +00:00
Daniel Shokouhi
6678f8387f Remove unused import (#30858) 2020-01-16 16:26:10 -08:00
Paulus Schoutsen
09f7a09ce7 Merge pull request #30853 from home-assistant/rc
0.104.1
2020-01-16 12:47:51 -08:00
Aaron Bach
e2e01f5020 Fix sensor type creation with multiple Ambient weather stations (#30850) 2020-01-16 11:38:10 -08:00
Per-Øyvind Bruun
0e1450838e Fix for issue #29822 (#30849) 2020-01-16 11:38:10 -08:00
Per-Øyvind Bruun
a93088dafb Fix for issue #29822 (#30849) 2020-01-16 11:37:53 -08:00
Aaron Bach
9bfcd04a4f Fix sensor type creation with multiple Ambient weather stations (#30850) 2020-01-16 11:37:28 -08:00
Paulus Schoutsen
006419b96c Whitelist Frenck for release 2020-01-16 11:36:01 -08:00
Paulus Schoutsen
3f54533e72 Bumped version to 0.104.1 2020-01-16 11:33:54 -08:00
Paulus Schoutsen
cc126761e1 Reinstate and deprecate filename option for hue config (#30846) 2020-01-16 11:33:47 -08:00
Quentame
8fdf68c8d1 Fix iCloud when no family members (issue #30829) (#30836) 2020-01-16 11:33:46 -08:00
Josh Bendavid
6a8582750c Fix play_media in webostv (#30828) 2020-01-16 11:33:45 -08:00
Pascal Vizeli
5b51f740df Fix mpd time issue (#30825)
* Fix mpd time issue

* Update homeassistant/components/mpd/media_player.py

Co-Authored-By: Franck Nijhof <git@frenck.dev>
2020-01-16 11:33:45 -08:00
Paulus Schoutsen
881b35f9d6 Handle no host info in ignored config entries (#30822) 2020-01-16 11:33:44 -08:00
springstan
8f852bd656 Fix setup error of Mikrotik (#30810) 2020-01-16 11:33:43 -08:00
Josh Bendavid
368d04b2a1 update to aiopylgtv 0.2.7 (#30797) 2020-01-16 11:33:42 -08:00
Jan De Luyck
6d83dafff2 Update emulated_roku to 0.1.9 (#30791)
* Update emulated_roku to 0.1.9

* Update requirements_all
2020-01-16 11:33:42 -08:00
Paulus Schoutsen
7da84dca76 Reinstate and deprecate filename option for hue config (#30846) 2020-01-16 11:28:35 -08:00
Franck Nijhof
2a65da5db2 Deprecate history_graph integration (#30835) 2020-01-16 10:31:18 -08:00
Franck Nijhof
8861c80068 Deprecate hide_if_away from device_tracker (#30833) 2020-01-16 10:31:00 -08:00
Quentame
04b7d9e848 Fix iCloud when no family members (issue #30829) (#30836) 2020-01-16 09:27:43 -08:00
Franck Nijhof
235ab64066 Deprecate weblink integration (#30834) 2020-01-16 09:25:49 -08:00
Franck Nijhof
4544665749 Deprecate states UI options in group integration (#30831) 2020-01-16 09:25:39 -08:00
Paulus Schoutsen
e1205409f3 Handle location API being exhausted (#30798) 2020-01-16 17:31:12 +01:00
Alexei Chetroi
d9d5e06baf Use collection helpers for input_datetime component (#30815)
* Refactor input_datetime.
Keep the state as datetime, but format accordingly to has_time and
has_date.

* Use config dict for input_datetime.
* Add tests.
* Lint
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-16 09:16:57 -05:00
Josh Bendavid
d1da653e62 Fix play_media in webostv (#30828) 2020-01-16 12:30:55 +01:00
Pascal Vizeli
bef8600972 Fix mpd time issue (#30825)
* Fix mpd time issue

* Update homeassistant/components/mpd/media_player.py

Co-Authored-By: Franck Nijhof <git@frenck.dev>
2020-01-16 11:20:58 +01:00
springstan
9d5a391916 Fix setup error of Mikrotik (#30810) 2020-01-16 10:48:47 +01:00
Paulus Schoutsen
6f24fe3970 Handle no host info in ignored config entries (#30822) 2020-01-16 10:19:38 +01:00
Rick van Hattem
1566d963a8 Fixed pyyaml requirement from 5.2.0 to 5.2 (#30808) 2020-01-15 20:16:26 -05:00
HomeAssistant Azure
01520a32d3 [ci skip] Translation update 2020-01-16 00:31:45 +00:00
Franck Nijhof
b42134bbce Merge branch 'master' into dev 2020-01-15 22:18:51 +01:00
Franck Nijhof
4bb319e658 0.104.0 (#30803)
0.104.0
2020-01-15 21:38:22 +01:00
MatthewFlamm
b8feaba5cb Update pynws to v0.10.1 (#30662)
* update to pynws 0.10.1

* remove unneeded raw json files

* move test helper module to const
2020-01-15 12:01:47 -08:00
springstan
3899c6ae27 Bump librouteros to 3.0.0 (#30800) 2020-01-15 11:54:20 -08:00
Franck Nijhof
1e2c3cacf9 Mark hide_entity deprecated in automation integration (#30799) 2020-01-15 11:53:52 -08:00
Franck Nijhof
3d9b6332c8 Bumped version to 0.104.0 2020-01-15 20:22:09 +01:00
Jc2k
1a6535ff8b Restore unit_of_measurement from entity registry (#30780)
* Restore unit_of_measurement from entity registry

* Lint fix
2020-01-15 20:17:42 +01:00
Paulus Schoutsen
3fd14ca3cf Refactor Ring data handling (#30777)
* Refactor Ring data handling

* Add async_ to methods
2020-01-15 20:17:36 +01:00
Pascal Vizeli
1c70435df6 Revert #29701 (#30766)
* Revert #29701

* fix format

* Fix lint
2020-01-15 20:17:28 +01:00
Josh Bendavid
5393300086 update to aiopylgtv 0.2.7 (#30797) 2020-01-15 10:48:30 -08:00
ochlocracy
bb42ff93f4 Add support for vacuums to Alexa. (#30764) 2020-01-15 09:15:31 -08:00
Paulus Schoutsen
1e82813c3b Refactor Ring data handling (#30777)
* Refactor Ring data handling

* Add async_ to methods
2020-01-15 08:10:42 -08:00
Jc2k
de26108b23 Restore unit_of_measurement from entity registry (#30780)
* Restore unit_of_measurement from entity registry

* Lint fix
2020-01-15 08:09:05 -08:00
Miroslav Ždrale
36796ef649 Update pyubee to 0.8 (#30785) 2020-01-15 16:24:06 +01:00
Jan De Luyck
41469cec6c Update emulated_roku to 0.1.9 (#30791)
* Update emulated_roku to 0.1.9

* Update requirements_all
2020-01-15 16:21:55 +01:00
Raman Gupta
ac771addc1 Add Config Flow support, Device Registry support, available property to vizio component (#30653)
* add config flow support, device registry support, available property

* raise PlatformNotReady if HA cant connect to device

* remove test logging statement and fix integration title

* store import and last user input values so user can see errors next to value that caused error

* add PARALLEL_UPDATES

* add missing type hints

* add missing type hints to tests

* fix options config flow title

* changes based on review

* better key name for message when cant connect

* fix missed update to key name

* fix comments

* remove logger from test which was used to debug and update test function names and docstrings to be more accurate

* add __init__.py to vizio tests module

* readded options flow and updated main component to handle options updates, set unique ID to serial, fixes based on review

* pop hass.data in media_player unload instead of in __init__ since it is set in media_player

* update requirements_all and requirements_test_all

* make unique_id key name a constant

* remove additional line breaks after docstrings

* unload entries during test_user_flow and test_import_flow tests to hopefully reduce teardown time

* try to speed up tests

* remove unnecessary code, use event bus to track options updates, move patches to pytest fixtures and fix patch scoping

* fix comment

* remove translations from commit

* suppress API error logging when checking for device availability as it can spam logs

* update requirements_all and requirements_test_all

* dont pass hass to entity since it is passed to entity anyway, remove entity unload from tests, other misc changes from review

* fix clearing listeners

* use config_entry unique ID for unique ID and use config_entry entry ID as update signal

* update config flow based on suggested changes

* update volume step on config import if it doesn't match config_entry volume step

* update config_entry data and options with new volume step value

* copy entry.data and entry.options before updating when updating config_entry

* fix test_import_entity_already_configured
2020-01-15 11:43:55 +01:00
Alexei Chetroi
5fa7d6f22a Allow input_* and timer component setup without config (#30772)
* Allow input_boolean setup without config.

* Allow input_number setup without config.

* Allow input_select setup without config.

* Allow input_text setup without config.

* Allow timer setup without config.
2020-01-14 22:15:59 -05:00
Bram Kragten
8af946fba5 Search: Add search to default config and don't resolve area (#30762)
* Add search to default config and don't resolve area

* Move to frontend

* Minor update

Co-authored-by: Jason Hu <awarecan@users.noreply.github.com>
2020-01-14 18:36:21 -08:00
HomeAssistant Azure
8093da6a0c [ci skip] Translation update 2020-01-15 00:31:56 +00:00
Alexei Chetroi
0a7feba855 Use storage based collections for Timer platform (#30765)
* Use config dict for timer entity.

* Manage timer entities using collection helpers.

* Add tests.

* Make Timer duration JSON serializable.
2020-01-14 15:32:48 -08:00
Josef Schlehofer
6f84723fec Upgrade youtube_dl to version 2020.01.15 (#30767) 2020-01-14 15:31:51 -08:00
Paulus Schoutsen
fbf5e320f7 Whitelist Frenck for release 2020-01-14 15:06:30 -08:00
Pascal Vizeli
4731f7c721 Hass.io allow to reset password with CLI (#30755)
* Hass.io allow to reset passwort with CLI

* Add improvments

* fix comments

* fix lint

* Fix tests

* more tests

* Address comments

* sort imports

* fix test python37
2020-01-14 23:49:56 +01:00
Pascal Vizeli
9f62b58929 Revert #29701 (#30766)
* Revert #29701

* fix format

* Fix lint
2020-01-14 23:02:49 +01:00
Paulus Schoutsen
5fdc60e067 Add Safe Mode (#30723)
* Store last working HTTP settings

* Add safe mode

* Fix tests

* Add cloud to safe mode

* Update logging text

* Fix camera tests leaving files behind

* Make emulated_hue tests not leave files behind

* Make logbook tests not leave files behind

* Make tts tests not leave files behind

* Make image_processing tests not leave files behind

* Make manual_mqtt tests not leave files behind
2020-01-14 13:03:02 -08:00
Paulus Schoutsen
8dbdf0b0e1 Bumped version to 0.104.0b5 2020-01-14 12:59:50 -08:00
Franck Nijhof
fe9c85aaf1 Fix HomeKit behavior with lights supporting color and temperature (#30756) 2020-01-14 12:59:41 -08:00
Bas Nijholt
9de800ab6a bump aiokef to 0.2.5 which uses locks (#30753) 2020-01-14 12:59:41 -08:00
Pascal Vizeli
f530ea10af Refactor HomeMatic / Fix issue with 0.104/dev (#30752)
* Refactor HomeMatic / Fix issue with 0.104/dev

* Fix lock
2020-01-14 12:59:40 -08:00
Daniel Perna
64224f46ec Update pyhomematic to 0.1.63 (#30594) 2020-01-14 12:59:39 -08:00
Alan Tse
413545bd91 Bump teslajsonpy to 0.2.3 (#30750) 2020-01-14 12:57:34 -08:00
Paulus Schoutsen
f5af77d00c Set default locale for cloud Alexa config (#30749) 2020-01-14 12:57:33 -08:00
Paulus Schoutsen
4bc520c724 Update Ring to 0.6.0 (#30748)
* Update Ring to 0.6.0

* Update sensor tests

* update -> async_update

* Delete temp files

* Address comments

* Final tweaks

* Remove stale print
2020-01-14 12:57:32 -08:00
David F. Mulcahey
8e5f46d5b5 Bump ZHA quirks to 0.0.31 (#30740)
* Bump ZHA quirks version

* update requirements
2020-01-14 12:57:31 -08:00
Josh Bendavid
9fa0779c1f update aiopylgtv to 0.2.6 (#30739) 2020-01-14 12:57:30 -08:00
Josh Bendavid
c138a93454 update aiopylgtv to 0.2.5 (#30702) 2020-01-14 12:57:30 -08:00
Paulus Schoutsen
c6b96f7250 Fix Ring wifi sensors (#30735)
* Fix Ring wifi sensors

* Update before adding
2020-01-14 12:56:01 -08:00
Phil Bruckner
4a8ecb82a8 Revert "Forget auth token when going offline so we can reconnect (#26630)" (#30705)
This reverts commit 2d6d6ba90e.
2020-01-14 12:56:00 -08:00
Franck Nijhof
80f3cb7d79 Fix discovery for oauth2 flow implementations (#30700)
* Fix discovery for oauth2 flow implementations

* Fix user step

* Add tests
2020-01-14 12:55:59 -08:00
Paulus Schoutsen
c4673ddee1 Update Ring to 0.6.0 (#30748)
* Update Ring to 0.6.0

* Update sensor tests

* update -> async_update

* Delete temp files

* Address comments

* Final tweaks

* Remove stale print
2020-01-14 12:54:45 -08:00
Tim Rightnour
ba3c3057da Add support for the voltage sensor on the greeneye GEM (#30484)
* Add support for the voltage sensor on the greeneye GEM

* Changed per suggestion @springstan
2020-01-14 20:46:04 +01:00
springstan
297c360d04 Fix supported_features in MQTT fan (#28680)
* Added custom validator function for speed list

* Replace CONF_SPEED_STATE_TOPIC with CONF_SPEED_COMMAND_TOPIC to determine SUPPORT_SET_SPEED

* Revert "Added custom validator function for speed list"

This reverts commit f000396fa6.

* Replace CONF_OSCILLATION_STATE_TOPIC with CONF_OSCILLATION_COMMAND_TOPIC to determine SUPPORT_OSCILLATE
2020-01-14 09:17:44 -08:00
Akın Ömeroğlu
0b8a269b23 Fix small typo in alarmdotcom component (#30758) 2020-01-14 17:47:59 +01:00
Bas Nijholt
a26fef38a2 bump aiokef to 0.2.5 which uses locks (#30753) 2020-01-14 17:41:52 +01:00
Franck Nijhof
6b49bea6c4 Fix HomeKit behavior with lights supporting color and temperature (#30756) 2020-01-14 07:09:35 -08:00
Alan Tse
aeb789ddcc Bump teslajsonpy to 0.2.3 (#30750) 2020-01-14 11:27:49 +01:00
Pascal Vizeli
ced6df158b Refactor HomeMatic / Fix issue with 0.104/dev (#30752)
* Refactor HomeMatic / Fix issue with 0.104/dev

* Fix lock
2020-01-14 11:26:59 +01:00
Bas Delfos
0d688faa56 Fix 'NewIPAddress' error in component fritz (#30210)
* Fix 'NewIPAddress' error in component fritzbox

* Upgrade to fritzconnection 1.2.0
2020-01-14 09:46:16 +01:00
Paulus Schoutsen
1e3b3ecbe6 Set default locale for cloud Alexa config (#30749) 2020-01-14 08:33:45 +01:00
HomeAssistant Azure
f9fe91ee74 [ci skip] Translation update 2020-01-14 00:31:46 +00:00
Steven Looman
75f0fedd68 Fix translation from HA playlist to UPnP playlistItem (#30743) 2020-01-13 23:52:49 +01:00
Franck Nijhof
658d338058 Removes Cisco Spark integration (#30738) 2020-01-13 10:23:26 -08:00
Josh Bendavid
f639a8fbaa update aiopylgtv to 0.2.6 (#30739) 2020-01-13 13:11:06 -05:00
David F. Mulcahey
1b730b3055 Bump ZHA quirks to 0.0.31 (#30740)
* Bump ZHA quirks version

* update requirements
2020-01-13 13:10:22 -05:00
Paulus Schoutsen
10e89bbc8c Fix Ring wifi sensors (#30735)
* Fix Ring wifi sensors

* Update before adding
2020-01-13 09:13:46 -08:00
Paulus Schoutsen
f50714d7e9 Update config flow test scaffolding (#30694)
* Update config flow test scaffolding

* asyncpatch -> patch

* Update classname
2020-01-13 15:20:25 +01:00
Franck Nijhof
040b283a14 Fix hassfest allowing omitting discovery methods when using OAuth2Flow (#30732) 2020-01-13 05:36:47 -08:00
Paulus Schoutsen
1f9d6ba541 Update Hue SSDP discovery (#30695) 2020-01-13 05:30:07 -08:00
Franck Nijhof
1b739f9555 Removes unneeded abort if unique id in Oauth2 discovery flow (#30733) 2020-01-13 05:29:19 -08:00
michaeldavie
3c2b57afaf Bump env_canada to 0.0.34 (#30713) 2020-01-13 14:27:53 +01:00
Franck Nijhof
7143ed7ceb Remove hidden property from fibaro integration (#30730) 2020-01-13 14:23:08 +01:00
Franck Nijhof
0c14d4e067 Remove hidden property from emby integration (#30729) 2020-01-13 14:22:48 +01:00
Franck Nijhof
c8a52d4566 Remove hidden property from egardia integration (#30728) 2020-01-13 14:22:06 +01:00
Franck Nijhof
3df329b8ec Bump apprise to 0.8.3 (#30731) 2020-01-13 08:20:09 -05:00
Franck Nijhof
56dc5298fc Remove hidden property from xiaomi_miio.remote integration (#30727) 2020-01-13 13:50:01 +01:00
Maciej Bieniek
15645ab0c9 Add unique ID to Airly config entries (#30681)
* Add unique ID to Airly config entries

* Update tests

* Update tests

* Fix typo

* Remove unnecesary and undo changes in first test

* Suggested change
2020-01-13 13:28:07 +01:00
zewelor
ce13fb8d73 Support yeelight color light with nightlight (#30194)
* Support color light with nightlight

* Better nightlight mode support check

* Lint fixes

* Remove brightness control for color light with nightlight mode
2020-01-13 06:03:48 +01:00
Franck Nijhof
96c11bc6d7 Unhide SPC binary sensors by default (#30699) 2020-01-12 20:47:07 -08:00
Aaron Bach
b585feb109 Consolidate SimpliSafe property services (#30567)
* Consolidate SimpliSafe property services

* Code review comments

* Code review comments

* Ensure all services are admin services

* Code review comments
2020-01-12 21:32:08 -07:00
Quentame
123bef4f1e Fix SynologyDSM sensor if network_sensors is None (#30718) 2020-01-13 04:42:37 +01:00
HomeAssistant Azure
0534153ae7 [ci skip] Translation update 2020-01-13 00:31:54 +00:00
Phil Bruckner
89c04c94e0 Revert "Forget auth token when going offline so we can reconnect (#26630)" (#30705)
This reverts commit 2d6d6ba90e.
2020-01-12 14:21:07 -06:00
Yarmo Mackenbach
96bf8bc395 Update NSAPI to version 3.0.0 (#30599)
* Updated NSAPI to version 3.0.0

* Fixed code style error

* Restructured API access

* Improved construction of attributes

* Fixed handling of API output

* Added @YarmoM as code owner

* Updated CODEOWNERS

* Reverted changes for full backwards compatibility

* Fixed bad conditional

* Simplify conditional
2020-01-12 20:30:26 +01:00
Bogdan Vlaicu
5f5e8d81e1 Bumped oru to 0.1.11 (adds a timeout to the api request) (#30704) 2020-01-12 17:55:33 +01:00
Josh Bendavid
c798413971 update aiopylgtv to 0.2.5 (#30702) 2020-01-12 17:55:11 +01:00
Franck Nijhof
6729902010 Fix discovery for oauth2 flow implementations (#30700)
* Fix discovery for oauth2 flow implementations

* Fix user step

* Add tests
2020-01-12 07:37:34 -08:00
Paulus Schoutsen
1b89fef888 Bumped version to 0.104.0b4 2020-01-11 20:16:43 -08:00
Paulus Schoutsen
3715f821d7 Fix update person validation (#30691) 2020-01-11 20:16:18 -08:00
Paulus Schoutsen
dc57d670d8 Log error when integration is missing platform setup (#30690) 2020-01-11 20:16:17 -08:00
Paulus Schoutsen
c00af14ee2 Ring OTP improvement (#30688)
* Fix otp flow

* Update Ring to 0.5

Co-authored-by: steve-gombos <3118886+steve-gombos@users.noreply.github.com>
2020-01-11 20:16:17 -08:00
SukramJ
b383a5195f Fix Error with HomematicIP Cloud Cover (#30667) 2020-01-11 20:16:16 -08:00
SukramJ
4c5ea54df9 Fix Error with HomematicIP Cloud Cover (#30667) 2020-01-11 20:01:13 -08:00
Martin Hjelmare
030a399b09 Make hue config flow tests more robust (#30678)
* Make hue config flow tests robust

* Fix io on setup

* Update last tests
2020-01-11 20:00:49 -08:00
Martin Hjelmare
91f738127d Make met config flow tests robust (#30689)
* Make met config flow tests more robust

* Fix test with default form values

* Remove not needed test

* Clean create entry test

* Clean double test

* Clean last tests

* Fix docstring
2020-01-11 20:00:02 -08:00
Paulus Schoutsen
117efb5a04 Fix update person validation (#30691) 2020-01-11 19:59:43 -08:00
inputd
4dc39492a5 Drop timer component microseconds (#30198)
* Update __init__.py
2020-01-11 22:55:28 -05:00
Bill Durr
4d6417295b ZHA cover device support (#30639)
* ZHA cover device support
* flake8
* flake8, black
* isort
* pylint
* more test
* use zigpy provided functions
* black
* handle command errors, better state handling
* black
* more test
* lint
* Update ZHA cover tests coverage.
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
2020-01-11 22:42:14 -05:00
Robert Van Gorkom
a0b0dc0aca Optimistically set tplink light states (#30189)
* Optimistically handling state changes.
Using retries when command fail.

* Fixing endless update loop.

* Address PR comments.
2020-01-12 03:45:01 +01:00
Paulus Schoutsen
9266fc0cd7 Ring OTP improvement (#30688)
* Fix otp flow

* Update Ring to 0.5

Co-authored-by: steve-gombos <3118886+steve-gombos@users.noreply.github.com>
2020-01-11 18:22:08 -08:00
Paulus Schoutsen
abe727fbbc Log error when integration is missing platform setup (#30690) 2020-01-11 18:21:57 -08:00
Robert Van Gorkom
672db9cfe9 Fixing unit of measure for withings hydration. Fixes #30570 (#30685) 2020-01-11 20:58:06 -05:00
HomeAssistant Azure
8b46b5591f [ci skip] Translation update 2020-01-12 00:32:04 +00:00
Paulus Schoutsen
e3b37c44d6 Bumped version to 0.104.0b3 2020-01-11 16:17:03 -08:00
Paulus Schoutsen
718f3438ea Upgrade Ring to new version (#30666)
* Upgrade Ring to new version

* Move legacy cleanup down

* Fix test
2020-01-11 16:16:58 -08:00
Paulus Schoutsen
7073b0eb88 Upgrade Ring to new version (#30666)
* Upgrade Ring to new version

* Move legacy cleanup down

* Fix test
2020-01-11 16:04:39 -08:00
Alexei Chetroi
4972b249bf Use collection helpers for input_text entities (#30633)
* Refactor input_text to use config dict.
* Use collections for input_text.
* Update homeassistant/components/input_text/__init__.py
Better logging names.
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/input_text/__init__.py
Correct artifacts.
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/input_text/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Cleanup.
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-11 17:37:39 -05:00
Ville Skyttä
4a66eb0a69 Upgrade huawei-lte-api to 1.4.6 (#30683)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.6
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.5
2020-01-11 23:36:40 +01:00
Quentame
519c1fa2da Update iCloud sensors when service finish its update (#30680)
* Update iCloud sensors when needed

* Add sensor should_poll
2020-01-11 23:12:55 +01:00
Ville Skyttä
62f53b656d Fix test_scenes_with_entity (#30684)
Don't assume any particular order for returned scenes; it's undefined
(currently uses dict values()).
2020-01-11 22:25:59 +01:00
Alexei Chetroi
7d506bc38b Use storage collections for input_select entity management (#30604)
* Refactor input_select to use _config dict.
* Use collections for input_select.
* Add tests.
* Move async_setup to top.
* Cleanup.
* async_write_ha_state()
* Update homeassistant/components/input_select/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-11 11:37:57 -05:00
cgtobi
e793ed9ab0 Refactor Netatmo integration (#29851)
* Refactor to use ids in data class

* Use station_id

* Refactor Netatmo to use oauth

* Remove old code

* Clean up

* Clean up

* Clean up

* Refactor binary sensor

* Add initial light implementation

* Add discovery

* Add set schedule service back in

* Add discovery via homekit

* More work on the light

* Fix set schedule service

* Clean up

* Remove unnecessary code

* Add support for multiple entities/accounts

* Fix MANUFACTURER typo

* Remove multiline inline if statement

* Only add tags when camera type is welcome

* Remove on/off as it's currently broken

* Fix camera turn_on/off

* Fix debug message

* Refactor some camera code

* Refactor camera methods

* Remove old code

* Rename method

* Update persons regularly

* Remove unused code

* Refactor method

* Fix isort

* Add english strings

* Catch NoDevice exception

* Fix unique id and only add sensors for tags if present

* Address comments

* Remove ToDo comment

* Add set_light_auto back in

* Add debug info

* Fix multiple camera issue

* Move camera light service to camera

* Only allow camera entities

* Make test pass

* Upgrade pyatmo module to 3.2.0

* Update requirements

* Remove list comprehension

* Remove guideline violating code

* Remove stale code

* Rename devices to entities

* Remove light platform

* Remove commented code

* Exclude files from coverage

* Remove unused code

* Fix unique id

* Address comments

* Fix comments

* Exclude sensor as well

* Add another test

* Use core interfaces
2020-01-11 12:20:00 +01:00
etheralm
5ffbf55170 Add support for Dyson TP06 fan (#30611)
* initial commit

* update manifest.json

* update CODEOWNERS

* remove unnecessary else

* add rest of asserts for TP06 state test
2020-01-11 10:41:52 +01:00
Jörg Thalheim
b128814acf pushover: improve error when image download fails (#30615) 2020-01-11 10:36:50 +01:00
Alexei Chetroi
9c551ae85d Use storage based collections for input_number entities (#30576)
* Use collections for input_number.
* Add tests.
* Typo fix.
* Make editable a public attribute.
* Move async_setup to top.
* Update homeassistant/components/input_number/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/input_number/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Cleanup.
* async_write_ha_state()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-10 23:27:41 -05:00
Paulus Schoutsen
86bdba2ea2 Bumped version to 0.104.0b2 2020-01-10 20:18:35 -08:00
HomeAssistant Azure
77d184ee25 [ci skip] Translation update 2020-01-10 20:18:20 -08:00
HomeAssistant Azure
d0357ceecd [ci skip] Translation update 2020-01-10 20:18:20 -08:00
HomeAssistant Azure
0fc2cce4dc [ci skip] Translation update 2020-01-10 20:18:20 -08:00
Dave T
80a1084f2d Update ON/OFF condition and triggers to match documentation and UI, issue #30462 (#30663) 2020-01-10 20:17:13 -08:00
Alexei Chetroi
2eff988a5c Fix ZHA temperature sensor restoration (#30661)
* Add test for restoring state for zha temp.

* Don't restore unit of measurement for ZHA sensors.

Properly restore ZHA temperature sensor state.
2020-01-10 20:17:12 -08:00
Jc2k
449e6841a7 Fix HomeKit with entity registry restoration where supported_features is a non-None falsey (#30657)
* Fix homekit with #30094

* Fix test
2020-01-10 20:17:12 -08:00
Dave T
c1c90b8034 Update ON/OFF condition and triggers to match documentation and UI, issue #30462 (#30663) 2020-01-10 19:59:11 -08:00
Alexei Chetroi
008dddb17c Fix ZHA temperature sensor restoration (#30661)
* Add test for restoring state for zha temp.

* Don't restore unit of measurement for ZHA sensors.

Properly restore ZHA temperature sensor state.
2020-01-10 20:30:58 -05:00
ochlocracy
605b0ceb5f Add support for variable fan speed list length. (#30574) 2020-01-10 17:26:37 -08:00
Jc2k
669c89e8c0 Fix HomeKit with entity registry restoration where supported_features is a non-None falsey (#30657)
* Fix homekit with #30094

* Fix test
2020-01-10 16:33:48 -08:00
HomeAssistant Azure
d6512c8a9f [ci skip] Translation update 2020-01-11 00:31:55 +00:00
ochlocracy
74a198e37b Implement TimeHoldController Interface in Alexa (#30650)
* Implement Alexa.TimeHoldController Interface

* Add test for timer resume directive.
2020-01-10 23:11:50 +01:00
Paulus Schoutsen
f505310f11 Bumped version to 0.104.0b1 2020-01-10 13:37:13 -08:00
Phil Bruckner
626c01b4a0 Do not save last_seen if older than prev_seen (#30647)
Also add warnings when updates skipped similar to google_maps
2020-01-10 13:37:03 -08:00
springstan
c785b791a2 Bump Adafruit_BBIO to 1.1.1 (#30630) 2020-01-10 13:37:02 -08:00
Pascal Vizeli
a6492cc7bb Set body size for Proxy / streams to 16mb (#30608) 2020-01-10 13:37:02 -08:00
Robert Svensson
5a8311e9d8 Fix problem with restoring POE control (#30597) 2020-01-10 13:37:01 -08:00
Paulus Schoutsen
0b3b589457 Add Ring config flow (#30564)
* Add Ring config flow

* Address comments + migrate platforms to config entry

* Migrate camera too

* Address comments

* Fix order config flows

* setup -> async_setup
2020-01-10 13:36:34 -08:00
Paulus Schoutsen
e58b41ef23 Implement capability attributes (#30545)
* Implement capability attributes

* Fix HeOS update order

* Fix test
2020-01-10 13:35:44 -08:00
Phil Bruckner
c7e300e5b1 Fix upnp raw sensor state formatting when None (#30444) 2020-01-10 13:35:43 -08:00
NobleKangaroo
e2f591e5bc Remove self as Emulated Hue codeowner (#30654) 2020-01-10 22:35:18 +01:00
ochlocracy
d0062fc740 Fix Alexa ChangeReports Filter non-proactively_reported_properties (#30655)
* Fix Change Report Properties.

* Fix Change Report Properties.
2020-01-10 22:34:50 +01:00
Paulus Schoutsen
3f29c234b8 Add Ring config flow (#30564)
* Add Ring config flow

* Address comments + migrate platforms to config entry

* Migrate camera too

* Address comments

* Fix order config flows

* setup -> async_setup
2020-01-10 21:35:31 +01:00
Paulus Schoutsen
3348f4f6d1 Add search integration (#30511)
* Add search integration

* Add scenes and config entry support

* Update comments

* Add support for groups

* Allow querying config entry

* Update manifest

* Fix scene tests
2020-01-10 19:57:37 +01:00
Robert Svensson
d883ee62f8 deCONZ - Disable daylight sensor by default (#30625)
* Dont enable daylight sensor by default

* Fix tests
2020-01-10 19:57:08 +01:00
springstan
c13b461737 Bump Adafruit_BBIO to 1.1.1 (#30630) 2020-01-10 19:56:41 +01:00
Ville Skyttä
74cde3de6e Upgrade pydocstyle to 5.0.2 (#30648)
https://github.com/PyCQA/pydocstyle/blob/5.0.2/docs/release_notes.rst
2020-01-10 19:56:07 +01:00
Fabian Affolter
fb2e059346 Upgrade colorlog to 4.1.0 (#30642) 2020-01-10 19:55:49 +01:00
Phil Bruckner
d65f2ac31a Do not save last_seen if older than prev_seen (#30647)
Also add warnings when updates skipped similar to google_maps
2020-01-10 19:55:39 +01:00
Fabian Affolter
53a42ccd5d Upgrade pylast to 3.2.0 (#30644) 2020-01-10 16:59:40 +01:00
Fabian Affolter
5e3747a058 Upgrade shodan to 1.21.2 (#30641) 2020-01-10 16:58:13 +01:00
Fabian Affolter
ec1109329b Upgrade praw to 6.5.0 (#30643) 2020-01-10 16:57:52 +01:00
Raman Gupta
d25aa1f183 Convert vizio component from sync to async component (#30605)
* add device_info property and move component to async

* use new VizioAsync class to have proper async support

* remove hass from VizioDevice init since it is not needed

* update requirements_all

* missed type hint

* updates based on review

* pyvizio version bump

* additional fixes based on review

* mistake in last commit

* remove device_info property because it can't be used unless this integration has config flow support
2020-01-10 03:53:47 +01:00
escoand
ef05aa2f39 Add Samsung TV config flow (#28306)
* add config flow

* add tests

* add user step error handling

* remove unload function

* add missing test file

* handle authentication correctly

* remove old discovery mode

* better handling of remote class

* optimized abort messages

* add already configured test for user flow

* Import order

* use ip property instead context

* Black

* small syntax

* use snake_case

* Revert "use ip property instead context"

This reverts commit 91502407eb216f8a0b1b90e3e6fb165b81406f8f.

* disable wrong pylint errors

* disable wrong no-member

* Try to fix review comments

* Try to fix review comments

* Fix missing self

* Fix ip checks

* methods to functions

* simplify user check

* remove user errors

* use async_setup for config

* fix after rebase

* import config to user config flow

* patch all samsungctl

* fix after rebase

* fix notes

* remove unused variable

* ignore old setup function

* fix after merge

* pass configuration to import step

* isort

* fix recursion

* remove timeout config

* add turn on action (dry without testing)

* use upstream checks

* cleanup

* minor

* correctly await async method

* ignore unused import

* async call send_key

* Revert "async call send_key"

This reverts commit f37057819f.

* fix comments

* fix timeout test

* test turn on action

* Update media_player.py

* Update test_media_player.py

* Update test_media_player.py

* use async executor

* use newer ssdp data

* update manually configured with ssdp data

* dont setup component directly

* ensure list

* check updated device info

* Update config_flow.py

* Update __init__.py

* fix duplicate check

* simplified unique check

* move method detection to config_flow

* move unique test to init

* fix after real world test

* optimize config_validation

* update device_info on ssdp discovery

* cleaner update listener

* fix lint

* fix method signature

* add note for manual config to confirm message

* fix turn_on_action

* pass script

* patch delay

* remove device info update
2020-01-10 03:19:10 +01:00
HomeAssistant Azure
4fb36451c2 [ci skip] Translation update 2020-01-10 00:31:50 +00:00
Nathan
955aa1de39 Add INFO logging to generic_thermostat component for keep-alive turn … (#28740)
* Add INFO logging to generic_thermostat component for keep-alive turn on/off

* run black
2020-01-10 00:20:16 +01:00
tiagofreire-pt
7052cdded1 Change nomenclature for Roborock fan speeds (#30614)
* Change nomenclature for Roborock fan speeds 

* Update test_vacuum.py

* Update test_vacuum.py
2020-01-09 23:49:13 +01:00
Daniel Lashua
669844e4dd Check netgear device_tracker link_rate to ensure device is connected (#30581)
* check link_rate to ensure device is connected

* black
2020-01-09 20:45:42 +01:00
Davide Varricchio
208a123c47 Update PYAEHW4A1 to version 0.3.4 (#30616)
* Update manifest.json

* Update requirements_all.txt

* Update requirements_test_all.txt
2020-01-09 13:07:23 -05:00
Nikolay Vasilchuk
f878fabd09 Fix TOD component incorrectly determining the state between sunrise and sunset (#30199)
* TOD fix

* Comment added

* Review

* Review

* Review
2020-01-09 17:17:16 +01:00
William Sutton
3a3d448f17 Add preset scheduling to radiothermostat (#29847)
* Added preset scheduling to radiothermostat. Added alternate scheduling & religious scheduling to climate/const.py

* Fix Flake8 Errors in climate.py

* Fixing more flake8 errors in climate.py

Removed duplicate set_preset_mode def

* Fixed more flake8 errors. 

Please be the end of these errors.

* Fixed black formatting

* Fixed black, broke flake8, fixed flake8

* Fixed CODE_TO_FAN_STATE black error

* Fixed isort issues

* Local isort broke black formatting

Docs should run isort before black. Default isort will undo certain black formatting.

* Removed last commas from imports

* Added removed line

* Fixed formatting

Hopefully this is what the CI pipeline is looking for.

* Ran isort from git repo root, utilizing setup.cfg.

* One more try

* fixed added definition and fixed logger string

* fixed formatting

* lost a close-paren

* Update const.py

Removed radiotherm specific presets

* Update climate.py

Moved preset definitions into radiotherm climate.py
2020-01-09 15:25:19 +01:00
Malte Franken
4149bd653d Fix statistics sensor honouring max_age (#27372)
* added update listener if max_age is set

* remove commented out code

* streamline test code

* schedule next update based on the next state to expire

* fixed update process

* isort

* fixed callback function

* fixed log message

* removed logging from test case
2020-01-09 14:03:27 +01:00
David Bonnes
a99135a09e tweak honeywell manifest (#30612) 2020-01-09 12:36:32 +00:00
Pascal Vizeli
a4c1114c8e Set body size for Proxy / streams to 16mb (#30608) 2020-01-09 11:09:34 +01:00
Martin Hjelmare
9ebf5ea413 Fix aurora import order (#30606) 2020-01-09 10:25:03 +01:00
Olen
290043aed6 Add neato boundary name to state if it exists (#29915)
* Add boundary name to state if it exists

If the robot is cleaning a pre defined area with a name, add the name to the state-attribute.

* Reformat patch

* Removing whitespace

* Even more formatting 

That black did not catch on first run...
2020-01-09 09:42:18 +01:00
Watchfox
6b7be35f4a Fix aurora sensor not converting latitude and longitude correctly (#28643) 2020-01-09 08:40:10 +01:00
Phil Bruckner
260596d11b Fix upnp raw sensor state formatting when None (#30444) 2020-01-09 06:51:30 +01:00
Alistair Galbraith
fe0b537291 Template alarm panel (#30487)
* Added support for template alarm panel

* Rewrote tests in new async format

* Fix stale docstring

* Update to tests, standardization on NAME vs FRIENDLY_NAME
2020-01-09 06:03:26 +01:00
HomeAssistant Azure
8062bed53e [ci skip] Translation update 2020-01-09 00:31:49 +00:00
Daniel Perna
9ce5c65b14 Update pyhomematic to 0.1.63 (#30594) 2020-01-09 00:32:57 +01:00
Robert Svensson
ff5f890e79 Fix problem with restoring POE control (#30597) 2020-01-08 22:33:51 +01:00
Matt Snyder
103d352b1f Add Doorbird events to logbook (#30588)
* Add Doorbird events to logbook

* Add logbook to dependencies
2020-01-08 21:27:48 +01:00
Paulus Schoutsen
ed6aef2fd7 Implement capability attributes (#30545)
* Implement capability attributes

* Fix HeOS update order

* Fix test
2020-01-08 21:22:56 +01:00
Paulus Schoutsen
4cd83e71dd Version bump to 0.105.0dev0 2020-01-08 21:07:04 +01:00
Paulus Schoutsen
5d850c5b19 Bumped version to 0.104.0b0 2020-01-08 21:06:22 +01:00
Paulus Schoutsen
95bc539bab Merge remote-tracking branch 'origin/master' into dev 2020-01-08 21:05:53 +01:00
Mariano Faraco
9e885112ec Add last_online and level attribute to steam online (#30321)
* Steam Online: Add last_online and Level attributes

* Steam Online: Add last_online and Level attributes

* Fixes from comments on initial pull request

* Push attributes only if they are not None
2020-01-08 21:04:42 +01:00
mohmacht
d048233776 The MFI Dimmer Switch model is missing from the list, causing the mfi Wall switches not to be recognized. (#30572)
Please add this one model to support my mfi switches, thank you.

 python 1.py dump_sensors --noverify
               Model |                Label |             Tag |      Value | Extra
------------------------------------------------------------------------------
       Dimmer Switch |        Bedroom2Light |      active_pwr |  22.047071 | 1.0
       Dimmer Switch |      LivingRoomLight |      active_pwr |        0.0 | 0.0
       Dimmer Switch |      FamilyRoomLight |      active_pwr |  42.803919 | 1.0
       Dimmer Switch |   MasterBedroomLight |      active_pwr |        0.0 | 0.0
2020-01-08 21:04:33 +01:00
fwestenberg
498bec4a61 Add Stookalert integration (#30306)
* Added Stookalert integration

* Added Stookalert integration

* Added Stookalert integration

* Solved comments

* Flake8 change

* Bump stookalert to version 1.1.2

* Fixed attributes and state

* Get method for private variables

*  Update to stookalert 0.1.4

* Code optimization

* Update requirements
2020-01-08 21:03:50 +01:00
Franck Nijhof
d659807b6f Fix WLED transition time unit (#30583) 2020-01-08 21:03:36 +01:00
Bram Kragten
6112092949 Updated frontend to 20200108.0 (#30591) 2020-01-08 21:02:07 +01:00
David Bonnes
2c1e354537 evohome: allow two round thermostats per gateway (#30589)
* bugfix issue #30517
* bump library, tweak name in manifest
* remove lint hint
2020-01-08 18:57:28 +00:00
Maciej Bieniek
4cd2e09fb3 Add missing string for already_configured in GIOS integration (#30590) 2020-01-08 19:44:03 +01:00
Franck Nijhof
120a96ff59 Bump adguardhome to 0.4.1 (#30586) 2020-01-08 10:48:57 -05:00
Maciej Bieniek
6e3e383b3f Add missing string for already_configured in Brother integration (#30584) 2020-01-08 16:15:05 +01:00
Franck Nijhof
0e9b414c26 Migrate Integration Quality Scale from docs to manifest (#30579) 2020-01-08 14:19:42 +01:00
Alexei Chetroi
ae8957ae12 Use more consts for person implementation (#30553)
* Use more consts for person implementation.

* Use ATTR_ENTITY_ID.
2020-01-08 07:35:34 -05:00
Santobert
3d7488d188 Trigger automation without skipping condition (#28484)
* Trigger automation without skipping condition

* [] instead of .get()

* Update __init__.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-08 10:36:11 +01:00
Robert Svensson
84a1afc785 deCONZ - Fix device automations (#30577) 2020-01-08 10:06:33 +01:00
Robert Svensson
0d48d682dc deCONZ - Make sensors sorted on creation for deterministic order (#30569)
* Make sensors sorted on creation for deterministic order

* Martins comment
2020-01-08 09:30:02 +01:00
Ernst Klamer
31553796da Bump pyRFXtrx to 0.25 (#30566) 2020-01-08 09:20:50 +01:00
Daniel Shokouhi
130a577e67 Add android repo to issue template (#30571) 2020-01-07 22:10:04 -05:00
HomeAssistant Azure
8b7ffcdaf1 [ci skip] Translation update 2020-01-08 00:31:50 +00:00
Bram Kragten
16199b7a52 Add command to delete lovelace config (#30558)
* Add command to delete lovelace config

* Test + decorator for WS
2020-01-07 22:59:04 +01:00
Bram Kragten
1ce662d699 Updated frontend to 20200107.0 (#30561) 2020-01-07 22:55:10 +01:00
Franck Nijhof
bfa0edaf92 Migrate Integration Quality Scale from docs to manifest: internal (#30551) 2020-01-07 20:58:49 +01:00
Sascha Kühndel
23700e4db8 Fix hue flashing innr lights (#29828) 2020-01-07 20:56:57 +01:00
FrengerH
83d18c183b Fix missing strings for deconz magic cube rotation support (#30552)
* Fix missing strings for deconz magic cube rotation

* Fix missing strings for deconz magic cube rotation
2020-01-07 19:06:25 +01:00
Aaron Bach
856db4d122 Fix incorrect Rainmachine dict lookups (#30550) 2020-01-07 10:43:12 -07:00
Paulus Schoutsen
9aa02e35a7 Entity Component to no longer generate automatic groups (#23789) 2020-01-07 17:30:53 +01:00
tetienne
13e6479b6e Ease code before adding color and temperature to light template (#30455)
* Split async_update

* Use pytest parameters to avoid duplicate code

* Fix UnboundLocalError

* Test error rendering for template state

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-07 17:22:42 +01:00
Franck Nijhof
e18426051b Add Integration Quality Scale to manifest (#30547) 2020-01-07 17:21:56 +01:00
SukramJ
a4c830b5e4 Add reset_energy_counter service to Homematic IP Cloud (#30256)
* Add reset_energy_counter service to Homematic IP Cloud

* Fix isort

* Register service as admin service
2020-01-07 10:24:46 -05:00
Aleix Murtra
1d1aa06d05 Add TMB sensor (#27964)
* Add TMB i-Bus sensor

* Raise exception if HTTP error

* Addressed comments

* Fixed format

* Fixed format

* Addressed comments

* Remove guard before add_entities method

* Remove unauthorized exception

* Make CONF_BUS_STOPS option required
2020-01-07 16:22:16 +01:00
Franck Nijhof
b4d6d238e5 Correct names in manifests (T-Z) (#30546) 2020-01-07 14:31:18 +01:00
springstan
a5cc08c8b6 Update featured integrations screenshot in README (#30134)
* Update featured integrations in README

* Update screenshot to include Somfy and exclude Almond

* Update outdated screenshot of featured components
2020-01-07 14:30:52 +01:00
Franck Nijhof
22760a0bee Correct names in manifests (Q-S) (#30543) 2020-01-07 08:19:44 -05:00
Paulus Schoutsen
b27e05fc8d Use capability attributes in climate (#30544)
Co-authored-by: Jc2k <john.carr@unrouted.co.uk>
2020-01-07 14:14:46 +01:00
Raman Gupta
a9f6dd698e Remove suppress_warning from config options for vizio component (#30536)
* move constants, move schema validation to init, prepare for zeroconf/config flow

* mistake in refactor

* update .coveragerc, move validate_auth to __init__, only attempt to get ESN if device setup is validated

* fix schema validation

* remove suppress warning config option

* remove config_flow from manifest since its not ready yet

* update requirements_all.txt

* fix issue with merge conflict
2020-01-07 13:31:13 +01:00
Jeff Irion
73af75cb41 Catch UnicodeDecodeError exceptions in 'androidtv.adb_command' service (#30538)
* Catch UnicodeDecodeError exceptions in 'androidtv.adb_command' service

* Replace "adb_command" with SERVICE_ADB_COMMAND
2020-01-07 13:30:34 +01:00
Jeff Irion
98bb400f3a Bump adb-shell to 0.1.1 and androidtv to 0.0.38 (#30539)
* Bump adb-shell to 0.1.1 and androidtv to 0.0.38

* Bump adb-shell to 0.1.1 and androidtv to 0.0.38

* Bump adb-shell to 0.1.1 and androidtv to 0.0.38
2020-01-07 13:30:15 +01:00
Franck Nijhof
dc02c28891 Correct names in manifests (M-P) (#30541) 2020-01-07 13:28:35 +01:00
Paulus Schoutsen
c963128306 Upgrade to use new version of HASS-nabucasa (#30506)
* Upgrade to use new version of HASS-nabucasa

* Update hass-nabucasa to 0.31
2020-01-07 13:25:57 +01:00
Casper
6dc49a44d9 Update manifest.json: Typo fixed (#30542) 2020-01-07 13:23:52 +01:00
Colin Frei
b3f429eefa Swiss Transport Data: Save delay on sensor (#30526) 2020-01-07 12:27:34 +01:00
Jason Ross
692e87f5cc Add venstar PIN to config and client initialization (#30300)
* Add PIN to config and client  initialization

* Fix Formatting Error

* update PLATFORM_SCHEMA validation with the new option.
2020-01-07 10:20:46 +01:00
Alexei Chetroi
6740249bef Use collection helpers for input_boolean (#30514)
* Refactor input_boolean to use config dict for instantiation.

* Refactor input_boolean to use YamlCollection.

* Add storage collection to input_boolean.

* Update homeassistant/components/input_boolean/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Doh.

* Address comments.

* Add editable device state attribute.

* Clean up entities from entity registry on removal.

Reload yaml from correct source.

* Add tests.

* Update homeassistant/components/input_boolean/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Don't reset entity state on updates.

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-07 08:53:43 +01:00
Franck Nijhof
345cc244ed Correct names in manifests (C-L) (#30532) 2020-01-07 08:19:17 +01:00
Raman Gupta
7d58de1bda Update vizio component to prepare for config flow and zeroconf support (#30522)
* move constants, move schema validation to init, prepare for zeroconf/config flow

* update requirements_all and make setup validation more pythonic

* mistake in refactor

* un-revert change from previous PR

* rename schema var

* update .coveragerc, move validate_auth to __init__, only attempt to get ESN if device setup is validated

* reinstate validate_setup but change logic to use new connection test function

* fix schema validation

* simplify string empty check logic

* missed commit
2020-01-06 20:32:31 -05:00
Eleftherios Chamakiotis
e22742550c Add "autobypass" option when arming AlarmDecoder integration (#30002)
* Initial implementation

* Passing autobypass parameter to constructor, as suggested

* Black formatting

* Removed default value from autobypass parameter of the constructor, as it's redundant
2020-01-06 20:17:21 -05:00
Trekky12
5ed1f16f25 Add pilight dimmer as light component (#30107)
* Add pilight dimmer as light component

* fix CI errors

* fix missing new lines

* improve formatting and addresses comments of @springstan

* rename config parameter and remove super() call to match pylint

* import only used constants of the pilight component

* Add myself to the code owners

* fix CODEOWNERS
2020-01-06 20:13:08 -05:00
HomeAssistant Azure
8c70fb5463 [ci skip] Translation update 2020-01-07 00:32:07 +00:00
Quentame
1587603c4c Bump synologydsm to 0.3.0 (#30529) 2020-01-06 17:38:42 -06:00
Markus Nigbur
453f7c7294 Fire restarted event on restarting active timer (#30475)
* Fire restarted event on restarting active timer

* Added test for the restart event
2020-01-07 00:00:23 +01:00
Franck Nijhof
6f92c19302 Correct integration names in manifests (A-B) (#30527)
* Correct names in manifests (A-B)

* Just Baidu

* Asterisk Call Detail Records
2020-01-06 23:59:12 +01:00
rccoleman
4a2987e790 Allow specific status codes while notifying mobile_app devices (#30496)
* Removed check and return with a notification status of 201

* Allow additional result codes

Allow 200, 201, and 202 as valid result codes
2020-01-06 23:41:07 +01:00
Jeff Irion
5ec5df77cc Register 'androidtv.download' and 'androidtv.upload' services (#30086)
* Add tests

* Add FileSync test

* Fill in services.yaml for 'androidtv.adb_filesync' service

* Update example paths in services.yaml

* Bump androidtv to 0.0.37

* Bump androidtv to 0.0.37

* Bump androidtv to 0.0.37

* Import LockNotAcquiredException

* Import LockNotAcquiredException from androidtv.exceptions

* Rename 'host' to 'address'

* Add a logging statement when an ADB command is skipped

* Check hass.config.is_allowed_path(local_path)

* Add return

* Fix pylint

* Reduce duplicated code (AndroidTVDevice vs. FireTVDevice)

* Split 'adb_filesync' service into 'download' and 'upload' services

* Don't use '.get()' for required data; return if the services are already registered

* Replace "command" with ATTR_COMMAND

* Don't try to connect to a device if it is a duplicate
2020-01-06 23:10:13 +01:00
Paulus Schoutsen
fbc53a886f Merge pull request #30525 from home-assistant/rc
0.103.6
2020-01-06 22:43:24 +01:00
Alexxander0
e88bfda2a8 Fix AVM FRITZ!DECT switch total consumption (#30478)
actor.get_energy() returns Wh, so division by 1000 is correct
2020-01-06 22:23:26 +01:00
Paulus Schoutsen
5675f16b61 Bumped version to 0.103.6 2020-01-06 22:02:31 +01:00
Paulus Schoutsen
4d0a093ec4 Fix google sync (#30524) 2020-01-06 22:02:25 +01:00
michaeldavie
60a9de40aa Bump env_canada to 0.0.31 (#30409) 2020-01-06 22:02:24 +01:00
Andrew Sayre
ed6b95f14a Bump pysmartthings 0.7.0 (#30302) 2020-01-06 22:01:06 +01:00
Robert Svensson
ce114b81c3 Handle wired bug on restart (#30276) 2020-01-06 22:01:05 +01:00
Paulus Schoutsen
05374d7c85 Fix google sync (#30524) 2020-01-06 22:00:39 +01:00
Franck Nijhof
a84741392b Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
Maciej Bieniek
21029b1d7b Add Brother Printer integration (#30359)
* Init entities as unavailable when offline

* Initial commit

* Fix CODEOWNERS

* CODEOWNERS

* Run script.hassfest

* Add initial test

* Bump library

* More tests

* Tests

* Add new sensors and fix KeyError

* Fix unique_id and device_info

* Fix check for configured device

* More tests

* Bump library version

* Add uptime sensor

* Use config entry unique ID

* Run python3 -m script.gen_requirements_all

* Fix pylint error

* Remove pysnmp dependency

* Raise ConfigEntryNotReady when device offline at HA start

* Remove period from logging message

* Generator simplification

* Change raise_on_progress

* Rename data to printer

* Move update state to async_update

* Remove unused _unit_of_measurement

* Remove update of device_info

* Suggested change for tests

* Remove unnecessary argument

* Suggested change
2020-01-06 11:06:16 -06:00
Jc2k
8257ea30c0 Set required_features field when registering fan services (#30516)
* Set required_features on fan services

* Fix mqtt fan test

* Update fan.py
2020-01-06 17:10:51 +01:00
Jc2k
a58c796641 Add support for homekit air quality sensors (#30510)
* Add air quality sensor

* Fix comment from review

* Fix comment from review

* Lint fix
2020-01-06 16:35:10 +01:00
Ben
1fffa210e1 Add surepetcare component (#24426)
* add surepetcare

* cleanup

* remove unused imports and comments

* remove comment

* fix bug which prevented updating the sensors

* improve config validation

* fix voluptuous usage

* fix format & credential storage

* various fixes to hass-conform

* small format fixes

* change False to None

* still trying to be hass-conform

* remove unused class

* fix imports

* fix f-string

* add guard clause?!

* central data fetch

* do not pass in hass, will be provided automatically

* make the linters happy

* disable constant-test warning and add commas

* worksforme

* fix link in manifest

* remove icon

* bump surepy to 0.1.5

* worksforme

* small doc fixes

* add discovery_info guard

* result of another awesome review

* and again :)

* exclude surepetcare in .coveragerc
2020-01-06 09:00:01 -05:00
SukramJ
0971c681af Add HmIP-PMFS and HmIP-WHS2 to HomematicIP Cloud (#30325)
* update test data

* Update homematicip_cloud.json

* Add HmIP-WHS2

* Add HmIP-PMFS
2020-01-06 08:35:41 -05:00
Gido
10e698e0b2 Update GarbageTypeCodes for rova
Updating rova/sensor.py. Rova json format changed for garbage collection.
2020-01-06 08:34:15 -05:00
Ville Skyttä
80cbc32c49 Spell Zigbee consistently, with lowercase "b" (#30440)
https://zigbeealliance.org/developer_resources/zigbee-specification/
"Please note that this uses old branding, Zigbee is always a lowercase
 B, not a capital. This change occurred shortly after the official
 release of this document."

Also other docs at https://zigbeealliance.org/solution_type/zigbee/,
https://github.com/zigpy/zigpy/issues/111
2020-01-06 08:32:10 -05:00
FrengerH
0d1da9f5cb deCONZ - Rotation support for Xiaomi magic cube (#30472)
* Added rotation to deconz magic cube event

* Device trigger support
2020-01-06 12:34:27 +01:00
Alan Tse
f4f7c25f74 Bump teslajsonpy to 0.2.2 (#30512)
Fixes #30235
2020-01-06 09:52:26 +01:00
HomeAssistant Azure
d1ed67f44a [ci skip] Translation update 2020-01-06 00:32:11 +00:00
brefra
4efbe7135c Add LED control of push buttons and bump velbus-library (#30445)
* Add LED control

* Bump python-velbus library to 2.0.35

To have LED control available in library

* Apply black formating

* Fix no-else-return pylint error

* Changed to f-string and more dry code

* Rewrite turn_on for LED control
2020-01-06 01:28:10 +01:00
Franck Nijhof
e642d95d0f Migrate collection of component tests from coroutine to async/await (#30504) 2020-01-06 01:22:22 +01:00
Ville Skyttä
f400b77837 Preserve new BLE tracker item name if seen before adding discovery (#30318)
* Preserve new BLE device name if one seen before the last scan but not on it

* Save an indented else block

* Use async_fire_time_changed and mock_device_tracker_conf in tests
2020-01-05 23:13:54 +02:00
Jc2k
fffc5a5fbb Add support for v1 and v2 HomeKit fans. (#30503)
* Add support for v1 and v2 HomeKit fans.

* Lint fix
2020-01-05 15:56:46 +01:00
Paulus Schoutsen
8625e962ce Remove double person data validation (#30501) 2020-01-05 15:50:59 +01:00
Franck Nijhof
0a9ac91dec Migrate automatic tests from coroutine to async/await (#30371)
* Migrate automatic tests from coroutine to async/await

* Remove unneeded side effect

* Replace unittest with asynctest, add additional asserts to tests
2020-01-05 07:23:22 -06:00
Ville Skyttä
5216477353 Be consistent with Home Assistant and Hass.io spelling (#30500)
* Be consistent with Home Assistant spelling

* Be consistent with Hass.io spelling
2020-01-05 14:09:17 +02:00
Paulus Schoutsen
24b25b8917 Restore state helper to work with entity registry restoration (#30451)
* Restore state helper to work with entity registry restoratino

* Update restore_state.py
2020-01-05 11:58:59 +01:00
Raman Gupta
2ac5862eda Add unique id property for Vizio devices so they get added to entity registry (#30497)
* add unique id property for Vizio devices so they get added to entity registry

* update requirements

* small change to make code more readable

* update to use f-string for consistency

* fix property name

* set unique_id to none if serial number couldnt be found

* set unique_id to none

* ESN should be globally unique so no device type needed. pyvizio will set ESN to None if ESN is unobtainable
2020-01-05 11:20:06 +01:00
Paulus Schoutsen
30076d1843 Add person reload service (#30493) 2020-01-05 11:16:37 +01:00
Robert Svensson
35e19eec18 Axis - Allow manual configuration to update existing configuration (#30467)
* Allow manual configuration to update existing configuration

* Harmonize tests

* Understand what Elupus means...
2020-01-05 10:11:17 +01:00
HomeAssistant Azure
063193e6e5 [ci skip] Translation update 2020-01-05 00:32:15 +00:00
Pascal Vizeli
e95a04b6f6 bump hassio-builder version 2020-01-05 00:28:42 +01:00
Pascal Vizeli
8c2858ebde support odroid-n2 on release 2020-01-05 00:26:39 +01:00
Paulus Schoutsen
95cd0a2c68 Mobile App add device tracker to person registering app (#30460) 2020-01-04 23:15:50 +01:00
Phil Bruckner
e233dd7cbe Fix timer with empty config (#30463) 2020-01-04 23:01:58 +01:00
David F. Mulcahey
6c89b6c5a2 Add Zigbee group binding to ZHA (#30433)
* initial group binding work
* add group cluster binding
2020-01-04 16:58:51 -05:00
Robert Svensson
967fe89f6d deCONZ - Allow manual configuration to update existing configuration (#30469)
* Allow manual configuration to update existing configuration

* Harmonize tests
2020-01-04 22:55:57 +01:00
Franck Nijhof
639cdf5eef Bump twentemilieu to 0.2.0 (#30471) 2020-01-04 22:55:04 +01:00
Franck Nijhof
42b86d4b4e Bump wled to 0.2.1 (#30474)
* Bump wled to 0.2.0

* Bump wled to 0.2.1
2020-01-04 22:52:37 +01:00
Franck Nijhof
4e62da9c8e Improve WLED pure white support for RGBW (#30477) 2020-01-04 22:52:10 +01:00
Franck Nijhof
51db9bdfce Add unique ID to WLED config entries (#30480)
* Add unique ID to WLED config entries

* Improve robustness of the tests
2020-01-04 22:48:31 +01:00
Franck Nijhof
bf9418e51a Bump adguardhome to 0.4.0 (#30483) 2020-01-04 22:47:34 +01:00
Franck Nijhof
3b14d9f375 Add unique ID to elgato config entries (#30486) 2020-01-04 22:45:11 +01:00
Franck Nijhof
4ea0754094 Fix WLED light transition (#30490) 2020-01-04 22:44:28 +01:00
Franck Nijhof
049ced63b1 Bump elgato to 0.2.0 (#30485) 2020-01-04 20:25:07 +01:00
Paulus Schoutsen
2f362b44c4 Allow adding unique device ID to mobile app registration (#30457)
* Allow adding unique device ID to mobile app registration

* Remove unknown data

* Better fix
2020-01-04 13:45:03 +01:00
Paulus Schoutsen
6e909ab3f1 Only return remote UI url if remote UI enabled (#30453) 2020-01-04 13:43:59 +01:00
Robert Svensson
63347ebeb5 Make Axis integration use config entry unique id (#30461)
* Make Axis integration use config entry unique id
2020-01-04 08:58:18 +01:00
HomeAssistant Azure
075d3f6e32 [ci skip] Translation update 2020-01-04 00:32:23 +00:00
Joakim Plate
8dc57a3700 Allow all sources and sound modes to be selected in google assistant (#30418)
* Simplify media player source list

Google don't need a whitelisted set of modes anymore. So let's just forward any mode that we have.

* Report current mode with the setting name, not a synonym

* Refactor mode generation to support other modes

* Support sound mode as mode as well

* Adjust failing test now with sound modes
2020-01-04 00:39:03 +01:00
Phil Bruckner
d6e230e66b Fix counter with empty config (#30454) 2020-01-04 00:03:54 +01:00
brefra
b75aa7eb3a Fix async call inside sync context (#30458)
* Fix async call inside sync context

* Apply black formatting
2020-01-04 00:01:37 +01:00
Paulus Schoutsen
b9aba30a6e Extract Collection helper from Person integration (#30313)
* Add CRUD foundation

* Use collection helper in person integration

* Lint/pytest

* Add tests

* Lint

* Create notification
2020-01-03 21:37:11 +01:00
David Cramer
3033dbd86c Add Sentry component (#30422) 2020-01-03 21:34:20 +01:00
Robert Svensson
bb55606d29 Axis - Remove manual configuration and legacy config file import (#30365)
* Remove manual configuration and legacy config file import

* Remove unused imports in tests after rebase
2020-01-03 14:25:31 -06:00
ochlocracy
6387a50697 Implement supported locales for Alexa capabilities (#30285)
* Implement Alexa capability supported locales.

* Check config for supported locales.

* Removed unused import.

* Applied some potpourri to improve code smell.

* Change supported_locales to set.
2020-01-03 21:23:22 +01:00
Jc2k
80701c8f2a Defer homekit_controller initial poll after all entities are created (#30355)
* Make sure first poll happens after sub-platforms are loaded and entities are created.

* Function dosn't need to return anything

* Don't forward entry if already forwarded it
2020-01-03 21:22:27 +01:00
Robert Svensson
2b26af89df Improve tests based on Martins feedback from Axis improve tests (#30442) 2020-01-03 12:23:17 -06:00
Marcelo Moreira de Mello
e7af759330 Bump ring to 0.2.9 (#30439) 2020-01-03 12:19:14 -06:00
Robert Svensson
ec61342ec3 deCONZ - Improve tests based on Martins feedback in Axis integration (#30438) 2020-01-03 18:11:04 +01:00
Josh Anderson
8a1fc8b8f0 Check status field for UPS online binary sensor (#30144)
Avoids issue where status was previously reported as offline when
battery was low or UPS was over voltage
2020-01-03 17:40:36 +01:00
Jc2k
6b519499a7 Don't expose flows that aren't initialised. (#30432)
* Don't expose flows that aren't initialised.

If a flow init does not return immediately then there is a window where our
behaviour is screwy:

 * Can try to configure a flow that isn't ready
 * Can show notifications for discoveries that might yet return an abort

This moves the flow discovery events and notifications to after the flow is
initialised and hides flows that don't have a cur_step from async_progress

* Fix tradfri test

* Black.

* Lint fixes
2020-01-03 17:28:05 +01:00
Jc2k
df6c7b97f5 isort homekit (#30437) 2020-01-03 15:00:44 +00:00
Robert Svensson
536b201472 WIP deCONZ - Support Fyrtur/Kadrilj battery sensors (#30403)
* Sensor.binary is None means unsupported sensor
* Don't create ordinary sensor on ZHABattery type
2020-01-03 15:15:32 +01:00
Bas Nijholt
0d5486f772 Add KEF speakers integration (#28959)
* add KEF speakers platform for the integration

This will work with the KEF LS50 Wireless and KEF LSX speakers.
The development of this code happened on https://github.com/basnijholt/media_player.kef

* rename DATA_KEF -> DOMAIN

* use aiokef v0.2.0 and support LSX and new features

* sort imports

* fix @MartinHjelmare's suggestions

* remove _CONFIGURING

* change STATE_UNKNOWN to None

* use lat and long for unique_id

* bump aiokef to v0.2.2

* use config[ATTR] instead of config.get(ATTR)

* use getmac

* fix case when MAC is None

* use host as instance lifetime id

* fix requirements
2020-01-03 14:59:44 +01:00
Ville Skyttä
fa4fa30461 Various string cleanups (#30435)
* Remove some unnecessary string concatenations

* Replace some simple str.formats with f-strings

* Replace some string concatenations with f-strings
2020-01-03 14:47:06 +01:00
Sérgio
5ad209c6fd Handle telegram event commands with args (#30254)
* Handle telegram event commands with args

* Parse message regargless of command

* Lint

* Use multiple assignment
2020-01-03 08:22:14 -05:00
David K
859935e8bc Update HomeKit position state characteristic for covers (#27867)
* HomeKit: update position state characteristic for covers

position state is a mandatory characteristic for HK window coverings

* Test position state characteristic
2020-01-03 08:19:03 -05:00
Robert Svensson
b57da2f862 Axis - Improve tests based on feedback (#30430)
* Use MockConfigEntry, add_to_hass and hass.config_entries.async_setup

* Mock method instead of handling paths
2020-01-03 13:27:14 +01:00
Joakim Plate
0944d02262 Mark API key as deprecated (#30402)
Service account should be used instead
2020-01-03 12:12:29 +01:00
Ian Duffy
5580ee3fa1 Don't allow badly formed upnp devices to kill auto discovery (#30342)
Prevent the following from occurring:

```
2019-12-31 22:38:41 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 85, in async_init
    return await self._async_handle_step(flow, flow.init_step, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 145, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/deconz/config_flow.py", line 182, in async_step_ssdp
    if discovery_info[ssdp.ATTR_UPNP_MANUFACTURER_URL] != DECONZ_MANUFACTURERURL:
KeyError: 'manufacturerURL'
2019-12-31 22:38:41 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 85, in async_init
    return await self._async_handle_step(flow, flow.init_step, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 145, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/deconz/config_flow.py", line 182, in async_step_ssdp
    if discovery_info[ssdp.ATTR_UPNP_MANUFACTURER_URL] != DECONZ_MANUFACTURERURL:
KeyError: 'manufacturerURL'
```
2020-01-03 12:08:40 +01:00
Stefan Agner
3f33fc6122 convert to integer if rounding precision is zero (#30226)
Convert values to integer if rounding precision is zero. With that a
value which is an integer before filtering can be configured to stay
integer when using precision = 0. This also aligns behavior of filters
to how rounding behaves in tempaltes (homeassistant/helpers/template.py,
function forgiving_round).
2020-01-03 11:54:19 +01:00
Jc2k
fdfedd086b Rework FlowManager to use inheritance (#30133)
* Pull async_finish_flow/async_create_flow out of ConfigEntries

* Towards refactoring

* mypy fixes

* Mark Flow manager with abc.* annotations

* Flake8 fixes

* Mypy fixes

* Blacken data_entry_flow

* Blacken longer signatures caused by mypy changes

* test fixes

* Test fixes

* Fix typo

* Avoid protected member lint (W0212) in config_entries

* More protected member fixes

* Missing await
2020-01-03 11:52:01 +01:00
Robert Svensson
0a4f3ec1ec Use config entry unique id for deCONZ (#30122)
* Use config entry unique id

* Clean up

* Backwards compatiblity note

* Fix some of Balloobs comments

* Bump dependency to v66

* Black somehow missed config flow tests...

* Move set unique ID til after possibility to update existing entry
2020-01-03 11:50:53 +01:00
Ville Skyttä
c130e81638 Fix number of times seen in debug message (#30429) 2020-01-03 11:31:50 +01:00
tetienne
f5aa89dd06 Fix set tilt position (#30428) 2020-01-03 11:31:05 +01:00
ochlocracy
3a18ef219b Add RTSP stream support for UVC (Unifi Video Client) integration (#30297)
* Add SUPPORT_STREAM to supported_features.

* Implement stream_source with channel RTSP URIs.

* Add Tests for Stream Support.

* Make stream_source async.

* Removed unused import.

* Re-wrote test to remove warning, and lint error.
2020-01-03 11:30:26 +01:00
Oliver
b097a64010 Implemented media_play & media_pause / push to version 0.7.11 of denonavr (#30421)
* Implement media_play & media_pause / push to version 0.7.11 of denonavr

* fix denonavr version in requirements_test_all.txt
2020-01-02 22:06:33 -06:00
David F. Mulcahey
ef8eefc7a0 Remove ZHA establish device mappings function (#30423)
* remove establish_device_mappings
* inline init
2020-01-02 21:21:09 -05:00
Josh Bendavid
4c6e10a988 Cleanup of state handling in webostv (#30416)
* cleanup unnecessary manipulation of state variables

* update unit test
2020-01-03 02:46:32 +01:00
HomeAssistant Azure
4bf15a07a3 [ci skip] Translation update 2020-01-03 00:32:16 +00:00
Robert Svensson
9b961632af Axis - Improve tests (#30415) 2020-01-03 00:02:59 +01:00
Josh Bendavid
c1936f6fe4 Add generic command/button functionality to webostv (#30379)
* add generic command/button functionality to webostv

* update codeowners
2020-01-02 22:32:56 +01:00
Josh Bendavid
9064058a03 Add generic command functionality to denonavr (#29295)
* Add generic command functionality to denonavr

* add minimal unit tests for denonavr

* fix import order

* simplify denonavr unit test

* handle domain specific service calls with dispatcher

* update unit tests

* update unit tests

* remove unnecessary return value

* fix handling of mock instances in unit tests
2020-01-02 22:30:20 +01:00
michaeldavie
b91cbb50c8 Bump env_canada to 0.0.31 (#30409) 2020-01-02 15:24:43 -06:00
springstan
8e5ccfcb8a Bump miflora and bluepy (#30411) 2020-01-02 15:24:29 -06:00
Franck Nijhof
4f8663846b Migrate frontend tests from coroutine to async/await (#30386) 2020-01-02 14:23:56 -06:00
Franck Nijhof
4e6d415541 Migrate media_player tests from coroutine to async/await (#30387) 2020-01-02 14:23:35 -06:00
Franck Nijhof
b9fcb87d2c Migrate generic tests from coroutine to async/await (#30388) 2020-01-02 14:23:16 -06:00
Franck Nijhof
1e3822bdd7 Migrate group tests from coroutine to async/await (#30389) 2020-01-02 14:22:49 -06:00
Franck Nijhof
332cbbd8b1 Migrate freedns tests from coroutine to async/await (#30390) 2020-01-02 14:22:30 -06:00
Franck Nijhof
5b2b86987b Migrate fido tests from coroutine to async/await (#30391) 2020-01-02 14:22:13 -06:00
Franck Nijhof
7b00e94184 Migrate local_file tests from coroutine to async/await (#30392) 2020-01-02 14:21:54 -06:00
Aaron David Schneider
5edf72c9ea fix issuecomment-570284682 (#30405) 2020-01-02 14:17:37 -06:00
Franck Nijhof
24d5e54eed Bump pre-commit to 1.21.0 (#30406) 2020-01-02 14:16:58 -06:00
Ville Skyttä
e6388e186c Remove unnecessary string literal concatenations (#30360) 2020-01-02 21:17:10 +02:00
Ernst Klamer
cac750066a Remove unnessecary rfxtrx light property def (#30397) 2020-01-02 16:44:29 +01:00
Ernst Klamer
77978a979b Restore state for Rfxtrx devices (#30309)
* Restore state rfxtrx switch

* Restore state RFXtrx lights

* Restore state RFXtrx covers

* Restore comment

* Remove line

* Remove logging

* fix black

* Fix typo
2020-01-02 07:59:13 +01:00
HomeAssistant Azure
769cf19052 [ci skip] Translation update 2020-01-02 00:32:24 +00:00
Alan Tse
fc08c62a31 Add charging rate sensor to Tesla (#30286)
* Add charging rate sensor to Tesla

* Remove reference to bin_type
2020-01-02 00:36:14 +01:00
Franck Nijhof
37d1771400 Migrate google_* tests from coroutine to async/await (#30377) 2020-01-01 17:24:30 -06:00
Franck Nijhof
bcb47dab45 Migrate discovery tests from coroutine to async/await (#30376) 2020-01-01 17:22:32 -06:00
Franck Nijhof
b43b50b6d2 Migrate ffmpeg tests from coroutine to async/await (#30375) 2020-01-01 17:22:08 -06:00
Franck Nijhof
c5298dc4dc Migrate cast tests from coroutine to async/await (#30374) 2020-01-01 17:21:42 -06:00
Franck Nijhof
c837f185f7 Migrate camera tests from coroutine to async/await (#30372) 2020-01-01 17:21:21 -06:00
Franck Nijhof
8814e1eadc Migrate no_ip tests from coroutine to async/await (#30370) 2020-01-01 17:18:40 -06:00
Franck Nijhof
47aa0043bf Migrate owntracks tests from coroutine to async/await (#30369) 2020-01-01 17:18:20 -06:00
Franck Nijhof
1a2a976be2 Migrate counter tests from coroutine to async/await (#30368) 2020-01-01 17:17:55 -06:00
Franck Nijhof
320dc52bb3 Migrate config tests from coroutine to async/await (#30366) 2020-01-01 17:16:27 -06:00
Franck Nijhof
4e7b35355d Migrate websocket_api tests from coroutine to async/await (#30364) 2020-01-01 17:15:29 -06:00
Franck Nijhof
0fb5fbd85c Migrate hassio tests from coroutine to async/await (#30363) 2020-01-01 17:13:43 -06:00
Franck Nijhof
3a4db2fae7 Migrate mailbox tests from coroutine to async/await (#30361) 2020-01-01 17:13:04 -06:00
Aaron David Schneider
99bc911f7f Add attributes to fritz device_tracker (#30350)
* add attributes to device_tracker

* fix pylint

* requested changes

* docstring updated
2020-01-01 22:03:37 +01:00
Alan Tse
790b2d00c7 Fix HVAC mode for Tesla (#30287)
* Fix HVAC mode for Tesla

* Change HVAC_MODE to HEAT_COOL
2020-01-01 20:49:20 +01:00
Fabian Affolter
0479e93de7 Upgrade python_opendata_transport to 0.2.1 (#30348) 2020-01-01 14:06:20 -05:00
Jeff Irion
83e05da0b3 Fix media_player example for select_source service (#30358) 2020-01-01 19:40:11 +01:00
Franck Nijhof
bc6e2a06e6 Migrate yr tests from coroutine to async/await (#30351) 2020-01-01 16:21:37 +01:00
Franck Nijhof
33828ae514 Migrate timer tests from coroutine to async/await (#30352) 2020-01-01 16:20:18 +01:00
Franck Nijhof
9ba0daa358 Migrate teksavvy tests from coroutine to async/await (#30353) 2020-01-01 16:18:17 +01:00
Franck Nijhof
9fbe6d60cb Migrate startca tests from coroutine to async/await (#30354) 2020-01-01 16:17:35 +01:00
Fabian Affolter
e099d57bde Upgrade zeroconf to 0.24.4 (#30347) 2020-01-01 14:04:37 +01:00
Josef Schlehofer
298d898627 Upgrade youtube_dl to version 2020.01.01 (#30341) 2020-01-01 12:36:43 +01:00
Alan Tse
272c00e81b Remove use of bin_type in Tesla component (#30315)
* Remove use of bin_type

* Convert _unit attribute to units

* Remove unnecessary variable assignment

* Change to using util library convert
2020-01-01 12:23:29 +01:00
HomeAssistant Azure
bb2d8e3f7d [ci skip] Translation update 2020-01-01 00:32:22 +00:00
Franck Nijhof
52ed9608e2 Migrate input_* tests from coroutine to async/await (#30336) 2020-01-01 01:22:44 +01:00
Josh Bendavid
fc23b4f83f Migrate webostv to new library and make integration async with callback state updates (#29296)
* migrate webostv to new aiopylgtv version of the library and add support
for generic commands, input/button commands, and callback state updates

* update requirements

* cleanup and bump aiopylgtv version

* update webostv unit tests

* make webostv unit tests work with python 3.7

* cleanup for code checks

* cleanup and code review

* make all client request functions coroutines

* make host required for webostv configuration

* remove generic command and button functionality plus related cleanup

* fix previous track function

* update unit tests

* fix imports for unit tests

* update unit test

* further unit test updates

* remove unnecessary setup call in unit tests

* restore previous behaviour with client key config file in hass configuration directory
2020-01-01 00:26:35 +01:00
Franck Nijhof
af153521dc Migrate emulated_hue tests from coroutine to async/await (#30331) 2019-12-31 16:50:07 -06:00
Franck Nijhof
194cb8dbf5 Migrate xiaomi_miio tests from coroutine to async/await (#30329) 2019-12-31 16:49:00 -06:00
Franck Nijhof
2ac5537495 Migrate alexa tests from coroutine to async/await (#30332) 2019-12-31 16:48:17 -06:00
Franck Nijhof
0280862780 Migrate api tests from coroutine to async/await (#30338) 2019-12-31 22:58:40 +01:00
Franck Nijhof
687a052d40 Migrate python_script tests from coroutine to async/await (#30335) 2019-12-31 22:48:43 +01:00
springstan
f11d39f8eb Bump alarmdecoder to 1.13.9 (#30303) 2019-12-31 15:54:31 -05:00
Franck Nijhof
d8d75d882b Bump pyps4-2ndscreen to 1.0.4 (#30327) 2019-12-31 15:52:45 -05:00
Franck Nijhof
cd8f954a4d Migrate wunderground tests from coroutine to async/await (#30330) 2019-12-31 21:04:24 +01:00
Franck Nijhof
30dbed3f98 Migrate dsmr tests from coroutine to async/await (#30333) 2019-12-31 21:03:21 +01:00
Franck Nijhof
2620a95944 Improve Withings tests in different time zone (#30326)
* Improve Withings tests in different time zone

* Address code review comment

* Spelling error in code doc
2019-12-31 11:10:39 -05:00
Alexei Chetroi
a3061bda60 Make the rest of ZHA platforms to use ZHA class registry (#30261)
* Refactor ZHA component tests fixtures.

* Add tests for ZHA device discovery.

* Refactor ZHA registry MatchRule.

Allow callables as a matching criteria.
Allow sets for model & manufacturer.

* Minor ZHA class registry refactoring.

Less cluttered strict_matching registrations.

* Add entities only if there are any.

* Migrate rest of ZHA platforms to ZHA registry.

* Pylint fixes.
2019-12-31 11:09:58 -05:00
Alan Tse
5ed44297e6 Simplify Tesla icon get code (#30301)
* Simplify icon get code

* Remove extraneous None
2019-12-31 16:27:39 +01:00
Lars-P
4031596aa7 Fix luftdaten integration by adding a sensor for pressure at sealevel (#30317) 2019-12-31 15:58:54 +01:00
brefra
3c8ebf1844 Add light support to Velbus integration (#30323)
* Add light support to Velbus integration

* Add Velbus light.py to .coveragerc

* Applied black formatting
2019-12-31 15:46:02 +01:00
Fabian Affolter
734ef5a7a9 Upgrade Sphinx to 2.3.1 (#30310) 2019-12-31 15:32:26 +01:00
Iulius
1c2618d99a Add separate command and state topics for mqtt lock (#29808)
* Update lock.py

Allow different command and state topic + different command and state values.

* Formatting updated after black run

* TC updated to reflect different state & cmd values

* Abbreviations for lock states added

* additional non-default state test

* whitespaces fixed

* black formatting run
2019-12-31 15:24:09 +01:00
Christian
fd0375ac20 Add support for Velux garage doors (#30214)
* Update manifest.json

* Update cover.py

Add GarageDoor

* Update to pyvlx 0.2.12

* Sort
2019-12-31 15:17:17 +01:00
Phil Bruckner
609bf445f0 Remove Amcrest deprecated sensors and switches (#30308) 2019-12-31 08:16:41 -06:00
Shawn Wilsher
e68cd339b9 Reduce solaredge logging severity (#30305)
* [solaredge] Reduce Severity of Log Line

This log error happens frequently for some sites, but it shouldn't be an error.
It is expected, per the SolarEdge Monitoring API, that some sites do not
support this information, and the expected result is that this would be
empty (see comments on #27959).

Fixes #27959

* Fix a typo

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2019-12-31 08:56:23 -05:00
rhadamantys
dedd1aec8c Add support for Somfy RTS power socket and Somfy io Temperature sensor (#30053)
* Added support for Somfy RTS wireless power socket and
Somfy Temperature Sensore Thermos Wirefree io

* Added code formatting fixes for commit 5faaf9c

* added support for RollerShutterRTSComponent from Somfy

* Added support for RTS roller shutter in set_cover_position

* Add support for Somfy RTS power socket and Somfy io temperature sensor

* black and isort fixes
2019-12-31 14:48:31 +01:00
SukramJ
b0a0871bed Bump dependency for HomematicIP Cloud (#30319) 2019-12-31 14:45:17 +01:00
Steven Barth
4bfc7b9848 Add homematic host port config for HMIP-only CCUs (#30077)
* homematic: Add host port config for HMIP-only CCUs

When adding a host (CCU) to the homematic component currently the hardcoded port 2001 is used to communicate with it.
However that port is only available on the target if the target supports HM (wireless) protocol which is not the case e.g. for
the Hass.io Homematic CCU addon when running in HMIP-only mode with the HMIP-RFUSB stick.

This allows to change the port home assistant uses to talk to the CCU in order to provide services under hte homematic homain, e.g. homematic.set_variable_value

The default value for this option is the old hardcoded value this the change should be backwards compatible with existing configurations.

* Change style of config retrieval
2019-12-31 08:41:44 -05:00
Philipp Schmitt
72e97792bd Update liveboxplay and pyteleloisirs (#30093) 2019-12-31 08:38:46 -05:00
Issac
3f570245aa Add local_ip component (#29973)
* Added localip component

* Split config and core logic, and migrate to sensor platform (requested by @MartinHjelmare)
Also allow overriding the sensor name via the config

* Tweak docstring

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Initial support for config entries

* Rename localip to local_ip (1/2)

* Rename localip to local_ip (2/2)

* Add test for config_flow

* Split and rename tests

* Remove unneeded code from config_flow

* Implement configuration as config entry import.  Other misc requested changes from code review.

* Fix tests

* minor code review fixes

* remove unneeded code

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2019-12-31 14:34:53 +01:00
Franck Nijhof
5414e9d155 Fix Withings leaking time zone change into other tests (#30320)
* Fix Withings leaking time zone change in other tests

* Fix spelling error in code doc
2019-12-31 14:30:09 +01:00
Paulus Schoutsen
bb14a083f0 Store capabilities and supported features in entity registry, restore registered entities on startup (#30094)
* Store capabilities and supported features in entity registry

* Restore states at startup

* Restore non-disabled entities on HA start

* Fix test

* Pass device class from entity platform

* Clean up restored entities from state machine

* Fix Z-Wave test?
2019-12-31 14:29:43 +01:00
Maciej Bieniek
2c1a7a54cd Add GIOS integration (#28719)
* Initial commit

* Add gios to requirements

* Add tests

* Update .coveragerc file

* Run gen_requirements_all.py

* Change DEFAULT_SCAN_INTERVAL

* Better strings

* Bump library version

* run script.hassfest

* run isort

* Add icons mapping

* Remove unnecessary f-string

* Remove unnecessary listener

* Refactoring config_flow

* Add unique_id to config entry

* Change AQI states to consts in English

* Remove unused init

* Remove unused exception

* Remove private instance attribute

* Remove overwrite state property

* Fix pylint error

* Add SCAN_INTERVAL for air_quality entity

* Add _abort_if_unique_id_configured()
2019-12-31 13:05:31 +01:00
Phil Bruckner
1ee299b079 Ignore google_maps updates when last_seen goes backwards (#30178) 2019-12-30 19:30:45 -06:00
HomeAssistant Azure
ae51331d49 [ci skip] Translation update 2019-12-31 00:32:20 +00:00
Andrew Sayre
914aea9446 Bump pysmartthings 0.7.0 (#30302) 2019-12-30 14:49:56 -06:00
Robert Svensson
41d2d1f309 Handle wired bug on restart (#30276) 2019-12-30 12:40:52 -06:00
Tais Hedegaard Holland
bad35577cb Bump ihcsdk to 2.4.0 (#30279)
* Update requirements_all.txt

update ihcsdk to version 2.4.0

* Update manifest.json

upgrade to version 2.4.0 of ihcsdk
2019-12-30 12:38:17 -06:00
Andy Grunwald
3b9f48b51d Contributing: Add note about feature suggestions and bug tracking (#30225) 2019-12-30 17:54:16 +01:00
Alan Tse
40e3d6f773 Change default icons for Tesla components (#30288) 2019-12-30 17:52:34 +01:00
Fabian Affolter
d0c9a42b81 Add custom validator for countries (#30280) 2019-12-30 17:51:25 +01:00
Fabian Affolter
33738cc83a Upgrade beautifulsoup4 to 4.8.2 (#30274) 2019-12-30 17:51:11 +01:00
Jc2k
fccb13b762 Add homekit_controller service.sensor.smoke (#30269) 2019-12-30 08:05:49 +00:00
Jc2k
8a22a38353 Accept homekit_controller pairing codes both with and without dashes (#30273)
* Handle MalformedPinError from homekit_python
* Handle both formats of pin codes
2019-12-30 07:36:01 +00:00
HomeAssistant Azure
13116d8d3f [ci skip] Translation update 2019-12-30 00:32:19 +00:00
Ville Skyttä
9892564ab5 Upgrade rflink to 0.0.50, ignore_devices now supports * and ? anywhere (#30268)
https://github.com/aequitas/python-rflink/releases/tag/0.0.50
https://github.com/aequitas/python-rflink/releases/tag/0.0.49
https://github.com/aequitas/python-rflink/releases/tag/0.0.48
https://github.com/aequitas/python-rflink/releases/tag/0.0.47
2019-12-29 21:12:49 +02:00
François
85624e8031 Fix creating smappee sensors when remote is not active (#30270) 2019-12-29 17:18:23 +01:00
LE LAY Olivier
a91b005822 Fix ble_tracker randomly pygatt thrown error (#28671)
* fix(ble_tracker): catch randomly pygatt thrown error

* fix(ble_tracker): merge except errors
2019-12-29 09:26:43 +02:00
HomeAssistant Azure
5d8dda4f68 [ci skip] Translation update 2019-12-29 00:32:14 +00:00
Pascal Vizeli
79b47157b8 Merge pull request #30260 from home-assistant/rc
0.103.5
2019-12-28 22:16:11 +01:00
Alexei Chetroi
36585558a5 Refactor ZHA channel logging (#30259)
Add channel.id property -- id unique for this the device only.
2019-12-28 15:41:55 -05:00
Pascal Vizeli
ae42736235 Bump version 0.103.5 2019-12-28 20:26:06 +00:00
Robert Van Gorkom
08af989658 Fixing timezone issue which caused wrong selection of data to be used. (#30011) 2019-12-28 21:25:37 +01:00
Marcelo Moreira de Mello
fdd090bae0 Bump ring to 0.2.8 to fix Oauth issues (#30245) 2019-12-28 20:24:29 +00:00
Paulus Schoutsen
5a9e543087 Whitelist Android/iOS auth callbacks (#30082)
* Whitelist Android/iOS

* Add iOS alternate flavor URLs

* Update indieauth.py

Co-authored-by: Robbie Trencheny <me@robbiet.us>
2019-12-28 21:20:18 +01:00
Maikel Punie
e1e8d6a562 Bump python-velbus library to 2.0.32 to fix problems with the glaspanels (#30257) 2019-12-28 21:16:52 +01:00
Ville Skyttä
4e50a402c7 Note Huawei LTE notify service change requires restart (#30223)
Refs https://github.com/home-assistant/home-assistant/issues/30222
2019-12-28 16:31:42 +01:00
SukramJ
658ec309aa Add HmIP-MOD_TM to HomematicIP Cloud (#30255) 2019-12-28 16:29:14 +01:00
Ville Skyttä
c5a280c064 Huawei LTE: Fix YAML options overriding ones set from GUI (#30249)
Closes https://github.com/home-assistant/home-assistant/issues/30221
2019-12-28 16:27:49 +01:00
Felix Barbalet
0323b246bd Bump libpurecool to 0.6.0 (#30247)
* bump libpurecool to 0.6.0 - fixes home-assistant/home-assistant#26367

* update manifest too
2019-12-28 16:19:18 +01:00
SukramJ
134dc45b77 Bump dependency for HomematicIp cloud (#30237)
* Bump dependency for HomematicIp cloud

* Update test_data
2019-12-28 13:46:04 +01:00
Ville Skyttä
e4cda9ae0b Fix Huawei LTE error message on service call without URL and routers (#30250) 2019-12-28 12:55:45 +01:00
Marcelo Moreira de Mello
59fee12b45 Bump ring to 0.2.8 to fix Oauth issues (#30245) 2019-12-28 10:15:35 +01:00
springstan
cf7b70dd8c Bump python-qbittorrent to 0.4.1 (#30239) 2019-12-28 10:09:42 +01:00
HomeAssistant Azure
2e07902999 [ci skip] Translation update 2019-12-28 00:32:22 +00:00
Kerwood
9d6f3654ad DECONZ - Added support for Aqara single switch WXKG03LM (#30240) 2019-12-27 21:47:45 +01:00
Franck Nijhof
9159da6583 Bump shodan to 1.21.1 (#30234) 2019-12-27 20:35:25 +01:00
HomeAssistant Azure
39d38923b7 [ci skip] Translation update 2019-12-27 00:32:13 +00:00
David F. Mulcahey
05a0922dc0 Bump ZHA dependencies (#30228)
* bump dependencies
* requirement files
* bump quirks to 0.0.30
2019-12-26 17:08:14 -05:00
Josh Bendavid
d6744fbc4e Fix handling of symlinked device descriptors in keyboard_remote and move remaining sync io to executor thread pool (#30206)
* fix handling of symlinked device decriptors

* make check for symlinked paths more efficient

* make variable names pylint compliant

* move sync io during setup and device connect/disconnect to executor thread pool

* move remaining sync io during setup to executor thread pool

* remove unnecessary lambda functions
2019-12-26 19:06:57 +01:00
Paul Annekov
b2753b7578 bump tuyaha 0.0.5 (#30213) 2019-12-26 13:27:59 +01:00
Alan Tse
e58ef36adc Bump teslajsonpy to 0.2.1 (#30217)
Closes #29922
2019-12-26 13:25:49 +01:00
HomeAssistant Azure
169c4089ff [ci skip] Translation update 2019-12-26 00:32:16 +00:00
Ville Skyttä
50a87bbe18 Add Huawei LTE integration suspend and resume services (#30207)
Useful e.g. if accessing the router web interface from another source
such as a web browser is temporarily required.
2019-12-25 12:43:51 +01:00
Ville Skyttä
a5c4508571 Make Huawei LTE notify service name configurable (#30208)
* Default Huawei LTE notify service name to notify.huawei_lte, make configurable

Closes https://github.com/home-assistant/home-assistant/issues/29409

* Set default notify service name for uninvoked options flow
2019-12-25 13:42:28 +02:00
Kevin McCormack
f56797e413 Update Vivotek camera component (#30191)
- Bump libpyvivotek version to 0.4.0
- Add digest authentication
2019-12-25 11:45:49 +01:00
rhadamantys
89450f405c Add support for enocean window handle FA 10 00 (Hoppe) (#29968)
* Added support for Somfy RTS wireless power socket and
Somfy Temperature Sensore Thermos Wirefree io

* Added code formatting fixes for commit 5faaf9c

* added support for RollerShutterRTSComponent from Somfy

* Added support for RTS roller shutter in set_cover_position

* added support for enocean window handle FA 10 00 (Hoppe)

* removed spaces in empty lines

* removal of rawdata attribute / code style

* isort fix

* PyLint fixes

* Improvements after review suggestions: rename device class to sensor type to avoid ambiguousness

* added import for DEVICE_CLASS_POWER from const.py

* removed window handle unit
2019-12-25 11:41:00 +01:00
Niall Donegan
5e3102b2d6 Pull track position from MPD status (#28579)
* Pull track position from MPD status()

This allows the progress bar to work when using the media-control card in lovelace.

* Actually commit flake8 fix!

* Extra documentation.

Mainly to trigger CI rerun.

* Updated to use self._media_position
2019-12-25 11:09:03 +01:00
Josef Schlehofer
217b974cef Upgrade youtube_dl to 2019.12.25 (#30203) 2019-12-25 10:18:10 +01:00
HomeAssistant Azure
bb35d93fde [ci skip] Translation update 2019-12-25 00:32:06 +00:00
ochlocracy
25f78dd1a9 Implement EqualizerController in Alexa for media_player. (#30159) 2019-12-24 17:06:39 -05:00
springstan
4ea42c2479 Bump datapoint to 0.9.5 (#30185) 2019-12-24 12:00:32 -07:00
springstan
482ff4061e Bump importlib-metadata to 1.3.0 (#30196)
* Bump importlib-metadata to 1.3.0

* Include setup.py and package_constraints.txt
2019-12-24 12:00:05 -07:00
Tim Rightnour
f32eaa2fdd Add onewire devices and owserver remote host support (#29948)
* Add support for HobbyBoards sensors: Hub, Humidity, Moisture, PulseCounter
Add support for an owserver running on a remote host

* Cleanup and fixes for style/etc

* Forgot to convert to f-strings.

* Update with changes requested by @MartinHjelmare

* Pylint

* Fix to None

* Reverse logic for hobbyboard test to eliminate pylint complaint

* Modified manifest to list myself as codeowner

* Move some functions down into OneWireProxy instead of the top OneWire

* Oops, missed some decode()'s

* And another!
2019-12-24 14:41:29 +01:00
Quentame
2113d65c06 Fix AdGuard Home safe search sensor name (#30171)
* Fix AdGuard Home safe search sensor name

* Fix typo
2019-12-24 14:14:58 +01:00
Fabian Affolter
783672d305 Upgrade zeroconf to 0.24.3 (#30187) 2019-12-24 14:11:01 +01:00
HomeAssistant Azure
8add6c5f2e [ci skip] Translation update 2019-12-24 00:32:12 +00:00
David F. Mulcahey
85d2ba047b Protect against bad data stored in ZHA (#30183) 2019-12-23 19:11:35 -05:00
Alan Tse
3aa2ae1700 Enable config flow for Tesla (#28744)
* build: bump teslajsonpy to 0.2.0

* Remove tests

* feat: add config flow

* feat: add async

* perf: convert unnecessary async calls to sync

* feat: add charger voltage and current sensor

* feat: add options flow

* build: bump teslajsonpy to 0.2.0

* Remove icon property

* Revert climate mode change

* Remove charger sensor

* Simplify async_setup_platform

* Update homeassistant/components/tesla/sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/tesla/binary_sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Address requested changes

* Fix pylint error

* Address requested changes

* Update codeowners

* Fix pylint error

* Address requested changes

* Address requested change

* Remove unnecessary check for existing config entry

* Load scan_interval in async_setup_entry

* Include coverage of config_flow

* Add tests for full coverage

* Address requested test changes

* Remove unnecessary init lines

* Remove unnecessary init

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2019-12-23 21:54:25 +01:00
Claudio Heckler
edce497a0d New date_time_utc display option added to the time_date sensor platform (#30158) 2019-12-23 21:48:24 +01:00
P-Verbrugge
059e8722b6 Updated formatting of total_blocks value (#30170)
The number of total blocks is always a round number. There can't be .1 or .11 blocks for example. The output is now always formatted with two decimals that are always 00.
2019-12-23 21:42:44 +01:00
Greg
f23cc16660 Upgrade envoy_reader to 0.11.0 (#30179) 2019-12-23 21:35:54 +01:00
Quentame
f72ba0c716 Add icons to Freebox sensors (#30132) 2019-12-23 09:37:41 -07:00
springstan
4c5801ee8c Add cast to state of Dyson Air Quality Sensor (#30100) 2019-12-23 09:34:57 -07:00
Quentame
e3a3964911 Add icon to Plex sensor (#30172) 2019-12-23 09:25:57 -07:00
ochlocracy
a2678b2aff Add support for input_number entities in Alexa integration (#30139)
* Add support for input_number entities

* Update homeassistant/components/alexa/capabilities.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Removed get methods to directly access required attributes dicts.

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2019-12-23 15:17:37 +01:00
Paulus Schoutsen
7f2921b0e6 Merge remote-tracking branch 'origin/master' into merge-master 2019-12-22 23:42:46 +01:00
Paulus Schoutsen
48d35a4550 Merge pull request #30154 from home-assistant/rc
0.103.4
2019-12-22 23:41:22 +01:00
Robert Svensson
31b17e2b95 Allow battery value of 0 as well as make sure to not create a battery tracker if one already exist (#30155) 2019-12-22 22:58:36 +01:00
Robert Svensson
e9dc404de1 Allow battery value of 0 as well as make sure to not create a battery tracker if one already exist (#30155) 2019-12-22 22:58:22 +01:00
Paulus Schoutsen
720d63f496 Bumped version to 0.103.4 2019-12-22 22:34:57 +01:00
Franck Nijhof
e9b19e0465 Fix deconz SSDP updating Hassio discovery (#30153) 2019-12-22 22:34:14 +01:00
springstan
e74c4c5d99 Move imports into setup function in homekit __init__.py (#30137) 2019-12-22 22:25:27 +01:00
Paulus Schoutsen
697833bc91 Remove requirement from entity integration (#30113) 2019-12-22 22:25:03 +01:00
Franck Nijhof
d101d4449f Fix deconz SSDP updating Hassio discovery (#30153) 2019-12-22 22:24:18 +01:00
Alexei Chetroi
fdaaabf070 ZHA binary_sensor cleanup. (#30149) 2019-12-22 14:07:49 -05:00
cgtobi
d4ff214fce Clean up scaffold (#30135) 2019-12-22 19:53:03 +01:00
Franck Nijhof
b1bb2298e0 Bump sqlalchemy to 1.3.12 (#30142) 2019-12-22 19:52:39 +01:00
Ville Skyttä
868eb3c735 More helpers type improvements (#30145) 2019-12-22 19:51:39 +01:00
Philipp Danner
70f8bfbd4f Update Integration of Keba charging station (#30125)
* fixed parsing of current to float in service set_current

* Added optional name in the config file in order to get a better entety naming (easier to find)

* fix parsing of all parameters to service calls

* addressed code review comments + updated pypi dependency

* config name imported from cont.py + minor naming changes to be more clear about the meaning of a sensor

* removed name in config again, use product name gathered from the charging station instead

* implemented suggested changes

* changed variable naming as requested
2019-12-22 19:46:53 +01:00
Alexei Chetroi
83768be814 Refactor ZHA binary_sensor (#30138)
* Refactor ZHA binary_sensor.

Use ZHA entity class registry for channel specific implementations.

* Remove registries.BINARY_SENSOR_TYPES dict.

* Address PR comments.
2019-12-22 13:24:57 -05:00
Fabian Affolter
ed0ee3100d Upgrade zeroconf to 0.24.2 (#30140) 2019-12-22 12:01:22 +01:00
Paulus Schoutsen
32aae7017e Remove requirement from entity integration (#30113) 2019-12-22 10:32:42 +01:00
Paulus Schoutsen
63a843c19c Fix test 2019-12-22 10:31:23 +01:00
springstan
251808874f Move imports into setup function in homekit __init__.py (#30137) 2019-12-22 10:23:44 +01:00
Alexei Chetroi
9c23c4adf2 Cleanup ZHAEntity class (#30131)
Remove `_domain` attribute since we're not using it anymore.
2019-12-21 18:33:00 -05:00
Alexei Chetroi
8e3dfbd5c9 Refactor ZHA electrical measurement sensor. (#30130) 2019-12-21 17:15:50 -05:00
Paulus Schoutsen
834929a14e Clean up mobile app webhooks (#30123) 2019-12-21 22:45:06 +01:00
Alexei Chetroi
fb3bb8220b Implement ZHA entity classes registry (#30108)
* ZHA Entity registry.
Match a zha_device and channels to a ZHA entity.

* Refactor ZHA sensor to use registry.
* Remove sensor_types registry.
* Fix ZHA device tracker battery remaining.
* Remove should_poll/force_update attributes.
* Fix binary_sensor regression.
* isort.
* Pylint.
* Don't access protected members.
* Address comments and fix spelling.
* Make pylint happy again.
2019-12-21 16:26:58 -05:00
Jc2k
b41480ae46 Add a config entry mechanism to rediscover a discovery that was ignored (#30099)
* Mechanism to rediscover a discovery that was ignored

* Add core config entry tests for new rediscover step

* Add tests for homekit_controller implementation of async_step_rediscover

* Rename rediscover to unignore

* Comment the new ignore/unignore mechanisms
2019-12-21 11:22:07 +01:00
Maikel Punie
3911f24f75 Upgrade python-velbus (#30110) 2019-12-21 11:20:31 +01:00
Vladimír Záhradník
0fc92928a4 Add device class attribute to modbus sensors (#30030) 2019-12-21 10:54:48 +01:00
Ville Skyttä
6604680793 Helpers type hint improvements (#30106) 2019-12-21 09:23:48 +02:00
Ville Skyttä
ecdc1adf90 Upgrade mypy to 0.761 (#30104)
https://mypy-lang.blogspot.com/2019/12/mypy-0760-released.html
https://github.com/python/mypy/releases/tag/v0.761
2019-12-20 22:35:02 +01:00
Bas Nijholt
de94afd090 add --show-diff-on-failure to pre-commit (#30097)
This makes the traceback on a failing CI pipeline much more useful.
2019-12-20 22:00:31 +01:00
Jc2k
4ef04840e9 Don't error on removal of an ignored homekit_controller config entry (#30083)
* Don't error on ignored entries

* Don't ever call async_remove_entry or async_unload_entry for an unignored ignore config entry
2019-12-20 21:49:07 +01:00
Paulus Schoutsen
3e7699b886 Merge pull request #30096 from home-assistant/rc
0.103.3
2019-12-20 21:28:49 +01:00
Paulus Schoutsen
d448ed9f6d Bump ring to 0.2.5 (#30103) 2019-12-20 20:44:46 +01:00
springstan
f229cf2796 Bump starlingbank to 3.2 (#30098) 2019-12-20 20:44:46 +01:00
Paulus Schoutsen
b3098c9f2c Bump ring to 0.2.5 (#30103) 2019-12-20 20:42:13 +01:00
springstan
27f35f86ad Bump starlingbank to 3.2 (#30098) 2019-12-20 20:29:12 +01:00
ochlocracy
0faca57e8b Explicitly include Alexa interface for image_processing entities. (#30101) 2019-12-20 20:28:23 +01:00
gppanayotov
84e1b3d07f Add an open window sensor for heating zones (#30090) 2019-12-20 19:02:46 +01:00
Pascal Vizeli
5def51835e Fix v2 2019-12-20 17:10:04 +00:00
Pascal Vizeli
12f1a322a7 Fix test 2019-12-20 16:20:10 +00:00
Fazli Sapuan
488f26d55b Fix homekit handling of 0 light brightness and fan speed (#29962)
* Fix homekit handling of 0 light brightness and fan speed

* Update homekit tests for new initial brightness/speed value
2019-12-20 16:08:08 +00:00
Wim Haanstra
20a0557be7 Fix failure in transform method (#30023)
* Fix failure in transform method

* Fix formatting issue
2019-12-20 16:07:07 +00:00
omriasta
e58291015c Patch rachio (#30031)
* fix binary sensor offline/online

fixed self._handle_update on line 66 to produce args, kwargs.
Updated the binary sensor to check the correct index in the tuple.

* Fixed Standby switch

Set standby switch to poll in order to get status when homeassistant starts up.
Updated the index for the switch to get the status from the tuple.
2019-12-20 16:05:28 +00:00
Pascal Vizeli
e6a27983d3 Bump version 0.103.3 2019-12-20 14:16:39 +00:00
Franck Nijhof
939ca63cbc Fix update port and api key on deconz discovery config entry u… (#30088)
* Fix update port and api key on discovery config entry update

* Remove coroutine from _update_entry
2019-12-20 14:15:45 +00:00
Michaël Arnauts
04b5d6c697 Rework tado component (#29246)
* Fix imports so it works in custom_components

* Rework tado component

* Code cleanup

* Remove water_heater

* Address pylint warnings

* Remove water_heater from components

* Raise PlatformNotReady when we couldn't connect

* Revert PlatformNotReady since we are not a platform

* Add debugging information

* Add fallback setting

* Import with relative path

* Address race condition

* Cleanup

* Catch 422 Errors and log the real error

* Use async_schedule_update_ha_state to update the entities

* Forgot the True
2019-12-20 13:24:43 +01:00
Fazli Sapuan
92fd3e3ad5 Fix homekit handling of 0 light brightness and fan speed (#29962)
* Fix homekit handling of 0 light brightness and fan speed

* Update homekit tests for new initial brightness/speed value
2019-12-20 11:00:21 +01:00
Franck Nijhof
eb0aed3653 Fix update port and api key on deconz discovery config entry u… (#30088)
* Fix update port and api key on discovery config entry update

* Remove coroutine from _update_entry
2019-12-20 10:29:18 +01:00
HomeAssistant Azure
3a610edb78 [ci skip] Translation update 2019-12-20 00:32:22 +00:00
Ville Skyttä
d236a19139 Include all SSDP data in discovery info (#28197)
* Include all SSDP data in discovery info

* Use UPnP device description as discovery info, inject some SSDP attrs

* Clean up attribute names

* Adapt existing SSDP flows to changed attribute names

* Prefix all SSDP UPnP attribute name constants with ATTR_UPNP, tweak a bit
2019-12-19 19:28:03 +02:00
springstan
0cb468d7b0 Make name of nmbs live sensor customizable via unique_id (#29662)
* Make name customizable for nmbs live sensors

* Change order of the live name

* Added unique id to live nmbs sensor

* Revert changing the name of the live sensor
2019-12-19 17:45:52 +01:00
Maciej Bieniek
80be3b74a9 Init entities as unavailable when offline (#29738) 2019-12-19 14:10:27 +01:00
Paulus Schoutsen
52818bdb89 Make Hassfest stricter pt 2 (#30068)
* Make Hassfest stricter

* Fix if-condition

* Small cleanup
2019-12-19 14:00:22 +01:00
ochlocracy
5baaa852dd Refactor Alexa capabilityResources object into class, Implement Alexa semantics object (#29917)
* Refactor capabilityResources object into class.
Implement semantics object to support open, close, raise, lower utterences.
Replace covers PercentageController with RangeController.
Add semantics for covers.
Remove PowerController for covers.
Add new display categories.
Add new items to Alexa Global Catalog.
Implement garage door voice PIN code support though Alexa app.
Fixed bug with getting property for ModeController.
Fixed bug were PercentageController AdjustPercentage would exceed 100.

* Comment fixes in Tests.

* Reorder imports.

* Added additional tests for more code coverage.

* Added and additional test for more code coverage.

* Explicitly return None for configuration() if not instance of AlexaCapabilityResource.
2019-12-19 12:44:17 +01:00
Yuchen Ying
9804fbb527 Add unit_of_measurement to various Transmission sensors (#30037)
* Add unit_of_measurement to various Transmission sensors 

Without unit_of_measurement, the history graph card will not show those sensors as line chart.

* Change Counts to Torrents.
2019-12-19 11:23:46 +01:00
Paulus Schoutsen
e0d6810134 Remove stream from camera after deps (#30057) 2019-12-19 11:23:19 +01:00
Jc2k
c3144eddbb Set unique id on homekit_controller config entries (#30035)
* Set unique id on config entries

* Changes from review
2019-12-19 09:45:22 +01:00
Paulus Schoutsen
50714fbedf Merge pull request #30064 from home-assistant/rc
0.103.2
2019-12-19 08:03:47 +01:00
Paulus Schoutsen
c9de5b9fef Bumped version to 0.103.2 2019-12-19 07:53:38 +01:00
Paulus Schoutsen
aae80dca1c Fix recursion 2019-12-19 07:53:32 +01:00
Aaron Bach
9e5de1a106 Guard against future unknown SimpliSafe entity types (#30059)
* Guard against future unknown SimpliSafe entity types

* Updated log message
2019-12-18 17:52:56 -07:00
HomeAssistant Azure
5ea4ba6a2e [ci skip] Translation update 2019-12-19 00:32:16 +00:00
Paulus Schoutsen
f5c7d23b0f Merge remote-tracking branch 'origin/master' into dev 2019-12-18 22:18:35 +01:00
Paulus Schoutsen
82a5c23c9c Merge pull request #30056 from home-assistant/rc
0.103.1
2019-12-18 22:15:02 +01:00
Paulus Schoutsen
952b21facc Bumped version to 0.103.1 2019-12-18 21:24:39 +01:00
Aaron Bach
9f64656603 Bump simplisafe-python to 5.3.6 (#30055) 2019-12-18 21:23:57 +01:00
Andrew Onyshchuk
6d06cec0e0 Fix support for legacy Z-Wave thermostats (#29955)
This brings back support for Z-Wave thermostats
of SETPOINT_THERMOSTAT specific device class.
Such devices don't have COMMAND_CLASS_THERMOSTAT_MODE
and are now handled separately.
2019-12-18 21:19:59 +01:00
Chris Mandich
9836e78120 Fix loading flume integration (#29926)
* Fix https://github.com/home-assistant/home-assistant/issues/29853

* Run script.gen_requirements

* Update to store Token File in config directory

* Update to store Token File in config directory

* Update to store Token File in config directory
2019-12-18 21:18:49 +01:00
Justin Bassett
f1d22db009 Fix mobile app device identifiers (#29920)
Fix identifiers when updating device registration.
2019-12-18 21:18:49 +01:00
Anders Melchiorsen
24c87638e6 Support entity_id: all in lifx.set_state (#29919) 2019-12-18 21:18:48 +01:00
Wim Haanstra
36f7096f09 Fix failure in transform method (#30023)
* Fix failure in transform method

* Fix formatting issue
2019-12-18 13:18:14 -07:00
springstan
9b65d83e28 Fix setup error for logbook (#29908)
* Fix setup error by moving an import back into the setup function

* Revert c741664d4d

* Add homekit as after_dependency to logbook manifest.json
2019-12-18 21:18:10 +01:00
springstan
29e412a6c4 Fix setup for tank_utility component (#29902) 2019-12-18 21:17:26 +01:00
Aaron Bach
a466ae0279 Bump aioambient to 1.0.2 (#29850) 2019-12-18 21:17:25 +01:00
Paulus Schoutsen
628a148944 Install requirements of after_dependencies when loading integrations (#29491)
* Install requirements of after_dependencies when loading integrations

* Fix smartthings test
2019-12-18 21:17:24 +01:00
Alexei Chetroi
41bef4b919 Add timer reload service. (#30015) 2019-12-18 21:15:11 +01:00
Aaron Bach
0adb88156d Bump simplisafe-python to 5.3.6 (#30055) 2019-12-18 21:06:57 +01:00
omriasta
bdef54de0c Patch rachio (#30031)
* fix binary sensor offline/online

fixed self._handle_update on line 66 to produce args, kwargs.
Updated the binary sensor to check the correct index in the tuple.

* Fixed Standby switch

Set standby switch to poll in order to get status when homeassistant starts up.
Updated the index for the switch to get the status from the tuple.
2019-12-18 21:04:54 +01:00
Erik Kastelec
d16011b849 changed Venstar component temperature to half degree accuracy (#30034) 2019-12-18 08:47:01 -05:00
Paulus Schoutsen
9c7caaa142 Add option to ignore flows (#30008) 2019-12-18 07:41:01 +01:00
Greg
feb39c39a3 Update Envoy sensor to configure credentials and grab Inverter Date from updated API (#28837)
* Update manifest.json

Updated sensor to use the latest version of the API to be able to use the new features.

* Updated sensor to use new API features.  Configurable credentials and Inverter last reported date.

* EnvoyReader is passed to Envoy uses async update()

* Fixed pydocstyle warnings

* Fixed merge issue. Had extra variable.

* Added warning message when authentication for Inverter data fails

* Added continue after exception for loop

* Moved if statement outside of try/except

* Removed unneeded boolean attribute
2019-12-18 01:51:19 +01:00
HomeAssistant Azure
0135b988ff [ci skip] Translation update 2019-12-18 00:32:19 +00:00
Fabian Affolter
876195a8a8 Upgrade zeroconf to 0.24.1 (#30028) 2019-12-17 17:00:00 +01:00
Fabian Affolter
31cd0af47a Upgrade matrix-client to 0.3.2 (#30027) 2019-12-17 16:26:36 +01:00
Andre Richter
115aa2e49c Z-Wave: Fibaro FGR*-222: Add venetian blind support (#29701)
The Fibaro FGR-222/FGRM-2222 ZWave roller shutter devices have a proprietary
command class to support setting the tilt angle of venetian blinds (= type of
window cover). This PR adds the support to HA for this. This allows the user to
set the height of the blinds and the tilt angle separately.

Original patch by @ChristianKuehnel #24405.
2019-12-17 09:26:19 -05:00
Robert Van Gorkom
78e831b08e Make tplink light more responsive (#28652)
* Making tplink light more responsive.

* Adding light platform tests.

* Addressing PR feedback.

* Mocking the module, not the api.

* Using sync method for background update.
2019-12-17 02:24:50 +01:00
HomeAssistant Azure
ad8278c078 [ci skip] Translation update 2019-12-17 00:32:23 +00:00
Franck Nijhof
0439d6964c Fix persistent setup error notification content (#29995)
* Fix persistent setup error notification content

* Use documentation from manifest, enriched error messages

* Fix issue caught by mypy
2019-12-16 20:16:23 +01:00
Vladimír Záhradník
c16fae2c0b Fix modbus service description (#30005) 2019-12-16 20:07:46 +01:00
Paulus Schoutsen
58b5833d64 Convert Hue to use unique ID (#30000)
* Convert Hue to use unique ID

* Fix normalization

* Store/restore unique ID

* Fix tests
2019-12-16 19:45:09 +01:00
zewelor
575eb48feb Show current effect in yeelight device (#28975)
* Show current effect in yeelight device

* Use device_state_attributes instead of state_attributes

* Add early return in set effect

* Make single if elif chain

* Fix if elif

* Fix if elif
2019-12-16 16:23:05 +01:00
Paulus Schoutsen
d851cb6f9e Add unique ID to config entries (#29806)
* Add unique ID to config entries

* Unload existing entries with same unique ID if flow with unique ID is
finished

* Remove unused exception

* Fix typing

* silence pylint

* Fix tests

* Add unique ID to Hue

* Address typing comment

* Tweaks to comments

* lint
2019-12-16 12:27:43 +01:00
Franck Nijhof
87ca61ddd7 Add check-json to CI and Pre-commit (#29912)
* Add check-json to CI and Pre-commit

* Add ignore pre-commit hooks to gen_requirements_all
2019-12-16 11:06:16 +01:00
Franck Nijhof
d1e59b20c8 Bump pytest to 5.3.2 (#29990) 2019-12-16 10:59:32 +01:00
Franck Nijhof
dd0f0034f3 Bump shodan to 1.21.0 (#29991) 2019-12-16 10:57:42 +01:00
Emacee
be042f3d91 Update binary_sensor.py (#29977)
Change sensor type for central locking from safety into lock.
2019-12-16 09:42:48 +01:00
Louis-Dominique Dubeau
33cbb398ad Don't use the locals parameter on exec. (#29979)
Using the locals parameter makes it so that the code of a Python script runs as
if it were in the body of a ``class``. One effect of this is that functions
defined as part of a script cannot call one another directly.

Fixes: #24704, #13653
2019-12-16 09:39:20 +01:00
Paulus Schoutsen
b058742404 Fix condition typo (#29989) 2019-12-16 09:33:11 +01:00
Ryan
3f32490ae6 Fixed "condtion_type" to "condition_type" (#29984)
Fixed "condtion_type" to "condition_type"
2019-12-16 08:41:32 +01:00
Paulus Schoutsen
9e51a18845 Make hassfest import detection better (#29932)
* Make hassfest import detection better

* Fix tests
2019-12-16 08:22:20 +01:00
Jeff Irion
8fe17c0933 Remove 'SUPPORT_PLAY_MEDIA' from Volumio (#29969) 2019-12-16 08:21:29 +01:00
Kevin Eifinger
fc01da8933 Migrate to api_key (#29966) 2019-12-16 08:20:41 +01:00
Joakim Plate
039cc98278 Support case of unknown/unavailable temperature/humidity (#29959)
* Support case of unknown/unavailable temperature/humidity

State is never None, just a string.

* Lint suggestion
2019-12-16 08:04:59 +01:00
Ville Skyttä
445fd15f76 Drop Python 3.6 support (#29978) 2019-12-16 07:29:19 +01:00
Andrew Onyshchuk
bfafa77016 Fix support for legacy Z-Wave thermostats (#29955)
This brings back support for Z-Wave thermostats
of SETPOINT_THERMOSTAT specific device class.
Such devices don't have COMMAND_CLASS_THERMOSTAT_MODE
and are now handled separately.
2019-12-15 20:02:18 -05:00
HomeAssistant Azure
95a6a7502a [ci skip] Translation update 2019-12-16 00:32:25 +00:00
Ville Skyttä
d6f317c0a9 Remove deprecated rflink configs (#29972)
They've been deprecated and automatically replaced since July 2017
already, fe6a4b8ae5
2019-12-15 22:57:23 +02:00
Aaron Godfrey
012c09ce00 Fix example value for Todoist service (#29953) 2019-12-15 18:47:11 +01:00
Fabian Affolter
9c0799eb0a Upgrade keyring to 20.0.0 and keyrings.alt to 3.4.0 (#29960) 2019-12-15 17:41:56 +01:00
Chris Caron
09f3362cc6 isort fix on test_media_player (#29965) 2019-12-15 16:07:57 +01:00
Joakim Plate
84a7115435 Start of using hass state for tests rather than direct object (#29377) 2019-12-15 13:14:50 +01:00
Jeff Irion
8a5bce81c8 Bump adb-shell to 0.1.0 and androidtv to 0.0.36 (#29938)
* Bump adb-shell to 0.1.0 and androidtv to 0.0.36

* Add test for setting up two devices

* Add test_setup_same_device_twice

* Fix test_setup_two_devices

* Fix coverage

* Coverage

* Fix flaky 'test_setup_two_devices'

* Another stab at coverage

* Rename 'address' back to 'host'
2019-12-15 11:31:59 +01:00
Tyler
a28545b69b bump venstar 0.12 (#29954)
* bump venstar 0.12

* Update manifest.json
2019-12-15 08:16:20 +01:00
Chris Mandich
6dd496deb4 Fix loading flume integration (#29926)
* Fix https://github.com/home-assistant/home-assistant/issues/29853

* Run script.gen_requirements

* Update to store Token File in config directory

* Update to store Token File in config directory

* Update to store Token File in config directory
2019-12-15 03:45:29 +01:00
Quentame
820780996a Add battery sensor to iCloud (#29818)
* Add battery sensor to iCloud

* Update .coveragerc

* Review: @balloob & @MartinHjelmare

* Review: use f string
2019-12-14 23:06:00 +01:00
Raman Gupta
003658a3f0 Update androidtv version to improve source selection support (#29579)
* Change androidtv module versions and add support for select_source for all device types

* Update and add tests

* Update requirements_test_all.txt

* Update requirements_all.txt

* Consolidate tests

* Fix typo

* Remove 'self._device'
2019-12-14 16:54:41 +01:00
ochlocracy
3db7e8f5e9 Implement Alexa.EventDetectionSensor for Alexa (#28276)
* Implement Alexa.EventDetectionSensor Interface

* Removed references to PR #28218 not yet merged into dev.

* Update tests to include Alexa Interface

* Guard for `unknown` and `unavailible` states.

* Fixed Unnecessary "elif" after "return"
2019-12-14 08:47:45 +01:00
DjMoren
3c86825e25 Update Tahoma component's tahoma-api requirement's version (#29918) 2019-12-14 08:00:19 +01:00
Anders Melchiorsen
2cb92c66ef Support entity_id: all in lifx.set_state (#29919) 2019-12-14 07:36:33 +01:00
Justin Bassett
114390c95e Fix mobile app device identifiers (#29920)
Fix identifiers when updating device registration.
2019-12-14 07:36:12 +01:00
HomeAssistant Azure
8f5a00a98b [ci skip] Translation update 2019-12-14 00:32:08 +00:00
Paulus Schoutsen
a470a72ec5 Add integration platform helper (#29914) 2019-12-13 15:38:41 +01:00
springstan
6b3260357f Fix setup error for logbook (#29908)
* Fix setup error by moving an import back into the setup function

* Revert c741664d4d

* Add homekit as after_dependency to logbook manifest.json
2019-12-13 14:08:30 +01:00
Franck Nijhof
c8cc8acc81 Fixes invalid JSON syntax in devcontainer (#29911) 2019-12-13 12:41:56 +01:00
Franck Nijhof
b91a8f510c Fix incorrect file format yr test fixure (#29910) 2019-12-13 12:29:24 +01:00
Fabian Affolter
1301a4fcc6 Upgrade Sphinx to 2.2.2 and sphinx-autodoc-typehintsi to 1.10.3 (#29906) 2019-12-13 11:15:26 +01:00
Ville Skyttä
4d57de335c Make Python deprecation notice easier to maintain (#29900) 2019-12-13 10:39:57 +01:00
springstan
9fbb6d981a Fix setup for tank_utility component (#29902) 2019-12-13 10:31:53 +01:00
Bas Nijholt
c59bf0bff6 genericpath is an internal Python module and shouldn't be imported according to core Python devs. (see [this](https://bugs.python.org/msg358136) comment) (#29903)
For a reason unknown to me, @exxamalte introduced this in https://github.com/home-assistant/home-assistant/pull/14342.

The problem is that Linux and macOS implement `os.path` differently, one imports from [`ntpath.py`](https://github.com/python/cpython/blob/master/Lib/ntpath.py) and the other one from [`posixpath.py`](https://github.com/python/cpython/blob/master/Lib/posixpath.py), and both these files use `genericpath.py`.

Somehow, `isort` on macOS will see `genericpath` as a third party library and sort it accordingly.
Other Unix-based OSes will correctly treat `genericpath` as an internal library.

This problem led to a sorting sequence in the following commits:

- ca0fad2cbb
- f5d4878992
- 7d68e88d31
- 1fee400dcd

This supersedes https://github.com/home-assistant/home-assistant/pull/29893.
2019-12-13 09:47:09 +01:00
HomeAssistant Azure
5b32ee566c [ci skip] Translation update 2019-12-13 00:32:17 +00:00
Sebastian Muszynski
c051ae0bfb Bump python-miio version to 0.4.8 (#29890) 2019-12-12 22:39:11 +01:00
Alexei Chetroi
7685c76b9b Defer log formatting. (#29888) 2019-12-12 14:16:02 -05:00
randellhodges
9d662d6114 ISY994 Node Filter Update (#28155)
* Adding filters for keypad dimmers and smoke sensor

* ran black --fast as suggested

* Adding filters for keypad dimmers and smoke sensor

* ran black --fast as suggested
2019-12-12 19:47:38 +01:00
John Luetke
7c42f4b45b (Re)Add support for multiple Pi-Holes (#27569)
* Update configuration schema to support multiple Pi-holes

* Construct sensors for each configured Pi-hole

* Ensure each Pi-hole has a unique name

* Update services to handle multiple Pi-holes

* Update tests for multiple configurations

* Refactor tests to support service testing

* Fix else-raise per pyliunt

* Per code review, add all entities in a single call

* Per code review, add the default name as default.

* Per code review, add cv.ensure_list to prevent breaking change

* Per code review, move name validation to schema

* Remove default name

* Per code review, validate api_key in schema definition

* Per code review, rename variables

* Per code review, use list comprehension

* Ensure unique slug names in config validation

* Per code review, refactor to CoroutineMock

* Fix adding sensor entities

* Per code review, refactor mock function creation

* Per code review, refactor mock function return values
2019-12-12 19:43:49 +01:00
Alexei Chetroi
327b5c3c94 Log ZHA bind/unbind operations status (#29842)
* Log bind/unbind operation result.
* Use ZDO consts.
* Use device logger for bind/unbind results.
* Lint.
2019-12-12 12:16:51 -05:00
Alexei Chetroi
1fee400dcd Revert "Sort import for tests/components/feedreader/test_init.… (#29882)
This reverts commit 7d68e88d31.
2019-12-12 17:10:43 +01:00
Ville Skyttä
130571c478 Remove no longer needed auth.util, use secrets instead (#29861) 2019-12-12 16:46:33 +01:00
Bas Nijholt
c58c10ab7c Add isort to CI and pre-commit (#29739)
* add isort to CI and pre-commit

* disable wrong-import-order in pylintrc

* ✏️ Tweak


Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2019-12-12 15:58:47 +01:00
Bas Nijholt
7d68e88d31 Sort import for tests/components/feedreader/test_init.py (#29878)
This unblocks https://github.com/home-assistant/home-assistant/pull/29739
2019-12-12 15:56:32 +01:00
Franck Nijhof
4b33578757 Fix package import sort on dwd_weather_warnings (#29874) 2019-12-12 14:45:00 +01:00
Aaron Bach
914b49566a Bump aioambient to 1.0.2 (#29850) 2019-12-12 10:24:57 +01:00
Ville Skyttä
7931a0b675 Use Bionic's ffmpeg on Travis, jonathonf/ffmpeg-4 is N/A at the moment (#29860) 2019-12-12 07:15:32 +01:00
Paulus Schoutsen
b9eb831d29 Revert Tahoma removal (#29840)
* Revert "Remove Tahoma component #29744 (#29745)"

This reverts commit df74272ba6.

* Revert "Cleanup removed component (#29788)"

This reverts commit 3a28361beb.
2019-12-12 06:37:55 +01:00
HomeAssistant Azure
7bd98d1082 [ci skip] Translation update 2019-12-12 00:32:15 +00:00
foxy82
a08e3d7352 Update rfxtrx component so it can be run as a custom_component (#29638)
* Updating rfxtrx component so it can be run as a custom_component

* Fix pylint errors

* Fix pylint errors

* Fix pylint error on dict.

* isort
2019-12-11 15:58:49 +01:00
Paulus Schoutsen
87164e2129 Bumped version to 0.103.0 2019-12-11 15:55:23 +01:00
Pascal Vizeli
ce041f131e Remove uvloop event policy (#29835)
* Remove uvloop event policy

* Clean tests

* Fix lint

* Cleanup statment
2019-12-11 15:55:09 +01:00
Robert Svensson
2fb36d3dea UniFi - Handle disabled switches (#29824) 2019-12-11 15:55:09 +01:00
Robert Svensson
4dd1c51186 UniFi - honor detection time when UniFi wire bug happens (#29820) 2019-12-11 15:55:08 +01:00
Robert Svensson
4c9c22bc3a Add more logging to help future debug situations (#29800) 2019-12-11 15:55:07 +01:00
springstan
0cb9d0746a Add user-agent to fix dwd_weather_warnings setup error (#29596)
* Added dummy user-agent to http request to fix setup error

* Replace dummy user-agent with the user-agent of the global home assistant session

* Adjust comment and rename user-agent constant
2019-12-11 15:52:10 +01:00
Robert Svensson
856dd63680 Add more logging to help future debug situations (#29800) 2019-12-11 15:45:21 +01:00
springstan
7b8dff2aa9 Add user-agent to fix dwd_weather_warnings setup error (#29596)
* Added dummy user-agent to http request to fix setup error

* Replace dummy user-agent with the user-agent of the global home assistant session

* Adjust comment and rename user-agent constant
2019-12-11 15:43:54 +01:00
Pascal Vizeli
0c796fc3c3 Remove uvloop event policy (#29835)
* Remove uvloop event policy

* Clean tests

* Fix lint

* Cleanup statment
2019-12-11 13:28:50 +01:00
Tiit Rätsep
01ef44fd68 Fix Soma integration connection issue (#27692)
* Added a check for Connect actually returning something before telling the user the setup succeeded

* Added handling for KeyError in case API returns empty response, formatting

* Trying to please the linter
2019-12-11 13:27:28 +01:00
Bas Nijholt
004af97699 Sort imports for requirements.py and its test using isort (#29836)
Unblocks https://github.com/home-assistant/home-assistant/pull/29739
2019-12-11 12:12:06 +01:00
HomeAssistant Azure
c2357d843b [ci skip] Translation update 2019-12-11 00:32:21 +00:00
Ville Skyttä
a12cf7211d Upgrade pydocstyle to 5.0.1 (#29830)
* Upgrade pydocstyle to 5.0.1

http://www.pydocstyle.org/en/5.0.1/release_notes.html

* Pydocstyle and other docstring fixes
2019-12-10 23:25:06 +01:00
Alexei Chetroi
3ed1738f76 Fix input_text initialization with empty config. (#29829) 2019-12-10 23:24:33 +01:00
Robert Van Gorkom
66d2f5f61d Fix withings wrong sleep state entry (#29651)
* Fixing issue where wrong sleep state entry was being used. closes #28370,#29397

* Fixing formatting.

* Sorting imports to get black checks to pass.

* Using lambda for getting latest sleep serie.
2019-12-10 21:54:50 +01:00
Ville Skyttä
899f6cf1a3 Re-authorize Huawei LTE on login required error (#29597)
* Re-authorize Huawei LTE on login required error

Closes https://github.com/home-assistant/home-assistant/issues/29531

* Eliminate one indented "else" block

* Convert get_data from inline to instance method

* Use .get instead of [] for checking subscriptions for clarity
2019-12-10 22:41:29 +02:00
Robert Svensson
99328bd4c1 UniFi - honor detection time when UniFi wire bug happens (#29820) 2019-12-10 20:05:18 +01:00
Robert Svensson
47e5142ddb UniFi - Handle disabled switches (#29824) 2019-12-10 20:04:48 +01:00
proferabg
e28fd16c84 Fix tank utility token (#29801)
* Tank Utility Token Fix

Fix 400 Bad Request on Invalid Token

* Format Fix for Pull Request #29801

* Pylint Annotation Fix for Pull Request #29801
2019-12-10 19:25:21 +01:00
Paulus Schoutsen
302d5d66ab Bumped version to 0.103.0b1 2019-12-10 13:05:22 +01:00
Brett T. Warden
807badea93 Bump Roku to 4.0.0 (#29809) 2019-12-10 13:05:17 +01:00
Bram Kragten
d53c6be50a Updated frontend to 20191204.1 (#29787) 2019-12-10 13:05:16 +01:00
Pascal Vizeli
19920e48ba HomeAssistant-pyozw 0.1.7 (#29743) 2019-12-10 13:04:07 +01:00
Nikolay Vasilchuk
70fe5d3238 Fix unit_of_measurement for Starline temperature sensors (#29740) 2019-12-10 13:04:06 +01:00
Robert Svensson
f7015703bb Only update disabled_by when enabled default and entity enabled states differ (#29643) 2019-12-10 13:04:05 +01:00
Santobert
90de5652b9 Change source of device_info (#29570) 2019-12-10 13:04:04 +01:00
Ville Skyttä
2d6599fdd2 Huawei LTE device tracker fixes (#29551)
* Include MAC address in device state attributes for absent devices too

* Use MAC address as default name whether device is connected or not

* Fix initialization of known entities

Closes https://github.com/home-assistant/home-assistant/issues/29354
2019-12-10 13:04:03 +01:00
Malte Franken
d9280330a6 Bump georss_generic_client to 0.3 (#29532)
* bump version of georss_generic_client library

* updated requirements
2019-12-10 13:04:02 +01:00
tetienne
a4fc4bb281 Increase somfy SCAN_INTERVAL (#29524)
- There was too many errors 504
2019-12-10 13:04:01 +01:00
David K
22e7ece315 Limit available heat/cool modes for HomeKit thermostats (#28586)
* Limit available heat/cool modes for HomeKit thermostats.
The Home app only shows appropriate modes (heat/cool/auto) for the device. Depending on the climate integration, disabling the auto start might be needed.

* Include improved mapping for HVAC modes in tests
2019-12-10 13:04:01 +01:00
Robert Svensson
db0baab692 Only update disabled_by when enabled default and entity enabled states differ (#29643) 2019-12-10 11:02:26 +01:00
Franck Nijhof
f5d4878992 Fix isort on a small set of misc files (#29803) 2019-12-10 09:25:42 +01:00
Paulus Schoutsen
27244e29c4 Install discovery requirements if used (#29795)
* Install discovery requirements if used

* Update loader.py

* Fix types
2019-12-10 09:24:49 +01:00
Franck Nijhof
0ed6a434f8 Adjusts repository README (#29805) 2019-12-10 09:22:37 +01:00
Ian
4f1f4a1b4f Nextbus: Sort results for upcoming times (#29811)
Sort upcoming times across all direction's for a particular route and
stop.
2019-12-10 09:22:13 +01:00
Brett T. Warden
9049e090f9 Bump Roku to 4.0.0 (#29809) 2019-12-10 09:20:52 +01:00
Alexei Chetroi
315d0064fe Fix zha circular import (#29802)
* Refactor zha.core.helpers.
* Make zha isort-able.
* Const import reorg.
* Keep DATA_ZHA config key on entry unload.
* Cleanup ZHA config flow.
* isort.
* Add test.
2019-12-10 00:00:04 -05:00
HomeAssistant Azure
12f273eb11 [ci skip] Translation update 2019-12-10 00:32:16 +00:00
Franck Nijhof
38a6fffecb Add JSON files validation to hassfest (#29799) 2019-12-09 22:43:38 +01:00
Alexei Chetroi
454cc684e4 Add input_select reload service. (#29647)
* Add input_select reload service.

* Add test.
2019-12-09 21:15:32 +01:00
Alexei Chetroi
8c1cdc0cf7 Add input_text reload service. (#29644)
* Add input_text reload service.

* Add test.
2019-12-09 21:15:24 +01:00
David F. Mulcahey
1222aa8c56 Add ZHA group API (#29641)
* add skeleton to retrieve zigbee groups
* get single group
* add a group
* return group members with group
* add comment
* fix group members
* add function to add device to group
* add group members
* add remove from group method
* add api to remove members from group
* add remove groups method
* clean up group add and remove
* fix remove group
* fix remove groups
* add api to get only groupable devices
* change var init
* add tests
* address review comment
2019-12-09 14:50:04 -05:00
Bas Nijholt
7f948594eb Sort imports according to PEP8 for google_assistant (#29633)
* sort imports and fix flake8 issue for google

* add isort:skip to EVENT_SYNC_RECEIVED
2019-12-09 20:00:14 +01:00
Franck Nijhof
bc3b7ed06b Fix build, invalid JSON file in icloud component (#29798) 2019-12-09 19:18:41 +01:00
Bas Nijholt
e37443f10c Sort imports according to PEP8 for components starting with "U" (#29779)
* use isort to sort imports for components starting with 'u'

* add 'pylint: disable=import-error' to the right place
2019-12-09 19:07:32 +01:00
Bas Nijholt
80c344d3a8 Sort imports according to PEP8 for huawei_lte (#29664) 2019-12-09 19:06:25 +01:00
Bas Nijholt
897522a82d Fix 'pytest.register_assert_rewrite("tests.common")' warning (#29797)
see fea243c035 (r355533273)
2019-12-09 19:04:38 +01:00
Bas Nijholt
080c702d4f Sort imports according to PEP8 for components starting with "C" (#29763) 2019-12-09 18:56:21 +01:00
Bas Nijholt
6cc75fc6f3 Sort imports according to PEP8 for components starting with "Z" (#29784)
* use isort to sort imports for components starting with 'z'

* add skip to end of zha/core/channels/__init__.py

* put 'pylint: disable=import-error' at the right place

* remove the import of config_flow in zha/__init__.py

According to @balloob it is no longer needed.

* revert previous commit

* isort:skip homeassistant/components/zha/__init__.py completely
2019-12-09 18:54:54 +01:00
springstan
6b6570e7ca Move imports to top for ness_alarm (#29518)
* Move imports to top for ness_alarm

* Added patch for the ArminState in alarm_control_panel.py
2019-12-09 18:46:56 +01:00
Bas Nijholt
08f128e9c7 Sort imports according to PEP8 for components starting with "D" (#29764)
* use isort to sort imports for components starting with 'd'

* fix isort mistake
2019-12-09 17:42:00 +01:00
Quentame
c804f8f961 Add config flow to iCloud (#28968)
* iCloud: setup ConfigFlow and prepare for more platforms

- add config flow + tests
- fix existing services
- add play_sound & display_message services
- document services
- can use devices with the same name
- prepare to add sensor platform

* Review : not copy account conf

* Review: Safer test patch

* Review: remove reset_account

* Review: Use executor_job while IO

* Review: Use executor_job while IO 2

* Review: use hass.helpers.storage.Store()

* Review: no IO in tests

* Remove reset from services.yaml

* Review: remove authenticate.return_value = Mock()

* Review: do not initialize the api with the mocked service

* isort

* Review: @MartinHjelmare Test config flow with all steps

* Review: Fix failed tests names

* Codevov: Add one missing test
2019-12-09 17:19:42 +01:00
Bas Nijholt
f60125b5c9 Sort imports according to PEP8 for 'tests' (#29791) 2019-12-09 16:52:24 +01:00
Bas Nijholt
67c56c860d Sort imports according to PEP8 for 'homeassistant' folder (#29789)
Components are already done
2019-12-09 16:42:10 +01:00
Bas Nijholt
29ec17d50d use isort to sort imports for "setup.py" (#29792) 2019-12-09 16:30:16 +01:00
Bas Nijholt
5cb6d1b21f Sort imports according to PEP8 for 'script' folder (#29790) 2019-12-09 16:24:03 +01:00
Pascal Vizeli
3a28361beb Cleanup removed component (#29788) 2019-12-09 16:21:12 +01:00
springstan
72f336a2dd Move imports to top for homekit (#29560)
* Move imports to top for homekit

* Moved back a couple imports, added annotation to disable import-outside-toplevel

* Fix all tests in test_homekit.py
2019-12-09 16:10:02 +01:00
Bram Kragten
bb3fa6990a Updated frontend to 20191204.1 (#29787) 2019-12-09 15:10:03 +01:00
Bas Nijholt
96a6a44411 Sort imports according to PEP8 for components starting with "X" (#29782) 2019-12-09 14:58:51 +01:00
Bas Nijholt
9bcd4653e0 Sort imports according to PEP8 for components starting with "Y" (#29783) 2019-12-09 14:57:42 +01:00
Bas Nijholt
4035fda659 Sort imports according to PEP8 for components starting with "Q" (#29785) 2019-12-09 14:56:20 +01:00
Bas Nijholt
fbf1836997 Sort imports according to PEP8 for components starting with "W" (#29781) 2019-12-09 14:47:53 +01:00
Bas Nijholt
1ab1808307 Sort imports according to PEP8 for components starting with "N" (#29773) 2019-12-09 14:46:24 +01:00
Bas Nijholt
ee1cc3b3dd Sort imports according to PEP8 for components starting with "V" (#29780) 2019-12-09 14:42:53 +01:00
Bas Nijholt
de915e1bf0 Sort imports according to PEP8 for components starting with "T" (#29778) 2019-12-09 14:41:48 +01:00
Bas Nijholt
485761bbaf Sort imports according to PEP8 for components starting with "R" (#29776) 2019-12-09 14:39:51 +01:00
Bas Nijholt
23b92b2a56 Sort imports according to PEP8 for components starting with "S" (#29777) 2019-12-09 14:38:01 +01:00
Bas Nijholt
21816eeed4 Sort imports according to PEP8 for components starting with "P" (#29775) 2019-12-09 14:29:39 +01:00
Bas Nijholt
5cdaff5405 Sort imports according to PEP8 for components starting with "O" (#29774) 2019-12-09 14:26:53 +01:00
Bas Nijholt
c49e423c78 Sort imports according to PEP8 for components starting with "K" (#29770) 2019-12-09 14:25:18 +01:00
Bas Nijholt
1dea0c9e34 Sort imports according to PEP8 for components starting with "L" (#29771) 2019-12-09 14:22:30 +01:00
Bas Nijholt
14779ce3d0 Sort imports according to PEP8 for components starting with "I" (#29769) 2019-12-09 14:21:24 +01:00
Bas Nijholt
710680d604 use isort to sort imports for components starting with 'm' (#29772) 2019-12-09 18:50:40 +05:30
Bas Nijholt
8b39957c56 Sort imports according to PEP8 for components starting with "H" (#29768) 2019-12-09 14:19:48 +01:00
Bas Nijholt
d58e6e924a Sort imports according to PEP8 for components starting with "G" (#29767) 2019-12-09 14:17:36 +01:00
Bas Nijholt
ca0fad2cbb Sort imports according to PEP8 for components starting with "F" (#29766) 2019-12-09 14:14:40 +01:00
Bas Nijholt
f9e06ca2fd Sort imports according to PEP8 for components starting with "E" (#29765) 2019-12-09 14:10:04 +01:00
Bas Nijholt
96961b9bcc Sort imports according to PEP8 for components starting with "A" (#29761) 2019-12-09 13:57:24 +01:00
Bas Nijholt
73de69896b Sort imports according to PEP8 for components starting with "B" (#29762) 2019-12-09 13:52:18 +01:00
tetienne
df74272ba6 Remove Tahoma component #29744 (#29745) 2019-12-09 13:35:14 +01:00
Pascal Vizeli
4bb670cdf7 HomeAssistant-pyozw 0.1.7 (#29743) 2019-12-09 13:33:28 +01:00
Bas Nijholt
9b27e5b86c Sort imports according to PEP8 for vultr (#29760) 2019-12-09 13:33:08 +01:00
Bas Nijholt
c7cf1b820c Sort imports according to PEP8 for hue (#29757) 2019-12-09 13:25:04 +01:00
Bas Nijholt
abfcc18004 Sort imports according to PEP8 for mobile_app (#29758) 2019-12-09 13:22:42 +01:00
Bas Nijholt
53012a548b Sort imports according to PEP8 for sleepiq (#29759) 2019-12-09 13:21:45 +01:00
Bas Nijholt
60e1789557 Sort imports according to PEP8 for emulated_roku (#29756) 2019-12-09 13:20:51 +01:00
Bas Nijholt
991834f337 Sort imports according to PEP8 for shopping_list (#29751) 2019-12-09 13:14:49 +01:00
Bas Nijholt
d1b38c0c79 Sort imports according to PEP8 for plaato (#29747) 2019-12-09 13:14:08 +01:00
Bas Nijholt
f281069c8c Sort imports according to PEP8 for vicare (#29754) 2019-12-09 13:13:33 +01:00
Bas Nijholt
76debf4c88 Sort imports according to PEP8 for scene (#29750) 2019-12-09 13:12:43 +01:00
Bas Nijholt
127d84edd1 Sort imports according to PEP8 for solarlog (#29752) 2019-12-09 13:11:37 +01:00
Bas Nijholt
3f469eac28 Sort imports according to PEP8 for yeelight (#29755) 2019-12-09 13:10:24 +01:00
Bas Nijholt
f81e608cc1 Sort imports according to PEP8 for remote (#29749) 2019-12-09 13:09:16 +01:00
Bas Nijholt
c4a6f265e8 Sort imports according to PEP8 for versasense (#29753) 2019-12-09 13:08:05 +01:00
Bas Nijholt
e9b428781b Sort imports according to PEP8 for pushbullet (#29748) 2019-12-09 13:06:25 +01:00
Bas Nijholt
3df40c7a16 Sort imports according to PEP8 for websocket_api (#29657) 2019-12-09 12:30:23 +01:00
Bas Nijholt
16a7408f23 Sort imports according to PEP8 for zwave (#29658) 2019-12-09 12:29:12 +01:00
Bas Nijholt
41cd678f00 Sort imports according to PEP8 for deconz (#29659) 2019-12-09 12:25:35 +01:00
Bas Nijholt
2da3848f89 Sort imports according to PEP8 for unifi (#29656) 2019-12-09 12:19:33 +01:00
Bas Nijholt
3b0f29fe95 sort imports according to PEP8 for lock (#29663) 2019-12-09 12:19:11 +01:00
Bas Nijholt
eb47c2b148 Sort imports according to PEP8 for media_player (#29665) 2019-12-09 12:17:41 +01:00
Bas Nijholt
01d651c67d Sort imports according to PEP8 for device_tracker (#29666) 2019-12-09 12:14:38 +01:00
Bas Nijholt
27bd6ca1db Sort imports according to PEP8 for emulated_hue (#29667) 2019-12-09 12:12:41 +01:00
Bas Nijholt
05daa817f5 Sort imports according to PEP8 for owntracks (#29672) 2019-12-09 12:11:27 +01:00
Bas Nijholt
d62993c5af Sort imports according to PEP8 for pilight (#29673) 2019-12-09 12:10:38 +01:00
Bas Nijholt
04225ba802 Sort imports according to PEP8 for rest (#29674) 2019-12-09 12:09:49 +01:00
Bas Nijholt
186799794d Sort imports according to PEP8 for nest (#29670) 2019-12-09 12:08:51 +01:00
Bas Nijholt
ad58e607df Sort imports according to PEP8 for somfy (#29675) 2019-12-09 12:07:10 +01:00
Bas Nijholt
69b113c539 Sort imports according to PEP8 for dyson (#29678) 2019-12-09 12:04:39 +01:00
Bas Nijholt
3d10bb3647 Sort imports according to PEP8 for http (#29679) 2019-12-09 11:59:38 +01:00
Bas Nijholt
c7d61279bd Sort imports according to PEP8 for ring (#29680) 2019-12-09 11:58:40 +01:00
Bas Nijholt
df85a50f3b Sort imports according to PEP8 for sensor (#29683) 2019-12-09 11:57:49 +01:00
Bas Nijholt
9cf3ff319e Sort imports according to PEP8 for iaqualink (#29681) 2019-12-09 11:56:51 +01:00
Bas Nijholt
b54c8641b4 Sort imports according to PEP8 for vesync (#29684) 2019-12-09 11:56:02 +01:00
Bas Nijholt
e4e4f78eb0 Sort imports according to PEP8 for utility_meter (#29710) 2019-12-09 11:54:56 +01:00
Bas Nijholt
b6cd6135c2 Sort imports according to PEP8 for wemo (#29685) 2019-12-09 11:53:51 +01:00
Bas Nijholt
776d8cfdc9 Sort imports according to PEP8 for specific_devices (#29687) 2019-12-09 11:51:36 +01:00
Bas Nijholt
c54135486e use isort to sort imports according to PEP8 for netatmo (#29682) 2019-12-09 11:50:59 +01:00
Bas Nijholt
4c5c34919d Sort imports according to PEP8 for camera (#29691) 2019-12-09 11:50:48 +01:00
Bas Nijholt
0b4ca9ecac Sort imports according to PEP8 for ambiclimate (#29689) 2019-12-09 11:49:35 +01:00
Bas Nijholt
bfa58f671a use isort to sort imports according to PEP8 for broadlink (#29690) 2019-12-09 11:48:52 +01:00
Bas Nijholt
9c1236b6de Sort imports according to PEP8 for ffmpeg (#29693) 2019-12-09 11:48:22 +01:00
Bas Nijholt
38657c0055 Sort imports according to PEP8 for counter (#29692) 2019-12-09 11:47:35 +01:00
Bas Nijholt
2261bb60e0 Sort imports according to PEP8 for geofency (#29695) 2019-12-09 11:46:49 +01:00
Bas Nijholt
2511f5edb4 Sort imports according to PEP8 for ifttt (#29696) 2019-12-09 11:46:08 +01:00
Bas Nijholt
fa6b75f2c1 Sort imports according to PEP8 for file (#29694) 2019-12-09 11:45:11 +01:00
Bas Nijholt
a78fe25871 Sort imports according to PEP8 for locative (#29698) 2019-12-09 11:43:46 +01:00
Bas Nijholt
642655b6d7 Sort imports according to PEP8 for met (#29699) 2019-12-09 11:43:00 +01:00
Bas Nijholt
c7b2c09a61 Sort imports according to PEP8 for xiaomi_miio (#29677) 2019-12-09 11:42:18 +01:00
Bas Nijholt
0e71c29e00 Sort imports according to PEP8 for opentherm_gw (#29671) 2019-12-09 11:34:06 +01:00
Bas Nijholt
0fbb450838 Sort imports according to PEP8 for jewish_calendar (#29697)
* use isort to sort imports according to PEP8 for jewish_calendar

* fix order
somehow isort did the wrong thing
2019-12-09 11:30:31 +01:00
springstan
202522fbca Move imports to top for nsw_fuel_station (#29538)
* Move imports to top for nsw_fuel_station

* Correct patch path in test_sensor.py

* Fix tests by removing the unused argument mock_nsw_fuel
2019-12-09 11:29:36 +01:00
Bas Nijholt
425a1814d9 Sort imports according to PEP8 for geonetnz_quakes (#29668) 2019-12-09 11:28:07 +01:00
Bas Nijholt
790881fa7b Sort imports according to PEP8 for almond (#29688) 2019-12-09 11:27:16 +01:00
Bas Nijholt
69f790f6cc Sort imports according to PEP8 for arduino (#29702) 2019-12-09 11:26:03 +01:00
Bas Nijholt
852996700f Sort imports according to PEP8 for arest (#29703) 2019-12-09 11:25:29 +01:00
Bas Nijholt
2cd55bbb87 Sort imports according to PEP8 for device_automation (#29707) 2019-12-09 11:24:49 +01:00
Bas Nijholt
ea39d5b428 Sort imports according to PEP8 for aws (#29704) 2019-12-09 11:23:21 +01:00
Bas Nijholt
f9e9a5e4cb Sort imports according to PEP8 for darksky (#29706) 2019-12-09 11:22:04 +01:00
Bas Nijholt
9228ed7c40 Sort imports according to PEP8 for verisure (#29711) 2019-12-09 11:21:16 +01:00
Bas Nijholt
6a11e6aa72 Sort imports according to PEP8 for soma (#29709) 2019-12-09 11:19:23 +01:00
Bas Nijholt
ebb2722d03 Sort imports according to PEP8 for gpslogger (#29717) 2019-12-09 11:15:02 +01:00
Bas Nijholt
c5316dbc39 Sort imports according to PEP8 for iqvia (#29720) 2019-12-09 11:14:08 +01:00
Bas Nijholt
c3d7ab6a7f Sort imports according to PEP8 for netgear_lte (#29725) 2019-12-09 11:13:37 +01:00
Bas Nijholt
7128396f1a Sort imports according to PEP8 for minio (#29723) 2019-12-09 11:08:29 +01:00
Bas Nijholt
6a67532a2d Sort imports according to PEP8 for linky (#29722) 2019-12-09 11:07:50 +01:00
Bas Nijholt
cbf59fb33d Sort imports according to PEP8 for input_text (#29719) 2019-12-09 11:06:05 +01:00
Bas Nijholt
9df71ecae2 Sort imports according to PEP8 for neato (#29724) 2019-12-09 11:05:22 +01:00
Nikolay Vasilchuk
791dc5809f Fix unit_of_measurement for Starline temperature sensors (#29740) 2019-12-09 10:56:57 +01:00
Santobert
c399fe2837 Change source of device_info (#29570) 2019-12-09 10:46:25 +01:00
Bas Nijholt
d0c7db548f use isort to sort imports according to PEP8 for group (#29713) 2019-12-09 09:39:26 +01:00
Bas Nijholt
1790036767 use isort to sort imports according to PEP8 for zone (#29712) 2019-12-09 09:38:38 +01:00
Bas Nijholt
2abc9005cc use isort to sort imports according to PEP8 for homeassistant (#29718) 2019-12-09 09:38:24 +01:00
Bas Nijholt
236a21c76e Sort imports according to PEP8 for pi_hole (#29726) 2019-12-09 09:38:14 +01:00
Bruno Filipe
942f654d92 Proactively report Alexa Endpoint Health properties (#29736) 2019-12-09 09:37:15 +01:00
Bas Nijholt
8c1a8b502d Sort imports according to PEP8 for velbus (#29676) 2019-12-09 09:36:42 +01:00
gjbadros
6996ad3541 Protect Doorbird platform from failing when individual doorbird fails (#29374)
* Wrap connection attempt by try/except block so an individual downed doorbird does not fail the whole platform

* Fixed lint warning

* Disable too-broad-exception pylint warning since the whole point of this is to catch all exceptions and log them while letting processing continue; I don't disable a lint warning lightly, but this is the entire intent of this PR.

* Fixed name of pylint warning to broad-except

* Use _LOGGER.exception to get the stack trace too, per PEP8 recommendation for a bare Exception being caught.

* per @balloob, switch to just catching OSError on a narrow block; I'm not sure this protects all problems with Doorbird device startup, but it protects against the primary one I experience.
2019-12-09 09:14:55 +01:00
HomeAssistant Azure
8dea7f0f98 [ci skip] Translation update 2019-12-09 00:32:08 +00:00
Bernhard B
d451e54e34 Add Signal Messenger integration (#28537)
* added signalmessenger integration

* allows to send a message (with an attachment) to one or more
  recipients

* added signalmessenger documentation to manifest file

* remove debug logging from signalmessenger integration

* add signalmessenger to .coveragerc

* fixed typo in signalmessenger manifes

* moved service specific code to own pypi library

* updated pysignalclirestapi dependeny in manifest.json

* added pysignalclirestapi requirement for signalmessenger component

* fixed typo in codeowners

* reworked signalmessenger integration based on code review input

* updated requirements for signalmessenger

* small code improvements in signalmessenger integration

* no need to use the get() method to access dict parameters that are
required

* small changes in signalmessenger integration

* re-ordered import statements
* removed empty "requirements" list (not needed)

* changed import order in signalmessenger integration according to PEP 8

* used isort to order includes in signalmessenger integration

* renamed signalmessenger to signal_messenger

* renamed signalmessenger to signal_messenger in CODEOWNERS file

* changed documentation url in signal_messenger integration to new name

* changed signal messenger naming in .coveragerc
2019-12-09 00:27:06 +01:00
Robert Van Gorkom
e577f047f7 Add tests for vera component (#28340)
* Adding tests for vera component.
Fixing update bug in the vera climate platform.

* Updating requrements file.

* Moving vera stop to a job.
Sorting imports.

* Addressing simple PR feedback.

* Splitting tests into platforms.

* Mocking controller instead of using requests_mock.

* Updating pyvera to use version that stops threads quickly.

* Updating requirements files.

* Mocking the pyvera module, not the API.

* Addressing PR feedback.
Handling start/stop of patch in fixture.
Removing unecessary code.

* Using generator
2019-12-09 00:19:38 +01:00
Bas Nijholt
076e0273a2 Sort imports according to PEP8 for kodi (#29721) 2019-12-08 23:42:04 +01:00
Bas Nijholt
39887c46c0 Sort imports according to PEP8 for dialogflow (#29714) 2019-12-08 23:40:06 +01:00
Bas Nijholt
81a482332d Sort imports according to PEP8 for eufy (#29715) 2019-12-08 23:34:18 +01:00
Bas Nijholt
6a1753d6db Sort imports according to PEP8 for geonetnz_volcano (#29716) 2019-12-08 23:33:42 +01:00
Bas Nijholt
cce3077df3 Sort imports according to PEP8 for cert_expiry (#29705) 2019-12-08 23:32:50 +01:00
Bas Nijholt
e6eed4755f Sort imports according to PEP8 for plex (#29708) 2019-12-08 23:31:55 +01:00
Gerald Hansen
3d25ed7994 Change state values for Worx Landroid sensor (#27453)
The obj["state"] contains already several named return states as
following: "grass cutting", "trapped recovery", "searching wire",
           "following wire", "searching home", "home", "idle"
And with the batteryChargerState also the "charging"

Fixes #455
2019-12-08 22:27:18 +01:00
Bas Nijholt
55559f3e30 Sort imports according to PEP8 for starline (#29653) 2019-12-08 21:09:48 +01:00
Bas Nijholt
51ece97e0d Sort imports according to PEP8 for hive (#29669) 2019-12-08 21:06:05 +01:00
Bas Nijholt
415176e350 Sort imports according to PEP8 for template (#29655) 2019-12-08 21:05:08 +01:00
Bas Nijholt
e0b82440ad Sort imports according to PEP8 for switch (#29654) 2019-12-08 18:50:17 +01:00
Bas Nijholt
3d64405896 Sort imports according to PEP8 for recorder (#29652) 2019-12-08 18:48:18 +01:00
Fabian Affolter
b832749e3c Fix file permission (#29660) 2019-12-08 18:41:48 +01:00
Bas Nijholt
0a4979549d use isort to sort imports according to PEP8 for vacuum (#29650) 2019-12-08 22:47:01 +05:30
Bas Nijholt
b731ddabde Sort imports according to PEP8 for homekit (#29645) 2019-12-08 18:16:49 +01:00
Bas Nijholt
aeff27680b use isort to sort imports according to PEP8 for light (#29648) 2019-12-08 22:46:23 +05:30
Bas Nijholt
ce5072fc91 use isort to sort imports according to PEP8 for mqtt (#29649) 2019-12-08 22:45:26 +05:30
Bas Nijholt
d2c1e5d45c Sort imports according to PEP8 for homekit_controller (#29646) 2019-12-08 18:14:26 +01:00
Bas Nijholt
0d5de6a464 use isort to sort imports according to PEP8 for ecobee (#29631) 2019-12-08 22:31:50 +05:30
Bas Nijholt
fbd4cf1089 use isort to sort imports according to PEP8 for cloud (#29626) 2019-12-08 22:31:12 +05:30
Bas Nijholt
e4e9cdce73 use isort to sort imports according to PEP8 for demo (#29630) 2019-12-08 22:29:27 +05:30
Bas Nijholt
a3b605bb7d use isort to sort imports according to PEP8 for cover (#29629) 2019-12-08 22:28:00 +05:30
Bas Nijholt
f355570f17 use isort to sort imports according to PEP8 for config (#29628) 2019-12-08 22:27:28 +05:30
Bas Nijholt
73c373a0f2 use isort to sort imports according to PEP8 for command_line (#29627) 2019-12-08 22:25:57 +05:30
Bas Nijholt
954813b478 use isort to sort imports according to PEP8 for climate (#29625) 2019-12-08 22:25:01 +05:30
springstan
3b5da9c44a Move imports to top for homekit_controller (#29564)
* Move imports to top for homekit_controller

* Fix IpPairing mock in two test files
2019-12-08 16:50:57 +00:00
Bas Nijholt
8f5e8c72c6 use isort to sort imports according to PEP8 for binary_sensor (#29622) 2019-12-08 22:02:08 +05:30
Bas Nijholt
f5288db93c use isort to sort imports according to PEP8 for cast (#29624) 2019-12-08 22:00:57 +05:30
Bas Nijholt
d3f67c3841 use isort to sort imports according to PEP8 for automation (#29620) 2019-12-08 21:59:39 +05:30
Bas Nijholt
a38f3ac9c6 use isort to sort imports according to PEP8 for fan (#29632) 2019-12-08 21:28:47 +05:30
Robert Svensson
57a3f7d5c8 Pass in parameters explicitly to DeconzSession (#29617)
Dont pass in loop to DeconzSession
Services will use new refresh state method
2019-12-08 16:53:34 +01:00
Bas Nijholt
00dc721609 sort imports according to PEP8 for hassio (#29634) 2019-12-08 16:33:22 +01:00
Bas Nijholt
b0d0060643 sort imports according to PEP8 for axis (#29621) 2019-12-08 15:44:03 +01:00
Fabian Affolter
c4794572d4 Fix file permission (#29635) 2019-12-08 15:43:09 +01:00
Sören Beye
94dec483e9 Don't escape command parameters (#29504)
* Don't escape command parameters

Escaping should only be done when using the tcp socket cli interface which we aren't.

* Updated comment to reflect the changes
2019-12-08 15:18:46 +01:00
James Nimmo
c78773970b Add IntesisHome Climate Platform (#25364)
* Add IntesisHome Climate Platform

* Add support for IntesisHome and Airconwithme devices

* Implement requested changes from PR review

* Improve error handling for IntesisHome component

* Fix snake-case naming style

* Update exception logging
2019-12-08 15:09:16 +01:00
Bas Nijholt
663e2eaaff sort imports according to PEP8 for buienradar (#29623) 2019-12-08 14:59:21 +01:00
Bas Nijholt
ba34922b03 sort imports according to PEP8 for alexa (#29618) 2019-12-08 14:56:42 +01:00
Bas Nijholt
6ad3b6426a sort imports according to PEP8 for auth (#29619) 2019-12-08 14:55:23 +01:00
Fabian Affolter
fa00808f6c Upgrade keyring to 19.3.0 and keyrings.alt to 3.2.0 (#29607) 2019-12-08 13:51:54 +01:00
Bas Nijholt
09ff0a5ac6 sort imports according to PEP8 for yweather (#29608) 2019-12-08 13:50:02 +01:00
Bas Nijholt
74c0219d0c sort imports according to PEP8 for components (#29609) 2019-12-08 13:46:04 +01:00
Bas Nijholt
b4bcd477f8 sort imports according to PEP8 for acer_projector (#29611) 2019-12-08 13:45:33 +01:00
Bas Nijholt
cfe68d7e00 sort imports according to PEP8 for actiontec (#29612) 2019-12-08 13:44:44 +01:00
Bas Nijholt
a885670a9a sort imports according to PEP8 for abode (#29610) 2019-12-08 13:44:12 +01:00
Bas Nijholt
f5a1b32be0 sort imports according to PEP8 for ads (#29613) 2019-12-08 13:43:32 +01:00
Bas Nijholt
e510c4ea1d sort imports according to PEP8 for air_quality (#29614) 2019-12-08 13:42:55 +01:00
Bas Nijholt
d020486929 sort imports according to PEP8 for alarm_control_panel (#29616) 2019-12-08 13:42:31 +01:00
Bas Nijholt
700cecc8ef sort imports according to PEP8 for airly (#29615) 2019-12-08 13:41:51 +01:00
Ville Skyttä
ef4515ed70 Add Huawei LTE reboot and clear traffic statistics services (#29594)
* Add clear traffic statistics service

* Add reboot service

* Register services as admin ones

* Make URL optional when there's only one router configured

* Eliminate one if/else indent level

* Remove unnecessary .keys() with sorted()
2019-12-08 12:21:48 +01:00
springstan
d752fe3033 Move imports to top for fido (#29557)
* Move imports to top for fido

* Fix tests for fido by using patch
2019-12-08 12:20:53 +01:00
springstan
6de8072e8a Move imports to top for websocket_api (#29556)
* Move imports to top for websocket_api

* Move back an import because of circular dependency, add annotations
2019-12-08 12:19:15 +01:00
SNoof85
21cf6777bb bump freebox api version (#29527) 2019-12-08 09:49:43 +01:00
Andrew McRae
de0db1601b Add quarterly cycle for utility_meter component (#29534)
* Add quarterly tariff period to utility_meter

Many tariff cycles in Australia are 3 monthly (quarterly).
Add quarterly tariff cycle handling to the utility_meter component.

* Add quarterly tariff period to utility_meter

Many tariff cycles in Australia are 3 monthly (quarterly).
Add quarterly tariff cycle handling to the utility_meter component.

* Change date for test for utility_meter

* Add quarterly tariff period to utility_meter

Many tariff cycles in Australia are 3 monthly (quarterly).
Add quarterly tariff cycle handling to the utility_meter component.
2019-12-08 09:49:18 +01:00
springstan
94b6cbc571 Move imports to top for stream (#29548) 2019-12-08 09:48:28 +01:00
springstan
957a2e99fd Move imports to top for tellduslive (#29550) 2019-12-08 09:48:08 +01:00
springstan
b759d50900 Move imports to top for google_assistant (#29561)
* Move imports to top for google_assistant

* Fix pylint error caused by isorting the imports with noqa: F401

* Move back an import because of circular dependency, add annotations
2019-12-08 09:45:13 +01:00
Franck Nijhof
cc9589cff2 Add Elgato Key Light integration (#29592)
* Add Elgato Key Light integration

* Remove passing in of hass loop

* Tweaks a comment

* Tweaks a function name

* Ensure domain namespace in data exists in entry setup
2019-12-08 09:26:31 +01:00
SukramJ
7f4baab3f6 Add additional Magic Cube Model (#29598) 2019-12-08 09:20:13 +01:00
Marius
0cdc315038 change icon for partly-cloudy-night (#29601)
to the available mdi:weather-night-partly-cloudy
2019-12-08 10:55:39 +05:30
Alexei Chetroi
e360b1265f Add input_number.reload admin service. (#29584)
* Add input_number reload service.

* Add test.

* Allow platform setup without entities.

We can reload and add entities later.
2019-12-07 21:26:06 +01:00
Alexei Chetroi
256056430e Add input_datetime reload service. (#29581)
* Add input_datetime reload service.

* Add reload service test.
2019-12-07 21:24:56 +01:00
Alexei Chetroi
ccb0fd5e32 Register automation.reload service as an admin service. (#29582)
* homeassistant/components/automation/__init__.py

* Register automation.reload as an admin service.
2019-12-07 21:17:30 +01:00
butako
d838a56c1d Improve Tahoma Velux support (#27920)
* Improved Velux support. Added Velux Solar Roller Blind. Fixed Velux Integra Window.

* fix indentation

* black formatting

* added new devices in correct sorted order
2019-12-07 16:14:09 +01:00
SNoof85
ee657f3c2f Add service to reboot the Freebox (#29525) 2019-12-07 12:09:43 +01:00
Fabian Affolter
9d7799c0af Upgrade pyyaml to 5.2.0 (#29586) 2019-12-07 09:06:55 +01:00
Ville Skyttä
977f51a9e4 Update Travis dist to bionic (#29575) 2019-12-07 08:34:46 +02:00
springstan
e2adfc3979 Move imports to top for onboarding (#29542) 2019-12-07 11:55:15 +05:30
HomeAssistant Azure
b4c95421d3 [ci skip] Translation update 2019-12-07 00:32:13 +00:00
springstan
23fb364076 Move imports to top for openuv (#29541)
* Move imports to top for openuv

* Renamed mock_pyopenuv_ to MockClient in test_config_flow
2019-12-06 14:13:43 -07:00
springstan
1ee8057662 Move imports to top for zha (#29555)
* Move imports to top for zha
* Move back some imports, add annotation for disabling import-outside-toplevel
* Move import config_flow before import api
2019-12-06 16:12:46 -05:00
Ville Skyttä
fb66a6cf81 Treat BaseException as over-general (#29573)
To follow pylint's defaults.
2019-12-06 21:58:32 +01:00
Ville Skyttä
31c71989e9 Huawei LTE device tracker fixes (#29551)
* Include MAC address in device state attributes for absent devices too

* Use MAC address as default name whether device is connected or not

* Fix initialization of known entities

Closes https://github.com/home-assistant/home-assistant/issues/29354
2019-12-06 21:53:26 +01:00
springstan
74d86dfff9 Move imports to top for soundtouch (#29546)
* Move imports to top for soundtouch

* Format with black

* Fix pyling error by renaming variable

* Rename entity instances to include entity instead of device
2019-12-06 21:11:02 +01:00
springstan
6af30bc232 Move imports to top for notion (#29539)
* Move imports to top for notion

* Fix mocking library in test_config_flow.py
2019-12-06 12:40:00 -07:00
Fabian Affolter
8afe13e818 Upgrade certifi to >=2019.11.28 (#29571) 2019-12-06 20:09:18 +01:00
Ville Skyttä
d257fff9ce Use "kB" and "s" as UPnP/IGD units (#29552)
For consistency with various existing components, and they're more
commonly used and compact than "kbyte" and "sec".
2019-12-06 23:24:11 +05:30
springstan
c9415ab75d Move imports to top for homematic (#29558) 2019-12-06 17:46:24 +01:00
1v0dev
b8434fdcfd Add service to set netatmo home heating schedule (#29244)
* Add service to set netatmo home heating schedule.

* handle NoDevice exeption; add service argument constant
2019-12-06 17:45:27 +01:00
Martin Rowan
48aba426a9 Bump lightwave to 0.17 (#29566) 2019-12-06 17:40:59 +01:00
springstan
606d310ea3 Move imports to top for spc (#29547)
* Move imports to top for spc

* Fix pylint error by removing duplicate import
2019-12-06 15:40:04 +01:00
springstan
d9b52ef98c Move imports to top for plant (#29543) 2019-12-06 15:00:54 +01:00
springstan
f3717421c0 Move imports to top for heatmiser (#29562) 2019-12-06 14:59:32 +01:00
David K
c5f4872aea Limit available heat/cool modes for HomeKit thermostats (#28586)
* Limit available heat/cool modes for HomeKit thermostats.
The Home app only shows appropriate modes (heat/cool/auto) for the device. Depending on the climate integration, disabling the auto start might be needed.

* Include improved mapping for HVAC modes in tests
2019-12-06 14:07:45 +01:00
springstan
27530be46f Move imports to top for influxdb (#29513) 2019-12-06 17:35:35 +05:30
springstan
ec3ffe309a Move imports to top for toon (#29553) 2019-12-06 10:40:38 +01:00
springstan
d5419b77f9 Move imports to top for sleepiq (#29544) 2019-12-06 09:13:44 +01:00
springstan
1bb499aec2 Move imports to top for smhi (#29545) 2019-12-06 09:11:07 +01:00
springstan
a857148560 Move imports to top for pjlink (#29540) 2019-12-06 09:09:45 +01:00
springstan
0aace1da55 Move imports to top for nx584 (#29537) 2019-12-06 09:08:54 +01:00
Franck Nijhof
e2a9c652ab Bump pytest to 5.3.1 (#29535) 2019-12-06 09:08:06 +01:00
Malte Franken
33542f0e5e Bump georss_generic_client to 0.3 (#29532)
* bump version of georss_generic_client library

* updated requirements
2019-12-06 06:55:42 +01:00
springstan
fcf18aca34 Move imports to top for modbus (#29515)
* Move imports to top for modbus

* Include imports for TCP and UDP ModbusClients
2019-12-06 06:10:29 +01:00
springstan
8def0326dd Move imports to top for izone (#29508)
* Move imports to top for izone

* Isorted all imports, fixed tests for config_flow
2019-12-06 06:08:08 +01:00
Alexei Chetroi
dc911ecc5b Add input_boolean reload service (#29379)
* Add input_boolean reload service.

* Add reload test.

* Address comments.

Register reload service as an admin service
Setup platform even if there're no entities
2019-12-05 20:31:18 -08:00
springstan
3b6bc9067f Move imports to top for mochad (#29514)
* Move imports to top for mochad

* Fix test test_light.py for mochad

* Fix test test_switch.py for mochad

* Make intra package imports relative in switch and light
2019-12-06 02:02:34 +01:00
orrpan
9ba9b3339b Add full state view for emulated_hue (apps using emulated_hue, 'sleep cycle' and 'sleep as android') (#26650)
* Add full state view for emulated_hue

* clean and support updated sleep cycle

* emulated hue add reuasable logic and cleanup code

* emulated hue correct typos

* Update hue_api.py

* correct error message and update test_hue_api.py

* cleanup test_hue_api.py
2019-12-05 15:23:54 -08:00
springstan
173966f459 Move imports to top for switcher_kis (#29530)
* Move imports to top for switcher_kis
* Disabled ungrouped imports if TYPE_CHECKING is true
2019-12-05 18:20:07 -05:00
springstan
20fdcbadff Move imports to top for nextbus (#29520)
* Move imports to top for nextbus

* Fix test_sensor.py failed tests
2019-12-05 21:56:42 +01:00
springstan
42688a6e4a Move imports to top for ign_sismologia (#29523) 2019-12-05 21:55:48 +01:00
tetienne
97cb8a3745 Increase somfy SCAN_INTERVAL (#29524)
- There was too many errors 504
2019-12-05 21:33:56 +01:00
springstan
b4fda5faab Move imports to top for mysensors (#29517) 2019-12-05 19:54:43 +01:00
Paulus Schoutsen
ec8ea02273 Fix recursion 2019-12-05 10:40:05 -08:00
springstan
4e7b9eaed0 Move imports to top for monoprice (#29516)
* Move imports to top for monoprice

* Format test with black
2019-12-05 19:16:15 +01:00
springstan
98d2eadb76 Move imports to top for statistics (#29223)
* Move imports to top for statistics

* Added recorder to manifest.json

* Deleted recorder from manifest.json, moved import back into method, added pylint disable comment

* Moved recorder util imports away from the top

* Move recorder imports to top, add recorder as after_dependency to manifest.json
2019-12-05 18:49:28 +01:00
springstan
5bdb20098e Move imports to top for meteoalarm (#29510) 2019-12-05 16:59:56 +01:00
springstan
1846b45cb5 Move imports to top for mobile_app (#29511) 2019-12-05 16:59:31 +01:00
springstan
19893b8f3c Move imports to top for islamic_prayer_times (#29506)
* Move imports to top for islamic_prayer_times

* Fix test_sensor.py for islamic_prayer_times

* Format test_sensor.py with black

* Fix tests for islamic prayer times sensor
2019-12-05 16:58:14 +01:00
springstan
76f455cea9 Move imports to top for mediaroom (#29509) 2019-12-05 16:56:53 +01:00
springstan
2a92eb1962 Move imports to top for ipma (#29507) 2019-12-05 16:56:01 +01:00
springstan
204ca3f3a6 Move imports to top for frontend (#29487) 2019-12-05 13:44:59 +01:00
springstan
ed5cdb528c Move imports to top for group (#29485)
* Move imports to top for group

* Fix failing test for group
2019-12-05 13:44:11 +01:00
springstan
ed464a75b2 Move imports to top for system_log (#29465) 2019-12-05 13:42:56 +01:00
springstan
04722fdd63 Move imports to top for http (#29500) 2019-12-05 13:42:09 +01:00
springstan
e9917c6a81 Move imports to top for google_translate (#29499) 2019-12-05 13:22:01 +01:00
springstan
009e4df6ef Move imports to top for hue (#29501) 2019-12-05 13:19:50 +01:00
springstan
086d1f432d Move imports to top for google_pubsub (#29498) 2019-12-05 12:59:59 +01:00
springstan
564fed7879 Move imports to top for ambient_station (#29497) 2019-12-05 12:50:53 +01:00
Paulus Schoutsen
a050d54847 Make hassfest stricter (#29494)
* Make hassfest stricter

* Update manifest.json
2019-12-05 10:15:28 +01:00
springstan
f6d1eb97a3 Move imports to top for decora_wifi (#29439) 2019-12-05 09:56:17 +01:00
Paulus Schoutsen
e99184bf68 Install requirements of after_dependencies when loading integrations (#29491)
* Install requirements of after_dependencies when loading integrations

* Fix smartthings test
2019-12-05 09:28:56 +01:00
Paulus Schoutsen
957e5018f4 Version bump to 0.104.0dev0 2019-12-04 22:52:58 -08:00
Paulus Schoutsen
f10076a4ad Bumped version to 0.103.0b0 2019-12-04 22:52:20 -08:00
Paulus Schoutsen
1646aab36d Version bump to 0.103.0dev0 2019-12-04 22:51:53 -08:00
Paulus Schoutsen
6885167fcc Merge remote-tracking branch 'origin/master' into dev 2019-12-04 22:51:08 -08:00
Daniel Perna
c6ac2a5705 Update pyhomematic (#29477) 2019-12-04 22:50:18 -08:00
Rohan Kapoor
b2d5de6a79 Switch iperf3 to generate a new client every time it runs a test (#29495)
* Switch iperf3 to generate a new client every time it runs a test

* Add myself to CODEOWNERS

* Fix imperative mood
2019-12-04 22:49:26 -08:00
Paulus Schoutsen
dad11f8208 Fix tests & lint 2019-12-04 22:47:40 -08:00
Paulus Schoutsen
28e9f1d0b8 Fix deconz import 2019-12-04 21:57:08 -08:00
Paulus Schoutsen
41440d4f1b Fix litejet tests 2019-12-04 21:47:35 -08:00
springstan
52926f1961 Move imports to top for canary (#29449) 2019-12-04 21:30:22 -08:00
springstan
d70ad369de Move imports to top for asuswrt (#29436) 2019-12-04 21:24:20 -08:00
springstan
f874a9df13 Move imports to top for clementine (#29437) 2019-12-04 21:24:08 -08:00
springstan
69ae469148 Move imports to top for deluge (#29438) 2019-12-04 21:23:56 -08:00
springstan
4c0f73a2b9 Move imports to top for datadog (#29440) 2019-12-04 21:23:17 -08:00
springstan
2773328134 Move imports to top for directv (#29441) 2019-12-04 21:23:05 -08:00
springstan
5ee20b61b3 Move imports to top for doorbird (#29442) 2019-12-04 21:22:51 -08:00
springstan
27200865ee Move imports to top for dlink (#29443) 2019-12-04 21:22:37 -08:00
springstan
50ee0c6727 Move imports to top for dunehd (#29444) 2019-12-04 21:22:27 -08:00
springstan
f2a08c438b Move imports to top for duke_energy (#29445) 2019-12-04 21:22:14 -08:00
Anders Melchiorsen
94297e96cb Update eternalegypt to 0.0.11 (#29446) 2019-12-04 21:22:03 -08:00
springstan
b2cce05405 Move imports to top for eight_sleep (#29447) 2019-12-04 21:21:50 -08:00
springstan
85e188db52 Move imports to top for egardia (#29448) 2019-12-04 21:21:40 -08:00
springstan
10759b7ca6 Move imports to top for enphase_envoy (#29450) 2019-12-04 21:21:25 -08:00
springstan
0158f29e4e Move imports to top for envisalink (#29457) 2019-12-04 21:21:12 -08:00
springstan
5586f40ab0 Move imports to top for enocean (#29451) 2019-12-04 21:20:26 -08:00
springstan
cdf53aed93 Move imports to top for enigma2 (#29452) 2019-12-04 21:20:11 -08:00
springstan
f422cdbfef Move imports to top for eq3btsmart (#29456) 2019-12-04 21:20:01 -08:00
springstan
06a156c091 Move imports to top for emby (#29453) 2019-12-04 21:19:43 -08:00
Ville Skyttä
ebc9d17558 Fix setup of Huawei LTE for which we can't get a MAC address (#29455)
Closes https://github.com/home-assistant/home-assistant/issues/29188
2019-12-04 21:19:25 -08:00
springstan
6c863a8948 Move imports to top for sonarr (#29462) 2019-12-04 21:18:57 -08:00
springstan
58ba6052e2 Move imports to top for environment_canada (#29458) 2019-12-04 21:18:52 -08:00
springstan
a4ac5dc6b8 Move imports to top for entur_public_transport (#29459) 2019-12-04 21:18:29 -08:00
springstan
24878f109c Move imports to top for solaredge (#29463) 2019-12-04 21:18:12 -08:00
springstan
dbd231b3a0 Move imports to top for somfy_mylink (#29464) 2019-12-04 21:17:45 -08:00
springstan
270d97d789 Move imports to top for daikin (#29490) 2019-12-04 21:17:33 -08:00
springstan
89c7629215 Move imports to top for deconz (#29489) 2019-12-04 21:17:18 -08:00
springstan
8647ba3dd5 Move imports to top for emulated_hue (#29488) 2019-12-04 21:16:51 -08:00
springstan
f5550509d4 Move imports to top for geo_json_events (#29486) 2019-12-04 21:16:25 -08:00
springstan
bbe57d6673 Move imports to top for history (#29484) 2019-12-04 21:15:39 -08:00
springstan
95de802fbd Move imports to top for hlk_sw16 (#29483) 2019-12-04 21:15:18 -08:00
springstan
3e634aaf5d Move imports to top for logi_circle (#29482) 2019-12-04 21:14:57 -08:00
springstan
81e4e9e26b Move imports to top for mailgun (#29480) 2019-12-04 21:14:39 -08:00
springstan
12e1c695ca Move imports to top for mfi (#29479) 2019-12-04 21:14:26 -08:00
springstan
7df4c1e676 Move imports to top for mhz19 (#29478) 2019-12-04 21:14:03 -08:00
springstan
653e0078a4 Move imports to top for skybell (#29475) 2019-12-04 21:13:49 -08:00
springstan
c6066d8b98 Move imports to top for ring (#29474) 2019-12-04 21:13:28 -08:00
springstan
c02d551cd5 Move imports to top for random (#29473) 2019-12-04 21:13:05 -08:00
springstan
d9661b408b Move imports to top for rainmachine (#29472) 2019-12-04 21:12:44 -08:00
springstan
c6b8d35c16 Move imports to top for ps4 (#29471) 2019-12-04 21:12:26 -08:00
springstan
43665466f5 Move imports to top for point (#29470) 2019-12-04 21:12:09 -08:00
springstan
96cf20ad81 Move imports to top for zoneminder (#29468) 2019-12-04 21:11:30 -08:00
springstan
72995f6ce6 Move imports to top for tuya (#29467) 2019-12-04 21:11:13 -08:00
springstan
5573504508 Move imports to top for litejet (#29481) 2019-12-04 21:08:22 -08:00
Bram Kragten
b829c46e18 Updated frontend to 20191204.0 (#29461) 2019-12-04 11:28:23 -08:00
springstan
a2a3c50555 Move imports to top for danfoss_air (#29435) 2019-12-04 20:27:51 +01:00
springstan
f8d607bdf5 Move imports to top for fixer (#29430)
* Move imports to top for fixer

* Only import FixerioException instead of all exceptions
2019-12-04 17:08:22 +01:00
springstan
0d1a389602 Move imports to top for etherscan (#29426) 2019-12-04 15:21:18 +01:00
springstan
af18c668d2 Move imports to top for familyhub (#29427) 2019-12-04 15:20:50 +01:00
springstan
4b6a2496c7 Move imports to top for fastdotcom (#29428) 2019-12-04 15:20:14 +01:00
springstan
12791a687b Move imports to top for fints (#29429) 2019-12-04 15:19:03 +01:00
springstan
c6ad57eb2b Move imports to top for fleetgo (#29431) 2019-12-04 15:15:30 +01:00
springstan
9bb6bcad70 Move imports to top for gearbest (#29432) 2019-12-04 15:14:46 +01:00
springstan
bef1c00b49 Move imports to top for hunterdouglas_powerview (#29420) 2019-12-04 14:15:39 +01:00
springstan
c880f09714 Move imports to top for horizon (#29419)
* Move imports to top for horizon

* Fix Pylint redefining name keys
2019-12-04 14:15:17 +01:00
springstan
46c306685d Move imports to top for hikvision (#29417) 2019-12-04 14:14:49 +01:00
springstan
c79e99318d Move imports to top for habitica (#29416) 2019-12-04 14:14:19 +01:00
springstan
d8dcf17cb5 Move imports to top for gstreamer (#29415) 2019-12-04 14:12:27 +01:00
springstan
4a7004b791 Move imports to top for greeneye_monitor (#29414) 2019-12-04 14:12:07 +01:00
springstan
88c1a630d8 Move imports to top for gpmdp (#29413) 2019-12-04 14:11:47 +01:00
springstan
95bc97fb6a Move imports to top for homeworks (#29418) 2019-12-04 14:11:14 +01:00
springstan
e6f7cbe53e Move imports to top for gitter (#29412) 2019-12-04 14:10:47 +01:00
springstan
6f5b59da15 Move imports to top for ialarm (#29422) 2019-12-04 14:10:15 +01:00
springstan
497674835b Move imports to top for ihc (#29425) 2019-12-04 14:09:57 +01:00
springstan
f4f4c695d9 Move imports to top for hydrawise (#29421) 2019-12-04 14:09:35 +01:00
springstan
c159ad52a4 Move imports to top for gogogate2 (#29411)
* Move imports to top for gogogate2

* Isorted imports
2019-12-04 14:09:04 +01:00
springstan
6c45c1969b Move imports to top for idteck_prox (#29423) 2019-12-04 14:08:01 +01:00
springstan
56b60577de Move imports to top for iglo (#29424) 2019-12-04 14:07:36 +01:00
Fabian Affolter
992d9273bb Upgrade psutil to 5.6.7 (#29407) 2019-12-04 11:45:56 +01:00
springstan
73e25296ca Move imports to top for joaoapps_join (#29402) 2019-12-04 11:18:05 +01:00
springstan
e04a208af0 Move imports to top for irish_rail_transport (#29401) 2019-12-04 11:17:38 +01:00
springstan
45c7c7a439 Move imports to top for keenetic-ndms2 (#29400) 2019-12-04 11:17:20 +01:00
springstan
a24e7832b5 Move imports to top for modem_callerid (#29396) 2019-12-04 11:16:58 +01:00
springstan
048068307d Move imports to top for microsoft (#29395) 2019-12-04 11:16:35 +01:00
springstan
518ca3afa7 Move imports to top for meteo_france (#29394) 2019-12-04 11:16:16 +01:00
springstan
849d8c885d Move imports to top for maxcube (#29393) 2019-12-04 11:15:53 +01:00
springstan
d79d9e0bfb Move imports to top for matrix (#29392) 2019-12-04 11:15:29 +01:00
springstan
c6fd8582a9 Move imports to top for lyft (#29391) 2019-12-04 11:14:35 +01:00
springstan
025c1a39a7 Move imports to top for lutron_caseta (#29390) 2019-12-04 11:14:07 +01:00
springstan
1a51590711 Move imports to top for lutron (#29389) 2019-12-04 11:13:46 +01:00
springstan
49232332a1 Move imports to top for luci (#29388) 2019-12-04 11:13:22 +01:00
springstan
695ec0c219 Move imports to top for london_underground (#29387) 2019-12-04 11:13:07 +01:00
springstan
7aab0d0aa0 Move imports to top for limitlessled (#29386) 2019-12-04 11:12:32 +01:00
springstan
cfe920079c Move imports to top for lightwave (#29385) 2019-12-04 11:12:03 +01:00
springstan
3dc629db08 Move imports to top for lg_netcast (#29384) 2019-12-04 11:11:42 +01:00
springstan
c3453be17b Move imports to top for lauch_library (#29383) 2019-12-04 11:11:21 +01:00
springstan
c0c1d68858 Move imports to top for iota (#29399) 2019-12-04 11:10:28 +01:00
springstan
1d65670a71 Move imports to top for kiwi (#29403) 2019-12-04 10:50:44 +01:00
springstan
fd107f2b2e Move imports to top for kwb (#29404) 2019-12-04 10:50:22 +01:00
springstan
2df189b58e Move imports to top for lacrosse (#29405) 2019-12-04 10:49:55 +01:00
springstan
09e2be02d3 Move imports to top for lametric (#29406) 2019-12-04 10:49:33 +01:00
Paulus Schoutsen
f6780c1fa2 Allow negative altitude in location updates (#29381) 2019-12-03 22:39:12 -08:00
HomeAssistant Azure
a1a131334a [ci skip] Translation update 2019-12-04 00:32:11 +00:00
springstan
0416e5b0fc Move imports to top for openhome (#29369) 2019-12-03 15:47:22 -08:00
springstan
3205afe74e Move imports to top for nuimo_controller (#29367) 2019-12-03 15:47:11 -08:00
springstan
bd1e5fce27 Move imports to top for noaa_tides (#29366) 2019-12-03 15:47:00 -08:00
springstan
3ddd20159c Move imports to top for nmbs (#29365) 2019-12-03 15:46:48 -08:00
springstan
564c468c26 Move imports to top for nmap_tracker (#29364) 2019-12-03 15:46:38 -08:00
springstan
bc635120fa Move imports to top for netio (#29363) 2019-12-03 15:46:26 -08:00
springstan
4130f2ff1a Move imports to top for netdata (#29362) 2019-12-03 15:46:16 -08:00
springstan
b462c539eb Move imports to top for n26 (#29357) 2019-12-03 15:46:07 -08:00
springstan
01bc1e4c66 Move imports to top for nad (#29358) 2019-12-03 15:45:56 -08:00
springstan
0e223662a9 Move imports to top for nanoleaf (#29359) 2019-12-03 15:45:46 -08:00
springstan
4989d1e7a9 Move imports to top for nederlandse_spoorwegen (#29360) 2019-12-03 15:45:36 -08:00
springstan
c9c41260b2 Move imports to top for nello (#29361) 2019-12-03 15:45:24 -08:00
springstan
be316af303 Move imports to top for mystrom (#29356) 2019-12-03 15:44:50 -08:00
springstan
9d213e70f0 Move imports to top for opensensemap (#29370) 2019-12-03 15:44:04 -08:00
Paulus Schoutsen
e26eebfc19 Remove cloud dependency from mobile_app (#29373) 2019-12-03 15:43:48 -08:00
Heine Furubotten
98b6905738 Upgrade enturclient to 0.2.1 (#29375) 2019-12-03 15:42:45 -08:00
springstan
bbf99c61fa Move imports to top for mycroft (#29355) 2019-12-03 15:42:21 -08:00
springstan
655780447c Move imports to top for nut (#29368) 2019-12-03 18:19:43 -05:00
springstan
f220c73e8f Move imports to top for orvibo (#29371) 2019-12-03 18:16:57 -05:00
springstan
f8ffcd6caf Move imports to top for opple (#29372) 2019-12-03 18:15:42 -05:00
Paulus Schoutsen
eef91f843d Rendering complex template objects to leave non-template values alone (#29353) 2019-12-03 14:15:45 -08:00
springstan
b1b784484e Move imports to top for owlet (#29352) 2019-12-03 14:13:37 -08:00
springstan
4f8200d15a Ignore state of climate entities in prometheus (#29346) 2019-12-03 12:54:25 -08:00
Luca Angemi
cae802f7ee Include telegram_bot message id for all messages (#29315)
* Include telegram_bot message id for all messages

* Update __init__.py
2019-12-03 12:51:45 -08:00
springstan
25b6740466 Move imports to top for pencom (#29348) 2019-12-03 19:02:09 +01:00
springstan
078e907178 Move imports to top for pushetta (#29332)
* Move imports to top for pushetta

* Make Pushetta.exceptions import lowercase and snakecase
2019-12-03 12:23:41 +01:00
Pascal Vizeli
e9647f8814 Update ozw 0.1.6 2019-12-03 10:51:46 +00:00
Pascal Vizeli
841ce8ade9 Fix uvloop warning (#29341) 2019-12-03 11:08:28 +01:00
Joakim Plate
26b63e73ad Add initial test suite for arcam_fmj integration (#29335)
* Add initial tests

* Adjust test

* Typo
2019-12-02 22:52:25 -08:00
Joakim Plate
4191d9ca8d Report unavailable entities to google (#28501)
* Report unavailable entites to google.

Entities should only removed when removed from HA. Removing a temporarily unavailable entity from google causes it to need to re-configured once it become available again.

* Fix test for unavailable entities
2019-12-02 22:14:16 -08:00
Paulus Schoutsen
32e04e1dce Lint 2019-12-02 22:08:19 -08:00
Joakim Plate
2569c4ae37 Google assistant storage of connected agents (#29158)
* Make async_report_state take agent_user_id

* Attempt to store synced agents

* Drop now not needed initialization

* Make sure cloud uses the all sync on changed preferences

* Some more places to use all version of sync

* Get the agent_user_id from the request context if available

* Minor cleanup

* Remove the old fixed agent_user_id for cloud

Instead pass along cloud_user where appropriate.

* async_delay_save takes a function

* Adjust test for delayed store

* Remove unused save function

* Add login check.
2019-12-02 22:05:59 -08:00
Andy Loughran
434b783b4c Update heatmiserv3 integration (#29006)
* Updated heatmiserV3 initial commit

* Fixing heatmiser component

* Updated codeowners and heatmiserV3 version

* Updating files as part of PR process

* Removed extra _LOGGER statements.

* Added in HVAC_MODE_OFF to allowed states to track whether heating on/off

* Handling PR comments

* Removed legacy tests

* fixing pylint errors

* Update homeassistant/components/heatmiser/climate.py

Removed .get from config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/heatmiser/climate.py

Removed .get from config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/heatmiser/climate.py

Removed .get from config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Updated climate based on latest feedback

* Removed cast to int and update requirements

* Update requirements

* Updated heatmiser deps
2019-12-03 06:48:51 +01:00
HomeAssistant Azure
d5ee34e504 [ci skip] Translation update 2019-12-03 00:32:23 +00:00
Paulus Schoutsen
02d9ed5e36 Do not select all entities when omitting entity ID in service call (#29178)
* Do not select all entities when omitting entity ID

* Address comments Matthew

* Require either area_id or entity_id

* Fix tests

* Fix test
2019-12-02 16:23:12 -08:00
Marius
9587afc5ce delete incorrect "mdi:brightness-3" (#29309)
delete incorrect 'mdi:brightness-3' in final 
```
def icon(self):
        """Icon to use in the frontend, if any."""
        return MOON_ICONS.get(self.state, "mdi:brightness-3")
```

which still shows in the sensors attributes
2019-12-02 16:19:56 -08:00
Franck Nijhof
76aaf8b560 Improve WLED white value support for RGBW strips (#29312) 2019-12-02 16:12:18 -08:00
springstan
8f608608ed Move imports to top for radarr (#29322) 2019-12-02 16:11:22 -08:00
springstan
141fd1bffd Move imports to top for qwikswitch (#29328) 2019-12-02 16:11:10 -08:00
Alain Turbide
83b21651ce Add alexa check for "name" channelMetadata attribute (#29279)
* Added check for "name" channelMetada attribute

* Added/changed smart home media player tests for added value name in chanelMetadata payload section

* Since Alexa only expects a number/callSign/affiliate in the returned response, returning "name" is not technically valid.  Modified to return the value in the callSign field  instead since it's a text value. Since there is no returned channel number, cannot return a true numeric value in "channel" field
2019-12-02 16:10:44 -08:00
Abílio Costa
9811d63d78 Improve Alexa interface selection for binary sensors (#29120)
* Improve Alexa interface selection for binary sensors

This allows the sensor to work correctly as a contact or motion sensor
in alexa, if the user overrides its display category as such.

* add tests
2019-12-02 16:02:17 -08:00
springstan
9160d43a08 Move imports to top for rachio (#29323) 2019-12-03 00:59:13 +01:00
springstan
bacc549576 Move imports to top for plum_lightpad (#29324) 2019-12-03 00:58:18 +01:00
springstan
55ba956d3d Move imports to top for qbittorrent (#29325) 2019-12-03 00:57:47 +01:00
springstan
61cb0924db Move imports to top for qnap (#29326) 2019-12-03 00:56:58 +01:00
springstan
1adcdad5a4 Move imports to top for quantum_gateway (#29327) 2019-12-03 00:56:08 +01:00
springstan
372aa312e1 Move imports to top for prezzibenzina (#29329) 2019-12-03 00:54:17 +01:00
springstan
9868161821 Move imports to top for postnl (#29330) 2019-12-03 00:53:42 +01:00
springstan
8baba2e33d Move imports to top for python_script (#29331) 2019-12-03 00:53:04 +01:00
Felipe Martins Diel
5a24dbf599 Broadlink remote (#26528)
* Add broadlink remote control platform

* Fix order of the imports

* Add remote.py to .coveragerc

* Optimize MAC address validation

* Use storage helper class and improve code readability

* Add me to the manifest as a code owner

* Fix dosctring

* Add me to the code owners

* Remove storage schemas, rename storage keys and improve readability
2019-12-02 13:20:36 -08:00
NobleKangaroo
67498595e4 Add Emulated Hue code owner (#29319) 2019-12-02 21:29:31 +01:00
Raman Gupta
040fd9c258 Update service domains for xiaomi_miio from base domains to xiaomi_miio domain (#29134)
* move service constants to const.py, move all custom xiaomi_miio services to xiaomi_miio domain

* update service names

* try to fix black error

* try black formatting again

* final black formatting attempt

* update service names to reflect platform

* fix typo
2019-12-02 11:49:39 -08:00
Paulus Schoutsen
ffaa0e572a Inline MQTT paho imports (#29177)
* Inline MQTT paho imports

* Address comments

* Fix patch paths

* Move other imports inline

* Fix test
2019-12-02 11:32:02 -08:00
Christian Ferbar
1804c6edc5 Clear miflora sensor state on exception (#29276)
* Clear state on exception

Clear state if querying the device fails. The state is then set to unknown, so it can be tracked if a miflora device isn't responding any more.

* Add available()

Signal valid data via available()
2019-12-02 11:24:16 -08:00
Paulus Schoutsen
9771826ed6 Add capability-attributes (#29306) 2019-12-02 11:15:50 -08:00
springstan
b28bc1d6fb Add name option to season sensor (#29302)
* Add name option to season sensor

* Changed DEFAULT_NAME from season to Season
2019-12-02 12:00:07 +01:00
NobleKangaroo
3f2b6bfaa4 Overhaul Emulated Hue (#28317)
* Emulated Hue Overhaul

* Fix erroneous merge

* Remove unused code

* Modernize string format
2019-12-01 21:00:22 -08:00
HomeAssistant Azure
19241f421b [ci skip] Translation update 2019-12-02 00:32:37 +00:00
Paulus Schoutsen
d1aa0cea97 Move intent registration to own integration (#29280)
* Move intent registration to own integration.

* Lint
2019-12-01 14:12:57 -08:00
Bram Kragten
d91dd68b31 Limit parallel requests to Philips Hue (#29189)
* Limit parallel requests to Philips Hue

* Fix tests

* Remove loop

* Update homeassistant/components/hue/bridge.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>
2019-12-01 13:24:16 -08:00
Ville Skyttä
a9baa24fda Improve naming and attrs of hostnameless Huawei LTE device tracker entities (#29281) 2019-12-01 20:58:31 +01:00
springstan
22225cea4d Move imports to top for seventeentrack (#29264)
* Move imports to top for seventeentrack

* Updated patch target path in test_sensor.py
2019-12-01 10:19:17 -07:00
Ville Skyttä
9927f6c17d Upgrade mypy to 0.750 (#29294)
https://mypy-lang.blogspot.com/2019/11/mypy-0.html
2019-12-01 17:58:26 +01:00
Andreas Oberritter
64628c1f70 Add ATEN PE component for ATEN eco PDUs (#27960)
* Add ATEN PE component for ATEN eco PDUs

* aten_pe: Require host configuration

* aten_pe: Do not import from other integrations

* aten_pe: Include unnamed outlets

* aten_pe: Avoid get() for config entries having default values

* aten_pe: Fix documentation URI

* aten_pe: Remove unused return value

* aten_pe: Update atenpdu lib to 0.2.0 for asyncio

* aten_pe: Raise exception if initialization fails

* aten_pe: Update atenpdu lib to 0.3.0 for improved exception handling
2019-12-01 17:46:12 +01:00
springstan
6c9291c7a6 Move imports to top for raspyrfm (#29284) 2019-12-01 15:25:57 +01:00
springstan
a0a348a200 Move imports to top for recswitch (#29285) 2019-12-01 15:24:48 +01:00
springstan
d0ed9b32ac Move imports to top for remote_rpi_gpio (#29286) 2019-12-01 15:24:11 +01:00
springstan
e2e53be5ac Move imports to top for ripple (#29287) 2019-12-01 15:23:18 +01:00
Daniel Høyer Iversen
3c9d2b552e Upgrade Tibber library (#29290) 2019-12-01 14:20:27 +01:00
springstan
8fbfb6bf8c Move imports to top for rocketchat (#29288) 2019-12-01 12:04:47 +01:00
springstan
84d6a5369f Move imports to top for raincloud (#29283) 2019-12-01 12:04:12 +01:00
springstan
9f649ed345 Move imports to top for roku (#29289) 2019-12-01 12:03:51 +01:00
Ville Skyttä
5c8a8a631c Add Huawei LTE binary sensor support, mobile connection sensor (#28226)
* Add Huawei LTE binary sensor support, mobile connection sensor

* Improve mobile connection sensor icon docstring

* Remove device class for permission to use a more descriptive icon
2019-11-30 22:09:08 -08:00
jjlawren
6a02c6540e Stop Plex config flow imports where more user input needed (#29241)
* Abort imports that require user interaction, update logs and tests

* Disable lint
2019-11-30 22:07:12 -08:00
springstan
c4c8a1ba2d Move imports to top for sense (#29258) 2019-11-30 21:35:45 -08:00
Bram Kragten
2bdf7fc8f5 Fix Hue linking with non ASCII chars in location (#29213)
* Fix Hue linking with non ASCII chars in location

* Use slugify
2019-11-30 21:33:11 -08:00
springstan
8908dba5b4 Add device trigger for alarm_control_panel (#29068)
* Added device trigger to alarm control panel

* Added supported features to check that device has certain trigger

* Fixed tests for device_trigger

* Fixed pylint error

* Removed pending trigger and removed trigger condition
2019-11-30 21:30:51 -08:00
Franck Nijhof
d5efd0b352 Fix Espalexa being detected as Hue Bridge (#29237) 2019-11-30 21:28:42 -08:00
Santobert
c0619944fa Neato reduce API calls (#29156)
* initial commit

* Fix a bug where some values are not available

* Workaround if git_robot_info() is not available
2019-11-30 21:26:44 -08:00
springstan
bb46918d2e Move imports to top for scsgate (#29257) 2019-11-30 21:24:54 -08:00
springstan
1560d84cd7 Move imports to top for sisyphus (#29252) 2019-11-30 21:24:38 -08:00
springstan
8da7f40736 Move imports to top for smarty (#29251) 2019-11-30 21:24:17 -08:00
springstan
bea5d18c4a Move imports to top for sochain (#29250) 2019-11-30 21:23:59 -08:00
springstan
6726c4c76b Move imports to top for spider (#29249) 2019-11-30 21:23:48 -08:00
springstan
9fbb345ce0 Move imports to top for tradfri (#29247) 2019-11-30 21:23:39 -08:00
springstan
93150f6f94 Move imports to top for sensehat (#29259) 2019-11-30 21:23:09 -08:00
springstan
f2b06d9abd Move imports to top for sht31 (#29260) 2019-11-30 21:22:53 -08:00
springstan
221db3a2dd Move imports to top for simplepush (#29261) 2019-11-30 21:22:33 -08:00
springstan
11b274989a Move imports to top for satel_integra (#29263) 2019-11-30 21:22:18 -08:00
springstan
4ceddc6d35 Move imports to top for sabnzbd (#29266) 2019-11-30 21:22:05 -08:00
springstan
3aff90c0ac Move imports to top for rpi_gpio_pwm (#29270) 2019-11-30 21:21:46 -08:00
springstan
453569a469 Move imports to top for russound_rio (#29267) 2019-11-30 21:21:40 -08:00
springstan
db2f53dfc1 Move imports to top for russound_rnet (#29268) 2019-11-30 21:21:28 -08:00
springstan
82d8c9c2ca Move imports to top for rova (#29269) 2019-11-30 21:21:08 -08:00
springstan
869e71f455 Move imports to top for rpi_rf (#29271) 2019-11-30 21:20:33 -08:00
springstan
7ad139bb63 Move imports to top for roomba (#29272) 2019-11-30 21:20:17 -08:00
springstan
96a28e59bc Move imports to top for route53 (#29273) 2019-11-30 21:19:28 -08:00
HomeAssistant Azure
aa9514b774 [ci skip] Translation update 2019-12-01 00:34:59 +00:00
springstan
5dbfa16e04 Move imports to top for simplisafe (#29262) 2019-11-30 17:16:05 -07:00
Wim Haanstra
bde453be47 Address DSMR Reader review notes (#29209)
* Fix review issues

* Remove None from get method

* No longer need logging import

* Give definition without name a default name
2019-11-30 16:23:03 +01:00
Pascal Vizeli
0ea91fbf2d Merge pull request #29234 from home-assistant/rc
Release 0.102.3
2019-11-30 11:58:54 +01:00
HomeAssistant Azure
8ae0d891e4 [ci skip] Translation update 2019-11-30 00:32:19 +00:00
springstan
4bec14b0f6 Move imports to top for swiss_public_transport (#29228)
* Move imports to top for swiss_public_transport

* Remove import of exceptions since only one exception is used
2019-11-29 22:16:14 +01:00
springstan
fbfbae8ad9 Move imports to top for swiss_hydrological_data (#29227) 2019-11-29 21:50:09 +01:00
springstan
39bf1b5f5d Move imports to top for stiebel_eltron (#29224) 2019-11-29 21:32:03 +01:00
springstan
7d90b1f9ec Move imports to top for streamlabswater (#29225) 2019-11-29 21:27:00 +01:00
springstan
93bb1a6816 Move imports to top for supla (#29226) 2019-11-29 21:26:23 +01:00
springstan
bbecd55c09 Move imports to top for synology (#29230) 2019-11-29 21:22:03 +01:00
springstan
c30dfac4ed Move imports to top for synologdsm (#29231) 2019-11-29 21:21:00 +01:00
springstan
e4b26dc02b Move imports to top for tahoma (#29232) 2019-11-29 21:19:49 +01:00
springstan
11331ad26e Move imports to top for starlingbank (#29233) 2019-11-29 21:18:52 +01:00
springstan
04bad4bc74 Move imports to top for switchbot (#29229) 2019-11-29 19:34:40 +01:00
Michaël Arnauts
e405398ca4 Allow turning off a tado water heater (#29221) 2019-11-29 19:22:22 +01:00
Pascal Vizeli
ec008ddbe4 Bump version 0.102.3 2019-11-29 17:48:08 +00:00
Bram Kragten
2d5d40ce0e Fix smartthings cloud webhook (#29219)
* Fix smartthings cloud webhook

* Update smartapp.py
2019-11-29 17:46:27 +00:00
Bram Kragten
4065c46046 Fix smartthings cloud webhook (#29219)
* Fix smartthings cloud webhook

* Update smartapp.py
2019-11-29 18:29:45 +01:00
springstan
392cdf49e6 Allow controlling Tado Hot Water Devices with temperature control (#29191) 2019-11-29 16:29:39 +01:00
tetienne
12155cb66e Fix somfy switch inherit from SwitchDevice instead of ToggleEntity (#29182) 2019-11-29 12:08:20 +01:00
Malte Franken
6126d05935 Migrate NSW Rural Fire Service integration to async library (#29181)
* use async integration library

* adapted unit tests

* removed unused constants

* relocated constants

* simplified generation of new entries

* small code fixes

* increased test coverage and removed unused code

* fixed comment

* simplified patch code
2019-11-29 12:06:21 +01:00
springstan
364d1cff40 Move imports to top for xiaomi (#29197) 2019-11-29 08:09:36 +01:00
springstan
e63bca4f32 Move imports to top for xiaomi_aqara (#29196) 2019-11-29 08:09:10 +01:00
michaeldavie
1322661ee0 Handle None when trucating long Environment Canada state values (#29208)
* Handle None when trucating long state values, add info message

* Black
2019-11-29 04:13:21 +01:00
springstan
1c824f5ca7 Move imports to top for ziggo_mediabox_xl (#29193) 2019-11-29 02:10:08 +01:00
springstan
e5aa050def Move imports to top for zhong_hong (#29194) 2019-11-29 02:09:03 +01:00
springstan
fe34ea1865 Move imports to top for zabbix (#29195) 2019-11-29 02:07:52 +01:00
springstan
66aae61fd5 Move imports to top for wirelesstag (#29198) 2019-11-29 02:03:14 +01:00
Fabian Affolter
0d30a6bcac Upgrade youtube_dl to 2019.11.28 (#29199) 2019-11-29 02:02:01 +01:00
springstan
25ad933d2d Move imports to top for vultr (#29200) 2019-11-29 02:00:40 +01:00
springstan
243e80459d Move imports to top for volvooncall (#29201) 2019-11-29 01:59:48 +01:00
springstan
0e4920d6a1 Move imports to top for tof (#29203)
* Move imports to top for tof

* Isorted imports
2019-11-29 01:58:56 +01:00
springstan
7b33e57e86 Move imports to top for tautulli (#29204) 2019-11-29 01:56:39 +01:00
springstan
5001dbdcfa Move imports to top for tapsaff (#29205) 2019-11-29 01:55:52 +01:00
springstan
e1fece48e1 Move imports to top for syncthru (#29206) 2019-11-29 01:54:42 +01:00
springstan
430061a159 Move imports to top for usgs_earthquakes_feed (#29202) 2019-11-29 01:53:49 +01:00
HomeAssistant Azure
8dc366c75b [ci skip] Translation update 2019-11-29 00:32:07 +00:00
Fabian Affolter
103b917bb2 Upgrade psutil to 5.6.6 (#29192) 2019-11-28 23:20:00 +01:00
guillempages
26e674b4c3 Resolve hosts for fritzbox_callmonitor (#28761)
* Resolve hosts for fritzbox_callmonitor

If the configuration supplied "host" is not an IP address, try resolving it

* always use gethostbyname

Instead of just checking whether it is an IP and if it isn't try to resolve; just resolve it; IPs will be returned unchanged, and hostnames will be resolved.

* Catch error if the hostname cannot be resolved

* Don't fallback to default host

If the hostname cannot be resolved; don't try to fallback; just print the error message.

* Fail setup if hostname cannot be resolved

If the hostname cannot be resolved, log an error and stop the setup;
no entities will be then created.
2019-11-28 21:14:20 +01:00
Wim Haanstra
daed314585 Dsmr reader (#28701)
* Added DSMR Reader platform

- Added DSMR Reader platform
- Updated codeowners for other components I added earlier

* Move sensor definitions to new file

* Sensor definitions in new file

* Add energy prices from MQTT

* lint fixes

* Black formatted some files

* Update .coveragerc

* Support transform methods on definitions

* Manifest mangled by Black, fixed

* Visual studio code reformatting dictionary error

* Fix issues with code, remove unrelated manifest changes

* Update CODEOWNERS
2019-11-28 20:30:24 +01:00
Paulus Schoutsen
b847d55077 Only create cloud user if cloud in use (#29150)
* Only create cloud user if cloud in use

* Pass context to alexa

* Update requirements

* Fix handing & design pattern for 0.30

* fix tests

* Fix lint & tests

* rename internal user
2019-11-28 14:23:59 +01:00
Pascal Vizeli
5d5d053bce Use github instead gitlab 2019-11-28 13:40:29 +01:00
tetienne
4e107a2bcf Add support for Somfy Camera Shutter (#29057) 2019-11-28 10:42:17 +01:00
jjlawren
9c9e9bc92a Bump plexwebsocket to 0.0.6 (#29175) 2019-11-27 22:40:08 -08:00
Joakim Plate
69991bf3a2 Move GoogleConfig initialization into setup of component (#29170) 2019-11-27 20:45:43 -08:00
Raman Gupta
3ecf5596ff update demo service domain and service description (#29164)
* update demo service domain and service description

* move DOMAIN and service name to const.py

* update per balloob's service name suggestion

* update service name in services.yaml

* update service name constant's name
2019-11-27 20:36:40 -08:00
Paulus Schoutsen
4cfd24a03a Fix mobile app device identifiers (#29173) 2019-11-27 20:27:22 -08:00
Dan Jones
665613e395 Add fan support to lutron_caseta (#29033)
* Adding lutron_caseta fan controller. Updated to pylutron 0.5.1

* Accidental import remain

* updating for black formatting

* Fix blank spaces

* Moving third party import

* update to 0.5.1 to pass checks

* fix deletion of new line

* Update fan.py

* Update with dev branch, update from comments, added mediumhigh
2019-11-28 02:45:36 +01:00
Raman Gupta
f1a4e212cc Update service domain for alarmdecoder from 'alarm_control_panel' to 'alarmdecoder' (#29127)
* update alarmdecoder service domain

* update alarmdecoder service name

* black formatting
2019-11-27 16:51:40 -08:00
Raman Gupta
88376bf363 move wemo services to wemo domain (#29135) 2019-11-27 16:49:12 -08:00
Raman Gupta
9fd058aa33 move soundtouch services to soundtouch domain (#29140) 2019-11-27 16:47:45 -08:00
HomeAssistant Azure
f6dd51a7fb [ci skip] Translation update 2019-11-28 00:32:18 +00:00
Raman Gupta
7ecd5b5e5a add services.yaml description for service (#29160) 2019-11-27 14:18:21 -08:00
Raman Gupta
ceb1528b50 Update bluetooth_tracker service name and domain from 'device_tracker' to 'bluetooth_tracker' (#29161)
* move service constants to const.py, update service domain, add service description

* update .coveragerc
2019-11-27 14:18:01 -08:00
Raman Gupta
b6d94bcc96 Change apns service domain and remove unused variable (#29165)
* change apns service domain and remove unused variable

* fix tests

* move DOMAIN to const.py and import DEVICE_TRACKER_DOMAIN from base component
2019-11-27 14:15:25 -08:00
Robert Svensson
bdb3eb1683 Handle case when device can be None (#29171) 2019-11-27 14:14:19 -08:00
jjlawren
88441d5f68 Reduce connection timeout to avoid config flow timeouts (#29172) 2019-11-27 14:14:01 -08:00
Raman Gupta
acc10c296e move import to top and add service definition for pilight (#29163)
* move import to top and add service definition for pilight

* move import above HA imports
2019-11-27 21:26:54 +01:00
Tsvi Mostovicz
d7a66e6e4c Return Jewish Calendar holiday type id support (#29168)
* Bring back holiday type id as a attribute to the holiday sensor

* Add test for holiday type id attribute
2019-11-27 20:52:03 +01:00
Brett T. Warden
fa1622fe8b Use roku.poweron method for media_player.turn_on (#29123)
Instead of using the roku.power method, which toggles power,
implement the media_player.turn_on command for the roku component
by calling the new roku.poweron method.

Fixes #28961, but depends on upstream
https://github.com/jcarbaugh/python-roku/pull/53
2019-11-27 18:19:10 +01:00
Raman Gupta
8ef8a314df Update service domain for ifttt from 'alarm_control_panel' to 'ifttt' (#29129)
* update service domain for ifttt

* update missed variable references
2019-11-27 18:17:56 +01:00
Raman Gupta
82fe409961 add services.yaml description for matrix service (#29159) 2019-11-27 18:15:15 +01:00
Raman Gupta
b274fcba05 Update service domain for harmony from 'remote' to 'harmony' (#29146)
* move harmoney services to harmony domain

* update service names
2019-11-27 18:14:46 +01:00
Raman Gupta
d577868190 move yamaha service to yamaha domain (#29142) 2019-11-27 18:13:54 +01:00
Raman Gupta
ef21fd2536 Update services.yaml for nuheat (#29133)
* update services.yaml for nuheat

* update tests

* black formatting
2019-11-27 15:20:40 +01:00
mvn23
fdf0793fdd Add opentherm_gw device support (#28722)
* Add opentherm_gw device support

* Add support for enabling/disabling of opentherm_gw entities

* Disable sensors by default, base climate entity_id on gw_id instead of friendly_name to guarantee uniqueness

* Remove platform name from unique_id
2019-11-27 08:14:41 -05:00
Raman Gupta
12ae8b025f move squeezebox service to squeezebox domain (#29141) 2019-11-27 13:54:00 +01:00
Raman Gupta
59939004bf Update service domain for mill from 'climate' to 'mill' (#29132) 2019-11-27 13:47:38 +01:00
Abílio Costa
a08df53dbc Add "gentle" mode for Xiaomi Roborock vacuum (#29004)
* Add "gentle" mode for Xiaomi Roborock vacuum

* fix tests
2019-11-27 13:46:13 +01:00
Tom Brien
8f05388bc5 Remove ios warning for no devices subscribed to ios.notify (#29153)
Since 2019.1 has launched there is a perfectly reasonable (in fact the standard) case where ios component is loaded (i.e. actionable notifications) but no devices are registed for the now defunct `ios.notify` service. As such, the log warning relating to this case is no longer relevant.
2019-11-27 13:35:38 +01:00
Raman Gupta
c80f284ca4 Update service domain for mysensors from 'switch' to 'mysensor… (#29147) 2019-11-27 13:31:40 +01:00
Raman Gupta
2d2ab452ca update envisalink service domain (#29126) 2019-11-27 11:27:48 +01:00
Raman Gupta
1681d36637 Update service domain for todoist from 'calendar' to 'todoist' (#29131)
* move todoist constants to const.py and update service domain

* update .coveragerc

* remove unused variable

* save file
2019-11-27 11:26:59 +01:00
Paulus Schoutsen
004476a1f8 Add intent integration to expose intent handle API (#29124)
* Add intent integration to expose intent handle API.

* Run hassfest + fix scaffolding

* Update __init__.py
2019-11-27 11:25:43 +01:00
Raman Gupta
ec61a86678 move service constants to const.py and move channels services to channels domain (#29139) 2019-11-27 11:23:52 +01:00
Raman Gupta
1f13809c6d Update service domain for lifx from 'light' to 'lifx' (#29136)
* update service domain for lifx custom services

* fix service name
2019-11-27 11:23:06 +01:00
Raman Gupta
9e882ef6b4 move wink service definitions from lock to wink domain (#29137) 2019-11-27 11:21:52 +01:00
Raman Gupta
5120181e0e move facebox service to facebox domain (#29151) 2019-11-27 11:20:24 +01:00
Raman Gupta
c72e230432 move songpal service to songpal domain (#29143) 2019-11-27 11:19:01 +01:00
Raman Gupta
0ff0ec7d3e move econet services to econet domain (#29149) 2019-11-27 11:18:21 +01:00
Raman Gupta
ff4d256893 move icloud services to icloud domain (#29144) 2019-11-27 11:16:53 +01:00
Raman Gupta
b8f03aa3be move neato service to neato domain (#29148) 2019-11-27 11:15:59 +01:00
Raman Gupta
975ee0ea7f Update service domain for elkm1 from 'alarm_control_panel' to 'elkm1' (#29128)
* move elkm1 services to elkm1 domain

* update missed variable references
2019-11-27 11:15:27 +01:00
Raman Gupta
b7896c7b6f move nuki service to nuki domain services.yaml and remove missing service (#29138) 2019-11-27 11:14:22 +01:00
Raman Gupta
fb9f561052 move html5 service to html5 domain (#29145) 2019-11-27 11:13:27 +01:00
Chris Caron
8933540950 bumped supported apprise version to 0.8.2 (#29125) 2019-11-26 20:18:43 -08:00
Ville Skyttä
5bc8ef962b Upgrade huawei-lte-api to 1.4.4 (#29130)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.4

Closes https://github.com/home-assistant/home-assistant/issues/28922
2019-11-26 20:18:24 -08:00
Ville Skyttä
738b3363d9 UpCloud updates (#28646)
* Upgrade upcloud-api to 0.4.5

* Fix UpCloud name spelling in manifest

* Update data at setup time for better initial states

* Clean up signal handlers on remove

* Signal data update on server start

To keep related binary sensor better up to date.

* Improve track_time_interval emulation for initial update
2019-11-26 20:17:14 -08:00
HomeAssistant Azure
2a7aac6afc [ci skip] Translation update 2019-11-27 00:32:16 +00:00
springstan
33c6ee80ad Move imports to top for traccar (#29116) 2019-11-26 16:07:12 -08:00
springstan
5eaafcfd7f Move imports to top for touchline (#29117) 2019-11-26 16:06:44 -08:00
springstan
4e96ca9486 Move imports to top for temper (#29118) 2019-11-26 16:02:50 -08:00
springstan
555190990a Move imports to top for tank_utility (#29119) 2019-11-26 16:02:36 -08:00
Joakim Plate
06231e7ac2 Move request sync logic into GoogleConfig (#28227)
* Move request sync logic into GoogleConfig

* Return http status code for request_sync same as cloud

* agent_user_id is not optional for async_sync_entities now

* No need in checking parameter here

* Adjust some things for cloud tests

* Adjust some more stuff for cloud tests

* Drop uneccessary else

* Black required change

* Let async_schedule_google_sync take agent_user_id

* Assert return value on api call

* Test old api key method

* Update homeassistant/components/google_assistant/helpers.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
2019-11-26 22:47:13 +01:00
gjbadros
5f1b0fb15c Allow rest sensor list responses (#28835)
* Make rest sensor a little bit more flexible and allow the response to be a list with 0th element being a dictionary

* Black formatter wanted a different formatting

* Added test case for a list response with dict as 0th element

* Fixed lint error - it thinks a + STRING is an avoidance of using % sequences for log messages; I generally prefer explicit + rather than string juxtaposition for combining string literals, but sounds like that's not the standard

* Fixed test case -- I added it to the wrong scenario and need to use the one with json_attrs.
2019-11-26 22:10:58 +01:00
springstan
b72c6c4424 Update list of supported countries for Workday Sensor (#29000)
* Updated list of supported countries

* Added Honduras and Polish back to the list

* Added HND for Honduras to the list
2019-11-26 22:09:00 +01:00
Colin O'Dell
0849d42dc6 Remove the alarm_control_panel CODEOWNER (#29114)
Although I originally contributed this component, I no longer use it myself and haven't been following the internal development of HA, so I'm no longer a good person to review any further changes to this component.  I would therefore like to relinquish my CODEOWNER status over this component.
2019-11-26 21:57:45 +01:00
Evgeny
4ea47333d8 Update roomba bin state checking (#29030)
* Fixed bin full detection

* Refactored bin check

* Fix after pylint
2019-11-26 21:31:00 +01:00
Alex van den Hoogen
fe626f5669 Add Post Processing Jobs to NZBGet component (#29027)
* Added Post Processing Jobs to NZBGet component

In the current implementation of the NZBGet component there is no way of
knowing whether NZBGet is still in the Post Processing phase of a download
job. This can be very useful information. For instance when you want to
suspend the NZBGet service when all queue items have been completed.

This change adds that additional sensor.

* Renamed Count to Jobs in NZBGet component
2019-11-26 11:31:20 -08:00
sophof
078a7e446d Fix all entities triggering all observations in bayesian sensor (#28979)
* change fromkeys to dict comprehension to prevent append working on a list by reference. Now each entity id has its own seperate list

* change fromkeys to dict comprehension to prevent append working on a list by reference. Now each entity id has its own seperate list

* use get instead of direct keys for dict

* change fromkeys to dict comprehension to prevent append working on a list by reference. Now each entity id has its own seperate list

* use get instead of direct keys for dict

* changed get back to []
2019-11-26 11:26:40 -08:00
Nikolay Vasilchuk
a37260faa9 StarLine integration (#27197)
* Device Tracker works

* Device Tracker works

* Binary Sensor

* Sensor

* Lock

* Switch and service

* New switches

* Update interval options

* WIP

* Translation errors

* Check online state

* WIP

* Move to aiohttp

* Some checks

* CI

* CI

* .coveragerc

* Black

* icon_for_signal_level test

* update_interval renamed to scan_interval

* async logic

* Fix cookie read

* Requirement starline

* Reformat

* Requirements updated

* ConfigEntryNotReady

* Requirement starline

* Lint fix

* Requirement starline

* available status

* Translations

* Expiration to config

* CI

* Linter fix

* Small renaming

* Update slnet token

* Starline version bump

* Fix updates

* Black

* Small fix

* Removed unused fields

* CI

* set_scan_interval service

* deps updated

* Horn switch

* Starline lib updated

* Starline lib updated

* Black

* Support multiple integrations

* Review

* async_will_remove_from_hass

* Deps updated

* Test config flow

* Requirements

* CI

* Review

* Review

* Review

* Review

* Review

* CI

* pylint fix

* Review

* Support "mayak" devices

* Icons removed

* Removed options_flow

* Removed options_flow test

* Removed options_flow test
2019-11-26 11:17:11 -08:00
Raman Gupta
c21650473a Update service domain for epson from 'media_player' to 'epson' (#29113)
* update .coveragerc, move epson constants to const.py, move epson cutsom service to epson domain

* Newline in services.yaml
2019-11-26 11:12:50 -08:00
Raman Gupta
9e01591cac Update service domain for blackbird from 'media_player' to 'blackbird' (#29112)
* move service constants to const.py, update blackbird custom service domain

* Readd bluesound services.yaml entries since it should be part of a different branch
2019-11-26 11:10:13 -08:00
Raman Gupta
2da37778af Update service domain for bluesound from 'media_player' to 'bluesound' (#29111)
* move service constants to const.py, move services to bluesound domain

* Remove bluesound services from media_player/services.yaml
2019-11-26 11:06:34 -08:00
rappenze
1c73ac5df8 Fix Vicare imports (#29071)
* fix import

* Update water_heater.py

* use ValueError

* use ValueError
2019-11-26 10:46:53 -08:00
Aaron Bach
2cdd8ad15e Add new properties and services for V3 SimpliSafe systems (#28997)
* Add new properties and services for V3 SimpliSafe systems

* Small semantic change

* Updated docstrings

* Semantics

* Streamlined adding V3 properties

* Re-add attribute

* Bump to 5.3.5

* Owner comments

* Correct coroutine name
2019-11-26 11:44:40 -07:00
springstan
595567ad82 Move imports to top for trafikverket_weatherstation (#29108) 2019-11-26 10:23:08 -08:00
springstan
c221fc5d22 Move imports to top for thinkingcleaner (#29110) 2019-11-26 10:22:57 -08:00
springstan
23d4445de3 Move imports to top for trackr (#29109) 2019-11-26 10:22:28 -08:00
springstan
a27d8570c8 Move imports to top for unifi_direct (#29106) 2019-11-26 10:12:00 -08:00
springstan
4119ade2af Move imports to top for travisci (#29107) 2019-11-26 10:11:43 -08:00
springstan
825ac36ee7 Move imports to top for uvc (#29072)
* Move imports to top for uvc

* Fixed linting error

* Renamed parameter in constructor to avoid redefining import
2019-11-26 10:11:10 -08:00
Quentame
9a388e2dd2 Move dominos imports at top-level (#29090) 2019-11-26 10:10:20 -08:00
Quentame
c84590b18c Move free_mobile imports at top-level (#29092) 2019-11-26 10:10:05 -08:00
Quentame
274508f8fd Move fortigate imports at top-level (#29093) 2019-11-26 10:09:52 -08:00
Quentame
915d23158d Move foobot imports at top-level (#29094) 2019-11-26 10:09:32 -08:00
Quentame
4107fd9a25 Move folder_watcher imports at top-level (#29095) 2019-11-26 10:09:20 -08:00
Quentame
7a04f0c0df Move flunearyou imports at top-level (#29096) 2019-11-26 10:09:10 -08:00
Quentame
a7c4abba98 Move flexit imports at top-level (#29097) 2019-11-26 10:08:53 -08:00
springstan
21ed87a773 Move imports to top for ubee (#29105) 2019-11-26 10:08:34 -08:00
springstan
03fe7cb347 Move imports to top for twilio_call (#29104) 2019-11-26 10:08:16 -08:00
springstan
33af72a54f Move imports to top for uptimerobot (#29103)
* Move imports to top for uptimerobot

* Move imports to top for twilio_call

* Revert twilio_call
2019-11-26 10:07:46 -08:00
Raman Gupta
499838d5a7 move service constants to const.py, move custom services to monoprice domain (#29099) 2019-11-26 10:07:29 -08:00
SukramJ
c1163283ff Add hvac_action to HomematicIP Cloud Climate (#28859)
* Add hvac_action to HomematicIP Cloud Climate

* update test data

* limit hvac action to radiator only

* add checks

* Fix test to match new conditions
2019-11-26 10:02:30 -08:00
springstan
d0c47dfee2 Move imports to top for webostv (#29102) 2019-11-26 09:49:14 -08:00
Raman Gupta
42ce5e8b07 Update service domain for local_file from 'camera' to 'local_file' (#28890)
* update service domain for local_file from camera to local_file

* remove service.yaml entry in camera component as part of change

* fix test

* move constants to const.py

* add local_file/const.py to .coveragerc

* remove local_file/const.py from .coveragerc since component has tests
2019-11-26 09:22:55 -08:00
Rami Mosleh
a5960830d7 Add host field to add_torrent service (#28653)
* Add host field to add_torrent service

* Code cleanup

* use name instead of host for service

* update add_torrent
2019-11-26 09:22:12 -08:00
Matthew Donoughe
f8a36499c1 Add serial to caseta devices (#28886)
* add model and serial to caseta devices

* use just serial for unique id

* add display name for entity registry

* remove caseta device model

* just store device

* state and device are the same
2019-11-26 09:06:14 -08:00
Hmmbob
9e971495f7 Update WazeRouteCalculator, add config options, fix subscription (#27963)
* Update WazeRouteCalculator to 0.11

* Update WazeRouteCalculator to 0.11

* Adding new config options to Waze

* Fixing avoid subscription option

* Update WazeRouteCalculator to 0.12

There was an error in the underlying lib

* Update WazeRouteCalculator to 0.12
2019-11-26 09:05:06 -08:00
Quentame
44e708f72b Move ee_brightbox imports at top-level (#29054)
* Move ee_brightbox imports at top-level

* Fix tests

* Fix : Commented out code
2019-11-26 08:59:55 -08:00
Quentame
78d5184186 Move icloud imports at top-level (#29089) 2019-11-26 08:59:42 -08:00
Austin Drummond
c47ed743f1 Fix HomeKit linked battery sensor crash (#28974)
* fix homekit linked battery sensor crash

* simplified missing linked battery

* fixed formatting

* Make if faster
2019-11-26 08:55:33 -08:00
Pascal Vizeli
f9571c9637 Fix Alexa tests (#29100) 2019-11-26 16:17:41 +01:00
Bendik Brenne
c538d899a2 Fix empty data attribute in sinch service call (#28253)
* Fix empty data attribute in sinch service call

* Simplified the PR as per @MartinHjelmare`s request.
2019-11-26 14:14:09 +01:00
Paulus Schoutsen
c76f768a82 Make conversation and intent context aware (#28965)
* WIP

* LINT
2019-11-26 11:30:21 +01:00
Tim McCormick
6c6a5c50a5 Fix digest auth rest sensors (#28153)
* Fix digest auth rest sensors

* Refactor to use request()

* Fix black complaints

* Don't rename data variable

Don't rename the data variable, appears several other sensors have been coded to rely on it

* Fix tests

test_setup_missing_schema:
Change the exception to check for to PlatformNotReady. With the change away from prepared statements, we no longer get the MissingSchema error during setup - we get it when we attempt to call the endpoint. Since the result is PlatformNotReady, which is what we want, and the error log clearly contains a note that the schema is incorrect I think this is fine.

test_setup_failed_connect & test_setup_timeout:
These aren't checking for minimum config, and they're not invoking the correct method to have the default config filled in. Therefore I've just added the correct minimum config so these can continue to test what they're there to test.

test_update_request_exception:
Testing a request exception with the assert on line 404! Excellent. Anyway, we've moved from using the requests Session object to the requests.request function - so the patch needed to be altered to ensure the RequestException was raised.

* Remove no longer needed import

* Fix binary sensor test in same way
2019-11-25 23:22:11 -08:00
ochlocracy
b0925e60d7 Explicitly include "Alexa" Interface in discovery response (#28218)
* Explicitly include Alexa Interface to discovery response.

* Updated cloud component test to reflect additional Alexa interface.

* Updated test for recently added SeekController.
2019-11-25 23:05:10 -08:00
Bas Nijholt
db425f5432 Simplify getting alias from tplink smartplug.context (#28696)
* tplink: simplify getting alias from smartplug.context

* add a doc-string to private property
2019-11-25 23:03:38 -08:00
Ville Skyttä
99c7608fb4 Lint config cleanups (#28864)
* Remove bunch of unneeded lint exclusions

* Use symbolic names instead of identifiers in pylint disables

* Tighten scope of some pylint disables
2019-11-25 22:40:08 -08:00
Barry Williams
afaa464142 If volume disabled do not enable support (#28635) 2019-11-25 22:34:45 -08:00
Shulyaka
1f72de108c google_assistant: support for humidity sensors (#28695) 2019-11-25 22:12:20 -08:00
Emeric
72ccc83651 Add uptime and number of reboot for bbox sensor (#28880)
* Add uptime and reboot for bbox sensor

* Use timestamp for uptime

* Fix black format
2019-11-25 21:34:13 -08:00
Adam Cheng
6e7b5b71f5 Add scale and offset to temperature values to Modbus Climate (#27045)
* Add scale and offset to temperature values

* fix (no-else-return)

* Update manifest.json

* Added codeowners
2019-11-25 20:59:01 -08:00
Dmitry Krasnoukhov
4881bc04d8 Allow to change MQTT climate hold mode (#28988) 2019-11-25 20:53:37 -08:00
springstan
5f4fc271d4 Fixed CONFIG_SCHEMA and getting data from the config (#28985) 2019-11-25 20:27:51 -08:00
Pedro Lamas
db0008e62c Allow templates in rest_command headers (#26099) 2019-11-25 19:39:56 -08:00
springstan
cc255da038 Move imports to top for ecovacs (#29017)
* Moved imports in ecovacs integration

* Imported sucks once, reused it multiple times
2019-11-25 18:01:48 -08:00
Michaël Arnauts
cc346e57e6 Cast the volume_level of a universal media_player to a float (#29045)
* Make sure to cast the volume_level of a universal media_player to a float

* Fix test that expects the wrong bahaviour

* Catch exception instead of checking for None
2019-11-25 18:01:24 -08:00
Quentame
8a413b152d Move esphome imports at top-level (#29064) 2019-11-25 18:00:58 -08:00
olijouve
87de5db535 Fix Onvif setup error: premature end of connection on GetStreamURI (#26781)
* Fix Onvif setup error with a premature end of connection on GetStreamUri wsdl call

Reconnect to onvif camera after getting profiles to fix this error :

[homeassistant.components.onvif.camera] Retrieving stream uri                                                                                                                                 
[zeep.asyncio.transport] HTTP Post to http://192.168.1.15/onvif/Media:                                                                                                                        
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur
2019-09-20 01:08:51 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform onvif                                                                                                                       
Traceback (most recent call last):                                                                                                                                                                                                   
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 553, in write_bytes                                                                                                                                   
    await self.body.write(writer)                                                                                                                                                                                                    
  File "/usr/local/lib/python3.7/site-packages/aiohttp/payload.py", line 231, in write                                                                                                                                               
    await writer.write(self._value)                                                                                                                                                                                                  
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 101, in write                                                                                                                                           
    self._write(chunk)                                                                                                                                                                                                               
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 67, in _write                                                                                                                                           
    raise ConnectionResetError('Cannot write to closing transport')                                                                                                                                                                  
ConnectionResetError: Cannot write to closing transport                                                                                                                                                                              
                                                                                                                                                                                                                                     
The above exception was the direct cause of the following exception:                                                                                                                                                                 
                                                                                                                                                                                                                                     
Traceback (most recent call last):                                                                                                                                                                                                   
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform                                                                                                                         
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)                                                                                                                                                                
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for                                                                                                                                                            
    return fut.result()                                                                                                                                                                                                              
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 110, in async_setup_platform                                                                                                                          
    await hass_camera.async_initialize()                                                                                                                                                                                             
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 168, in async_initialize                                                                                                                              
    await self.async_obtain_input_uri()                                                                                                                                                                                              
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 266, in async_obtain_input_uri                                                                                                                        
    stream_uri = await media_service.GetStreamUri(req)                                                                                                                                                                               
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/bindings.py", line 13, in send                                                                                                                                           
    options["address"], envelope, http_headers                                                                                                                                                                                       
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/transport.py", line 107, in post_xml                                                                                                                                     
    response = await self.post(address, message, headers)                                                                                                                                                                            
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/transport.py", line 95, in post                                                                                                                                          
    proxy=self.proxy,                                                                                                                                                                                                                
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 497, in _request                                                                                                                                             
    await resp.start(conn)                                                                                                                                                                                                           
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 844, in start                                                                                                                                         
    message, payload = await self._protocol.read()  # type: ignore  # noqa                                                                                                                                                           
  File "/usr/local/lib/python3.7/site-packages/aiohttp/streams.py", line 588, in read                                                                                                                                                
    await self._waiter                                                                                                                                                                                                               
aiohttp.client_exceptions.ClientOSError: [Errno None] Can not write request body for http://192.168.1.15/onvif/Media

* Add code comment

* Update camera.py

* Lint.
2019-11-25 17:56:17 -08:00
Andrew Onyshchuk
f5c01cc30d Improve z-wave thermostat support (#27040)
* Improve z-wave thermostat support

Discover thermostat using COMMAND_CLASS_THERMOSTAT_MODE
so that it is a single entitiy in case there are multiple
setpoints. z-wave docs mention it is always present.
Add support for single/range target temperature depending
on the current thermostat mode.

* Remove debug print

* Refactor Z-Wave dynamic setpoint(s) selection

- use explicit mapping between modes and setpoints as defined in
Z-Wave specs
- add tests for away (2 setpoints) and heat eco (1 setpoint) modes

* Add non-standard thermostat mode aliases
2019-11-25 16:32:37 -08:00
HomeAssistant Azure
807de1aeb3 [ci skip] Translation update 2019-11-26 00:32:24 +00:00
Gil Peeters
0088995b98 Refactor template components to extract common routines (#27064)
* Added availability_template to Template Cover platform

* Added availability_template to Template Binary Sensor platform

* Added availability_template to Template Fan platform

* Added availability_template to Template Light platform

* Added availability_template to Template Sensor platform

* Added availability_template to Template Switch platform

* Added availability_template to Template Vacuum platform

* Added availability_template to Template Lock platform

* Added to test for invalid values in availability_template

* Black and Lint fix

* black formatting

* Added to test for invalid values in availability_template

* black

* Added to test for invalid values in availability_template

* Added to test for invalid values in availability_template

* simplified exception handler

* Fixed Entity discovery big and coverage

* Added to test for invalid values in availability_template

* flake8

* fixed component ID in test

* Added to test for invalid values in availability_template

* Added to test for invalid values in availability_template

* Made availability_template redering erorr more concise

* Cleaned template setup

* I'll remember to run black every time one of these days...

* Refactored Template initialisation

* Refactored Template initialisation

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fixed linting issues

* Moved availability_template rendering to common loop

* Moved availability_template rendering to common loop

* Moved availability_template rendering to common loop

* Moved availability_template rendering to common loop

* Removed 'Magic' string

* Removed 'Magic' string and removed duplicate code

* Removed 'Magic' string

* Removed 'Magic' string

* Brought contant into line

* Refactored availability_tempalte rendering to common loop

* Removed 'Magic' string

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* Fixed tests (magic values and state checks)

* Fixed tests (magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Removed duplicate

* Clean up and remove debug

* Reverted Dev Container Change
2019-11-25 16:30:49 -08:00
Jacob McSwain
d5db55354e Add SSL configuration (#29038)
* OpenGarage: Add protocol configuration (#29037)

* OpenGarage: Change CONF_PROTOCOL to CONF_SSL

Resolves https://github.com/home-assistant/home-assistant/pull/29038#discussion_r350173095

* OpenGarage: Add `verify_ssl` as an option
2019-11-25 15:47:18 -08:00
Quentame
112a3f5e9f Move hangouts imports at top-level (#29055) 2019-11-25 15:44:11 -08:00
SukramJ
1fde0d18ed Add supported_features to Alarm Control Panel to limit device_actions (#29065)
* Add supported_features to Alarm Control Panel

* mark supported_features abstract

* Add SF to async_register_entity_service

* fix test

* Add missing SF SUPPORT_ALARM_ARM_CUSTOM_BYPASS

* isort

* fix async_register_entity_service

* Update alarm_control_panel.py
2019-11-25 15:42:53 -08:00
springstan
3203cba01f Move imports to top for xiaomi_tv (#29073) 2019-11-25 15:40:42 -08:00
springstan
c95a01ce3a Move imports to top for yale_smart_alarm (#29074) 2019-11-25 15:40:25 -08:00
springstan
729116ff3a Move imports to top for version (#29075) 2019-11-25 15:40:08 -08:00
springstan
a64d04da56 Move imports to top for xeoma (#29076) 2019-11-25 15:39:54 -08:00
springstan
d211a29cae Move imports to top for xfinity (#29077) 2019-11-25 15:39:44 -08:00
Quentame
844eb6b8ef Move dlna_dmr imports at top-level (#29082) 2019-11-25 15:37:19 -08:00
Quentame
5015993f30 Move upnp imports at top-level (#29083) 2019-11-25 15:37:03 -08:00
Quentame
29e2201446 Move velux imports at top-level (#29085) 2019-11-25 15:36:37 -08:00
Quentame
12c396fb19 Move epsonworkforce imports at top-level (#29086) 2019-11-25 15:36:04 -08:00
ochlocracy
970a80216d Add valid inputs to alexa InputController (#28483)
* Add supported Inputs for Alexa.InputController.

* Fixed Test.

* Added default parameter for get() per @quthla suggestion.

* Added additional tests, assets call data.

* Added additional tests, asserts call data.

* Accounted for space in input name, added tests to handle space.
2019-11-25 15:17:12 -08:00
mvn23
f53812f261 Fix opentherm_gw config flow migration (#28474)
* Fix opentherm_gw migration to config flow.

* Address feedback
2019-11-25 15:08:18 -08:00
ochlocracy
5ea5db32d2 Add Alexa.ModeController to cover entities, adds open/close utterances! (#28309)
* Added Alexa.ModeController to cover entities.

* Added synonyms for directives.

* Updated tests for additional synonyms for directives.

* Added Alexa.ModeController to cover entities.

* Sacrifice unused variable in split() to please the Pylint gods.

* Removed duplicate instance check.

* Corrected variable name, clarified definition and consistency.

* Changed list to tuple.
2019-11-25 15:07:33 -08:00
ochlocracy
dc8c085872 Support default display category based one switch device_class. (#28221) 2019-11-25 14:50:43 -08:00
Quentame
f971e16749 Move eddystone_temperature imports at top-level (#29052)
* Move eddystone_temperature imports at top-level

* Fix pylint ?
2019-11-25 23:46:12 +01:00
Heine Furubotten
04754b354c Entur public transport code owner (#29080)
* entur code owner

* gen codeowners file
2019-11-25 23:45:33 +01:00
Heine Furubotten
66b7dfec53 Nilu integration code owner (#29081)
* nilu code owner

* gen codeowners file
2019-11-25 23:45:14 +01:00
Quentame
c4108fec4f Move yi imports at top-level (#29001)
* Move yi imports at top-level

* Review 1 : removing useless disable=import-error

* Review 2 : removing useless disable=import-error
2019-11-25 15:32:35 -07:00
majuss
3dd5222ec7 Bumped lupupy to version 0.0.18 (#28989)
* Bumped lupupy

* Ran gen req

* Ran gen hassfest


Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2019-11-25 20:21:54 +01:00
SukramJ
9a5dc848c9 Fix climate device actions (#28660)
* limit climate device actions

* update test

* use supported_features for device_action

* Fix tests

* user support_features for device_condition
2019-11-25 11:12:00 -08:00
Bas Nijholt
ea6417bea3 track Raspberry Pi 4 image in the version integration (#29059) 2019-11-25 10:07:27 -08:00
Quentame
e40dda3ce3 Move econet imports at top-level (#29050) 2019-11-25 16:06:37 +01:00
Ville Skyttä
f504ac8c65 Drop < 0.97 Huawei LTE sensor unique id migration workaround (#29060) 2019-11-25 16:06:10 +01:00
Pascal Vizeli
9dc63419c4 Bump numpy 1.17.4 / opencv 4.1.2 for Python 3.8 (#29061) 2019-11-25 16:05:21 +01:00
fredericvl
3e4f7fddf2 Handle offline state of SAJ inverters (fixes #29007) (#29009)
* Fix for SAJ issue #29007

* Sort mapping
2019-11-25 08:46:49 -05:00
Quentame
335473cb71 Move hdmi_cec imports at top-level (#29056) 2019-11-25 14:43:17 +01:00
cgtobi
6da01904c4 Fix typo in scaffold generator script (#29058) 2019-11-25 14:42:40 +01:00
SukramJ
1043712c54 Code maintenance for HomematicIP Cloud (#28980)
* Add more type hints to Homematic IP Cloud

* Rename device to entity in async_setup_entry
2019-11-25 14:17:14 +01:00
Otto Winter
b927f40f00 Add climate hvac_action for ESPHome (#28993)
* Add climate action

* Bump aioesphomeapi
2019-11-25 14:13:19 +01:00
Quentame
5edc45e9af Move fibaro imports at top-level (#28995) 2019-11-25 14:12:01 +01:00
springstan
ccb05764b6 Move imports to top for ffmpeg_motion and ffmpeg_noise (#29026)
* Move imports to top for ffmpeg_motion and ffmpeg_noise

* Fixed tests
2019-11-25 14:11:23 +01:00
Quentame
71bafba9ec Move ecoal_boiler imports at top-level (#29049) 2019-11-25 14:08:52 +01:00
Quentame
cb5d00a07b Move ebox imports at top-level (#29048) 2019-11-25 14:08:28 +01:00
kuchel77
63f66785ad Added error checking (#29041)
Add in error checking in case disks or volumes are empty.
2019-11-25 14:08:04 +01:00
Quentame
752a4d7221 Move dyson imports at top-level (#29047) 2019-11-25 14:06:39 +01:00
Quentame
193769c791 Move vizio imports at top-level (#29046) 2019-11-25 14:05:46 +01:00
Quentame
3122182ab2 Move edimax imports at top-level (#29053) 2019-11-25 14:05:07 +01:00
Michaël Arnauts
c21c167f4e Use TADO_MODE for temperature overrides in tado climate component. (#29014)
* Use TADO_MODE for temperature overrides in tado climate component.

* Fix typo in pydoc

* Add myself as a code owner

* Update CODEOWNERS file
2019-11-25 14:04:36 +01:00
Chris Halls
5690313084 Report device unavailable state through Emulated Hue (#29029)
If an entity is in unavailable state in HA, we expose this
as unreachable to Hue clients. This helps when troubleshooting
Hue issues because you can now receive feedback if there is an issue
on the HA side.
2019-11-25 12:17:08 +01:00
springstan
aa00e56e1c Move imports to top for discovery (#29020) 2019-11-25 12:15:55 +01:00
escoand
430f7bdfd4 Catch samsungtv websocket exceptions (#28849)
* catch websocket exceptions

* fix syntax

* use exceptions from base class

* add comments

* add test
2019-11-25 10:45:50 +01:00
Fabian Affolter
5b64052d69 Upgrade discord.py to 1.2.5 (#28998) 2019-11-25 09:50:10 +01:00
springstan
cc3559d54c Move imports to top for geizhals (#29021) 2019-11-25 09:43:59 +01:00
springstan
ee038999fc Move imports to top for todoist (#29022) 2019-11-25 09:43:29 +01:00
springstan
fe9084bb3b Move imports to top for watson_tts (#29023) 2019-11-25 09:42:37 +01:00
Quentame
5822deda1d Move philips_js imports at top-level (#29003) 2019-11-25 09:41:37 +01:00
Philipp Schmitt
6307f383a7 Fix #27028 (#29042) 2019-11-25 09:40:32 +01:00
Josh Anderson
8fade79a0a Add an early start sensor for heating zones (#28732) 2019-11-25 09:13:59 +01:00
Paulus Schoutsen
ebc0ed1e22 Merge pull request #29039 from home-assistant/rc
0.102.2
2019-11-24 21:16:56 -08:00
Paulus Schoutsen
8a467bbf5c Bumped version to 0.102.2 2019-11-24 19:57:50 -08:00
Franck Nijhof
b10d42e330 Alexa gracefully handle climate devices without presets (#29010) 2019-11-24 19:57:43 -08:00
Bram Kragten
2af1ba7492 Updated frontend to 20191119.6 (#28996) 2019-11-24 19:57:42 -08:00
shred86
a56f7f5d75 Fix temp not being reported properly (#28973) 2019-11-24 19:57:42 -08:00
cgtobi
481f71107b Fix manual config (#28956) 2019-11-24 19:57:41 -08:00
Pascal Vizeli
2e85e3662f Fix ikea lights on deconz (#28949)
* Fix ikea lights on deconz

* check for None

* Use cleaner code style
2019-11-24 19:57:40 -08:00
jjlawren
c382406735 Fix Plex setup race condition v2 (#28943)
* Connect websocket when platforms ready, not when HA is ready

* Use callbacks from platform setup tasks instead

* Convert setup to async

* Apply suggestions from code review

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
2019-11-24 19:57:40 -08:00
Franck Nijhof
48c289fad3 Alexa gracefully handle climate devices without presets (#29010) 2019-11-24 19:57:18 -08:00
Michaël Arnauts
647595fd67 Move imports to the top for Tado. (#29016) 2019-11-24 22:47:31 +01:00
springstan
1495df374b Made spotify playlist name validation less strict (#28684) 2019-11-24 20:53:26 +01:00
springstan
ce8e0e5489 Move imports to top for volkszaehler (#29025) 2019-11-24 20:31:15 +01:00
Franck Nijhof
94f8e634b2 Ensure wheel package is present when running Pylint (#29012) 2019-11-24 14:35:30 +01:00
HomeAssistant Azure
7c6b38d308 [ci skip] Translation update 2019-11-24 00:32:21 +00:00
Fabian Affolter
bbca6e3ac2 Upgrade shodan to 1.20.0 (#28983)
* Upgrade shodan to 1.20.0

* Upgrade mutagen to 1.43.0
2019-11-23 23:12:02 +01:00
Fabian Affolter
98eae305e2 Upgrade zeroconf to 0.24.0 (#28986) 2019-11-23 23:11:01 +01:00
Bram Kragten
6ad74fba30 Updated frontend to 20191119.6 (#28996) 2019-11-23 13:12:56 -08:00
Andrey Kupreychik
9fd8ffdc44 Bumped keenetic NDMS2 client version to 0.0.11 (#28990) 2019-11-23 21:22:50 +01:00
Fabian Affolter
2a8e99d799 Upgrade mutagen to 1.43.0 (#28984) 2019-11-23 18:01:27 +01:00
Jesse Hills
ebd38395fb Update pyjuicenet dependency (#28958)
Closes #28926
2019-11-23 16:46:48 +01:00
Fabian Affolter
f1d4a3cd6e Catch Zeroconf exception (#28728)
* Catch Zeroconf exception

* Make it an error
2019-11-23 16:46:06 +01:00
jjlawren
2c00a9ec68 Fix Plex setup race condition v2 (#28943)
* Connect websocket when platforms ready, not when HA is ready

* Use callbacks from platform setup tasks instead

* Convert setup to async

* Apply suggestions from code review

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
2019-11-23 09:16:21 -06:00
majuss
614842bcf2 Bumped pypca to 0.0.7 (#28976) 2019-11-23 14:41:52 +01:00
shred86
0a58853689 Fix temp not being reported properly (#28973) 2019-11-23 12:29:54 +01:00
Josef Schlehofer
b4f477f4de Upgrade youtube_dl to 2019.11.22 (#28964) 2019-11-23 11:13:44 +01:00
Tomasz
23737e0225 Rename rest_command request to response, add exc_info for exceptions (#28521)
* rename request to response, isort and black fixes

* Log exception details

* Add status code to success log, reformat log

* new syntax for response

* changed info to debug
2019-11-23 11:02:52 +01:00
cgtobi
0bd01ba495 Fix manual config (#28956) 2019-11-23 11:00:26 +01:00
Chris Mandich
08432c7c09 Add flume support (#27235)
* Add Flume Sensor

Add support for Flume API and sensor

* Add support for choosing timezone

Timezone is now a required option in configuration.yaml

* Add Flume to coveragerc and CODEOWNERS

Add flume to be ommited from testing. Add @ChrisMandich as Flume Code owner

* Revert "Add Flume to coveragerc and CODEOWNERS"

This reverts commit 0b27437a3b.

* Update manifest.json

Added Documentation URL for Flume to HASS.IO

* Update manifest.json

Added missing Newline at EOF.

* Update sensor.py

Update sensor to not required Device ID for configuration. Now loops through all available Type 2 devices and adds them as an entity.

* Update Manifest, CODEOWNERS, and manifest.json

Resolved errors related to code owners and requirements. Using hassfest and gen_requirements_all

* Update sensor.py

Implemented recommendations from @Quentame. Including time zone from Home Assistant, Updated variable names, and Consolidated duplicate functions.

* Implemented suggested changes from @Quentame

This includes: components name, using f-strings instead of concat, snake_case for variables, constants for the addition of future device types, clearer errors, and removed variables no longer in use.

* Update sensor.py

Restored unit_of_measurement. Updated return to "gal".

* Address pylint errors

* Update sensor.py

Include protected attributes in setup_platform.

* Address Pylint errors

homeassistant/components/flume/sensor.py:63:11: W0703: Catching too general exception Exception (broad-except)
homeassistant/components/flume/sensor.py:133:8: R1720: Unnecessary "else" after "raise" (no-else-raise)
homeassistant/components/flume/sensor.py:162:8: R1705: Unnecessary "else" after "return" (no-else-return)
homeassistant/components/flume/sensor.py:236:8: R1720: Unnecessary "else" after "raise" (no-else-raise)

* Update sensor.py

I'm okay with the broad exception clause.
homeassistant/components/flume/sensor.py:65:11: W0703: Catching too general exception Exception (broad-except)

* Update sensor.py

Add more specific exceptions for Try/Except.

* Update Flume Sensory.py

add requirements, exclude from tests, us pyflume pypi package.

* Update sensor.py to support latest pyflume package

* Update manifest

provide better flow of manifest and easier readibility.

* Update manifest.json

Reccomended by @balloob as it is already a core requirement

* Update sensor.py

Add proposed changes from @balloob

* Update requirements_all.txt

pytz is a core dependency, removing flume's requirement for it.

* Update sensor.py

Added @MartinHjelmare recommended changes.

* Update sensor.py

Resolving PyLint error

* Update sensor.py

Remove `KeyError`. Add length check for flume entity list before adding.

* Update sensor.py

* Update pyflume version

* Update imports with isort

* Add line break between standard library and thirdparty imports.

* Remove throttle from sensor.py
2019-11-23 09:55:46 +01:00
HomeAssistant Azure
b4caa4ab82 [ci skip] Translation update 2019-11-23 00:32:17 +00:00
Jonas
829e0a7c42 Add Proxmox VE integration (#27315)
* Added the Proxmox VE integration

* Fixed code as described in PR #27315

* Fixed small linting error

* Fix code as described in PR #27315 code review

* Improve code as described in PR #27315
2019-11-22 23:03:41 +01:00
Santobert
c35f9ee35f Creating a scene by snapshotting entities (#28939)
* Initial commit

* Add tests

* service.yaml

* typo

* snapshooted -> snapshot

* snapshot_entities instead of snapshot

* Edit validator

* Fix tests

* Remove keys()

* Improve coverage

* Activate scenes

* Use pytest.raise

* snapshot -> snapshotted
2019-11-22 13:21:28 -08:00
akasma74
a977f398ae Fix return values of preset_mode(s) properties (#27751)
It is incorrect to return None as a result of proprety call because in such a case state_attr call will return None as well, which means "Unknown attribute".
Instead for preset_mode(s) PRESET_NONE constant should be used for consistency.
2019-11-22 21:27:40 +01:00
Tobias Perschon
d92f48646a Add round to half template method (#28948)
* added round to half method

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* testcase for new round method

Signed-off-by: Tobias Perschon <tobias@perschon.at>
2019-11-22 10:08:41 -08:00
awkwardDuck
6d77c15f28 fix typo for mediumvioletred (#28941) 2019-11-22 15:33:53 +01:00
Pascal Vizeli
051e37eb49 Fix ikea lights on deconz (#28949)
* Fix ikea lights on deconz

* check for None

* Use cleaner code style
2019-11-22 15:32:05 +01:00
kurniawan77
9a23a1c336 Add device trigger support for Aqara WXKG11LM 2016 switch to Deconz (#28946)
https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Xiaomi-WXKG11LM-2016
2019-11-22 13:54:56 +01:00
HomeAssistant Azure
1968a88336 [ci skip] Translation update 2019-11-22 00:32:10 +00:00
Paulus Schoutsen
37f808f4d8 Merge pull request #28932 from home-assistant/rc
0.102.1
2019-11-21 15:06:27 -08:00
Per Sandström
e3b2a33962 Bump verisure to vsure 1.5.4 and jsonpath 0.82 (#28933) 2019-11-21 22:53:02 +01:00
jjlawren
ab9a60f83f Delay Plex websocket connection to avoid race (#28934) 2019-11-21 12:39:39 -08:00
jjlawren
a62bd97fa5 Delay Plex websocket connection to avoid race (#28934) 2019-11-21 12:39:24 -08:00
Paulus Schoutsen
3391fc660a Bumped version to 0.102.1 2019-11-21 12:25:12 -08:00
Bram Kragten
42809ad6a9 Updated frontend to 20191119.5 (#28925)
* Updated frontend to 20191119.4

* Updated frontend to 20191119.5
2019-11-21 12:25:05 -08:00
cgtobi
dba87fd2e1 Fix missing Netatmo sensors (#28899)
* Update pyatmo to 3.0.1

* Improve sensor name

* Fix missing sensors

* Update pyatmo module

* Update pyatmo to 3.1.0

* Update requirements

* Fix method call
2019-11-21 12:25:04 -08:00
Bram Kragten
c015f94fa2 Updated frontend to 20191119.5 (#28925)
* Updated frontend to 20191119.4

* Updated frontend to 20191119.5
2019-11-21 19:05:26 +01:00
cgtobi
86e581b83d Fix missing Netatmo sensors (#28899)
* Update pyatmo to 3.0.1

* Improve sensor name

* Fix missing sensors

* Update pyatmo module

* Update pyatmo to 3.1.0

* Update requirements

* Fix method call
2019-11-21 17:35:03 +01:00
SNoof85
c7c7a9ad06 Update __init__.py (#28911) 2019-11-20 22:31:39 -08:00
HomeAssistant Azure
0e14c3f92a [ci skip] Translation update 2019-11-21 00:32:11 +00:00
Paulus Schoutsen
df3e17a983 Merge pull request #28909 from home-assistant/rc
0.102.0
2019-11-20 14:04:30 -08:00
Kevin Eifinger
9f181ac92e bump herepy to 0.6.3.3 (#28907)
* bump herepy to 0.6.3.3

* run gen_requirements_all
2019-11-20 22:37:59 +01:00
Paulus Schoutsen
138cee8069 Version bump to 0.102.0 2019-11-20 13:05:54 -08:00
Bram Kragten
787aac7cf2 Fix Almond onboarding url when using cloud (#28908) 2019-11-20 13:05:37 -08:00
Bram Kragten
ae3cf72fb2 Fix Almond onboarding url when using cloud (#28908) 2019-11-20 13:03:01 -08:00
Raman Gupta
1c630738f7 update services.yaml for keyboard component (#28889) 2019-11-20 21:40:00 +01:00
Raman Gupta
288ae8b1e7 Update services.yaml for cloudflare component (#28888)
* update services.yaml for cloudflare component

* Made description more clear
2019-11-20 15:45:11 +01:00
Alexei Chetroi
4ba2bd232c Command arguments for issue_zigbee_cluster_commands. (#28885) 2019-11-20 08:34:06 -05:00
Raman Gupta
b267d54db3 Update services.yaml for Roku component (#28887)
* update services.yaml for roku component

* add new line
2019-11-20 13:14:13 +01:00
Bram Kragten
bca93ca2ec Bumped version to 0.102.0b3 2019-11-20 12:33:39 +01:00
Bram Kragten
98c7ddc0cf Updated frontend to 20191119.2 (#28896) 2019-11-20 12:32:13 +01:00
Bram Kragten
9fb289ad93 Updated frontend to 20191119.1 (#28881) 2019-11-20 12:32:12 +01:00
Bram Kragten
69b096023a Updated frontend to 20191119.0 (#28875) 2019-11-20 12:32:11 +01:00
Santobert
ab41310847 Fix setting colors while reproducing a lights state (#28871)
* Fix setting colors while reproducing state

* Reorder list
2019-11-20 12:32:10 +01:00
Andi
687b7fc8cb Fix Synology camera whitelist (#28822)
* Fix Synology camera whitelist

If whitelist config is set, not camera is added to HA at all.

* Fix Synology Camera whitelist

Fix typo in config key.

* Update camera.py

Access config dict the voluptuous way
2019-11-20 12:32:09 +01:00
Franck Nijhof
89cd5d46cd Fix documentation URL in failed platform config check (#28814)
* Fix documentation URL in failed platform config check

* Replace pop from list by access using negative index

* Use of split instead of rsplit
2019-11-20 12:32:09 +01:00
Bram Kragten
d9f146d076 Updated frontend to 20191119.2 (#28896) 2019-11-20 12:30:32 +01:00
foxy82
9fd6afc5fb Allow connection to rfxtrx using tcp (#28297) 2019-11-19 21:11:17 -05:00
Franck Nijhof
6db4e975e3 Bump pytest to 5.3.0 (#28883) 2019-11-19 20:51:25 -05:00
Abílio Costa
e60ae77f1b Add ZHA service to issue group commands (#28823)
* add service to ZHA to issue group commands
* fix args
2019-11-19 19:49:09 -05:00
HomeAssistant Azure
6b62328c0f [ci skip] Translation update 2019-11-20 00:32:09 +00:00
Santobert
8e7a9521dc Fix setting colors while reproducing a lights state (#28871)
* Fix setting colors while reproducing state

* Reorder list
2019-11-19 16:16:59 -06:00
Bram Kragten
b92b6c40b7 Updated frontend to 20191119.1 (#28881) 2019-11-19 16:16:43 -06:00
Michael Hansen
c2161b1f5a Add HTTP view to conversation to handle intents via JSON POST (#28818) 2019-11-19 13:47:03 -06:00
Rohan Kapoor
cd8c281cb6 Add @rohankapoorcom to CODEOWNERS for speedtestdotnet and fastdotcom (#28879) 2019-11-19 13:43:21 -06:00
Paulus Schoutsen
94675ca5a7 Mark entity abc (#28869)
* Mark entity abc

* Use abstractmethod in climate

* Lint
2019-11-19 13:42:09 -06:00
Franck Nijhof
21157f9dac Downgrade duplicate YAML key log to warning (#28851) 2019-11-19 13:09:23 -06:00
Franck Nijhof
9324845aaa Move imports to top for serial_pm (#28861) 2019-11-19 13:07:29 -06:00
Franck Nijhof
9002955787 Move import to top for aftership (#28860) 2019-11-19 13:07:17 -06:00
Franck Nijhof
2d4b038b48 Move import to top for alarmdecoder (#28862) 2019-11-19 13:06:56 -06:00
Marius
5203c72fca Add state dependent icons to moon sensor (#28743)
* have sensor.moon use state dependent icons

Material design icons have icons for all sensor.states, let's use these natively in the component.
Based on the Season icons, tried to change accordingly.

* Update sensor.py

added state constants

* Update sensor.py

fixed missing mdi:

* order of constants. moon icons and use self.state

change order of constants to alphabetical, changed order in Moon_icons to alphabetical, used self.state for icon lookup

* replace the strings

 replace the strings for self.state with the constants

* removed quotes

* removed spaces, empty line

* local Black

* Sort imports and move import to file header


Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2019-11-19 19:10:15 +01:00
Franck Nijhof
5fcfdee6b5 Fix documentation URL in failed platform config check (#28814)
* Fix documentation URL in failed platform config check

* Replace pop from list by access using negative index

* Use of split instead of rsplit
2019-11-19 18:33:09 +01:00
springstan
e915dd0d95 Pulseaudio: Changed default port from 4712 to 4713 (#28857) 2019-11-19 16:28:12 +01:00
ktnrg45
b83f92e4a5 Bump pyps4-2ndscreen to 1.0.3 (#28874) 2019-11-19 15:21:46 +01:00
Pascal Vizeli
a4ed1d69b8 Add init for run inside devcontainer 2019-11-19 13:53:12 +00:00
Bram Kragten
1f4296f688 Updated frontend to 20191119.0 (#28875) 2019-11-19 14:48:51 +01:00
Steven Impens
475c8ebae2 Add component VersaSense (#24619)
* Add component VersaSense

* Updates based on review

* Changes based on review

* Fixed whitespace

* Fixed lines too long

* Fixed lines too long

* Formatted using black

* Added available property

* Set unavailable property appropriately

* Conversion to f-strings

* Load platform only once per platform

* Fixed duplicate identifiers across multiple devices

* Single call to async_add_entities during setup

* Removed unnecessary async/await syntax

* Added constants for key-value pairs

* Removed async/await syntax

* Added breaks in measurement check

* Added guard clause for discovery_info
2019-11-19 14:05:23 +01:00
Malte Franken
4e9e9efa43 GeoNet NZ Volcanic Alert Level sensor (#26901)
* first version of new integration

* moved icon to shared consts

* added unit tests

* transformed from geolocation to sensor integration

* alert level is now the state of the sensor

* adopted unit tests

* fixed comment

* keep all sensors registered even if the feed update fails intermittently

* bumped version of upstream library

* bumped version of integration library

* regenerated requirements

* bumped version of integration library

* bumped version of integration library

* fixed generated file

* removed commented out code

* regenerated config flow file

* update to latest integration library version

* simplified code

* removed debug log statement

* simplified code structure

* defined constant

* use core interfaces

* moved test and fixture

* sorted imports

* simplified patching

* moved fixture to central config file
2019-11-19 14:00:59 +01:00
HomeAssistant Azure
8439e597ce [ci skip] Translation update 2019-11-19 00:32:19 +00:00
Andi
61bb24c423 Fix Synology camera whitelist (#28822)
* Fix Synology camera whitelist

If whitelist config is set, not camera is added to HA at all.

* Fix Synology Camera whitelist

Fix typo in config key.

* Update camera.py

Access config dict the voluptuous way
2019-11-18 17:03:10 +01:00
Evgeny
1a46294e6d Update roomba integration (#28560)
* Updated iRobot integration

* added custom delay for periodic mode

* new version of roombapy
2019-11-18 16:59:07 +01:00
Quentame
eb23846cfe Move imports in owntracks component (#27780)
* Move imports in owntracks component

* Fix nacl import

* Fix nacl import 2

* Fix nacl import 3

* Add helper.supports_encryption tests

* Fix tests helper 1

* Fix tests 2

* Add not_supports_encryption + get_cipher_error tests

* Code cov

* Fix nacl_not_imported test
2019-11-18 16:47:30 +01:00
Bram Kragten
7966411274 Bump version 2019-11-18 15:44:17 +01:00
Bram Kragten
bf4c81aa5e Updated frontend to 20191118.0 (#28852) 2019-11-18 15:43:20 +01:00
cgtobi
d91eddc4f0 Update pyatmo to 3.0.1 (#28829) 2019-11-18 15:43:19 +01:00
Jackie Yang
fb1fd19aae Fix miio air quality sensor (#28828)
Fix https://github.com/home-assistant/home-assistant/issues/28827
2019-11-18 15:43:18 +01:00
Michaël Arnauts
c6343c9e88 Fix Comfoconnect errors during startup (#28802)
* Add callback registrations to async_added_to_hass

* Fix CODEOWNERS

* Fix code formatting

* Requested changes.

* Don't pass unused hass and fix string formatting

* Fix import order.
2019-11-18 15:43:17 +01:00
Bram Kragten
b964fcc5b1 Updated frontend to 20191115.0 (#28797) 2019-11-18 15:43:17 +01:00
Peter Nijssen
31cbdbf1dd Fix broken postnl sensor (#28794)
* fix broken postnl sensor

* make sure shipment list is not growing indefinitely
2019-11-18 15:43:16 +01:00
LeoCal
f8be1512b8 Fix Swisscom empty response received (#28782) 2019-11-18 15:43:15 +01:00
SukramJ
5ff24ecf77 Fix HomematicIP Cloud Alarm Control Panel support for basic mode (#28778) 2019-11-18 15:43:14 +01:00
Morten Trab
fe5f30ba78 Fix Repetier integration entity indexing (#28766)
* Fixed multi extruder/beds/chambers index issue, #28130

* Switched from .format to f style name formatting

* Fixed incorrect indexing

* Removed VS files

* Removed not need temp_id subtraction

* Removed VS files

* Fixed access mode

* Fixed access mode

* Fixing access mode - again
2019-11-18 15:43:13 +01:00
Tyler Page
5f0f5ca557 Fix changing venstar operation_mode (#28754) 2019-11-18 15:43:12 +01:00
fredericvl
1479e7353b Change unique id for SAJ sensor based on device SN (#28663)
* Change unique id for SAJ sensor based on device SN

* Add SAJ device name + sn to state attributes

* Revert device state attributes (after review)
2019-11-18 15:43:12 +01:00
Brendon Baumgartner
326c25a766 Fix amazon dependency conflicts (#28217)
* fix amazon dependency conflicts

* bump boto3 for route53
2019-11-18 15:43:11 +01:00
Bram Kragten
f6b48dec94 Updated frontend to 20191118.0 (#28852) 2019-11-18 15:40:26 +01:00
Kevin McCormack
a4ae9a94ee Update Vivotek camera integration (#28841)
- Add optional security_level config
- Bump libpyvivotek to 0.3.1
2019-11-18 10:01:36 +01:00
Paul Romkes
5731f528d2 Make intents end Snips session without speech (#28820)
* intents should also end session without speech

* Move endSession message to try block

* Minor improvement on endSession response
2019-11-18 09:13:22 +01:00
cgtobi
90c7d0e56a Update pyatmo to 3.0.1 (#28829) 2019-11-18 09:10:59 +01:00
Ville Skyttä
d4c80f160c Add bandit, use to catch known vulnerable XML parsing (#28341)
* Add bandit to pre-commit and CI, use to catch known vulnerable XML parsing

* Use defusedxml instead of direct xml.etree to parse XML

* Move config to tests/bandit.yaml
2019-11-18 09:10:15 +01:00
HomeAssistant Azure
aef808d2bf [ci skip] Translation update 2019-11-18 00:32:22 +00:00
Michaël Arnauts
3d5b007c6b Implement more Comfoconnect sensors (#28817)
* Rework Comfoconnect sensor platform

* Sort ATTRS and fix icon

* Add unique_id to fan

* Use a different signal per sensor type

* Add more logging

* Swap to be sure.

* Remove -fan suffix from unique_id
2019-11-18 00:39:49 +01:00
Guillermo Ruffino
0c48b8ec52 Esphome climate features (#28786)
* add esphome climate fan

* adds back compatibility support

* fixes, add swing mode

* revert client config

* sort import

* rebase
2019-11-17 23:14:19 +01:00
Fabian Affolter
101ab5c3fa Align naming (#28830)
* Align naming

* Update tests
2019-11-17 15:53:34 +01:00
Jay Newstrom
cb63a9d7e1 Add broadcast address for WOL and samsungtv (#28819)
* Add broadcast address for WOL and samsungtv

* Fix style

* Fix tests, and add new test for new functionality

* Fix code style
2019-11-17 13:17:22 +01:00
Jordan Speicher
f25a3cbfcf Add broadcast_address for wake-on-lan (#28793) 2019-11-17 12:52:33 +01:00
Jeff Irion
c7f684d3f4 Bump androidtv to 0.0.34 (#28816)
* Bump androidtv to 0.0.33; add pure-python-adb requirement

* python -m script.gen_requirements_all

* Avoid redundant 'available' check

* Bump androidtv to 0.0.34

* Update docstrings for the decorator functions
2019-11-17 12:47:14 +01:00
Jackie Yang
0a9ac7e655 Fix miio air quality sensor (#28828)
Fix https://github.com/home-assistant/home-assistant/issues/28827
2019-11-17 12:18:53 +01:00
HomeAssistant Azure
d1241147c8 [ci skip] Translation update 2019-11-17 00:32:32 +00:00
Michaël Arnauts
d6e99db38e Fix Comfoconnect errors during startup (#28802)
* Add callback registrations to async_added_to_hass

* Fix CODEOWNERS

* Fix code formatting

* Requested changes.

* Don't pass unused hass and fix string formatting

* Fix import order.
2019-11-16 15:05:17 +01:00
Santobert
0996b717ce Improve coverage of input_datetime/reproduce_state (#28272)
* Improve coverage of input_datetime/reproduce_state

* Improve tests
2019-11-16 13:27:54 +01:00
Fabian Affolter
fbe3d8dade Upgrade shodan to 1.19.1 (#28809) 2019-11-16 11:58:15 +01:00
Fabian Affolter
2779d4f66e Upgrade alpha_vantage to 2.1.2 (#28810) 2019-11-16 11:58:04 +01:00
michaeldavie
d736c5f648 Truncate sensor state values (#28788) 2019-11-16 10:56:54 +01:00
Peter Nijssen
87b13ee732 Fix broken postnl sensor (#28794)
* fix broken postnl sensor

* make sure shipment list is not growing indefinitely
2019-11-16 10:37:58 +01:00
bouni
afbd966ba6 Move imports in braviatv component (#27855)
* Move imports in braviatv component

* import braviarc directly

* fixed import

* directly import BraviaRC
2019-11-16 10:25:25 +01:00
Tommy Larsson
8a28d5fbee Add ombi password authentication option (#28742)
* Add password authentication option

* Add vol.Exclusive for auth config params
2019-11-16 10:23:05 +01:00
Ville Skyttä
d88ca0f5cb Lint exclusions (#28655)
* Remove malformed pylint disable markers

* Remove some unused imports

* Remove some unneeded lint exclusions

* Remove more unneeded lint exclusions

* Add specific codes to all noqa's
2019-11-16 10:22:07 +01:00
Ville Skyttä
2aee366a1f Upgrade pylint, tweak config (#28798)
* Upgrade pylint to 2.4.4 and astroid to 2.3.3

https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-4
https://github.com/PyCQA/astroid/blob/astroid-2.3.3/ChangeLog

* Disable pylint score and persistence

We don't use scoring, and it can be supposedly incorrect (so worse
than ignorable) when using more than one parallel job.
2019-11-16 09:59:26 +01:00
John Mihalic
16f8ae1535 Bump pyHik library to 0.2.5 for id, tamper fixes (#28807) 2019-11-16 09:57:04 +01:00
Fabian Affolter
d8ca2e9d71 Upgrade sqlalchemy to 1.3.11 (#28721) 2019-11-16 09:56:26 +01:00
Morten Trab
cd335bd434 Fix Repetier integration entity indexing (#28766)
* Fixed multi extruder/beds/chambers index issue, #28130

* Switched from .format to f style name formatting

* Fixed incorrect indexing

* Removed VS files

* Removed not need temp_id subtraction

* Removed VS files

* Fixed access mode

* Fixed access mode

* Fixing access mode - again
2019-11-16 09:45:43 +01:00
Bram Kragten
5e20817ea4 Updated frontend to 20191115.0 (#28797) 2019-11-16 07:22:06 +01:00
HomeAssistant Azure
adb3997547 [ci skip] Translation update 2019-11-16 00:32:13 +00:00
Davide Varricchio
d796053d9f Add support for Hisense AEH-W4A1 wifi module (AC remote control) (#28641)
* First commit

* First working release, but there's a lot to do

* Added support for preset_modes

* Refined logic

* Added translations for config_flow

* Updated translations

* modified:   homeassistant/components/hisense_aehw4a1/climate.py

* modified:   climate.py

* Updated library to latest version

* Small changes

* Null states when AC off

* Minor fixes

* Latest updates for TOX

* First commit

* First working release, but there's a lot to do

* new file:   requirements_test_all.txt

* Added support for preset_modes

* Refined logic

* Added translations for config_flow

* Updated translations

* modified:   homeassistant/components/hisense_aehw4a1/climate.py

* modified:   climate.py

* Updated library to latest version

* Small changes

* Null states when AC off

* Minor fixes

* Latest updates for TOX

* new file:   requirements_test_all.txt

* Fighting with tox

* vs Tox round 2

* Isort and updated requirements_test_all.txt

* Fighting with lint

* Implemented available state

* Changed exception type after Travis-ci pylint fails

* Support entry in configuration.yaml

* Removed commented code

* Switched to async

* Minor changes

* Updated library and fixed pylint errors

* Code optimization

* Implemented static ip addresses in configuration.yaml

* Reverted to existing constant

* Corrected pylint wrong-import-order

* Recovery from nuke event (messing all while rebase)

* Resolved Ci error

* Changes for PR

* Corrected temp scale for frontend

* Added test for config entry from configuration.yaml

* Updated dependency

* Check on manual config

* Imported custom exceptions and modified import config

* Optimized

* Change based on PR revision

* Added logging for failure event on manual config

* Tests added but to be corrected

* Edited tests

* Tests updated to ensure no I/O

* Working on tests

* Cheanges based on revision for PR

* Setting librey exception as direct side_effect in test

* Final changes for PR

* Redundand on command solved

* Improved AC logic
2019-11-15 21:22:24 +01:00
Tyler Page
35000848ed Fix changing venstar operation_mode (#28754) 2019-11-15 12:49:56 +01:00
LeoCal
4c690eace8 Fix Swisscom empty response received (#28782) 2019-11-15 10:52:15 +01:00
SukramJ
60e7440ec1 Fix HomematicIP Cloud Alarm Control Panel support for basic mode (#28778) 2019-11-15 09:55:40 +01:00
Paolo Tuninetto
b4ccc0202a Change keys for Samsung TV next and prev track command (#28213) 2019-11-15 09:53:16 +01:00
fredericvl
5e973dd017 Change unique id for SAJ sensor based on device SN (#28663)
* Change unique id for SAJ sensor based on device SN

* Add SAJ device name + sn to state attributes

* Revert device state attributes (after review)
2019-11-15 09:21:46 +01:00
Lado Kumsiashvili
bc14e93ae3 bump home mitemp_bt to 0.0.3. It has an important bugfix for reading … (#28765)
* bump home mitemp_bt to 0.0.3. It has an important bugfix for reading temperatures under 10 grade

* adjust the version number for mitemp_bt up to 0.0.3
2019-11-15 08:56:32 +01:00
Alan Tse
2aad150419 Convert Tesla to Async (#28748)
* build: bump teslajsonpy to 0.2.0

* feat: add async

* perf: convert unnecessary async calls to sync

* fix: force real login

* Revert change to HVAC_MODE_HEAT

* Remove charging rate sensor

* Remove tests

* Remove tests

* Address requested changes

* Add missing sensors

* Move update to async_setup_scanner

* Align wtih prior update behavior
2019-11-15 05:15:58 +01:00
cgtobi
806b96ef73 Bump pytest to 5.2.3 (#28785) 2019-11-15 05:14:46 +01:00
HomeAssistant Azure
f170ac48d2 [ci skip] Translation update 2019-11-15 00:32:15 +00:00
Brendon Baumgartner
0467ddb60c Fix amazon dependency conflicts (#28217)
* fix amazon dependency conflicts

* bump boto3 for route53
2019-11-14 21:07:43 +01:00
Bram Kragten
b2870b6833 DECONZ - Add device trigger support for aqara 86sw2 switches to Deconz (#28767)
* Add device trigger support for aqara 86sw2 switched to Deconz

* Update device_trigger.py

* Update naming
2019-11-14 19:15:08 +01:00
Paulus Schoutsen
f5a9bcdf6d Bumped version to 0.102.0b1 2019-11-14 14:36:30 +01:00
Paulus Schoutsen
af2443fb10 Fix account link version check (#28770) 2019-11-14 14:34:53 +01:00
Bram Kragten
520e4296ba Updated frontend to 20191114.0 (#28768) 2019-11-14 14:34:53 +01:00
David F. Mulcahey
4f089aba35 Bump ZHA quirks to 0.0.28 (#28750) 2019-11-14 14:34:52 +01:00
Paulus Schoutsen
2cf86a3554 Fix account link version check (#28770) 2019-11-14 14:34:13 +01:00
springstan
ea0bae2d1b Added plus sign to safe characters in urllib.parse.quote method (#28763) 2019-11-14 14:13:16 +01:00
Bram Kragten
962c47b666 Updated frontend to 20191114.0 (#28768) 2019-11-14 14:12:46 +01:00
Fabian Affolter
c6d6bbf3e0 Upgrade ephem to 3.7.7.0 (#28715) 2019-11-14 12:01:53 +01:00
HomeAssistant Azure
08d662c0a5 [ci skip] Translation update 2019-11-14 00:32:16 +00:00
Aaron Bach
3f2c344e4f Add small speed improvement when unloading RainMachine (#28759) 2019-11-13 14:27:42 -07:00
Aaron Bach
fae8cd48c4 Add small speed improvement when unloading OpenUV (#28758) 2019-11-13 14:27:15 -07:00
Aaron Bach
31131e4ac6 Add small speed improvement when unloading Notion (#28757) 2019-11-13 14:26:52 -07:00
Aaron Bach
c27b94c0e5 Add small speed improvement when unloading Ambient PWS (#28756) 2019-11-13 14:25:49 -07:00
Aaron Bach
8789da36be Add support for SimpliSafe locks (#28672)
* Start

* Lock init

* More stubbing

* Final pieces for PR

* Fixed incorrect property access

* Updaed .coveragerc

* Ensure we can handle unknown states

* Account for lock's offline property

* Account for device online

* Unload components concurrently

* Handle unknown states more gracefully
2019-11-13 20:48:08 +01:00
Bram Kragten
15e6278a2e Add config entry and device support to Demo (#28702)
* Add config entry and device support to Demo

* Some more devices

* Fix tests using demo

* Review comments

* Update config_flow.py

* Revert

* Disable pylint
2019-11-13 16:37:31 +01:00
mvn23
15ce738357 Bump pyotgw to 0.5b1 (#28751) 2019-11-13 09:32:22 -05:00
David F. Mulcahey
376e3def1d Bump ZHA quirks to 0.0.28 (#28750) 2019-11-13 09:25:45 -05:00
Thomas Germain
ec45e72bea Add verisure ethernet status (#28656) 2019-11-13 14:12:36 +01:00
Paulus Schoutsen
349e7b8cd1 Bumped version to 0.102.0b0 2019-11-13 13:55:02 +01:00
Paulus Schoutsen
8f390d099a Merge remote-tracking branch 'origin/master' into dev 2019-11-13 13:54:31 +01:00
Thomas
fe942c40a0 Correct openalpr_local config option name (#28746)
Previously was "alp_bin" now "alpr_bin" like it is outlined in the documentation (https://www.home-assistant.io/integrations/openalpr_local/)
2019-11-13 12:11:09 +01:00
Ville Skyttä
a48d426f18 Travis and tox config improvements (#28667)
* Use travis_wait only with pylint

pylint is the only job that is expected to be silent for extended time.
For others such a silence is a sign of a problem and using travis_wait
just lengthens the wait, and makes things harder to follow and debug,
because it also suppresses output in the web UI.

* Use pytest-xdist in tox

Similarly as in Azure.
2019-11-13 08:50:35 +01:00
Fabian Affolter
b4cec23add Upgrade psutil to 5.6.5 (#28717) 2019-11-13 08:43:14 +01:00
Dave T
4bcc669d19 Add device classes to weather sensors. (#28512) 2019-11-13 08:42:46 +01:00
Steven Looman
d7f45a47f5 Upgrade async_upnp_client==0.14.12 (#28733) 2019-11-13 07:43:38 +01:00
Fredrik Erlandsson
70e8c58254 version bump pypoint (#28737) 2019-11-13 07:42:12 +01:00
HomeAssistant Azure
d2d9f09f13 [ci skip] Translation update 2019-11-13 00:32:12 +00:00
Paulus Schoutsen
5961215e6e Set up Almond Web to connect to HA (#28603)
* Set up Almond Web to connect to HA

* Add missing string

* Add type
2019-11-12 11:01:19 -08:00
Otto Winter
a1f2b6d402 ESPHome fix missing state in certain circumstances (#28729)
* Fix ESPHome having missing state in certain situations

Fixes https://github.com/esphome/issues/issues/828

* Update requirements_all

* Also fix climate preset mode
2019-11-12 09:26:46 -08:00
Paulus Schoutsen
fc04b3e31c Remove choice word when Almond has choices (#28725) 2019-11-12 09:22:28 -08:00
jjlawren
5f177fa42e Use library method for season number (#28708) 2019-11-12 10:05:30 -06:00
Kevin Eifinger
48fd95c7db Fix Here Travel Time unable to find entity on startup (#27237)
* add support for entity_id as state of entity

* add circular reference detection

* voluptuous instead of regex

* wait for EVENT_HOMEASSISTANT_START

* move delayed_sensor_update to async_added_to_hass

* add @callback decorator

* remove nested entity resolving
2019-11-12 15:04:17 +01:00
Fabian Affolter
1208ab4c76 Upgrade discogs_client to 2.2.2 (#28723) 2019-11-12 12:28:34 +01:00
SukramJ
e8348221d4 Allow preset boost for Homematic IP Cloud power switches (#28713)
* Allow preset boost for Homematic IP Cloud  power switches

* Sort Imports

* Add test

* align test data
2019-11-12 11:32:32 +01:00
Federico Leoni
4f11eec1a1 Update binary_sensor.py (#28707)
* Update binary_sensor.py

* Fix style issues
2019-11-12 09:53:08 +01:00
jjlawren
87606bc12b Bump plexapi to 3.3.0 (#28709)
* Bump plexapi to 3.2.0

* Bump to 3.3.0
2019-11-11 19:30:07 -08:00
Aaron Bach
a89b4011ee Ensure SimpliSafe alarm control panels can return from being offline (#28710) 2019-11-11 18:55:31 -07:00
Alexei Chetroi
cfa689c3a6 Bump up ZHA dependencies. (#28711) 2019-11-11 20:53:23 -05:00
HomeAssistant Azure
25b0631264 [ci skip] Translation update 2019-11-12 00:32:11 +00:00
GaryOkie
a9a1c2b91d Update Homekit climate.py to remap current mode (#28625)
* Update Homekit climate.py to remap current mode

This update changes the mapping of Homekit's Current Mode Heating/Cooling State  to show the HASS Hvac_action attribute as "idle" instead of "off" when the returned value is 0.

* Update climate.py

removed imported constant no longer being used  (CURRENT_HVAC_OFF)

* corrected update to climate.py

trying again to remove unused constant.

* Update test_climate.py

* removed "change" comment

The added comment describing the change was not needed and should not be included, as it will already be described via "git annotate"  (per @jc2k)
2019-11-12 00:35:09 +01:00
Quentame
decab3e15b Add config flow tests for OwnTracks (#28644)
* Add config flow tests for OwnTracks

* Fix pylint

* Woops, uncomment test

* Woops again, logs removed

* Review from @MartinHjelmare + fix pylint
2019-11-11 21:30:00 +01:00
jjlawren
cfcacc2827 Bump plexwebsocket to 0.0.5 (#28703) 2019-11-11 19:26:56 +01:00
Bas Nijholt
3ce850234f fix typo in comments (#28694)
The global is called `PARALLEL_UPDATES` not `PARALLEL_UPDATE`.
2019-11-11 13:51:26 +01:00
Bram Kragten
90e723e25e Allow icons to be masked (#28692) 2019-11-11 02:53:57 -08:00
Kevin Lee
7bfde2dd33 Add Lutron hybrid keypad raise/lower buttons (#28674)
* Lutron: Add support for hybrid keypad raise/lower buttons

* Add MasterRaiseLower
2019-11-11 08:07:48 +01:00
Teemu R
b6c7976477 Add xiaomi_miio chuangmi.plug.hmi206 (#28688)
Related: https://github.com/rytilahti/python-miio/issues/574
2019-11-11 07:59:07 +01:00
Jon Gilmore
aea7c1c0ce Add codeowner for lutron integration (#28682)
* add codeowner for lutron integration

* ran hassfest
2019-11-11 01:51:24 +01:00
HomeAssistant Azure
0ac8b297cd [ci skip] Translation update 2019-11-11 00:32:13 +00:00
Rohan Kapoor
65dd7d998b #28645: Bump up zm-py to 0.4.0 (#28681) 2019-11-10 13:51:00 -08:00
Bram Kragten
66a574eca4 Hue: store current sensor entities by bridge (#28679) 2019-11-10 11:37:34 -08:00
jjlawren
206547a5d8 Skip updating idle Plex clients (#28664)
* Skip updating idle clients

* Different operators
2019-11-10 11:35:12 +01:00
Per Sandström
a9536e4ed1 verisure autolock service (#27366) 2019-11-10 08:25:10 +01:00
HomeAssistant Azure
65bf0a30f0 [ci skip] Translation update 2019-11-10 00:32:12 +00:00
jjlawren
ef687a36ff Add Plex debug logging (#28665) 2019-11-09 17:02:56 -06:00
Gerard
25f0b70966 Upgrade bimmer_connected to 0.6.2 (#28651)
* Upgrade bimmer_connected to 0.6.1

* Remove time.sleep from library
2019-11-09 23:43:04 +01:00
Aaron Bach
179a2eb187 Create base entity for SimpliSafe 2019-11-09 23:41:02 +01:00
Franck Nijhof
a39cac765e Add sensor platform to WLED integration (#28632)
* Add sensor platform to WLED integration

* Process review comments
2019-11-09 20:18:41 +01:00
Martin Hjelmare
fc95a3d088 Fix xiaomi vacuum tests (#28658)
* Fix xiaomi exceptions test

* Fix xiaomi_specific_services test

* Fix remaining xiaomi miio vacuum tests

* Clean up
2019-11-09 14:07:01 +01:00
bluestripe
0954f7d3be Add bluesound speaker group attribute (#28142)
* Added bluesound speaker group attribute.

* Changed code to fix failing tests.

* Changed condition checking for empty group list.

* Investigating CI pipeline error

* Changed back to the code that passed CI earlier

* Changed condition on existence of list and sorting of bluesound_group

* Re-introduced guard on group_name None
2019-11-09 08:16:53 +01:00
Shulyaka
58eeea903f Add pcal9535a integration (#26563)
* Support for PCAL9535A chip

Signed-off-by: Denis Shulyaka <Shulyaka@gmail.com>

* Code review changes

* Code review changes

* Fix import order

* Fix import order

* Apply suggestions from code review
2019-11-09 08:14:46 +01:00
shred86
97224df4fd Fix Abode capture_image and trigger_quick_action services (#28546)
* Fix Abode services

* Bump abodepy version

* Updated using dispatcher helper

* Code review fixes

* Removed init method from AbodeQuickActionBinary Sensor
2019-11-09 07:35:45 +01:00
HomeAssistant Azure
45b53c8e82 [ci skip] Translation update 2019-11-09 00:32:20 +00:00
LeoCal
bc53e9d0c8 Fix unhandled exception when Swisscom Internet Box is not responsive (#28618)
* Update device_tracker.py

From time to time, Swisscom Internet Box fails to respond and this causes an exception, which is currently not handled by the code:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/device_tracker/setup.py", line 164, in async_device_tracker_scan
    found_devices = await scanner.async_scan_devices()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/swisscom/device_tracker.py", line 46, in scan_devices
    self._update_info()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/swisscom/device_tracker.py", line 67, in _update_info
    data = self.get_swisscom_data()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/swisscom/device_tracker.py", line 83, in get_swisscom_data
    request = requests.post(url, headers=headers, data=data, timeout=10)
  File "/srv/homeassistant/lib/python3.7/site-packages/requests/api.py", line 116, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/requests/sessions.py", line 686, in send
    r.content
  File "/srv/homeassistant/lib/python3.7/site-packages/requests/models.py", line 828, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "/srv/homeassistant/lib/python3.7/site-packages/requests/models.py", line 757, in generate
    raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.1', port=80): Read timed out.

I've just added a try-except around the post.

* Update device_tracker.py

Addressed blank line issue reported by flake8

* Update device_tracker.py

Fixed alignment to be Black compliant.

* Update device_tracker.py

Fixed one more alignment issue
2019-11-08 11:01:35 -08:00
Ari
504ad6488c Add support for Heat Mode detection for ecobee Heat Pumps (#28273)
* Add support for Heat Mode detection for Heat Pumps - Fixes #26547

Since the ecobee component started to dynamically set the supported HVAC modes based on querying the device a few releases ago, users with Heat Pumps noticed that the Heat mode was no longer offered as an option by HA. Some of us did not actually notice until the summer was over :). This commit fixes that.

For heatpumps, ecobee returns:
'coolStages': 1, 
'heatStages': 0,
'hasHeatPump': True,

Fix tested on HA 100.1 and 100.3

Fixes bug https://github.com/home-assistant/home-assistant/issues/26547

* changed line formatted with black
2019-11-08 19:08:50 +01:00
fredericvl
caedc14b00 Added support for multiple SAJ solar inverters (#28612)
Changes after review
2019-11-08 10:48:28 -07:00
Tomasz
f8d3ea20b6 Move imports in xiaomi_miio (#27773)
* move imports in xiaomi_miio

* reorder imports with isort

* fix pylint error

* Rename imports
2019-11-08 18:32:44 +01:00
David F. Mulcahey
f2c56cff43 Bump ZHA quirks version (#28636) 2019-11-08 09:12:50 -08:00
Bram Kragten
d0f1e9fc01 Updated frontend to 20191108.0 (#28638) 2019-11-08 09:12:20 -08:00
Bram Kragten
28c6837f00 Add attribution and onboarding commands to conversation and Almond (#28621)
* Add attribution and onboarding commands to conversation and Almond

* False -> None

* Comments

* Update __init__.py

* Comments + websocket for convert

* Lint
2019-11-08 09:06:23 -08:00
cgtobi
4435b3a5c9 Fix issue with multiple Netatmo home coach devices (#28407)
* Retrieve more detailed module infos

* Switch to using IDs

* Bump pyatmo version to 2.3.3

* Update requirements

* Undo the change of the unique id

* Rename variable
2019-11-08 17:12:41 +01:00
Fredrik Erlandsson
cffadf919a Add turn_on/off to tfiac (#27712)
* Add turn_on/off to tfiac

* fix ws issue
2019-11-08 17:02:44 +01:00
Paulus Schoutsen
bd54ff3c02 Add TT WS API (#28599)
* Add TT WS API

* Add a test

* Correctly convert TT errrors
2019-11-08 10:06:16 +01:00
Franck Nijhof
b2071b81c1 Add switch platform to WLED integration (#28606)
* Add switch platform to WLED integration

* Use async_schedule_update_ha_state in async context

* Process review comments
2019-11-08 09:48:46 +01:00
akasma74
e96b5ef2b0 Fix generic_thermostat too_hot/too_cold (#27860)
* fix for too_hot/too_cold

Closes #27802

* too_hot correction
2019-11-08 09:25:37 +01:00
Ville Skyttä
4f56f4e7e9 Add Huawei LTE device registry support (#28594) 2019-11-08 09:19:59 +01:00
HomeAssistant Azure
64166583b3 [ci skip] Translation update 2019-11-08 00:32:12 +00:00
Jeff Irion
a71d852f16 Use friendly app names for Fire TV sources (#28417)
* Use friendly app names for Fire TV sources

* Remove debugging statement

* Tests pass

* Use 'blocking=True' to patch service calls

* Remove parentheses
2019-11-07 15:04:59 -07:00
Brett T. Warden
1012215709 Match ALARM in NUT UPS status message (#28591)
If ups.status contains "ALARM", add "Alarm" to virtual sensor ups.status.display.

Fixes #28580
2019-11-07 15:03:32 -07:00
jjlawren
2bdfa9928b Allow to skip SSL validation on Plex websocket (#28615) 2019-11-07 21:54:48 +01:00
Paulus Schoutsen
fadb6a3979 Add support for conversation ID (#28620) 2019-11-07 12:21:12 -08:00
Paulus Schoutsen
9b5fa2e67c Add device conditions to climate (#28553)
* Add device conditions to climate

* Update strings.json
2019-11-07 17:03:06 +01:00
SukramJ
9d3d35ad79 Add cool mode to HomematicIP climate (#28525)
* Add cool mode to HomematicIP climate

* Update test

* remove preset_party

* Fix profile_names check
2019-11-07 16:41:33 +01:00
Paulus Schoutsen
899306c8ec Add vacuum device conditions (#28551) 2019-11-07 16:29:39 +01:00
Paulus Schoutsen
a80baf2e5f Add fan device condition (#28549) 2019-11-07 16:29:10 +01:00
Paulus Schoutsen
48660585f1 Add climate device triggers (#28544)
* Add climate device triggers

* Test capabilities
2019-11-07 16:28:45 +01:00
Heine Furubotten
af73e54aee Add azure servicebus notify service (#27566)
* Add azure servicebus notify service

* files added to .coveragerc

* fix: import content type from const

* Moved imports to top level

* Code review fixes
+ added code owner
+ fixed config validation with has at least one
+ seperate attributes for dto to asb
* fixed doc link
* async setup instead of sync

* rename all the things
- removed too many ifs
* changed setup back to sync
+ comment about sync IO in lib

* More informative logging

* logging exception -> error
2019-11-07 14:47:44 +01:00
Pascal Vizeli
abb78a0d13 Fix fan strings 2019-11-07 13:48:23 +01:00
Pascal Vizeli
50f1b6c689 Fix vacuum strings 2019-11-07 13:47:26 +01:00
Paulus Schoutsen
d34caf50f1 Add climate device actions (#28552) 2019-11-07 13:44:59 +01:00
Bram Kragten
76aae0c23e Fix demo TTS (#28608) 2019-11-07 13:43:43 +01:00
Paulus Schoutsen
6999a712ef Add device triggers to vacuum (#28548)
* Add device triggers to vacuum

* Update strings
2019-11-07 13:39:35 +01:00
Tim Gates
c3f07347a1 Fix simple typo: unhasable -> unhashable (#28605) 2019-11-07 12:39:16 +01:00
Paulus Schoutsen
5032c5a04c Add fan device trigger (#28545) 2019-11-07 12:38:58 +01:00
Paulus Schoutsen
78657bfbaf Add lock device triggers (#28547)
* Add lock device triggers

* Lint
2019-11-07 12:26:59 +01:00
Paulus Schoutsen
2c607c836f Add device action to fan (#28550) 2019-11-07 12:26:10 +01:00
Paulus Schoutsen
11cdce3758 Add device actions to vacuum (#28554) 2019-11-07 12:24:58 +01:00
Jonathan Keljo
68fd39e321 Upgrade greeneye_monitor to 1.0.1 (#28600)
This release has a fix for a crash we were seeing occasionally, and a totally
revamped packet handler which should be more robust and CPU-efficient.

Fixes #25887
2019-11-07 10:42:42 +01:00
Malte Franken
b5587348f5 update to latest integration library version (#28597) 2019-11-06 21:37:29 -08:00
HomeAssistant Azure
265c390b65 [ci skip] Translation update 2019-11-07 00:32:16 +00:00
Franck Nijhof
78b83c653a Add WLED integration (#28542)
* Add WLED integration

* Use f-string for uniq id in sensor platform

* Typing improvements

* Removes sensor & light platform

* Remove PARALLEL_UPDATES from integration level

* Correct type in code comment 'themselves'

* Use async_track_time_interval in async context

* Remove stale code

* Remove decorator from Flow handler

* Remove unused __init__ from config flow

* Move show form methods to sync

* Only wrap lines that can raise in try except block

* Remove domain and platform from uniq id

* Wrap light state in bool object in is_on method

* Use async_schedule_update_ha_state in async context

* Return empty dict in device state attributes instead of None

* Remove unneeded setdefault call in setup entry

* Cancel update timer on entry unload

* Restructure config flow code

* Adjust tests for new uniq id

* Correct typo AdGuard Home -> WLED in config flow file comment

* Convert internal package imports to be relative

* Reformat JSON files with Prettier

* Improve tests based on review comments

* Add test for zeroconf when no data is provided

* Cleanup and extended tests
2019-11-06 23:55:39 +01:00
Hans Oischinger
3d2ff841d3 Handle exceptions from PyViCare library (#28536)
* ViCare: Handle exceptions from PyViCare library (#28072)

Sometimes Viessmann server failures or other connection problems may
lead to exceptions thrown when updating data.

This commit handles those exceptions with some error logging and
makes sure that the component does not break completely in that case.

* Remove unneeded returns

* Remove unneeded returns
2019-11-06 22:46:18 +01:00
Ville Skyttä
bb37bc32e3 Always run flake8 through pre-commit, and with doctests (#28490)
* Enable flake8 doctests everywhere

* Always run flake8 through pre-commit
2019-11-06 21:38:00 +02:00
Paulus Schoutsen
d9edd42532 Update to latest Somfy changes (#28207)
* Update to latest Somfy changes

* Update api.py

* Update api.py
2019-11-06 10:55:56 -08:00
Paulus Schoutsen
9a0a889492 Fix token sent to Almond Web (#28584) 2019-11-06 08:32:33 -08:00
ssenart
9ba3abd1b7 Add Netatmo camera services (#27970)
* Netatmo camera : Implement turn_on and turn_off methods.

* Netatmo camera : Implement turn_on and turn_off methods.

* Netatmo camera : Implement turn_on and turn_off methods.

* Netatmo camera : Implement turn_on and turn_off methods.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Add Presence Netatmo Camera services (set_light_auto, set_light_on, set_light_off) to control its internal flood light status.

* Add Presence Netatmo Camera services (set_light_auto, set_light_on, set_light_off) to control its internal flood light status.

* Netatmo camera : Use new style string formatting.

* Make the file compliant with flake8 linter.

* Make the file compliant with flake8 linter.

* Make it compliant with black formatter.

* Make it compliant with black formatter.

* Bug fix : Flood light control was not working with VPN url.
2019-11-06 07:52:59 -05:00
Kevin Köck
b7153ca207 Add mqtt temp_low/high_template in SCHEMA_BASE (#28257)
* fix missing temp_low/high_template in SCHEMA_BASE

* temperature_high/low_state_template test

* Update test_climate.py

* paste error

* Update test_climate.py

* Update test_climate.py

* Update test_climate.py

* Update test_climate.py
2019-11-06 07:50:54 -05:00
temeteke
2e1d05560f Reset states when connection to MPC-HC is lost (#27541)
* Reset states when connection to MPC-HC is lost

* Add the available property of mpchc
2019-11-06 07:47:34 -05:00
Josef Schlehofer
ac4d8ee07f Upgrade youtube_dl to 2019.11.05 (#28578) 2019-11-06 09:51:20 +01:00
Zach
e99bb8f75e Fix Doods error when detection labels are specified in list form (#28574) 2019-11-06 08:45:16 +01:00
Jeff Irion
438ee99175 Bump adb-shell to 0.0.8 (#28582)
* Bump 'adb-shell' to 0.0.8

* Update requirements_test_all.txt

* Update manifest.json
2019-11-06 08:02:07 +01:00
Grodesh
f8712b4d7f Update nextbus stop tag to accept strings (#27765) 2019-11-06 07:24:11 +01:00
Paulus Schoutsen
a63e976496 Fix invalid JSON in deconz strings.json 2019-11-05 20:33:37 -08:00
HomeAssistant Azure
8ab04d5fc7 [ci skip] Translation update 2019-11-06 00:31:46 +00:00
Aaron Bach
e69cd271dd Bump pytile and re-order imports (#28570) 2019-11-05 22:40:12 +01:00
Pascal Vizeli
005a1b2713 Add additional support over NC (#28527)
* Add voice support over NC

* Add disocery support for TTS / STT

* fix cloud TTS discovery

* Fix dev config

* Fix discovery

* Bump hass-nabucasa 0.25

* Add channel support

* Fix lint

* Update homeassistant/components/cloud/__init__.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>

* Update homeassistant/components/cloud/tts.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>

* Update homeassistant/components/cloud/tts.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>

* Update homeassistant/components/cloud/tts.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>

* bump hass-nabucasa

* Update tts.py

* fix lint
2019-11-05 22:39:15 +01:00
Pascal Vizeli
925e26b061 Update azure-pipelines-ci.yml 2019-11-05 21:58:35 +01:00
Pascal Vizeli
10247f6799 Fix dev dockerfile 2019-11-05 21:38:30 +01:00
Pascal Vizeli
1e398a8966 Try fix tests (#28470) 2019-11-05 21:12:29 +01:00
Paulus Schoutsen
a48ac4d18f Merge pull request #28568 from home-assistant/rc
0.101.3
2019-11-05 10:57:08 -08:00
Paulus Schoutsen
a0443b0238 Fix flaky test 2019-11-05 09:46:36 -08:00
Paulus Schoutsen
b2a5c75fbd Bumped version to 0.101.3 2019-11-05 09:09:00 -08:00
Santobert
2814a24f9e Add deprecated attributes to light.reproduce_state (#28557)
* Add deprecated attributes to light.reproduce_state

* Add blank line

* fix minor bug

* Typo
2019-11-05 09:08:06 -08:00
Maciej Bieniek
f5306f769c Fix Airly if more than one config entry (#28498) 2019-11-05 09:08:05 -08:00
Tim McCormick
1618c5c040 Fix missing import (#28460) 2019-11-05 09:08:04 -08:00
Santobert
7b86f0f926 Add deprecated attributes to light.reproduce_state (#28557)
* Add deprecated attributes to light.reproduce_state

* Add blank line

* fix minor bug

* Typo
2019-11-05 06:43:50 -08:00
Quentame
136f1f7fe9 Move imports in samsungtv component (#27775)
* Move imports in samsungtv component

* Fix tests

* Fix review 1

* Fix review 2

* wakeonlan is a module
2019-11-05 15:04:19 +01:00
Jesse Hills
a43095b2b5 Add override switch for juicenet (#28049)
* Add override switch for juicenet

* Update generated files

* Update indentation

* Fix indentation

* Remove unnecessary else statement

* Update homeassistant/components/juicenet/switch.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/juicenet/switch.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Remove state property

* Change string formatting

* Bump juicenet package version again
2019-11-05 14:24:20 +01:00
Zach
11efb2c2eb Avoid drawing image_processing font text inside the bow line (#27796)
* Adjust font text such that it won't be drawn inside the bow line in image_processing.draw_box

* Adjust font_height after actually counting the pixels

* Thinned out line_width and adjusted font size
2019-11-05 11:43:36 +01:00
Ville Skyttä
804b6bbc0e Reduce test requirements duplication, sync flake8 and related (#28538)
* Generate pre-commit test dependencies instead of duplicating

* Upgrade/sync to flake8 3.7.9, flake8-docstrings 1.5.0, and pydocstyle 4.0.1

https://flake8.readthedocs.io/en/latest/release-notes/3.7.9.html
https://gitlab.com/pycqa/flake8-docstrings/blob/1.4.0/HISTORY.rst
https://gitlab.com/pycqa/flake8-docstrings/blob/1.5.0/HISTORY.rst
http://www.pydocstyle.org/en/4.0.1/release_notes.html

* Include requirements_test.txt from *_all.txt instead of copying
2019-11-04 21:21:52 -08:00
Santobert
ef20f0985a Improve scene.create service (#28533)
* Improve scene.create service

* Typo

* Improve coverage

* Add from_yaml attribute

* from_service instead of from_yaml
2019-11-04 21:15:58 -08:00
Bouwe Westerdijk
fb0e20543e Update Plugwise (#28237)
* Plugwise update

* Fix DEFAULT_NAME

* Fix pylint errors

* Remove showing of DHW-status

* Remove `if not None` where possible

* Forgot to remove dhw-related code

* Updated w.r.t. comments from MartinHjelmare

* Remove the illuminance attribute - move to sensor

* Update homeassistant/components/plugwise/climate.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Breaking lines

* Remove thermostat_temperature

* Try fix lint errors.

* Remove spaces

* Remove more spaces
2019-11-05 02:58:17 +01:00
HomeAssistant Azure
ade60742d4 [ci skip] Translation update 2019-11-05 00:31:48 +00:00
Paulus Schoutsen
16a80beb43 Fix scaffold 2019-11-04 14:14:57 -08:00
Paulus Schoutsen
83a9f4ddb8 rate is a separate word (#28535) 2019-11-04 14:01:10 -08:00
Marius Flage
f5fb9fc580 Checking state before actually sending a new state change. Some projectors return ERR if you try to turn off a projector that's already off. (#28529) 2019-11-04 21:54:36 +01:00
Thom Troy
6e58a0c996 Update ephember library version (#28507)
* update ephember library version

* update requirements_all.txt for new pyephember version

* update imports to top of module
2019-11-04 21:49:53 +01:00
shred86
fe749fc0f8 Fix sensor device in the Abode component (#28516)
* Fix for occupancy sensor unique_id

* Add check for sensor attributes before adding entity

* Fixes temperature key issue

* Clean up code with better use of keys

* Code clean up
2019-11-04 21:49:11 +01:00
Bram Kragten
e419689229 Add config endpoint for scene (#28429)
* Add config endpoint for scene

* Add scenes to default config

* Fix test and add context to websocket service call

* Update scene.py

* Add tests
2019-11-04 12:38:18 -08:00
kennedyshead
bbe0cf3a0c Bump version for asuswrt to 1.1.22 (#28322)
* Bumping version

* Fix requirements

* Fix requirements
2019-11-04 20:52:55 +01:00
Martin
06c26f3ffc Add heating_type for ViCare integration (#27296)
* Add heating_type for ViCare

* Add additional gas heating properties

* Update requirements_all

* Add hvac action

* Remove measurements

* Remove unused property
2019-11-04 20:12:43 +01:00
chriscla
aaad8eac0a Fire an event when nzbget download completes (#27763)
* Fire an event when download completes

* Rename event and use a set

* Use a set comprehension

* Renaming method
2019-11-04 19:39:03 +01:00
Ville Skyttä
6a7b5657ac Support Huawei LTE SSDP discovery (#28214)
* Support Huawei LTE SSDP discovery

* Avoid KeyError on simultaneous user initiated flow

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Format code

* Add already configured check

* Initialize context in test flows

* Move deviceType match to manifest

* Update generated.ssdp

* Add SSDP config flow test case

* Remove stale debug print from tests
2019-11-04 19:56:49 +02:00
Charles Garwood
f3ea44cd92 Cleanup Device Registry on Z-Wave Node Removal (#28240)
* Remove device from device registry on node removal

* Make async_get_registry from entity registry more concise

* Lower log level to debug
2019-11-04 10:17:32 -05:00
Jess
5b85456759 Add switches (on/off zones) to geniushub (#28182)
* New switch platform for geniushub
* Update to new geniushub-client with support for on/off zones
2019-11-04 13:32:33 +00:00
Pascal Vizeli
99c0559a0c Speech to Text component (#28434)
* Initial commit for STT

* Fix code review
2019-11-04 13:10:42 +01:00
SukramJ
33c8cba30d Enable transition time for HmIP-BSL - HomematicIP Cloud (#28201)
* Enable transition time for HmIP-BSL - HomematicIP Cloud

harden ACP
fix hao device name

* update test, initalize instance var
2019-11-04 12:22:28 +01:00
SukramJ
b7296c61bc Align attribute naming between light and switch for HomematicIP Cloud (#28271) 2019-11-04 12:05:39 +01:00
Paulus Schoutsen
552fbda58b Remove legacy reproduce state (#28458)
* Remove legacy reproduce state

* Fix imports
2019-11-04 11:12:04 +01:00
Luca Zimmermann
9b72a55d60 Add compatibility for other STBY Codes (#28478)
Added PWR2 as valid standby code
2019-11-04 11:11:10 +01:00
Oscar Tin Lai
6004ef3279 Expose set auto mode for all Dyson fans (#28488)
Set auto mode should be exposed to all dyson fans (e.g. *Pure Cool Link* and *Pure Hot+Cool Link*) instead of only *Pure Cool*, as it is support in all of the models (i.e. similar to the set night mode).
2019-11-04 11:10:59 +01:00
Jonas Janz
fadb9bdfb3 Add information to IFTTT services.yaml (#28385)
* docs(ifttt): add information to services.yaml

* docs(ifttt): start examples lowercase

* docs(ifttt): start examples with capital letter

* docs(ifttt): end description on period
2019-11-04 10:58:39 +01:00
Tobias Efinger
40b676c06f Add services description for ness alarm (#28250) 2019-11-04 10:29:29 +01:00
Florent Thoumie
de1799d486 iaqualink: better handling of failures (#28514) 2019-11-04 09:58:27 +01:00
Fabian Affolter
60d7f730c3 Upgrade jinja2 to >=2.10.3 (#28422) 2019-11-04 09:57:20 +01:00
Fabian Affolter
cb19827932 Upgrade paho-mqtt to 1.5.0 (#28423) 2019-11-04 09:56:58 +01:00
Fabian Affolter
fe00f3558e Imports twitch (#28517)
* Move imports

* Add unique_id
2019-11-04 09:56:46 +01:00
Tom Robinson
e91bb1ab08 Replace Netatmo CO2 sensor icon (#28520) 2019-11-04 09:56:36 +01:00
Fabian Affolter
381bf987d2 Upgrade TwitterAPI to 2.5.10 (#28401) 2019-11-04 09:56:27 +01:00
SukramJ
7cbd55a817 Add dump config service to HomematicIP Cloud (#28231)
* Add dump config service to HomematicIP Cloud

* Mock builin.open

* Fix test

* reduce SGTIN if anonymize

* apply review feedback
2019-11-04 09:55:12 +01:00
Fabian Affolter
c01b7bbf28 Upgrade pillow to 6.2.1 (#28442) 2019-11-04 09:03:58 +01:00
Ville Skyttä
7e6bcb85b7 Don't fail tox pylint if PYLINT_ARGS is not set (#28403)
Closes https://github.com/home-assistant/home-assistant/issues/28342
2019-11-04 08:12:15 +01:00
Kevin McCormack
cb2f42b336 Update Vivotek component stream source (#27941)
* Update Vivotek component

Fix building stream URL

* Update Vivotek component

Make stream path optionally configurable.

* Update Vivotek camera integration

Use f-string to build stream source URL.
This improve readability and I hear it runs faster.
2019-11-04 04:11:14 +01:00
HomeAssistant Azure
0973f1961d [ci skip] Translation update 2019-11-04 00:32:38 +00:00
Maciej Bieniek
4e40394972 Fix Airly if more than one config entry (#28498) 2019-11-04 00:58:35 +01:00
Ville Skyttä
9b038bd10d Don't use deprecated encoding to json.loads (#28509)
Will be removed in 3.9, ignored in earlier supported versions.
2019-11-04 00:24:24 +01:00
Ville Skyttä
734e982822 Import CancelledError from asyncio, not .futures (#28511)
It's no longer in .futures in Python 3.8.0.
2019-11-04 00:05:01 +01:00
escoand
0768ae2dc8 Fix flaky YesssSMS tests on debug messages (#28506) 2019-11-03 23:56:08 +01:00
Joakim Plate
5fd9b474dc Always provide brightness value (#28228)
HA will remove attribute when light is off, but google expect all trait data all the time.
2019-11-03 11:36:02 -08:00
escoand
ecf2e9c0ab Fix flaky Samsung TV tests (#28503) 2019-11-03 18:32:01 +01:00
Ville Skyttä
b904a2c5ad Handle Huawei LTE timeouts (#28465) 2019-11-02 21:28:38 -07:00
Fabian Affolter
314c3d0965 Use integration name in docstring (#28445) 2019-11-02 21:28:07 -07:00
Tim McCormick
5cbb6607a6 Fix missing import (#28460) 2019-11-02 21:25:24 -07:00
András Rutkai
31752d5736 Fixing #27722 Watson TTS platform (sdk upgrade) (#28468) 2019-11-02 21:24:02 -07:00
michaeldavie
0d432f60e2 Bump env_canada to 0.0.30 (#28487) 2019-11-02 21:21:46 -07:00
Paulus Schoutsen
67eeb8f258 Fix flaky test 2019-11-02 21:21:13 -07:00
HomeAssistant Azure
f71527d5db [ci skip] Translation update 2019-11-03 00:31:44 +00:00
Ville Skyttä
1679ec3245 SSDP matching improvements (#28285)
* SSDP matching improvements

- support multiple match groups per domain
- require matches on all, not any item in a group
- support matching on all UPnP device description data

* Manifest structure fixes
2019-11-02 12:30:09 -07:00
Ville Skyttä
a8dff2f2d0 pre-commit: ship default and full configs (#28463)
For now, the only difference between the two is mypy.
2019-11-02 12:21:09 -07:00
Nash Kaminski
b8fa5367db Fix inability to transition between specific presets in Venstar component (#28238)
This change addresses a bug where one is unable to change directly between the away and temperature hold presets, as temperature hold cannot be enabled on a Venstar thermostat if away mode is active.
Furthermore, this change removes redundant state checks as the set_away and set_schedule calls are idempotent in the venstarcolortouch library. See https://github.com/hpeyerl/venstar_colortouch/blob/master/src/venstarcolortouch/venstarcolortouch.py#L275.
2019-11-02 10:51:30 +01:00
ktnrg45
512ef2fce4 Change ps4 state off to state standby (#28261)
* Change state off to state standby

* update docstring
2019-11-02 10:32:37 +01:00
Paulus Schoutsen
6c138e2982 Merge pull request #28456 from home-assistant/rc
101.2
2019-11-01 20:08:30 -07:00
Paulus Schoutsen
969b36a447 Bumped version to 0.101.2 2019-11-01 17:32:57 -07:00
Paulus Schoutsen
3f8dc5ed75 Also install after_deps (#28453) 2019-11-01 17:32:53 -07:00
jjlawren
fc7d43269c Use server-specific unique_ids for Plex media_players (#28447) 2019-11-01 17:32:52 -07:00
Robin Pronk
b88c0cf314 SNMP switch fix integer support (#28425) 2019-11-01 17:32:52 -07:00
Mister Wil
9e9537a3d0 Change Abode cache file path, add cache path to config flow (#28389)
* Changed cache file path

* Cache file naming scheme matches original

* Restart tests

* Adding cache path to config_flow.py

* Moved DEFAULT_CACHEDB to consts file

* Use correct cache path

* Linting issues
2019-11-01 17:32:51 -07:00
phispi
84e4e94d8e Prevent TypeError when KNX RGB(W) light value contains None (#28358)
* Prevent TypeError when KNX RGB(W) light value contains None.

* Pylint doesn't like 'w' as variable name, therefore using 'white' instead.

* Simplified code as suggested by pvizeli.
2019-11-01 17:32:51 -07:00
HomeAssistant Azure
4863face69 [ci skip] Translation update 2019-11-02 00:31:48 +00:00
Fabian Affolter
15900094a1 Update MQTT sensor test (#28449) 2019-11-01 17:30:37 -07:00
Mister Wil
ad4a960ed2 Change Abode cache file path, add cache path to config flow (#28389)
* Changed cache file path

* Cache file naming scheme matches original

* Restart tests

* Adding cache path to config_flow.py

* Moved DEFAULT_CACHEDB to consts file

* Use correct cache path

* Linting issues
2019-11-01 17:28:50 -07:00
Paulus Schoutsen
50affdf953 Also install after_deps (#28453) 2019-11-01 17:21:50 -07:00
Santobert
6655b7db2c Add scene.create service (#28300)
* Initial commit

* Fix scene.create
2019-11-01 15:53:42 -07:00
Robert Svensson
c0e1b97119 deCONZ - Improve discovery logging (#28452) 2019-11-01 23:36:23 +01:00
Robert Svensson
6cc947abbf deCONZ - Add Hue dimmer gen1 (rwl020) support to device triggers(#28450) 2019-11-01 23:06:29 +01:00
jjlawren
21d48218aa Use server-specific unique_ids for Plex media_players (#28447) 2019-11-01 22:41:26 +01:00
Robert Svensson
557e585e56 deCONZ - Support creating battery sensor when reported (#27538) 2019-11-01 22:31:22 +01:00
Robert Svensson
62b09580c4 deCONZ - Add Xiaomi Aqara Cube device trigger support (#27548)
* Add Xiaomi Aqara Cube device trigger support
2019-11-01 22:29:34 +01:00
Santobert
07b7d514ac Add improved scene support to the water_heater integration (#28277) 2019-11-01 13:37:34 -07:00
Santobert
12f1a8f551 Add improved scene support to the alarm_control_panel integration (#28269)
* Add improved scene support to the alarm_control_panel integration

* Add service description for alarm_arm_custom_bypass
2019-11-01 13:36:18 -07:00
SukramJ
1fb377e61e Use defined device class constants for Homematic (#28438)
* Use defined device classes for Homematic

* Remove not required default None

* Missed on None
2019-11-01 21:25:33 +01:00
phispi
f8d779e840 Prevent TypeError when KNX RGB(W) light value contains None (#28358)
* Prevent TypeError when KNX RGB(W) light value contains None.

* Pylint doesn't like 'w' as variable name, therefore using 'white' instead.

* Simplified code as suggested by pvizeli.
2019-11-01 21:23:23 +01:00
John Mihalic
44879b323e Bump pyEight library to 0.1.2 to update API URL (#28413) 2019-11-01 18:40:35 +01:00
Robin Pronk
c7d72f55e9 SNMP switch fix integer support (#28425) 2019-11-01 15:38:13 +01:00
Fabian Affolter
07337badcd Upgrade pysnmp to 4.4.12 (#28428) 2019-11-01 14:28:38 +01:00
Michael Schoonmaker
6f24d2bb3b Add a Services YAML for the Dominos integration (#27289) (#28339) 2019-11-01 14:27:26 +01:00
Fabian Affolter
083d34cdd9 Upgrade attrs to 19.3.0 (#28421) 2019-11-01 13:10:53 +01:00
Fabian Affolter
72a17d4c67 Upgrade thingspeak to 1.0.0 (#28424) 2019-11-01 13:09:45 +01:00
HomeAssistant Azure
bb6a617a6f [ci skip] Translation update 2019-11-01 00:32:13 +00:00
Daniyar Yeralin
54361342ba Introduce SUPPORT_COLOR_TEMP for flux_led component (#26692)
* Introduce SUPPORT_COLOR_TEMP for flux_led component

* Make black linter happy

* Remove duplicate SUPPORT_COLOR_TEMP

* Make linter happy
2019-11-01 00:15:20 +01:00
Paulus Schoutsen
5c9f7484c2 Merge remote-tracking branch 'origin/master' into dev 2019-10-31 14:18:03 -07:00
Paulus Schoutsen
c10e046323 Merge pull request #28399 from home-assistant/rc
0.101.1
2019-10-31 14:16:57 -07:00
Malte Franken
d200c2dca2 fix feedreader handling unrecognized published date (#28225) 2019-10-31 21:05:42 +01:00
escoand
82729bef70 Show all UPNP/IGD sensors in one device (#27517)
* show all UPNP/IGD sensors in one device

* use device name correctly

* Use id of device
2019-10-31 20:51:35 +01:00
thoscut
ec373d90c1 Add file list to attributes of folder sensor (#28338) 2019-10-31 20:49:33 +01:00
gngj
b74711793e Fill services.yaml for squeezebox (#28247)
* fill services.yaml for squeezebox

* Minor fix
2019-10-31 20:32:05 +01:00
Paulus Schoutsen
633d006554 Bumped version to 0.101.1 2019-10-31 12:11:35 -07:00
Paulus Schoutsen
4e2a8fde86 Check for import errors before validating config (#28395) 2019-10-31 12:11:30 -07:00
Paulus Schoutsen
d57fe0334f Fix check config (#28393) 2019-10-31 12:11:29 -07:00
Tsvi Mostovicz
75b8070c99 Fix hdate spamming homeassistant log (#28392)
* Fix hdate spamming homeassistant log

* Lower verbosity of another spammy message
2019-10-31 12:11:28 -07:00
Maciej Bieniek
b71e1affdb Fix Airly asyncio timeout error (#28387)
* Raise ConfigEntryNotReady

* Better asyncio.TimeoutError handling

* Sort imports

* Increase asyncio timeout
2019-10-31 12:11:28 -07:00
Steve M
d92060a461 Bump env_canada to fixed 0.0.29 version (#28360)
* Bump env_canada to fixed 0.0.29 version

* bump env_canada to 0.29
2019-10-31 12:09:43 -07:00
fredericvl
3c9482b2d3 Bump pysaj to v0.0.13 (fix for sensor date) (#28351) 2019-10-31 12:09:43 -07:00
Aaron Bach
5571c0c60a Bump pymyq to 2.0.1 (#28348) 2019-10-31 12:09:43 -07:00
Teemu R
54481598b7 Bump songpal to fix a regression (#28115)
The new release fixes a single regression from requests to aiohttp conversion.
Some devices do not respond with the correct mimetype which was not enforced
by requests but is enforced by aiohttp.

Related PR https://github.com/rytilahti/python-songpal/pull/59
2019-10-31 12:09:43 -07:00
Nikolay Vasilchuk
abbf6595bb Fix (#28369) 2019-10-31 12:07:07 -07:00
Paulus Schoutsen
631a819bd1 Fix check config (#28393) 2019-10-31 11:39:26 -07:00
Paulus Schoutsen
70c4b4a4f0 Check for import errors before validating config (#28395) 2019-10-31 11:38:06 -07:00
Tsvi Mostovicz
674860e00e Fix hdate spamming homeassistant log (#28392)
* Fix hdate spamming homeassistant log

* Lower verbosity of another spammy message
2019-10-31 11:16:27 -07:00
ZiroNL
5854eef47b Add services.yaml to onvif component (#28349) 2019-10-31 18:57:00 +01:00
Robert Van Gorkom
226b2bc3d0 Update withings-api to avoid data parsing bugs. (#28382) 2019-10-31 18:29:10 +01:00
Alexei Chetroi
89213a4ce8 Don't set entity_id in ZHA entities (#28362)
* Don't set entity_id on ZHA entities.
* Update tests.
* Use comma as separator for multiple channel names.
* Address PR comments.
2019-10-31 12:31:06 -04:00
Maciej Bieniek
d133501735 Fix Airly asyncio timeout error (#28387)
* Raise ConfigEntryNotReady

* Better asyncio.TimeoutError handling

* Sort imports

* Increase asyncio timeout
2019-10-31 09:29:27 -07:00
ochlocracy
ff5b070f4b Implement Alexa.SeekController Interface for media_player in Alexa (#28299)
* Implement Alexa.SeekController Interface for Alexa

* Added error handling and duration checks.

* Split out media_player SeekController tests and added error test.
2019-10-31 10:38:44 +01:00
gngj
bfe4a85e9d Fill services.yaml for duckdns (#28248)
* Fill services.yaml for duckdns

* Apply suggestions from code review

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>
2019-10-31 09:51:15 +01:00
Mark Coombes
e11c9d710c Add modelnumber for ecobee4 (#28278) 2019-10-31 09:49:38 +01:00
Santobert
89df821113 Flux log with debug instead of info (#28352) 2019-10-31 09:41:44 +01:00
fredericvl
ef92c5672d Bump pysaj to v0.0.13 (fix for sensor date) (#28351) 2019-10-31 09:39:27 +01:00
Steve M
d3750401c1 Bump env_canada to fixed 0.0.29 version (#28360)
* Bump env_canada to fixed 0.0.29 version

* bump env_canada to 0.29
2019-10-31 09:38:53 +01:00
HomeAssistant Azure
ee24710524 [ci skip] Translation update 2019-10-31 00:32:14 +00:00
Pascal Vizeli
2d7208470e Merge pull request #28354 from home-assistant/rc
0.101.0
2019-10-30 21:20:32 +01:00
Pascal Vizeli
7eceedea10 Bump version 0.101.0 2019-10-30 19:50:48 +00:00
Erik Montnemery
8ae43d2de3 Add device triggers to cover (#28063)
* Add device triggers to cover

* Use numeric_state trigger instead of template trigger

* Tweak translations
2019-10-30 20:49:01 +01:00
springstan
8aee92347f Fix KeyError in decora setup (#28279)
* Imported homeassistant.util and slugified address if no name is specified

* Added a custom validator function in case name is not set in config

* Removed logger.debug line only used for testing
2019-10-30 19:47:14 +00:00
Aaron Bach
bda3aadbcf Bump pymyq to 2.0.1 (#28348) 2019-10-30 09:05:13 -06:00
ZiroNL
4350467a00 Add services.yaml to local_file component. (#28330) 2019-10-30 08:36:53 +01:00
springstan
f8efc2adc6 Fix KeyError in decora setup (#28279)
* Imported homeassistant.util and slugified address if no name is specified

* Added a custom validator function in case name is not set in config

* Removed logger.debug line only used for testing
2019-10-30 07:57:40 +01:00
Paulus Schoutsen
24c29f9227 Add OAuth2 config flow scaffold (#28220)
* Add OAuth2 scaffold

* Generate integration if non-existing domain specified

* Update URL
2019-10-29 20:34:03 -07:00
HomeAssistant Azure
e700384cce [ci skip] Translation update 2019-10-30 00:32:11 +00:00
Paulus Schoutsen
cf6d11db8d Bumped version to 0.101.0b4 2019-10-29 16:17:34 -07:00
Bram Kragten
c104efc18d Updated frontend to 20191025.1 (#28327) 2019-10-29 16:16:41 -07:00
Pascal Vizeli
f021e5832a Cleanup not needed websocket flags for ingress (#28295) 2019-10-29 16:16:10 -07:00
David Bonnes
e1eab214ad allow multiple heaters per incomfort gateway (#28324)
* add multiple heaters per gateway
* bump client to handle the above
2019-10-29 21:29:39 +00:00
Sebastian Muszynski
6d734a714e Clean up Xiaomi Air Quality Monitor support (cgllc.airmonitor.b1) (#28301)
* Clean up Xiaomi Air Quality Monitor support (cgllc.airmonitor.b1)

* Remove unused variable

* Provide a proper unique_id

* Incorporate review

* Wrap the method that cause the exception

* Undo mistakenly changed file. Fixed in the separate PR.
2019-10-29 22:17:09 +01:00
Renaud Martinet
3a9e3ce857 Add services description for sabnzbd component (#28252) 2019-10-29 15:17:49 -04:00
cgtobi
1dfb67f0c5 Bump pytest to 5.2.2 (#28230) 2019-10-29 15:16:05 -04:00
Bram Kragten
5592eb7709 Updated frontend to 20191025.1 (#28327) 2019-10-29 16:30:33 +01:00
Pascal Vizeli
c00b058e53 Cleanup not needed websocket flags for ingress (#28295) 2019-10-29 12:05:05 +01:00
Jonas Janz
502f59977a Add description for arlo.update service (#28270) 2019-10-29 11:02:25 +01:00
Franck Nijhof
756c36171d Bump youtube_dl to 2019.10.29 (#28312) 2019-10-29 09:37:51 +01:00
Franck Nijhof
4dc6d36224 Bump pre-commit to 1.20.0 (#28313) 2019-10-29 09:37:18 +01:00
Paulus Schoutsen
79ac77a93d Almond integration (#28282)
* Initial Almond integration

* Hassfest

* Update library

* Address comments

* Fix inheritance issue py36

* Remove no longer needed check

* Fix time
2019-10-28 23:47:31 -07:00
Franck Nijhof
a4ec4d5a18 Add source constants for all config entry discovery sources (#28311) 2019-10-28 23:32:57 -07:00
Franck Nijhof
04ab20846a Bump black to 19.10b0 (#28310) 2019-10-28 23:32:34 -07:00
Sebastian Muszynski
5b96704c4a Use dict[key] for required config keys (#28304)
* Use dict[key] for required config keys

* Change CONF_NAME too because it has a default
2019-10-29 01:45:22 +01:00
Sebastian Muszynski
a0f764cf6d Remove blocking I/O from the event loop (#28305) 2019-10-29 01:44:26 +01:00
HomeAssistant Azure
0e4331e922 [ci skip] Translation update 2019-10-29 00:32:16 +00:00
Josh Bendavid
1e27a1f2b9 Add keyboard_remote trigger on multiple event types and emulate key hold events (#27761)
* convert keyboard_remote to async and add possibility to trigger on multiple event types, as well as emulate key hold events

* update requirements

* cleanup shutdown handling and config handling as well as address other minor comments

* cleanup unused return values and debug message formatting

* move start and stop event listen to separate coroutine plus minor cleanup

* make setup coroutine a function

* fix import order and attribute defined outside of init

* add to codeowners

* update codeowners
2019-10-29 00:59:13 +01:00
Florent Thoumie
0ef99934b7 Add more iaqualink entity properties, fix timeout issues (#28236)
* iaqualink: implement some more entity properties

* Style fixes
2019-10-29 00:42:06 +01:00
Ville Skyttä
f88ead597a Type hint improvements (#28260)
* Add and improve core and config_entries type hints

* Complete and improve config_entries type hints

* More entity registry type hints

* Complete helpers.event type hints
2019-10-28 13:36:26 -07:00
Paulus Schoutsen
070790ccc9 Bumped version to 0.101.0b3 2019-10-28 11:28:45 -07:00
jjlawren
0e2b55e60e Bump library to 0.0.3 (#28294) 2019-10-28 11:28:40 -07:00
Erik Montnemery
4a25bab1b3 Fix broken deconz trigger (#28211) 2019-10-28 11:28:39 -07:00
Erik Montnemery
3cedee3fea Add above and below to sensor condition extra_fields (#27364)
* Add above and below to sensor condition extra_fields

* Change unit_of_measurement to suffix in extra_fields

* Check if sensor has unit when getting capabilities

* Improve tests
2019-10-28 11:28:39 -07:00
Yann Jajkiewicz
f7a64019b6 Add support for Somfy Garage door Rollixo IO DiscreteGarageOpenerIOComponent in Tahoma component (#28291) 2019-10-28 11:22:15 -07:00
jjlawren
31dd69196c Bump library to 0.0.3 (#28294) 2019-10-28 10:39:37 -07:00
Pascal Vizeli
335872b54d Revert "More header cleanup for websocket proxy (#28288)" (#28293)
This reverts commit 7887850505.
2019-10-28 16:54:15 +01:00
Bram Kragten
549e8cf2c5 Hue: Create new config flow when auth is lost (#28204)
* Hue: Create new config flow when auth is lost

* Fix tests

* Fix tests

* Comments

* Lint
2019-10-28 08:45:08 -07:00
Eliseo Martelli
30f4ee121a Remove GTT component (#28286)
* removed GTT component

* Removed gtt.py from coveragerc
2019-10-28 14:54:42 +01:00
Sören
c1d88dd7a4 Bump avea to 1.4 (#28287)
* Bump avea to 1.4

* Bump avea to 1.4 #2
2019-10-28 14:47:04 +01:00
Pascal Vizeli
7887850505 More header cleanup for websocket proxy (#28288) 2019-10-28 14:34:13 +01:00
J.P. Hutchins
54342d2a4e Add transmission info about torrents that is accessible with templating (#27111)
* Add information about current downloads.

* Cleanup: add "Torrent Info" state attribute

* Add username to codeowners

* Rename state_attributes - device_state_attributes.

* Fix snakecase keys, use f-strings, remove redundant method.

* Access started_torrent_dict directly

* Add return None condition

* Remove redundancy.

* Add missing comma in codeowners list.

* Add missing @ to username.

* Update CODEOWNERS with script.hassfest.

* Remove transmission_downloading, give started_torrents the info.

* Confirm changes.

* Actually approve changes.

* Resolve conflicts.

* Remove leftovers from old torrent_info sensor.

* Remove get_started_torrent_info method.

Old method to display boolean for the removed torrent_info sensor.
2019-10-28 10:20:59 +01:00
fwestenberg
edcf476408 Add support for Xiaomi Air Quality Monitor (cgllc.airmonitor.b1) (#27735) 2019-10-28 07:43:01 +01:00
HomeAssistant Azure
72dee7dd21 [ci skip] Translation update 2019-10-28 00:32:16 +00:00
SukramJ
75f94b9147 Reorg and test attributes for HomematicIP Cloud (#28234)
* Reorg and test attribute for HomematicIP Cloud

* Add dutyCycle check to security_group

* Edit test to improve coverage

* Add missing flow test

* apply suggestion

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* fix assert condition
2019-10-28 01:03:26 +01:00
ZiroNL
6ac7796fb7 Add charset to imap component. (#28258) 2019-10-27 13:07:44 +01:00
Fabian Affolter
a9db2ead33 Suppress traceback (fixes #28243) (#28262) 2019-10-27 12:39:36 +01:00
Fabian Affolter
7e862e4d92 Update praw to 6.4.0 (#27324)
* Update praw to 6.4.0

* Update requirements_test_all.txt

* Fix docstrings

* Update tests
2019-10-27 10:04:43 +01:00
Floris Van der krieken
2747f08385 Add available state to unifiled integration (#28189)
* Added Unifi Led

* fixed manifest

* fixed style issue

* removed unused setting

* added sugested changes.

* fixed order

* fixed settings that are required

* Fix review issues

* fix variable name that was too short

* Testing something

* Reverted to a previous version for testing

* Reverted testing changes.

* Add available status and increase version of unifiled package version.

* No io in init function.
2019-10-27 05:18:23 +01:00
HomeAssistant Azure
868f88a4e0 [ci skip] Translation update 2019-10-27 00:32:10 +00:00
michaeldavie
82ed84ba43 Bump env_canada to 0.0.27 (#28239) 2019-10-26 22:27:21 +02:00
Fabian Affolter
bb8f139716 Upgrade speedtest-cli to 2.1.2 (#28216) 2019-10-26 13:45:42 +02:00
Ville Skyttä
2baee4ac3e Add Huawei LTE mobile data switch support (#28188)
* Add Huawei LTE mobile data switch support

* Remove stale comment

* Do HA state updates in base entity
2019-10-26 13:29:36 +03:00
HomeAssistant Azure
7096826d1d [ci skip] Translation update 2019-10-26 00:32:20 +00:00
Paulus Schoutsen
08cc9fd375 Add cloud account linking support (#28210)
* Add cloud account linking support

* Update account_link.py
2019-10-25 16:04:24 -07:00
Erik Montnemery
475b43500a Add above and below to sensor condition extra_fields (#27364)
* Add above and below to sensor condition extra_fields

* Change unit_of_measurement to suffix in extra_fields

* Check if sensor has unit when getting capabilities

* Improve tests
2019-10-26 06:55:42 +08:00
ochlocracy
d6654eaecb Implement Alexa.PlaybackStateReporter Interface for alexa (#28215) 2019-10-25 14:53:33 -07:00
Erik Montnemery
7fee44b8c5 Add additional device conditions to cover (#27830)
* Add additional device conditions to cover

* Add default value

* Add test

* Use numeric_state condition instead of template condition
2019-10-25 13:50:46 -07:00
ochlocracy
d44bfa8e88 Improved Alexa ThermostatController thermostatMode handling (#28176)
* Update ThermostatController to map directives to supported modes and add support for CUSTOM mode.

* Removed erroneous config value from test.

* Removed unnecessary use of a comprehension by dumbing down comment so pylint could comprehend.

* Removed erroneous import variable caused by removing erroneous config value from test.

* Removed unnecessary use of a comprehension.

* Reverted Removal or erroneous import variable and erroneous config value from test.
Apparently need for additional tests outside this component. Whoops.
2019-10-25 13:42:21 -07:00
Erik Montnemery
f4341c1546 Fix broken deconz trigger (#28211) 2019-10-25 13:40:05 -07:00
ochlocracy
da8a476142 Add support for supportedOperations to Alexa.PlaybackController (#28212)
* Added support for supportedOperations to Alexa.PlaybackController

* Added support for supportedOperations to Alexa.PlaybackController
2019-10-25 13:34:51 -07:00
Markus Pöschl
f2d6cc7329 Increased python-eq3bt version to latest (0.1.11) (#28175) 2019-10-25 21:25:27 +02:00
Hayley McIldoon
7ddce1d52b Add device condition support for device_tracker (#28190) 2019-10-25 10:51:35 -07:00
Paulus Schoutsen
c456b725fd Bumped version to 0.101.0b2 2019-10-25 10:49:42 -07:00
Bram Kragten
524f5a7264 Updated frontend to 20191025.0 (#28208) 2019-10-25 10:49:36 -07:00
gngj
637a16799f Fix microsoft tts (#28199)
* Update pycsspeechtts

From 1.0.2 to 1.0.3 as the old one is using an api that doesn't work

* Give a option to choose region

Api is now region dependent, so gave it a config
2019-10-25 10:49:35 -07:00
SukramJ
4df6b3c76a Partially revert tensorflow import move (#28184)
* Revert "Refactor imports for tensorflow (#27617)"

This reverts commit 5a83a92390.

* move only some imports to top

* fix lint

* add comments
2019-10-25 10:49:35 -07:00
jjlawren
05ee15c28c Update Plex via websockets (#28158)
* Save client identifier from auth for future use

* Use websocket events to update Plex

* Handle websocket disconnections

* Use aiohttp, shut down socket cleanly

* Bad rebase fix

* Don't connect websocket during config_flow validation, fix tests

* Move websocket handling to external library

* Close websocket session on HA stop

* Use external library, revert unnecessary test change

* Async & lint fixes

* Clean up websocket stopper on entry unload

* Setup websocket in component, pass actual needed object to library
2019-10-25 10:49:34 -07:00
gngj
d28f7ab120 Fix microsoft tts (#28199)
* Update pycsspeechtts

From 1.0.2 to 1.0.3 as the old one is using an api that doesn't work

* Give a option to choose region

Api is now region dependent, so gave it a config
2019-10-25 10:42:23 -07:00
Hayley McIldoon
2c914e0c59 Add device condition support for media_player (#28161)
* Add device condition for media_player

* Fix typo in strings
2019-10-25 10:22:39 -07:00
ochlocracy
38428308fc Change Alexa default display category based on media_player device_class (#28191)
* Support default display category based one media_player device_class.

* Support default display category based one media_player device_class.
2019-10-25 10:21:22 -07:00
Bram Kragten
5c8a9c2815 Updated frontend to 20191025.0 (#28208) 2019-10-25 10:20:42 -07:00
Ville Skyttä
3c4caaaefc Add presentation URL to SSDP discovery info (#28196) 2019-10-25 20:09:18 +03:00
On Freund
0656f0c62b Address post-merge coolmaster config flow code review (#28163)
* Address post-merge code review comments

* Use component path for 3rd party lib
2019-10-25 18:39:16 +02:00
jjlawren
43c7b57d1e Update Plex via websockets (#28158)
* Save client identifier from auth for future use

* Use websocket events to update Plex

* Handle websocket disconnections

* Use aiohttp, shut down socket cleanly

* Bad rebase fix

* Don't connect websocket during config_flow validation, fix tests

* Move websocket handling to external library

* Close websocket session on HA stop

* Use external library, revert unnecessary test change

* Async & lint fixes

* Clean up websocket stopper on entry unload

* Setup websocket in component, pass actual needed object to library
2019-10-25 18:37:50 +02:00
gngj
9153729b21 move hass-frontend import back down (#28203) 2019-10-25 09:02:40 -07:00
guillempages
98cf3f4aa3 [homematic]Add support for HmIP-BSL LEDs (#27307)
With this commit, 3 entities are created for the HmIP-BSL device:
2 lights for the two independent LEDs and 1 switch for the relais
2019-10-25 16:08:11 +02:00
guillempages
6bfb2460f2 [homematic]Pass channel to light color functions (#27306)
The device HmIP-BSL has two independent LEDs on two different channels,
so the channel needs to be explictly specified when setting the color.
2019-10-25 16:06:52 +02:00
escoand
9661efc312 Add Samsung TV automatic protocol detection (#27492)
* added automatic protocol detection

* fix logger tests

* fix async tests

* add missin const.py

* fix log formatting

* wait for first update call

* migrate first tests

* migrated all test functions

* started to use state machine

* updated all tests to use async_setup_component

* slove hints

* update tests

* get state at correct position

* remove impossible tests

* fix autodetect tests

* use caplog fixture

* add test for duplicate

* catch concrete exceptions

* don't mock samsungctl exceptions

* add test for discovery

* get state when possible

* add test for autodetect without connection
2019-10-25 14:32:12 +02:00
HomeAssistant Azure
95295791bd [ci skip] Translation update 2019-10-25 00:32:15 +00:00
Ville Skyttä
643b3a98ee Huawei LTE sensor metadata update (#28187) 2019-10-24 16:42:54 -07:00
SukramJ
32a024c641 Partially revert tensorflow import move (#28184)
* Revert "Refactor imports for tensorflow (#27617)"

This reverts commit 5a83a92390.

* move only some imports to top

* fix lint

* add comments
2019-10-24 16:41:13 -07:00
Joakim Sørensen
67cf7c26da Removes unwanted tradfri battery sensor (#28181) 2019-10-24 23:25:47 +02:00
Josef Schlehofer
63deec3275 Bump python-slugify to 4.0.0 (#28186) 2019-10-24 23:12:41 +02:00
Paulus Schoutsen
0a5cde7ac3 Bumped version to 0.101.0b1 2019-10-24 13:53:30 -07:00
Otto Winter
c64fe19260 Fix ESPHome stacktraces when removing entity and shutting down (#28185) 2019-10-24 13:53:17 -07:00
Otto Winter
8f232f3c69 Bump aioesphomeapi to 2.4.1 (#28170)
* Bump aioesphomeapi to 2.4.1

* Update requirements

* Bump to 2.4.2
2019-10-24 13:53:16 -07:00
Alexei Chetroi
059d2572a2 Fixes/zha ieee tail (#28160)
* Fix ZHA entity_id assignment.

* Update tests.
2019-10-24 13:53:16 -07:00
kennedyshead
98ac8a217d Adding device_class to samsungtv (#28168)
* Adding device_id to samsungtv

* Lint

* Adding test
2019-10-24 13:41:07 -07:00
Diefferson Koderer Môro
c96d4c978d Fix tzinfo type for onvif component (#28178) 2019-10-24 13:39:10 -07:00
Joakim Sørensen
ec478ab848 Add stop feature to tradfri covers (#28180)
* Tradfri cover enhancements

* tradfri dependency update

* Revert addition of battery attrubite

* Remove the supported_features property

* Remove unwanted file
2019-10-24 13:38:24 -07:00
Otto Winter
322d8c2dd5 Fix ESPHome stacktraces when removing entity and shutting down (#28185) 2019-10-24 13:36:47 -07:00
Joakim Sørensen
b61218f90e Tradfri config flow enhancements (#28179) 2019-10-24 21:31:58 +02:00
Otto Winter
8791a48328 Bump aioesphomeapi to 2.4.1 (#28170)
* Bump aioesphomeapi to 2.4.1

* Update requirements

* Bump to 2.4.2
2019-10-24 20:24:46 +02:00
Robert Van Gorkom
15bedd8f27 Use latest withings_api module (#27817)
* Using latest winthings_api module.
Drastically reduced complexity of tests.

* Removing import source.

* Fixing test requirements.

* Using requests_mock instead of responses module.

* Updating file formatting.

* Removing unused method.

* Adding support for new OAuth2 config flow.

* Addressing PR feedback.
Removing unecessary base_url from config, this is a potential breaking change.

* Addressing PR feedback.
2019-10-24 09:41:04 -07:00
Ville Skyttä
fc09702cc3 Modernize Huawei LTE (#26675)
* Modernization rework

- config entry support, with override support from huawei_lte platform in YAML
- device tracker entity registry support
- refactor for easier addition of more features
- internal code cleanups

* Remove log level dependent subscription/data debug hack

No longer needed, because pretty much all keys from supported
categories are exposed as sensors.

Closes https://github.com/home-assistant/home-assistant/issues/23819

* Upgrade huawei-lte-api to 1.4.1

https://github.com/Salamek/huawei-lte-api/releases

* Add support for access without username and password

* Use subclass init instead of config_entries.HANDLERS

* Update huawei-lte-api to 1.4.3 (#27269)

* Convert device state attributes to snake_case

* Simplify scanner entity initialization

* Remove not needed hass reference from Router

* Return explicit None from unsupported old device tracker setup

* Mark unknown connection errors during config as such

* Drop some dead config flow code

* Run config flow sync I/O in executor

* Parametrize config flow login error tests

* Forward entry unload to platforms

* Async/sync fixups

* Improve data subscription debug logging

* Implement on the fly add of new and tracking of seen device tracker entities

* Handle device tracker entry unload cleanup in component

* Remove unnecessary _async_setup_lte, just have code in async_setup_entry

* Remove time tracker on unload

* Fix to not use same mutable default subscription set for all routers

* Pylint fixes

* Remove some redundant defensive device tracker code

* Add back explicit get_scanner None return, hush pylint

* Adjust approach to set system_options on entry create

* Enable some sensors on first add instead of disabling everything

* Fix SMS notification recipients default value

* Add option to skip new device tracker entities

* Fix SMS notification recipient option default

* Work around https://github.com/PyCQA/pylint/issues/3202

* Remove unrelated type hint additions

* Change async_add_new_entities to a regular function

* Remove option to disable polling for new device tracker entries
2019-10-24 19:31:49 +03:00
Alexei Chetroi
969322e14a Fixes/zha ieee tail (#28160)
* Fix ZHA entity_id assignment.

* Update tests.
2019-10-24 12:23:02 -04:00
Floris Van der krieken
b1fcecd526 Add Unifi Led (#27475)
* Added Unifi Led

* fixed manifest

* fixed style issue

* removed unused setting

* added sugested changes.

* fixed order

* fixed settings that are required

* Fix review issues

* fix variable name that was too short

* Testing something

* Reverted to a previous version for testing

* Reverted testing changes.
2019-10-24 17:59:25 +02:00
kennedyshead
d44de6dd2b Fix Venstar formatting to restore clean CI (#28171) 2019-10-24 16:03:29 +02:00
Diefferson Koderer Môro
dd9ca70e96 Add onvif local datetime support (#26656)
* Update camera.py

* Add onvif local datetime support

* Correct capture TimeZone

* Replace one line if-statement by if-block
2019-10-23 21:03:24 -07:00
HomeAssistant Azure
8c31afc31e [ci skip] Translation update 2019-10-24 00:32:18 +00:00
Tyler Page
6a1501b59c Cover all possible values for venstar operation_mode (#27949)
* cover all possible values for operation_mode

* Update climate.py

* Update climate.py

* Update climate.py

mapped homeassistant constants to client ones so we don't have to check for both

* black + pylint

* move mode_map to __init__()

* Update climate.py

* Update climate.py
2019-10-24 02:10:57 +02:00
Teemu R
160c201be1 Bump songpal to fix a regression (#28115)
The new release fixes a single regression from requests to aiohttp conversion.
Some devices do not respond with the correct mimetype which was not enforced
by requests but is enforced by aiohttp.

Related PR https://github.com/rytilahti/python-songpal/pull/59
2019-10-23 23:13:56 +02:00
Paulus Schoutsen
1b21685651 Version bump to 102.0.dev0" 2019-10-23 13:38:35 -07:00
Paulus Schoutsen
3b934166a5 Bumped version to 0.101.0b0 2019-10-23 13:37:01 -07:00
Paulus Schoutsen
23289459ca Update translations 2019-10-23 13:36:38 -07:00
Bram Kragten
2b36fe421c Updated frontend to 20191023.0 (#28150) 2019-10-23 13:22:07 -07:00
Ville Skyttä
6a731a68cd Parallelize pylint everywhere (#28149)
* Run 2 pylint jobs by default

* Run pylint with autodetected number of jobs in Travis

Gives a ~25% speedup there at the moment.
2019-10-23 13:18:41 -07:00
Rami Mosleh
7cb6607b1f Allow multiple Transmission clients and add unique_id to entities (#28136)
* Allow multiple clients + improvements

* remove commented code

* fixed test_init.py
2019-10-23 13:09:11 -07:00
Villhellm
062ec8a7c2 changed STATE_OFF to STATE_STANDBY (#28148) 2019-10-23 13:03:52 -07:00
On Freund
1412862f2a Config entry and device for Coolmaster integration (#27925)
* Config entry and device for Coolmaster integration

* Lint/isort/flake/etc...

* Black formatting

* Code review fixes

* Config flow tests for coolmaster

* Add pycoolmaster requirement to test

* Remove port selection from Coolmaster config flow

* Update config_flow.py

* More idoimatic hash concat
2019-10-23 12:47:00 -07:00
fredericvl
b6fd191dc4 Add support for SAJ inverters connected via WiFi (#27742)
* Add support for SAJ inverters connected via WiFi

* Changes after review for saj
2019-10-23 12:11:04 -07:00
ochlocracy
65d8c70377 Rebase Implement Alexa.DoorbellEventSource Interface Controller (#27726) 2019-10-23 11:41:26 -07:00
Pascal Vizeli
0771dc3a37 Downgrade aioHTTP 3.6.2 to 3.6.1 (#28143) 2019-10-23 11:37:37 -07:00
Adrien Foulon
85eefe41da Fix supported_features in mqtt cover (#28120)
* Correctly compute the supported_features in cover.mqtt

* Update homeassistant/components/mqtt/cover.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Correctly compute the supported_features in cover.mqtt

* Format
2019-10-23 10:44:47 -07:00
libots
b8d2c58c60 Support for additional Abode timeline events (#28124)
* Support for additional timeline events

* Update __init__.py

* Expose details on user

These lines expose apptype and event_by, which can be used to give information on events initiated by keypad users (vs. users on the mobile app, web app, or those initiated from HA through abodepy).
2019-10-23 10:41:58 -07:00
Jon Gilmore
a3f3ea4e25 Fix Lutron Pico (#27059)
* removed a nesting level

* Lutron Pico fix

* Reverted logging change

Was unaware that f-strings aren't used in logging commands, reverted the usage

* Reverted logging change

Was unaware that f-strings aren't used in logging commands, reverted the usage

* fixed logic
2019-10-23 18:29:30 +02:00
Marius Flage
86700ec1ac Avoid query operations on a pjlink powered off projector (#28132) 2019-10-23 18:25:00 +02:00
SukramJ
efae75103a Cleanup typing and asserts for HomematicIP Cloud (#28144)
* Cleanup assert in Homematic IP Cloud Tests

* Cleanup typing
2019-10-23 18:21:49 +02:00
Ville Skyttä
7431e26752 Round system monitor load averages to 2 decimal digits (#27558)
On a Raspberry Pi 3, Python 3.7.4:

  # python3 -c "import os; print(os.getloadavg())"
  (0.2724609375, 0.3505859375, 0.3515625)
2019-10-23 08:57:51 -07:00
Diefferson Koderer Môro
4d8539e151 Move imports in raspihats component (#28088)
* Move imports in raspihats component

* Comment require

* Disable pylint for import-error

* Revert move imports

* Remove unnecessary pylint disable error

* Update homeassistant/components/raspihats/__init__.py

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

* Apply suggestions from code review

Co-Authored-By: cgtobi <cgtobi@users.noreply.github.com>
2019-10-23 08:53:05 -07:00
Diefferson Koderer Môro
14be60e5bf Move imports in nuheat component (#28038)
* Move imports in nuheat component

* Fix tox tests

* Fix tox tests

* Update tests/components/nuheat/test_init.py

@Balloob suggested the change because direct replacement, the mock would never be reverted and impact the other tests.

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
2019-10-23 08:30:38 -07:00
Alain Turbide
b1a374062b Add Alexa.ChannelController functions for media players (#27671)
* Added missing Alexa.ChannelController functions. Specifically ChangeChannel
and SkipChannel commands. These functions will call the play_media function
 in a media_player app if it has the capability published and pass on the
  channel# or channel name. The selected media player can then use this to
   select the channel on the device it is associated to.
Modified the existing Alexa.StepSpeaker Setvolume function to actually do
a stepped volume change using the steps sent by Alexa. The Alexa default
 step of 10 for a simple volume up/down can be changed via an exposed
 media_player attribute called volume_step_default.
 The default is set to 1. Any other value then default will be sent
 as sequential volume up /down to the media_player.

* The test code has some weird behaviour with passed boolean values.  Had to surround them in quotes for the tests to pass properly.

* Reverted test_smart_home.py change. Issue was not the boolean value but the behavior in the handler. The test suite does not like multiple await calls in a loop. Will investigate further.  The handler code works though.

* Added ChannelController/SkipChannels test in test_smart_home.py
Added test for callSign payload attribute.

* Modified smart home test to allow more than one call to services

* Added more tests for ChannelChange functions for various payload options.
Removed name options from metadata payload section. not needed.

* Reverted assert call change in alexa test __init__.py back to ==1. Not sure if it was the cause of the pytest's failing on github

* Corrected a comment.  First commit after a rebase.

* Comment line change.  Also wanted to force a code check on github.

* Added a loop delay in StepSpeaker and SkipChannel functions for safety

* Removed uneeded sleep from for loops.  Let remote handle delays
Moved service type decision out of for loops in ChannelController and StepSpeaker
Used constants instead of numeric values for support options in test module

* Change media_player const import to be more specific in source

* Modifed test_smart_home to use media_play constants instead of hardcode valu

* Removed unecessary test volume_step_default attribute from test_smart_home

* Removed uneeded comment in StepSpeaker function.
Re-ordered constants in test_smart_home.py

* Modified call to media_player play_media service to use media_player constant instead of hard coded value.

* Changed constant use to be consistant with rest of function.

* Correct merge conflicts in handlers.py and capablities.py
2019-10-23 08:28:23 -07:00
rolfberkenbosch
09b322b8a4 Fix issues with new tile 2020 devices (#28133)
* Update meteoalertapi to version 0.1.6

* Fix tile to supporting 2020 tile devices
2019-10-23 07:49:47 -06:00
Per-Øyvind Bruun
852cbad965 New platform for Microsoft Teams (#27981)
* New Microsoft Teams notification service

* Updated codeowners

* Updated requirements_all

* Changed from WEBHOOK_ID to URL

* Moved try/except block
2019-10-23 09:32:14 +02:00
jjlawren
44bf9e9ddc Additional SSL validation checks for cert_expiry (#28047)
* Additional SSL validation checks

* Add validity attribute, log errors on import

* Don't log from sensor
2019-10-22 23:34:12 -07:00
jjlawren
a644182b5e Save client identifier from Plex auth for future use (#27951)
* Save client identifier from auth for future use

* Bump requirements

* Stick with version 1
2019-10-22 23:32:57 -07:00
Ernst Klamer
acc3646ef3 Add Solar-Log platform (#27036)
* Add Solar-Log sensor

* Codeowners update

* Update homeassistant/components/solarlog/manifest.json

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* remove sunwatcher from gen_requirements_all.py

* remove sunwatcher from requirements_test_all.txt

* Remove scan_interval as configuration variable

I've set it to a fixed scan_interval of 1 minute. Removed the configuration option.

* Fix black format

* Config flow added (__init__.py)

* Config flow added (manifest.json)

* Config flow added (const.py)

* Config flow added (config_flow.py)

* Config flow added (strings.json)

* Config flow added (en.json translation)

* Config flow added (sensor.py rewritten)

* Config flow added (sensor.py)

* Config flow added (config_flows.py)

* resolve conflict config_flows.py

* Add tests

* add tests

* add tests

* Update .coverage to include all files for solarlog

* Fix await the unload

* Adjust icons, add http:// to default host

* Change icons

* Add http:// to host if not provided, fix await

* Add http:// to host if not provided, fix await

* Adjust tests for http:// added to host

* remove line

* Remove without http:// requirement

* Remove without http;// requirement
2019-10-22 23:31:43 -07:00
Paulus Schoutsen
b27dc5bd39 Merge remote-tracking branch 'origin/master' into dev 2019-10-22 23:22:24 -07:00
Diefferson Koderer Môro
6025630772 Move imports in melissa component (#28021)
* Move imports in melissa component

* Fix tox tests
2019-10-22 23:19:00 -07:00
Nikolay Vasilchuk
734704c1f7 Squeezebox LMS reconnect (#27378)
* Fix

* Review
2019-10-22 23:18:00 -07:00
Nikolay Vasilchuk
62a3dc1a94 Open Hardware Monitor Sensor reconnect (#28052)
* raise PlatformNotReady

* Don't show errors on reconnect
2019-10-22 23:17:34 -07:00
Diefferson Koderer Môro
b4054add61 Move imports in wake_on_lan component (#28100)
* Move imports in wake_on_lan component

* Fix tox tests
2019-10-22 23:14:52 -07:00
Ville Skyttä
c8b2860167 Fix bootstrap dev dependencies message (#28114)
https://github.com/home-assistant/home-assistant/pull/28060#discussion_r337701541
2019-10-22 23:12:57 -07:00
Santobert
50e9a9df4f Timer reproduce state (#28117) 2019-10-22 23:12:17 -07:00
Matt Schmitt
f67813e145 Fix service descriptions (#28122) 2019-10-22 23:09:28 -07:00
Lukas
65263bdef9 Fix #28104 - CalDav support for floating datetimes (#28123)
* Fix #28104 - CalDav support for floating datetimes

Timzones are optional in CalDav

It is possible that an entry contains neither a TZID, nor is an UTC time.
When this is the case, it should be treated as a floating date-time value,
which represent the same hour, minute, and second value regardless of which
time zone is currently being observed.

For Home-Assistant the correct timezone therefore is whatever is configured
as local time in the settings.

See https://www.kanzaki.com/docs/ical/dateTime.html

* Revert "Fix #28104 - CalDav support for floating datetimes"

This reverts commit cf32a6e390.

* add test case: floating events fail with error without patch

* Fix #28104 - CalDav support for floating datetimes

Timzones are optional in CalDav

It is possible that an entry contains neither a TZID, nor is an UTC time.
When this is the case, it should be treated as a floating date-time value,
which represent the same hour, minute, and second value regardless of which
time zone is currently being observed.

For Home-Assistant the correct timezone therefore is whatever is configured
as local time in the settings.

See https://www.kanzaki.com/docs/ical/dateTime.html

* style fix
2019-10-22 23:08:38 -07:00
Santobert
703cd96186 Add improved scene support to the input_datetime integration (#28105)
* input_datetime reproduce state

* simplify service decision
2019-10-22 23:03:38 -07:00
javicalle
8bdec13bad Move imports in hue component (#28121) 2019-10-22 22:58:57 -07:00
SteveDinn
25fd930d67 Add template filters to convert objects to and from JSON strings (#27909)
* Added filters to convert objects to and from JSON strings.

* Added extra spacing.

* Removed try/catch to get native exceptions

* Added tests.
2019-10-22 22:51:29 -07:00
Matt Kasa
ab22c61764 Support SmartStrip type devices (HS300, HS107) in tplink component (#26220)
* Add support for SmartStrip type devices (HS300, HS107) to tplink component

* Incorporate feedback from @MartinHjelmare using changes suggested by @shbatm

- Setting `_state` now uses a list comprehension
- `_alias` will use aliases from the Kasa app
- `_device_id` will be set to `_mac` for single plugs to retain backwards compatibility
2019-10-22 22:46:18 -07:00
Fredrik Erlandsson
09d8a4204a Add support for resource_template for rest sensor (#27869)
* add support for resource_template

* fix tests

* updated tests and xor(CONF_RESOURCE_TEMPLATE, CONF_RESOURCE)
2019-10-22 22:43:28 -07:00
Raman Gupta
4cb984842a Support custom source type for MQTT device tracker (#27838)
* support custom source type for MQTT device tracker

* fix typo

* add abbreviation
2019-10-22 22:26:29 -07:00
Marc Hörsken
e3f0c904b0 Add option to specify mDNS advertised IP address for HomeKit Bridge (#26791)
* Add options to specify advertised IP and MAC for HomeKit Bridge

This makes use of HAP-python's new feature in version 2.6.0
that allows to specify the mDNS advertised IP and MAC address.

This is a requirement for the following use cases:
- Running Home Assistant behind a NAT, e.g. inside Docker.
- Running it on a system with multiple interfaces there
  the default IP address, DNS entry and hostname diverge.

The forwarding of the required mDNS packets can be done with
an avahi-daemon based gateway, e.g. by using enable-reflector=yes.

Specifying the MAC address makes it possible to identify an
accessory in case HA is run inside a ephemeral docker container.

Whitespace changes were performed due to black and flake8.

* Update tests for HomeKit Bridge due to IP and MAC advertising

Whitespace changes were performed due to black and flake8.

* Remove the possibility to set the MAC address of the HomeKit Bridge

Since the MAC address is a random device ID, there is no need
for the user to be able to set a custom MAC address value for it.

Whitespace changes were performed due to black and flake8.
2019-10-22 22:06:21 -07:00
ochlocracy
da094e09fa Implement ToggleController, RangeController, and ModeController in alexa (#27302)
* Implement AlexaToggleController, AlexaRangeController, and AlexaModeController interfaces.

* Implement AlexaToggleController, AlexaRangeController, and AlexaModeController interfaces.

* Unkerfuffled comments to please the pydocstyle gods.

* Unkerfuffled comments in Tests to please the pydocstyle gods.

* Added additional test for more coverage.

* Removed OSCILLATING property check from from ModeController.

* Added capability report tests for ModeController, ToggleController, RangeController, PowerLevelController.

* Update homeassistant/components/alexa/capabilities.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/alexa/capabilities.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Corrected mis-spelling of AlexaCapability class.

* Changed instance from method to property in AlexaCapability class.

* Refactored to add {entity.domain}.{entity.attribute} to the instance name.

* Improved type handling for configuration object.
Added additional test for configuration object.

* Added Tests for unsupported domains for ModeController and RangeController

* Made changes to improve future scaling for other domains.

* Split fan range to speed maps into multiple constants.
2019-10-22 22:01:03 -07:00
HomeAssistant Azure
dc3aa43f73 [ci skip] Translation update 2019-10-23 00:32:15 +00:00
Franck Nijhof
adb15286b4 Fix test coverage, reverting top level import ptvsd (#28118) 2019-10-22 16:13:34 -07:00
Erik Montnemery
4700d647b0 Minor tweaks for sensor device automations (#27829)
* Minor tweaks for sensor device automations

* Change unit_of_measurement to suffix in extra_fields

* Address review comment
2019-10-22 11:40:07 -07:00
Diefferson Koderer Môro
04dbe5bc84 Move imports in dsmr component (#27974)
* Move imports in dsmr component

* Review

* Fix tests
2019-10-22 18:50:49 +02:00
bastshoes
0226b76e0a Add support SQL VACUUM for PostgeSQL (#28106)
* Add support SQL VACUUM for PostgeSQL

VACUUM PostgreSQL DB if repack is true

* Update tests
2019-10-22 08:39:26 -07:00
Santobert
c2c9213e9b Add improved scene support to the counter integration (#28103)
* Add improved scene support to the counter integration

* Remove comment
2019-10-22 08:28:06 -07:00
Pascal Roeleven
37bf577284 Add support for more Orange Pi devices (#28109)
* Bump OPi.GPIO to 0.4.0

* Move imports to top-level
2019-10-22 08:23:39 -07:00
Mark Coombes
09b4f65515 Add modelnumber for ecobee4 (#28107) 2019-10-22 08:22:42 -07:00
Fabian Affolter
acee87bef6 Support to use Whatsapp numbers (fixes ##28065) (#28078) 2019-10-22 09:00:58 +02:00
Diefferson Koderer Môro
77d55a3b15 Move imports in isy994 component (#28004) 2019-10-21 22:40:49 -07:00
Diefferson Koderer Môro
4a54b130cb Move imports in ptvsd component (#28087) 2019-10-21 22:39:36 -07:00
Diefferson Koderer Môro
3692c7496e Move imports in gtfs component (#27999)
* Move imports in gtfs component

* Fix pylint
2019-10-21 22:38:33 -07:00
Diefferson Koderer Môro
ff17bb4a56 Move imports in knx component (#28008)
* Move imports in knx component

* Fix pylint
2019-10-21 22:38:21 -07:00
Diefferson Koderer Môro
6c18bbcf04 Move imports in lastfm component (#28010)
* Move imports in lastfm component

* Fix pylint
2019-10-21 22:38:01 -07:00
Diefferson Koderer Môro
5d317dc096 Move imports in miflora component (#28025)
* Move imports in miflora component

* Fix pylint
2019-10-21 22:37:48 -07:00
Diefferson Koderer Môro
1a48c347a4 Move imports in mitemp_bt component (#28026)
* Move imports in mitemp_bt component

* Fix pylint
2019-10-21 22:37:31 -07:00
Diefferson Koderer Môro
a8c6b04906 Move imports in opencv component (#28042)
* Move imports in opencv component

* Fix pylint
2019-10-21 22:37:09 -07:00
Diefferson Koderer Môro
87cc661087 Move imports in pocketcasts component (#28084) 2019-10-21 22:36:46 -07:00
Diefferson Koderer Môro
1313ec4ec8 Move imports in proliphix component (#28085) 2019-10-21 22:36:35 -07:00
Diefferson Koderer Môro
2d36e9c08e Move imports in prometheus component (#28086) 2019-10-21 22:35:43 -07:00
Diefferson Koderer Môro
0193207b5c Move imports in recollect_waste component (#28089) 2019-10-21 22:35:25 -07:00
Diefferson Koderer Môro
40fbfe7a93 Move imports in rejseplanen component (#28091) 2019-10-21 22:35:05 -07:00
Diefferson Koderer Môro
3e8f2bf2fc Move imports in remember_the_milk component (#28092) 2019-10-21 22:34:51 -07:00
Diefferson Koderer Môro
d9b890a402 Move imports in repetier component (#28093) 2019-10-21 22:34:35 -07:00
Diefferson Koderer Môro
4a3d6208ae Move imports in rpi_pfio component (#28094) 2019-10-21 22:33:23 -07:00
Diefferson Koderer Môro
828bf1b400 Move imports in sesame component (#28095) 2019-10-21 22:33:02 -07:00
Diefferson Koderer Môro
f440259edc Move imports in seven_segments component (#28096) 2019-10-21 22:32:53 -07:00
Diefferson Koderer Môro
953f31dd55 Move imports in shiftr component (#28097) 2019-10-21 22:32:37 -07:00
Diefferson Koderer Môro
d9cb9601aa Move imports in skybeacon component (#28099) 2019-10-21 22:31:58 -07:00
Diefferson Koderer Môro
1111e150f4 Move imports in shodan component (#28098) 2019-10-21 22:31:41 -07:00
HomeAssistant Azure
2cc039dbc4 [ci skip] Translation update 2019-10-22 00:32:10 +00:00
Alexei Chetroi
fe7c45b363 Move remaining of ZHA imports to top level. (#28071)
* Move ZHA import to top level.
* ZHA tests: move imports to top level.
2019-10-21 19:30:56 -04:00
jjlawren
fc8920646b Fix Plex test timeouts (#28077)
* Ensure mocked calls are inside patch

* Avoid filesytem I/O
2019-10-21 16:29:04 -07:00
Paulus Schoutsen
cd00d556d4 Merge pull request #28073 from home-assistant/rc
0.100.3
2019-10-21 16:28:27 -07:00
Santobert
92508af253 Counter configure with value (#28066) 2019-10-21 15:01:35 -07:00
Pascal Vizeli
0d16e025df New cache on Azure (#27739)
* New cache on Azure

* Update azure-pipelines-ci.yml

* Update azure-pipelines-ci.yml

* Update azure-pipelines-ci.yml

* Update azure-pipelines-ci.yml

* Update azure-pipelines-ci.yml
2019-10-21 14:59:51 -07:00
Paulus Schoutsen
60846183f0 Bumped version to 0.100.3 2019-10-21 14:57:02 -07:00
Aaron Bach
e8b2d7d248 Update pymyq to 2.0.0 (#28069)
* Update pymyq to 2.0.0

* Removed unnecessary update

* Restore `type` parameter (as optional)
2019-10-21 14:56:58 -07:00
jjlawren
b79716ab93 Use URI provided by Plex for local connections (#27515)
* Use provided URI for local connections

* Use provided plexapi connection method

* Remove unused mock from tests

* Handle potential edge case(s)
2019-10-21 14:56:43 -07:00
jjlawren
b0d246d6a7 Rewrite Plex tests (#27624) 2019-10-21 14:56:37 -07:00
Diefferson Koderer Môro
4935ef5233 Move imports in piglow component (#28046)
* Move imports in piglow component

* Fix  pylint
2019-10-21 23:30:17 +02:00
Josef Schlehofer
6c39d77e23 Upgrade youtube_dl to version 2019.10.22 (#28070) 2019-10-21 23:06:50 +02:00
Otto Winter
ef194d1b82 Fix mypy missing from dev install script (#28060)
* Fix mypy missing

* Update bootstrap

* Update script/bootstrap

Co-Authored-By: cgtobi <cgtobi@users.noreply.github.com>
2019-10-21 13:56:02 -07:00
Aaron Bach
86b204df0e Update pymyq to 2.0.0 (#28069)
* Update pymyq to 2.0.0

* Removed unnecessary update

* Restore `type` parameter (as optional)
2019-10-21 14:46:39 -06:00
Patrik
86347a3d5f Refactor Tradfri light group (#27714)
* Set same manufacturer name of gateway as of devices

* Refactor Tradfri light group

* Restore should_poll and async_update
2019-10-21 21:42:17 +02:00
Alexei Chetroi
a0c50f4794 Leverage zigpy for IEEE address conversions (#27972)
* Refactor EUI64 conversions.

* Update ZHA dependencies.

* Update tests.
2019-10-21 13:14:17 -04:00
Erik Montnemery
643257d911 Include subscriber information when MQTT message can't be decoded (#28062) 2019-10-21 17:34:58 +02:00
Ville Skyttä
70ddab2f3c Helpers type hint additions and improvements (#27986)
* Helpers type hint additions and improvements

* Fix async setup dump callback signature
2019-10-21 17:54:59 +03:00
Otto Winter
ba10d5d604 Add ESPHome sensor force_update option (#28059)
* Add ESPHome sensor force_update option

* Update aioesphomeapi to 2.4.0
2019-10-21 16:06:57 +02:00
David Bonnes
269c8f1d14 Add hvac_action to geniushub (#28056)
* add hvac_action() to climate zones
2019-10-21 14:04:56 +01:00
Quentame
ac467d0b3f Not slugify cert_expiry name (#28055) 2019-10-21 14:30:49 +02:00
Pascal Roeleven
6ba437d83a Code cleanup for orangepi_gpio (#27958)
* Code cleanup for orangepi_gpio

* Move constants to const.py

* Use async wherever possible

* Remove obsolute functions

* Use relative package integration imports

* Move callbacks to async_added_to_hass

* Avoid side effects in init

* Prevent blocking I/O in coroutines

* Make sure entity is setup before added
2019-10-21 13:56:03 +02:00
Ties de Kock
a05144bb8b Fix buienradar component and add smoke tests (#27965)
* Fixes the buienradar component and add smoke tests

  * Fix errors due to circular imports after imports were moved.
  * Add smoke test so this situation will be caught in the future.

* Add buienradar.util to coveragerc

* Refactor tests to standalone pytest test function style

* Add __init__ to buienradar tests
2019-10-21 13:52:25 +02:00
Fabian Affolter
ea1401d0b6 Upgrade discord.py to 1.2.4 (#28054) 2019-10-21 13:48:07 +02:00
Matthew Turney
6c48abcaa5 rest_command component should support PATCH method (#27989)
Without PATCH the rest_command component lacks full RESTful API
support.
2019-10-21 11:20:18 +02:00
Alan Tse
1e832dc9ec Bump teslajsonpy and add update switch (#27957)
* bump teslajsonpy to 0.0.26
breaking change

* add update switch to tesla

* bump requirements_all.txt for teslajsonpy

* address requested style changes

* fix bug where update switch not loaded
2019-10-21 10:59:58 +02:00
jjlawren
d1fcc5762b Make dispatch signals unique per server (#28029) 2019-10-21 10:44:07 +02:00
Diefferson Koderer Môro
6844d203a1 Move imports in gpsd component (#27997) 2019-10-21 10:41:20 +02:00
Diefferson Koderer Môro
5fb3f6038b Move imports in itach component (#28005) 2019-10-21 10:24:26 +02:00
Diefferson Koderer Môro
322399c0af Move imports in kira component (#28007) 2019-10-21 10:24:06 +02:00
Diefferson Koderer Môro
36ff790a39 Move imports in greenwave component (#27998) 2019-10-21 10:22:52 +02:00
Diefferson Koderer Môro
d5799d020a Move imports in insteon component (#28001) 2019-10-21 10:22:34 +02:00
Diefferson Koderer Môro
1a68591fe6 Move imports in juicenet component (#28006) 2019-10-21 10:22:13 +02:00
Diefferson Koderer Môro
9fa99eaea9 Move imports in konnected component (#28009) 2019-10-21 10:21:40 +02:00
Rami Mosleh
09f9875ccf Glances config flow (#27221)
* Glances Integration with config flow

* Glances Integration with config flow

* fix description texts

* Glances Integration with config flow

* Glances Integration with config flow

* fix description texts

* update .coverage.py

* add codeowner

* add test_options

* Fixed typos, Added import, fixed tests

* sort imports

* remove commented code
2019-10-21 10:17:21 +02:00
Diefferson Koderer Môro
09acbc211c Move imports in lg_soundbar component (#28011) 2019-10-21 10:09:38 +02:00
Diefferson Koderer Môro
9a9cd1d0b2 Move imports in lifx component (#28012) 2019-10-21 10:09:14 +02:00
Diefferson Koderer Môro
6742b36a3d Move imports in lifx_legacy component (#28013) 2019-10-21 10:08:04 +02:00
Diefferson Koderer Môro
90731555f8 Move imports in loopenergy component (#28017) 2019-10-21 10:07:35 +02:00
Diefferson Koderer Môro
8922d702ae Move imports in lupusec component (#28018) 2019-10-21 10:07:09 +02:00
Diefferson Koderer Môro
4db761e6f2 Move imports in metoffice component (#28023) 2019-10-21 10:06:38 +02:00
Kevin McCormack
936dac2270 Add Vivotek camera component code owner (#28024) 2019-10-21 10:06:16 +02:00
Diefferson Koderer Môro
3e9d28f28a Move imports in mobile_app component (#28027) 2019-10-21 10:05:41 +02:00
Diefferson Koderer Môro
206f8cef5c Move imports in mychevy component (#28032) 2019-10-21 10:05:05 +02:00
Diefferson Koderer Môro
38db4b0a23 Move imports in mythicbeastsdns component (#28033) 2019-10-21 10:04:33 +02:00
Diefferson Koderer Môro
92ed8362ce Move imports in niko_home_control component (#28036) 2019-10-21 10:04:10 +02:00
Diefferson Koderer Môro
e9674374a4 Move imports in norway_air component (#28037) 2019-10-21 10:03:49 +02:00
Diefferson Koderer Môro
56a7233e0f Move imports in ohmconnect component (#28041) 2019-10-21 10:03:24 +02:00
Diefferson Koderer Môro
2f96691938 Move imports in otp component (#28044) 2019-10-21 10:02:59 +02:00
Diefferson Koderer Môro
bbc71441a1 Move imports in pandora component (#28045) 2019-10-21 10:02:22 +02:00
Diefferson Koderer Môro
fb79c45645 Move imports in iperf3 component (#28002) 2019-10-21 09:59:50 +02:00
Diefferson Koderer Môro
cf2ee1a09f Move imports in iss component (#28003) 2019-10-21 09:59:26 +02:00
Diefferson Koderer Môro
96509c0c0b Move imports in oasa_telematics component (#28039) 2019-10-21 09:58:59 +02:00
Diefferson Koderer Môro
67f7146cab Move imports in linode component (#28014) 2019-10-21 09:58:46 +02:00
Diefferson Koderer Môro
e19663f172 Move imports in lirc component (#28015) 2019-10-21 09:58:22 +02:00
Diefferson Koderer Môro
6de95995aa Move imports in logbook component (#28016) 2019-10-21 09:57:31 +02:00
Diefferson Koderer Môro
ff385d5e2b Move imports in lw12wifi component (#28019) 2019-10-21 09:56:19 +02:00
Diefferson Koderer Môro
c1fccee83a Move imports in magicseaweed component (#28020) 2019-10-21 09:55:53 +02:00
Diefferson Koderer Môro
1342fe2b3c Move imports in openevse component (#28043) 2019-10-21 09:55:29 +02:00
Diefferson Koderer Môro
265a1f1fb6 Move imports in neurio_energy component (#28035) 2019-10-21 09:54:51 +02:00
Diefferson Koderer Môro
cc3173e3ce Move imports in namecheapdns component (#28034) 2019-10-21 09:54:27 +02:00
Diefferson Koderer Môro
6a392e13dd Move imports in mpd component (#28030) 2019-10-21 09:53:59 +02:00
Diefferson Koderer Môro
1e27e2827d Move imports in mvglive component (#28031) 2019-10-21 09:53:28 +02:00
Diefferson Koderer Môro
ad39b957d6 Move imports in mopar component (#28028) 2019-10-21 09:52:49 +02:00
Diefferson Koderer Môro
4bb82fa8ad Move imports in message_bird component (#28022) 2019-10-21 09:48:25 +02:00
HomeAssistant Azure
ff3c0e5697 [ci skip] Translation update 2019-10-21 00:32:17 +00:00
Diefferson Koderer Môro
a13f8a1781 Move imports in frontend component (#27988) 2019-10-21 00:04:56 +02:00
Diefferson Koderer Môro
bb381d6060 Move imports in eliqonline component (#27980) 2019-10-20 23:39:24 +02:00
javicalle
87c0207163 Move imports in osramlightify component (#27985) 2019-10-20 23:38:45 +02:00
Diefferson Koderer Môro
ce00d06cbd Move imports in elkm1 component (#27982) 2019-10-20 23:37:52 +02:00
Diefferson Koderer Môro
ef8f88e25a Move imports in everlights component (#27983) 2019-10-20 23:36:43 +02:00
Diefferson Koderer Môro
bf6a30d1bb Move imports in goalfeed component (#27995) 2019-10-20 23:35:42 +02:00
Diefferson Koderer Môro
92ed89969c Move imports in gntp component (#27994) 2019-10-20 23:28:23 +02:00
Diefferson Koderer Môro
ab2d1ee134 Move imports in gc100 component (#27993) 2019-10-20 23:23:14 +02:00
Diefferson Koderer Môro
dd4075d495 Move imports in frontier_silicon component (#27990) 2019-10-20 23:22:50 +02:00
Diefferson Koderer Môro
5fa8c02e64 Move imports in futurenow component (#27991) 2019-10-20 23:21:17 +02:00
David Bonnes
bce9f14751 isort the evohome code (#27977) 2019-10-20 20:20:53 +01:00
David Bonnes
5d94c82175 isort the geniushub code (#27978) 2019-10-20 20:17:27 +01:00
Diefferson Koderer Môro
ca0a4a8750 Move imports for ebusd component (#27979) 2019-10-20 21:16:04 +02:00
David Bonnes
8356d92f04 Refactor entity_ids, tweak names and consolidate classes (#27921)
* refactor entity_ids, and consolidate classes

* isort the code
2019-10-20 19:48:52 +01:00
Diefferson Koderer Môro
54a711ca6a Move imports in dweet component (#27976) 2019-10-20 20:47:39 +02:00
Diefferson Koderer Môro
9db07b2a41 Move imports in onvif component (#27969) 2019-10-20 20:46:51 +02:00
David Bonnes
6951d78874 move imports in serial component (#27971) 2019-10-20 20:46:24 +02:00
Diefferson Koderer Môro
57b6c2c6b0 Move imports in crimereports component (#27973) 2019-10-20 20:41:11 +02:00
Diefferson Koderer Môro
c44163548d Move imports in dte_energy_bridge component (#27975) 2019-10-20 20:40:13 +02:00
David Bonnes
425e7fd1a7 bugfix evohome and bump client (#27968)
* bump client to 0.3.4b1

* handle bad schedules that cause issue #27768
2019-10-20 17:51:08 +01:00
Miroslav Ždrale
22b29a8005 Add option to disable HTTPS verification in Luci component (#27946)
* Add option to disable HTTPS verification in Luci component

* Update code owners

* Update code owners
2019-10-20 09:43:44 -07:00
Teemu R
ac5ce4136e Remove tplink device tracker (#27936)
* Remove tplink device tracker

Version 0.94 added a distress signal and since then nothing has happened.
This commit removes the device tracker which should have never been
a part of tplink integration in the first place as it does not share
anything with this pyhs100-based integration / kasa smarthome.

* add updated requirements_test_all that was forgotten

* remove unit tests
2019-10-20 18:11:48 +02:00
Michał Mrozek
5a592f1291 move imports in sma component (#27945) 2019-10-20 14:33:58 +02:00
Quentame
5ce437dc30 Fixing config_entries.async_forward_entry_unload calls (step 1) (#27857) 2019-10-20 12:15:46 +02:00
Michał Mrozek
c42ca94a86 move imports in smarthab component (#27942) 2019-10-20 12:14:07 +02:00
Michał Mrozek
ed46834a30 Move imports in sql component (#27713)
* move imports in sql component

* fix: variable redeclaration

* fix: close test db session on platform setup
2019-10-20 10:10:27 +02:00
Jacob Mansfield
9571f869d1 Fix whois error, check expiration_date for list and pick first (#27930) 2019-10-20 10:07:34 +02:00
Michał Mrozek
e01562ceea Move imports in snmp component (#27939)
* move imports in snmp component

* fix: move hlapi import top level
2019-10-20 10:06:32 +02:00
Michał Mrozek
a5ec5b567e move imports in snapcast component (#27940) 2019-10-20 10:05:37 +02:00
Michał Mrozek
2706e3289d Move imports in smappee component (#27943)
* move imports in smappee component

* fix: unneeded object inheritance
2019-10-20 10:05:11 +02:00
HomeAssistant Azure
2c00ff7e52 [ci skip] Translation update 2019-10-20 00:32:18 +00:00
Michał Mrozek
bfba46d64a move imports in sonos component (#27938) 2019-10-19 23:52:42 +02:00
jjlawren
eeb1bfc6f5 Central update for Plex platforms (#27764)
* Update Plex platforms together

* Remove unnecessary methods

* Overhaul of Plex update logic

* Apply suggestions from code review

Use set instead of list

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Review suggestions and cleanup

* Fixes, remove sensor throttle

* Guarantee entity name, use common scheme

* Keep name stable once set
2019-10-19 23:31:15 +02:00
Santobert
5c50fa3405 Bump pybotvac (#27933) 2019-10-19 22:56:57 +02:00
Tim McCormick
2a269fb9eb Update pysonos to 0.0.24 (#27937) 2019-10-19 22:54:36 +02:00
Paulus Schoutsen
bb5da77f2c Import shuffle (#27935)
* Simplify persistent_notification ws command

* Move cors import inside setup

* Fix stream imports
2019-10-19 12:44:51 -07:00
Hmmbob
febc48c84b Remove stride (#27934)
* Remove stride

* Remove Stride

* Remove stride

* Remove stride

* Remove stride
2019-10-19 21:40:45 +02:00
David Bonnes
efae9a24d5 remove duplicate unique_id, add unique_id for issues (#27916) 2019-10-19 12:27:15 -07:00
Franck Nijhof
cb061e57d2 Add support for AdGuard Home v0.99.0 (#27926)
* Bump adguardhome to 0.3.0

* Add a more user friendly version handling and added logs

* ✏️ Fixes spelling error in abort messages

* ✏️ Error messages improvements, suggested by cgtobi
2019-10-19 12:11:09 -07:00
shred86
48e5655379 Bump abodepy version (#27931) 2019-10-19 12:10:35 -07:00
Santobert
5fa4632c12 Add improved scene support to the cover integration (#27914) 2019-10-19 11:39:31 -07:00
Ville Skyttä
381d423fec Upgrade mypy to 0.740 (#27913)
* Upgrade mypy to 0.740

http://mypy-lang.blogspot.com/2019/10/mypy-0740-released.html

* Type hint additions

* Type fixes

* Remove no longer needed type ignores and casts

* Disable untyped definition checks in bunch of files
2019-10-19 11:35:57 -07:00
Paulus Schoutsen
758fcc9b00 Remove helper imports relying on installed requirements (#27898) 2019-10-19 11:33:21 -07:00
bouni
9ec0602986 Move imports in cpuspeed component (#27890) 2019-10-19 20:33:05 +02:00
Greg Rapp
840001e168 Added night arm mode support to Envisalink component (#27087) 2019-10-19 11:26:07 -07:00
SukramJ
de1477f00b Bump version of homematicip to 0.10.13 (#27928)
The Home websocket can now automatically reopen a lost connection (default)
2019-10-19 18:24:28 +02:00
Quentame
8c0deeb176 Move imports in luftdaten component (#27929) 2019-10-19 18:22:32 +02:00
SukramJ
eb48898687 Add climate profiles to Homematic IP Cloud (#27772)
* Add climate service to Homematic IP Cloud to select the active profile

* Add  profiles ass presets

* fix spelling

* Re-Add PRESET_NONE for selection

* Boost is a manual mode

* Fixes based on review

* Fixes after review
2019-10-19 17:44:40 +02:00
guillempages
f2617fd74a Split homematic color and effect support (#27299)
* [homematic] Split color and effect support

There are homematic devices (like HmIP-BSL) that support color but
do not support effects.
Split the support, so that color can be supported even if effects are not.

* Make effect fully independent of color

If a device supports effects for e.g. just brightness, it shouldn't be coupled to the color
2019-10-19 14:40:42 +02:00
Pascal Vizeli
1c0814d6f6 Run pylint parallel (#27919) 2019-10-19 13:42:49 +02:00
Pascal Vizeli
1f96a7becf Update azure-pipelines-ci.yml 2019-10-19 12:31:40 +02:00
Ville Skyttä
1ec01b5e6c Upgrade pylint to 2.4.3 and astroid to 2.3.2 (#27912)
https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-3
2019-10-19 12:03:52 +02:00
Joakim Plate
2bd9f5680d Report state (#27759)
* Add report state config

* Add initial steps for local report state

* Use owner of system as user_id

* First working prototype

* Only report state if requested

* Add some good logging and adjust constant name

* Move jwt generation out to non member

* Move cache out to caller

* Remove todo about cache

* Move getting token out of class

* Add timeout on calls

* Validate config dependency

* Support using service key to do sync call when api_key is not set

* Make sure timezone is fixed for datetime dummy

* Use exact expire_in time

* Support renewing token on 401

* Test retry on 401

* No need to declare dummy key twice

* Correct some docs on functions

* Add test for token expiry
2019-10-18 22:37:44 -07:00
Paulus Schoutsen
6303117354 Dont create coroutine until acting on it (#27907) 2019-10-18 20:58:43 -07:00
Brig Lamoreaux
37b23e9205 Move imports to top for harman_kardon_avr (#27903) 2019-10-18 20:58:15 -07:00
Brig Lamoreaux
1e727f339f Move imports in harmony component (#27904) 2019-10-18 20:58:07 -07:00
Paulus Schoutsen
00521b5e80 Fix flaky integration test (#27905) 2019-10-18 20:57:54 -07:00
Brig Lamoreaux
0cd55d6716 Move imports for hp_ilo components (#27906) 2019-10-18 20:57:47 -07:00
Brig Lamoreaux
2110fea02b Move import for htu21d component (#27908) 2019-10-18 20:57:36 -07:00
Pascal Vizeli
435cbb7f7e Azure pytest parallel (#27864)
* Azure pytest parallel

* Update azure-pipelines-ci.yml

* Remove test that does nothing
2019-10-18 20:51:53 -07:00
Santobert
7ed659151c Vacuum reproduce state (#27868)
* Vacuum reproduce state

* Add missing states

* Improved process

* Fix tests
2019-10-18 19:49:08 -07:00
Paulus Schoutsen
6391a68fd5 Better header check for OAuth2 helper (#27897) 2019-10-18 20:11:54 -05:00
foreign-sub
914ceea72d Bump keyring to 19.2.0 (#27899) 2019-10-18 20:09:41 -05:00
Paulus Schoutsen
d98114d2ab Guard cloud check (#27901)
* Guard cloud check

* Fix pos args
2019-10-18 20:08:53 -05:00
HomeAssistant Azure
9e8c391c81 [ci skip] Translation update 2019-10-19 00:32:15 +00:00
Heine Furubotten
065c6f4c9c Move imports for nilu component (#27896) 2019-10-19 01:05:36 +02:00
bouni
6df34a0128 Move imports in channels component (#27876) 2019-10-19 01:04:10 +02:00
bouni
422885b7fd Move imports in buienradar component (#27873) 2019-10-19 01:02:54 +02:00
bouni
d78f14b20a Move imports in canary component (#27874) 2019-10-19 01:01:59 +02:00
bouni
dc5d38128c Move imports in cast component (#27875) 2019-10-19 00:59:58 +02:00
bouni
8cf443110a Move imports in cisco_mobility_express component (#27877) 2019-10-19 00:59:07 +02:00
bouni
29ef49fdd9 Move imports in coolmaster component (#27888) 2019-10-19 00:57:59 +02:00
Brig Lamoreaux
535da96d4d Move imports to top for hikvisioncam (#27895) 2019-10-19 00:56:59 +02:00
Bram Kragten
8e3d210818 Add remove function to hue sensors (#27652)
* Add remove function to sensors

* Fix + comments

* Update light.py
2019-10-18 15:41:11 -07:00
bouni
1d8e366278 Move imports in cloud component (#27881) 2019-10-18 15:39:37 -07:00
bouni
b2b140e8d0 Move imports in cmus component (#27883) 2019-10-19 00:26:58 +02:00
bouni
7ed5616faa Move imports in cisco_webex_teams component (#27878) 2019-10-19 00:23:16 +02:00
bouni
d7a8a635ba Move imports in ciscospark component (#27879) 2019-10-19 00:14:49 +02:00
bouni
2e416168cf Move imports in coinbase component (#27884) 2019-10-19 00:05:42 +02:00
bouni
b11dc0f50f Move imports in coinmarketcap component (#27885) 2019-10-19 00:04:37 +02:00
bouni
93db814b15 Move imports in comfoconnect component (#27886) 2019-10-19 00:01:03 +02:00
bouni
dc30119d20 Move imports in concord232 component (#27887) 2019-10-19 00:00:00 +02:00
bouni
c333daab10 Move imports in cppm_tracker component (#27889) 2019-10-18 23:58:00 +02:00
springstan
2a95180d3b Move imports in fritzbox, fritz device tracker, fritzdect, fritzbox netmonitor (#27746)
* Moved imports to top-level in fritzbox_netmonitor component

* Moved imports to top-level in fritz, fritzbox and fritzdect
2019-10-18 14:54:56 -07:00
Paulus Schoutsen
b6c26cb363 Introduce new OAuth2 config flow helper (#27727)
* Refactor the Somfy auth implementation

* Typing

* Migrate Somfy to OAuth2 flow helper

* Add tests

* Add more tests

* Fix tests

* Fix type error

* More tests

* Remove side effect from constructor

* implementation -> auth_implementation

* Make get_implementation async

* Minor cleanup + Allow picking implementations.

* Add support for extra authorize data
2019-10-18 13:06:33 -07:00
bouni
6157be23dc Move imports in cloudflare integration(#27882) 2019-10-18 21:32:14 +02:00
Ville Skyttä
103ffacea7 Use pre-commit in CI and tox (#27743) 2019-10-18 12:20:26 -07:00
Paulus Schoutsen
a119932ee5 Refactor the conversation integration (#27839)
* Refactor the conversation integration

* Lint
2019-10-18 11:46:45 -07:00
Malte Franken
83a709b768 Move imports in recorder component (#27859)
* move imports to top-level in recorder init

* move imports to top-level in recorder migration

* move imports to top-level in recorder models

* move imports to top-level in recorder purge

* move imports to top-level in recorder util

* fix pylint
2019-10-18 10:14:54 -07:00
bouni
e95b8035ed Move imports in blinksticklight component (#27851) 2019-10-18 17:15:20 +02:00
bouni
bb76678b36 Move imports in blink component (#27850) 2019-10-18 17:14:50 +02:00
bouni
56dde68c5b Move imports in bmw_connected_drive component (#27853) 2019-10-18 17:14:01 +02:00
bouni
03cc7f377b Move imports in bom component (#27854) 2019-10-18 17:12:42 +02:00
Pascal Vizeli
9392cbff03 cryptography + numpy for python 3.8 (#27861) 2019-10-18 16:11:40 +02:00
bouni
3bb46d5080 Move blackbird imports (#27849)
* Move imports in blackbird component

* fixed tests after import move to top level
2019-10-18 15:12:36 +02:00
bouni
c0d084fb04 Move imports in blockchain component (#27852) 2019-10-18 15:12:00 +02:00
bouni
58d2d858cd Move imports in brunt component (#27856) 2019-10-18 15:08:40 +02:00
Tomasz Jagusz
675c91b436 Move imports in yweather (#27842)
Changes checked with pylint.
Formatted with black
Imports sorted with isort
2019-10-18 10:11:53 +02:00
bouni
511766cb06 Move imports in apns component (#27804)
* Move imports in apns component

* fixed apns tests
2019-10-17 22:13:29 -07:00
Quentame
5cb145f588 Move imports in openweathermap component (#27779) 2019-10-17 22:12:32 -07:00
Tobias Efinger
7ec8384fa6 Add service description for route53 integration (#27774) 2019-10-17 22:11:51 -07:00
Bendik Brenne
9625e0463b Add sinch integration (notify component) (#26502)
* Added sinch integration (notify component)

* Updated requirements

* Fixes according to lint

* Update homeassistant/components/sinch/notify.py

Co-Authored-By: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>

* Update homeassistant/components/sinch/notify.py

Co-Authored-By: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>

* Update homeassistant/components/sinch/notify.py

Co-Authored-By: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>

* Adds @bendikrb as codeowner

* Imports to the top. Catching specific exceptions. Logic fixes

* Updated CODEOWNERS

* Reformatting (black)

* Added sinch component to .coveragerc

* Conform to pylintrc

* Okay, Mr. Black

* Fixed: Catching too general exception Exception
2019-10-17 21:44:09 -07:00
Tsvi Mostovicz
2bc6b59e79 Move holiday info into a single sensor with multiple attributess (#27654)
* Move holiday onfo into a single sensor with multiple attributess

* Add tests for holiday attributes
2019-10-17 20:32:24 -07:00
Raman Gupta
4e25807b7d Add ability for MQTT device tracker to map non-default topic payloads to zones/states (#27143)
* add ability for MQTT device tracker to map nondefault topic payloads to zones

* update new parameter name and add abbreviation

* support for payload_home, payload_not_home, and payload_custom

* use constants STATE_NOT_HOME and STATE_HOME as defaults

* reference state constants directly

* add empty dict as default for payload_custom

* change parameter name for custom mapping of payloads to non-home zones to be more descriptive

* removed 'payload_other_zones' per ballobs review

* remove abbreviation for 'payload_other_zones'

* add tests for feature
2019-10-17 17:51:27 -07:00
mvn23
489340160b Add opentherm_gw options flow. (#27316) 2019-10-17 17:36:34 -07:00
jjlawren
0888098718 Use URI provided by Plex for local connections (#27515)
* Use provided URI for local connections

* Use provided plexapi connection method

* Remove unused mock from tests

* Handle potential edge case(s)
2019-10-17 17:31:53 -07:00
SukramJ
564789470e Add device_info to HomematicIP climate and acp (#27771) 2019-10-17 17:25:16 -07:00
Tiit Rätsep
81178661ae Added handling for connection errors in state update, added available property (#27794) 2019-10-17 17:23:11 -07:00
Maciej Bieniek
86a4be1636 Fix attribution (#27815) 2019-10-17 17:22:40 -07:00
Quentame
dcdcfdd376 Unload linky config entry (#27831) 2019-10-17 17:22:16 -07:00
scheric
3e7fcc7575 Add grid sensors to SolarEdge_local (#27247)
* Add grid sensors

* Formatting

* Add possibility to add attributes

* Add optimizer attribute

* Remove bare 'except'

* add proper exception

* Remove return attribution 0

* Ad inverter attribution

* Style change

* Add attribute name to sensors constants

* SENSOR_TYPES  alphabetical and snake_case lower

* Formatting

* forgot snake_case lower

* Add extra meter sensors

* add critical error for debugging

* Update sensor.py

* swam meter sensors

* Add suitable icons to meter reading

* Fix for pointless-statement

homeassistant/components/solaredge_local/sensor.py:173:8: W0104: Statement seems to have no effect (pointless-statement)
homeassistant/components/solaredge_local/sensor.py:192:8: W0104: Statement seems to have no effect (pointless-statement)
homeassistant/components/solaredge_local/sensor.py:349:16: W0104: Statement seems to have no effect (pointless-statement)
homeassistant/components/solaredge_local/sensor.py:356:16: W0104: Statement seems to have no effect (pointless-statement)

* Rename import energy sensor

* Insert feadback

* Change to debug info

* Add check if attribute name exist

* Remove unnecessary else

* Add return None if no attributes

* flake
2019-10-17 17:21:00 -07:00
Erik Montnemery
6d083969c2 Add device action support to the lock integration (#27499)
* Add device action support to the lock integration

* Check that the enitity supports open service
2019-10-17 17:20:10 -07:00
Quentame
bd0403c65e Move imports in telegram_bot component (#27785) 2019-10-17 17:19:34 -07:00
David Bonnes
2d1f7932ba bump client (#27799) 2019-10-17 17:19:07 -07:00
bouni
e17b8b011a Move imports in bitcoin component (#27814) 2019-10-17 17:18:47 -07:00
bouni
21754fd7cc Move imports in bbb_gpio component (#27813) 2019-10-17 17:18:22 -07:00
bouni
d95b4a6a0b Move imports in anel_pwrctrl component (#27798) 2019-10-17 17:18:11 -07:00
Tomasz Jagusz
bc58649c2b Move imports in MCP23017 component (#27769)
* mcp23017 move imports

* fix pylint errors
2019-10-17 17:17:56 -07:00
Quentame
fdf839774e Move imports in fritz + fritzbox_netmonitor component (#27823)
* Move imports in fritz + fritzbox_netmonitor component

* Fix PyLint 1
2019-10-17 17:17:24 -07:00
Quentame
22b904f5e0 Move imports in flux_led component (#27822) 2019-10-17 17:15:18 -07:00
Quentame
0965e358ea Move imports in fitbit component (#27820) 2019-10-17 17:14:53 -07:00
Quentame
fe036ed094 Move imports in flic component (#27821) 2019-10-17 17:13:20 -07:00
Ville Skyttä
3a608314c4 Mypy setup fixes (#27825)
* Install our core dependencies for mypy in azure

To match local setups and tox.

* Use "system" mypy in pre-commit instead of the "real" mypy hook

The results of mypy depend on what is installed. And the mypy hook
runs in a virtualenv of its own, meaning we'd need to install and
maintain another set of our dependencies there... no. Use the "system"
one and reuse the environment that is set up anyway already instead.

* Reintroduce needed ruamel.yaml type ignore

This ignore is required when ruamel.yaml is installed, and we want it
to be as it's part of the core dependency set.
2019-10-17 17:12:58 -07:00
Quentame
61edd33da7 Move imports in google component (#27826) 2019-10-17 17:11:51 -07:00
Quentame
6998687742 Move imports in gitlab_ci component (#27827) 2019-10-17 17:11:20 -07:00
bouni
9d583ad9f9 Move imports in baidu component (#27812) 2019-10-17 17:11:11 -07:00
bouni
54ef96e79a Move imports in awair component (#27811) 2019-10-17 17:11:01 -07:00
bouni
447d99a1ae Move imports in apcupsd component (#27803) 2019-10-17 17:10:28 -07:00
bouni
56c13503c3 Move imports in aqualogic component (#27805) 2019-10-17 17:10:16 -07:00
bouni
5eb781d378 Move imports in arlo component (#27806) 2019-10-17 17:09:47 -07:00
bouni
3cf7983e00 Move imports in asterisk_mbox component (#27807) 2019-10-17 17:08:58 -07:00
bouni
bb80d9bd16 Move imports in august component (#27810) 2019-10-17 17:06:41 -07:00
Malte Franken
1a5b4c105a Move imports in mqtt component (#27835)
* move imports to top-level in mqtt server

* move imports to top-level in mqtt configflow

* move imports to top-level in mqtt init

* move imports to top-level in mqtt vacuum

* move imports to top-level in mqtt light
2019-10-17 17:04:27 -07:00
Quentame
7637ceb880 Move imports in html5 component (#27473)
* Move imports in html5 component

* Fix tests 1

* Fix tests 2
2019-10-17 21:17:23 +02:00
tombbo
e992cfb45c Add on_off_inverted to KNX climate (#25900)
* Added a new configuration boolean parameter on_off_inverted to KNX Climate component.

* Remove unexpected spaces around equals.

* Parameter name changed to on_off_invert and modified to new version of XKNX library.

* Dict[key] for required config keys and keys with default config schema values.
2019-10-17 21:07:09 +02:00
bouni
ba0107f912 Move imports in android_ip_webcam component (#27797) 2019-10-17 17:07:36 +02:00
Pascal Vizeli
d52476333e Update devcontainer.json 2019-10-17 17:06:33 +02:00
bouni
136df743e3 moved imports to top level (#27782) 2019-10-17 15:38:58 +02:00
Jeff Irion
28cef89e03 Generate ADB key for Android TV integration (#27344)
* Generate ADB key for Android TV integration

* Remove 'do_nothing' function

* Remove 'return True'

* Re-add 2 'return True' lines
2019-10-17 15:33:20 +02:00
bouni
2c535c92bd moved imports to top level (#27784) 2019-10-17 15:05:45 +02:00
Quentame
12a8e7520e Move imports in netgear component (#27776) 2019-10-17 15:05:14 +02:00
bouni
62fcea2a8d moved imports to top level (#27781) 2019-10-17 15:04:41 +02:00
Quentame
ab598da4ba Move imports in nest component (#27778) 2019-10-17 15:03:50 +02:00
Quentame
8350e1246a Move imports in netgear_lte component (#27777) 2019-10-17 15:03:05 +02:00
Quentame
9dc0c05ee0 Move imports in imap + imap_email_content component (#27793) 2019-10-17 15:01:50 +02:00
bouni
88a78a4a18 Move imports in amcrest component (#27787) 2019-10-17 15:01:09 +02:00
Quentame
dc72aa48da Move imports in liveboxplaytv component (#27790) 2019-10-17 15:00:32 +02:00
bouni
4efa6689e4 Move imports in ampio component (#27788) 2019-10-17 15:00:00 +02:00
Quentame
9f71384524 Move imports in linux_battery component (#27789) 2019-10-17 14:59:36 +02:00
Quentame
35e0acf0a5 Move imports in keyboard component (#27791) 2019-10-17 14:58:56 +02:00
Quentame
e54f5102aa Move imports in ifttt component (#27792) 2019-10-17 14:58:23 +02:00
Tomasz Jagusz
b187ca93d0 Move imports in rpi_gpio (#27752)
* move imports for rpi_gpio

* fixed pylint error

* fix pylint error

* removed empty line

* add missing blank line

* sort with isort
2019-10-17 12:24:53 +02:00
Tomasz Jagusz
7fd606a254 bump rpi.gpio to 0.7.0 (#27753) 2019-10-17 11:30:18 +02:00
Antonio Larrosa
2d6d6ba90e Forget auth token when going offline so we can reconnect (#26630)
When an amcrest camera was unplugged and then plugged again
it was impossible to reconnect to it, since the old
auth token was reused while we need to use a new one.

In fact, the method that is called every minute to check
the camera availability is going to fail always since we're
reusing an old token.

By forgetting the token (setting it to None) when going offline,
we ensure that we'll regenerate it in the next commands thus allowing
to reconnect to the camera when it comes back online.
2019-10-17 11:29:08 +02:00
kennedyshead
46f1166edd Fix On/Off for melissa (#27733)
* Fixed On/Off for melissa

fixes #27092

* reformatted
2019-10-17 10:32:02 +02:00
Ville Skyttä
23db94c627 Run mypy in pre-commit without args to match CI (#27741) 2019-10-16 21:36:43 -07:00
springstan
e79a5baf9e Move imports in slack and socialblade (#27747)
* Moved imports to top-level in samsungtv, slack and socialblade

* Rewinded top-level imports in samsungtv component
2019-10-16 21:36:19 -07:00
Erik Montnemery
43c85c0549 Add device action support to the alarm_control_panel integration (#27616)
* Add device action support to the alarm_control_panel integration

* Improve tests
2019-10-16 21:34:56 -07:00
Robert Svensson
6ffc520b1c Axis - Improve discovery title by adding placeholder support (#27663)
* Improve discovery title by adding placeholder support
2019-10-16 20:45:03 +02:00
Josef Schlehofer
0607a30612 Upgrade youtube_dl to 2019.10.16 (#27737) 2019-10-16 20:28:59 +02:00
Andrey Kupreychik
bd95a89f45 Bump ndms2-client to 0.0.10 (#27734) 2019-10-16 20:28:12 +02:00
Pascal Vizeli
8a0f26e155 Add cache for mypy (#27745)
* Add cache for mypy

* Update ruamel_yaml.py
2019-10-16 17:37:24 +02:00
Pascal Vizeli
a1b8f4d9c3 New cache on Azure (#27739)
* New cache on Azure

* Update azure-pipelines-ci.yml

* Update azure-pipelines-ci.yml

* Update azure-pipelines-ci.yml

* Update azure-pipelines-ci.yml

* Update azure-pipelines-ci.yml
2019-10-16 17:11:25 +02:00
cgtobi
14d3b9b8f9 Bump pyatmo version to 2.3.2 (#27731)
* Bump pyatmo version to 2.3.2

* Add reachable attribute

* Add reachable attribute
2019-10-16 12:19:38 +02:00
Maciej Bieniek
ec78821161 Add sensor platform to Airly integration (#27717)
* Add sesnor.py file

* Move AirlyData to __init__

* Cleaning

* Update .coveragerc file

* Sort consts

* Sort imports

* Remove icons from sensors with device_class
2019-10-16 12:06:52 +02:00
Paolo Tuninetto
cc93dd4928 Move imports in Kodi component (#27728)
* Move imports for Kodi component

* Removed empty line ad requested by review
2019-10-16 12:05:05 +02:00
David Bonnes
44b6258e48 Add evohome high_precision temperatures (#27513)
* add high_precision (current) temperatures 
* bump client to use aiohttp for v1 client
* token saving now event-driven rather than scheduled
* protection against invalid tokens that cause issues
* tweak error message
2019-10-16 10:32:25 +01:00
bouni
5a35e52adf Move imports in device_tracker component (#27676)
* moved imports to top level

* sorted imports using isort
2019-10-16 10:25:37 +02:00
Bogdan Vlaicu
c8f6484095 New sensor platform integration for Orange and Rockland Utility smart energy meter (#27571)
* New sensor platform integration for Orange and Rockland Utility smart energy meter

* New sensor platform integration for Orange and Rockland Utility smart energy meter

* bumped the oru py version to 0.1.9

* Added PLATFORM_SCHEMA
Adde unique_id property
Changed logger level from info to debug when printing the updated sensor value
Set the SCAN_INTERVAL to 15 mins
Added exception handling durin init when creating the oru meter instance

* Various fixes base on the PR review
+ Added SCAN_INTERVAL for 15 mins

* fixed path to documentation
2019-10-16 09:52:30 +02:00
HomeAssistant Azure
b8e00925e7 [ci skip] Translation update 2019-10-16 00:32:17 +00:00
bouni
04a5f19f6a moved imports to top level (#27696) 2019-10-15 16:24:18 -07:00
springstan
2b92fd3422 Moved imports to top-level in fritzbox_callmonitor component (#27705) 2019-10-15 16:22:42 -07:00
Michał Mrozek
d4692367c5 move imports in spotcrime component (#27715) 2019-10-15 16:21:19 -07:00
Michał Mrozek
b2f6931bbe move imports in speedtestdotnet component (#27716) 2019-10-15 16:20:59 -07:00
Michał Mrozek
a58d242909 move imports in sony_projector component (#27718) 2019-10-15 16:17:09 -07:00
Rolf K
8720ca38b5 Add improved scene support for input_select (#27697)
* Add improved scene support for input_select

* Add tests for reproducing input_select states.

* Add some comments.

* Add support for set_options

Allows defining the options for an input_select in a scene.

* Add tests for set_options in test_reproduce_state

* Execute for real instead of mock execution.
2019-10-15 16:15:42 -07:00
Paulus Schoutsen
93f9afcd21 Fix config imports (#27669)
* Fix config imports

* Remove old migration

* Remove migrate tests
2019-10-15 16:15:26 -07:00
Rolf K
c700085490 Add improved scene support to input_text (#27687)
* Add improved scene support for input_text.

* Add tests for reproducing input_text states.

* Add some comments.
2019-10-15 08:37:15 -07:00
quthla
a591d78efe Bump PyMata to 2.20 (#27431)
* Bump PyMata to 2.20

* Bump PyMata to 2.20
2019-10-15 17:21:40 +02:00
bouni
6f894d2dec moved imports to top level (#27679) 2019-10-15 17:12:32 +02:00
springstan
26d19f9e1c Moved imports to top-level in spotify integration (#27703) 2019-10-15 17:12:12 +02:00
AaronDavidSchneider
d534f30042 Update fritzconnection requirement to 0.8.4 (#27698)
* update fritzconnection requirement

* update requierements for other components and requierements_all
2019-10-15 17:11:17 +02:00
bouni
0e5f24d60c moved imports to top level (#27693) 2019-10-15 17:57:02 +05:30
Luca Angemi
3e26b49cc2 Add battery status in owntracks (#27686)
* Add battery status in owntracks

* Remove trailing whitespaces
2019-10-15 17:56:39 +05:30
bouni
b22eb22358 moved imports to top level (#27695) 2019-10-15 17:56:04 +05:30
Tiit Rätsep
40fbc3bd41 Fix missing strings in soma config flow (#27689) 2019-10-15 14:05:10 +02:00
bouni
16c18d303f Move imports in bme680 component (#27506)
* moved imports to top level

* fixed pylint error

* moved imports to top level

* fixed import error
2019-10-15 13:39:51 +02:00
Quentame
5b1f44ba19 Move imports in yeelight + yeelightsunflower component (#27388)
* Move imports in yeelight + yeelightsunflower component

* Fix pylint

* Fix pylint (again)
2019-10-15 13:37:40 +02:00
bouni
0463349f02 moved imports to top level (#27683) 2019-10-15 12:28:24 +02:00
bouni
b4a73fa87e Move imports in decora component (#27645)
* moved imports to top level

* replaced importlib with standard import

* fix for Unable to import 'decora' error
2019-10-15 12:26:50 +02:00
SukramJ
3d7860391a Improve code coverage for HomematicIP Cloud (#27606)
* Improve tests for HomematicIP Cloud

* create fixtures remove decorators

* removed further decorators

* remove  last decorator

* improve exception handling

* removed not required coroutine

* use the correct place for mock
2019-10-15 12:12:58 +02:00
Brett T. Warden
57b8d1889a Handle marker attrs that may not exist (#27519)
marker-high-levels and marker-low-levels may not exist in printer
attributes returned by CUPS, so we'll use .get() to avoid this and
default to None:
KeyError: 'marker-high-levels'

Fixes #27518
2019-10-15 15:23:13 +05:30
bouni
5b410ff3a5 moved imports to top level (#27677) 2019-10-15 15:03:22 +05:30
bouni
ecc276de38 moved imports to top level (#27675) 2019-10-15 10:07:37 +02:00
bouni
502c65b5fd moved imports to top level (#27678) 2019-10-15 10:06:56 +02:00
bouni
5938f5a3a1 moved imports to top level (#27682) 2019-10-15 10:06:29 +02:00
Ville Skyttä
68a3c97464 Deprecate Python 3.6 support, 3.8.0 is out (#27680) 2019-10-15 10:04:58 +02:00
HomeAssistant Azure
d8e3255603 [ci skip] Translation update 2019-10-15 00:31:44 +00:00
Chris Caron
3cb844f22c Add Apprise notification integration (#26868)
* Added apprise notification component

* flake-8 fixes; black formatting + import merged to 1 line

* pylint issues resolved

* added github name to manifest.json

* import moved to top as per code review request

* manifest formatting to avoid failing ci

* .coveragerc updated to include apprise

* removed block for written tests

* more test coverage

* formatting as per code review

* tests converted to async style as per code review

* increased coverage

* bumped version of apprise to 0.8.1

* test that mocked entries are called

* added tests for hass.service loading

* support tags for those who identify the TARGET option

* renamed variable as per code review

* 'assert not' used instead of 'is False'

* added period (in case linter isn't happy)
2019-10-15 00:53:59 +02:00
Paulus Schoutsen
3231e22ddf Remove direct authentication via trusted networks or API password (#27656)
* Remove direct authentication via trusted networks and API password

* Fix tests
2019-10-14 14:56:45 -07:00
Michał Mrozek
97478d1ef4 Move imports in switchmate component (#27646)
* move imports in switchmate component

* fix: bring back pylint ignore line
2019-10-14 14:20:35 -07:00
Michał Mrozek
9aa28dfd54 move imports in stream component (#27647) 2019-10-14 14:20:18 -07:00
Michał Mrozek
4efa2f3244 Move imports in steam_online component (#27648)
* move imports in steam_online component

* fix: import reassigment
2019-10-14 14:19:53 -07:00
Michał Mrozek
bcb14182c6 move imports in statsd component (#27649) 2019-10-14 14:19:37 -07:00
ochlocracy
a49dbb9718 Update Unlock directive for Alexa LockController (#27653)
* Update the Alexa.LockController Unlock directive to include the lockState property in the context of the response.

* Added Test for Alexa.LockController Unlock directive to include the lockState property in the context of the response.
2019-10-14 14:19:05 -07:00
javicalle
6c0efe9329 Move imports in panasonic_bluray component (#27658) 2019-10-14 14:17:08 -07:00
Robert Svensson
5c2bf6dc7c Improve discovery title (#27664) 2019-10-14 14:15:46 -07:00
javicalle
487a5b2527 Move imports in panasonic_viera component (#27665) 2019-10-14 14:15:29 -07:00
Bram Kragten
75eb33eb70 Updated frontend to 20191014.0 (#27661) 2019-10-14 13:07:47 -07:00
Ville Skyttä
759ad08930 Typing misc fixes (#27543)
* Make async_get_conditions return type hint more specific

* Exclude script/scaffold/templates/ from pre-commit mypy
2019-10-14 13:03:37 -07:00
Michał Mrozek
2f6c2fadd0 move imports in squeezebox component (#27650) 2019-10-14 14:20:15 -05:00
Erik Montnemery
c7bd0fe909 Fix ZHA regressions caused by "Support async validation of device trigger" (#27401)
* Revert "Support async validation of device trigger (#27333)"

This reverts commit fdf4f398a7.

* Revert only ZHA changes

* Fix whitespace

* Restore ZHA changes but add check to make sure ZHA is loaded

* Address review comment

* Remove additional check
2019-10-14 14:11:43 -04:00
bouni
2295b33204 Move imports in bluesound component (#27502)
* moved imports to top level

* changed import order

* changed import order
2019-10-14 19:57:03 +02:00
Steven D. Lander
5a83a92390 Refactor imports for tensorflow (#27617)
* Refactoring imports for tensorflow

* Removing whitespace spaces on blank line 110

* Moving tensorflow to try/except block

* Fixed black formatting

* Refactoring try/except to if/else
2019-10-14 08:44:30 -07:00
Otto Winter
09de6d5889 Fix ESPHome climate preset mode refactor (#27637)
Fixes https://github.com/home-assistant/home-assistant/issues/25613
2019-10-14 08:41:16 -07:00
javicalle
de7963544f Apply isort on rfxtrx classes (#27615)
* Move imports in rfxtrx component

* Apply isort on rfxtrx files

* Update test_switch.py
2019-10-14 10:38:34 -05:00
ju
288d370ef5 Fix html5 notification documentation url (#27636) 2019-10-14 10:28:25 -05:00
bouni
6d4e3945d6 moved imports to top level (#27641) 2019-10-14 10:25:55 -05:00
Otto Winter
a79a9809f4 ESPHome Fix intermediary state published (#27638)
Fixes https://github.com/esphome/issues/issues/426
2019-10-14 16:02:39 +02:00
bouni
79b391c673 moved imports to top level (#27640) 2019-10-14 15:58:15 +02:00
Martin
d7d7f6a1c9 Fix temperature and heating mode (#27604) 2019-10-14 15:03:07 +02:00
Malte Franken
91c6cd9646 Move imports in darksky component (#27633)
* move imports to top-level

* modify patch path

* removed unused mocks and patches
2019-10-14 15:02:00 +02:00
bouni
aefb807222 moved imports to top level (#27634) 2019-10-14 15:00:51 +02:00
bouni
14e3b3af6f moved imports to top level (#27632) 2019-10-14 15:00:02 +02:00
Michał Mrozek
3c280565fa move imports in synology_srm component (#27603) 2019-10-14 14:59:26 +02:00
Pascal Vizeli
017a5a5b09 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-10-14 14:30:08 +02:00
Malte Franken
1cae6e664c move imports to top-level (#27630) 2019-10-14 10:56:40 +02:00
Steven D. Lander
b7023a96a3 Issue #27288 Move imports to top for FFMPEG (#27613) 2019-10-14 10:51:37 +02:00
Askarov Rishat
ff4e35e0ad Update yandex transport after api change (#27591)
* yandex maps api changed ("threads" in "Transport" added), ya_ma=>0.3.8 bug_fixed

* Update homeassistant/components/yandex_transport/sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* additional fix

* reformat

* fix mistake
2019-10-14 10:12:08 +02:00
Moritz Fey
da29c1125f add content for services.yaml for ccomponent stream (#27610) 2019-10-13 22:13:31 -07:00
Steven D. Lander
2cf3f6bffa Issue #27288 Moving imports to top for tesla component (#27618) 2019-10-13 22:02:01 -07:00
Michał Mrozek
afa7e0bfe8 fix: exception after kaiterra api call timeout (#27622) 2019-10-13 22:01:40 -07:00
jjlawren
cf76f22c89 Rewrite Plex tests (#27624) 2019-10-13 21:59:25 -07:00
HomeAssistant Azure
b37f0ad812 [ci skip] Translation update 2019-10-14 00:32:27 +00:00
Daniel Perna
fe7467cd5c Update pyhomematic to 0.1.61 (#27620) 2019-10-14 00:01:14 +02:00
Paulus Schoutsen
e866d769e8 Google Assistant Local SDK (#27428)
* Local Google

* Fix test

* Fix tests
2019-10-13 14:16:27 -07:00
Patrik
3454b6fa87 Refactor Tradfri base class (#27589)
* Refactor Tradfri base class

* Clarify doc

* Fix pylint

* Review fix

* Move
2019-10-13 13:59:28 -07:00
Santobert
9fb0812ce5 Improve neato tests (#27578)
* Improve tests

* Rename account to configflow

* configflow to config_flow

* Patch pybotvac instead of own code
2019-10-13 13:56:34 -07:00
Patrik
0235487a22 Move top level imports (#27597) 2019-10-13 13:56:01 -07:00
Michał Mrozek
c5dc670b36 move imports in tellstick component (#27600) 2019-10-13 13:55:43 -07:00
Michał Mrozek
d8b73f9459 move imports in ted5000 component (#27601) 2019-10-13 13:55:24 -07:00
Moritz Fey
48c1a0290c add content for services.yaml in component media_extractor (#27608)
* add content for services.yaml for media_extractor component

* remove example data

* add empty line on end of file

* Update services.yaml
2019-10-13 13:53:42 -07:00
Michał Mrozek
1d2b59db82 Move imports in syslog (#27602) 2019-10-13 22:38:42 +02:00
Fabian Affolter
585214f3a4 Upgrade Mastodon.py to 1.5.0 (#27598) 2019-10-13 22:29:48 +02:00
Ville Skyttä
5e79408708 Upgrade to flake8-docstrings 1.5.0, pytest 5.2.1, and pytest-cov 2.8.1 (#27588)
https://gitlab.com/pycqa/flake8-docstrings/blob/1.5.0/HISTORY.rst
https://docs.pytest.org/en/latest/changelog.html#pytest-5-2-1-2019-10-06
https://pytest-cov.readthedocs.io/en/latest/changelog.html#id1
2019-10-13 22:27:42 +02:00
Michał Mrozek
45694de2ee move imports in tibber component (#27584) 2019-10-13 22:25:54 +02:00
javicalle
dd8fc41747 Move imports in rflink component (#27367)
* Move imports in rflink component

* import order

* import order

* Update __init__.py

* Update __init__.py

I don't understand why tests are failing...

* Fix RFLink imports

* Fix monkeypatch for 'create_rflink_connection'

* isort for rflink classes
2019-10-13 22:19:11 +02:00
starkillerOG
2acd3f9e98 Allow MQTT json light floating point transition (#27253)
* MQTT json light: allow floating point transition

Allow to use floating point values for the transition time of the MQTT json light.
In this way transitions shorter than 1s can be used (0.5 seconds for instance) if the MQTT light supports it.

* Always sent a float
2019-10-13 20:29:14 +02:00
shred86
1774a1427b Add abode config entries and device registry (#26699)
* Adds support for config entries and device registry

* Fixing string formatting for logger

* Add unit test for abode config flow

* Fix for lights, only allow one config, add ability to unload entry

* Fix for subscribing to hass_events on adding abode component

* Several fixes from code review

* Several fixes from second code review

* Several fixes from third code review

* Update documentation url to fix branch conflict

* Fixes config flow and removes unused constants

* Fix for switches, polling entry option, improved tests

* Update .coveragerc, disable pylint W0611, remove polling from UI

* Multiple fixes and edits to adhere to style guidelines

* Removed unique_id

* Minor correction for formatting error in rebase

* Resolves issue causing CI to fail

* Bump abodepy version

* Add remove device callback and minor clean up

* Fix incorrect method name

* Docstring edits

* Fix duplicate import issues from rebase

* Add logout_listener attribute to AbodeSystem

* Add additional test for complete coverage
2019-10-13 20:01:04 +02:00
Michał Mrozek
d96cd4c4ea Move imports in tplink component (#27567)
* move imports in tplink component

* fix: order of imports

* fix: tplink tests

* fix: import order in tests

* fix: tests formatting
2019-10-13 17:05:04 +02:00
bouni
5e4b33c740 Move imports in bme280 component (#27505) 2019-10-13 15:09:44 +02:00
Michał Mrozek
989c3581ac Move imports in tplink_lte component (#27583) 2019-10-13 15:01:13 +02:00
Michał Mrozek
627ca3182a Move imports in thingspeak component (#27585) 2019-10-13 14:56:02 +02:00
springstan
930182a7cb Move import in deutsche_bahn integration (#27579)
* Moved import in deutsche_bahn integration

* Moved import schiene before PLATFORM_SCHEMA
2019-10-13 14:54:38 +02:00
Fabian Affolter
bbafeb5da2 Upgrade pillow to 6.2.0 (#27581) 2019-10-13 14:46:12 +02:00
Michał Mrozek
bb2a1cd439 Move imports in thermoworks_smoke component (#27586) 2019-10-13 14:42:29 +02:00
Fabian Affolter
b570be47ca Upgrade alpha_vantage to 2.1.1 (#27580)
* Upgrade alpha_vantage to 2.1.1

* Move imports
2019-10-13 12:46:43 +02:00
foxy82
7aae106525 Fix pioneer volume when using onkyo component (#27218)
* Fix Onkyo when using pioneer AV receiver so it can use max volume of 164

* Update media_player.py

Change to make receiver max volume configurable

* Update manifest.json

Update to latest onkyo-eiscp with a fix required for Pionner AVR

* Fix Onkyo when using pioneer AV receiver so it can use max volume of 164

* Fix Onkyo when using pioneer AV receiver so it can use max volume of 164

* Format

* Requirements all

* Fix CI errors

* Black
2019-10-13 10:59:35 +02:00
Paulus Schoutsen
066f2db602 Merge remote-tracking branch 'origin/master' into dev 2019-10-12 23:34:51 -07:00
Paulus Schoutsen
71f73af535 Merge pull request #27572 from home-assistant/rc
0.100.2
2019-10-12 23:33:53 -07:00
Paulus Schoutsen
24a1139c1d Update reqs 2019-10-12 20:27:48 -07:00
chriscla
57e6dc3f7a Fixing nzbget units display (#27521) 2019-10-12 20:19:02 -07:00
chriscla
6cbc9d6abb Fixing nzbget units display (#27521) 2019-10-12 20:18:30 -07:00
Paulus Schoutsen
17c3efa556 Bumped version to 0.100.2 2019-10-12 20:12:54 -07:00
Paulus Schoutsen
422ba89c6d Google: catch query not supported (#27559) 2019-10-12 20:12:48 -07:00
Mark Coombes
134137dd1c Fix for unknown sensor state (#27542) 2019-10-12 20:12:48 -07:00
Jordan Speicher
0fd49e13da Add mobile_app dependency on cloud (#27470) 2019-10-12 20:12:47 -07:00
Florent Thoumie
093ee7d5b2 iaqualink: set 5s timeout, use cookiejar defaults (#27426) 2019-10-12 20:12:46 -07:00
Teemu R
e8e32e3ed4 bump songpal to fix attrs usage when using its most recent version (#27410) 2019-10-12 20:12:46 -07:00
Teemu R
258f86801c Bump python-songpal (#27398)
Fixes #24269 and fixes #26776 - potentially also #22116
2019-10-12 20:12:45 -07:00
Robert Van Gorkom
863cf9823b Vangorra withings fix (#27404)
* Fixing connection issues with withings API by switching to a maintained client codebase.

* Updating requirements files.

* Adding withings api to requirements script.

* Using version of withings api with static version in setup.py.

* Updating requirements files.
2019-10-12 20:09:55 -07:00
Michał Mrozek
df646f5db1 Move imports in tikteck component (#27568)
* move imports in tikteck component

* fix: order of imports
2019-10-12 20:02:29 -07:00
springstan
25bec13335 Filled services.yaml for logbook integration (#27560) 2019-10-12 20:01:12 -07:00
springstan
a8f43843bf Filled services.yaml for browser integration (#27563)
* Filled services.yaml for browser integration

* Update services.yaml
2019-10-12 20:00:48 -07:00
Michał Mrozek
1fa6d9887e Move imports in tts component (#27565)
* move imports in tts components

* fix: order of imports
2019-10-12 19:59:30 -07:00
HomeAssistant Azure
62b886a5d5 [ci skip] Translation update 2019-10-13 00:31:39 +00:00
Paulus Schoutsen
a82ff4f7a9 Add strings for device automations to scaffold (#27556) 2019-10-12 14:09:06 -07:00
Paulus Schoutsen
9e121b785a Google: catch query not supported (#27559) 2019-10-12 14:07:01 -07:00
Mark Coombes
6c947f58b8 Fix for unknown sensor state (#27542) 2019-10-12 13:11:30 -07:00
Moritz Fey
96c0ad302f add device conditions for platform cover (#27544)
* add device condition support to the cover integration

* remove TODO comment

* add strings.json
2019-10-12 13:08:45 -07:00
SukramJ
1f7bd4235c Add test to Homematic IP Cloud switch (#27532) 2019-10-12 13:07:54 -07:00
Sébastien RAMAGE
6b92dbe209 Move imports for pushbullet component (#27460)
* Move imports in dht component

* remove empty line

* Move imports for pushbullet component

* revert unwanted changes

* Move imports for pushbullet component

* remove dht change from that branch

* remove dht changes from this branch
2019-10-12 13:05:36 -07:00
Jordan Speicher
86da3fb334 Add mobile_app dependency on cloud (#27470) 2019-10-12 13:05:01 -07:00
bouni
3096e94343 moved imports to top level (#27469) 2019-10-12 13:04:42 -07:00
bouni
88e54a4ce6 moved imports to top level (#27468) 2019-10-12 13:04:35 -07:00
Paolo Tuninetto
08ccaac21f Move Epson imports (#27457) 2019-10-12 13:04:14 -07:00
Sébastien RAMAGE
3b4e257214 Move imports in dht component (#27459)
* Move imports in dht component

* remove empty line

* Move imports for pushbullet component

* revert unwanted changes
2019-10-12 13:03:56 -07:00
bouni
930b576685 moved imports to top level (#27458) 2019-10-12 13:03:42 -07:00
Quentame
72b711fde6 Move imports in w800rf32 component (#27451) 2019-10-12 13:03:02 -07:00
quthla
e9642a0f65 Bump PyGithub to 1.43.8 (#27432)
* Bump PyGithub to 1.43.8

* Bump PyGithub to 1.43.8
2019-10-12 13:02:20 -07:00
bouni
8a1738281a moved imports to top level (#27454) 2019-10-12 13:02:12 -07:00
Quentame
701bb666c4 Move imports in watson_iot component (#27448) 2019-10-12 13:01:34 -07:00
quthla
3b9ee9c901 Bump RtmAPI to 0.7.2 (#27433)
* Bump RtmAPI to 0.7.2

* Bump RtmAPI to 0.7.2

* Bump RtmAPI to 0.7.2
2019-10-12 13:00:48 -07:00
foreign-sub
15f0fabe9d Bump pysyncthru to 0.5.0 (#27439) 2019-10-12 12:59:36 -07:00
Fredrik Erlandsson
22e7cb11f4 Change persistent notification about dev-info panel (#27441)
* there is no dev-info panel anymore

* Update __init__.py

* Update __init__.py
2019-10-12 12:58:52 -07:00
Paolo Tuninetto
17b1ba2e9f Move AmazonPolly imports (#27443) 2019-10-12 12:57:18 -07:00
Maciej Bieniek
652bf54044 Fix update after network error (#27444) 2019-10-12 12:57:01 -07:00
Paulus Schoutsen
64f9ecbac9 Remove incorrect translation folder 2019-10-12 12:56:10 -07:00
Quentame
bac337889f Move imports in vera component (#27477) 2019-10-12 12:55:40 -07:00
Quentame
eaf855286b Move imports in verisure component (#27476) 2019-10-12 12:55:33 -07:00
Quentame
c5b12d6006 Move imports in venstar component (#27478) 2019-10-12 12:54:55 -07:00
Quentame
0a2ec30ce3 Move imports in vasttrafik component (#27480) 2019-10-12 12:54:41 -07:00
Quentame
54d63c63c3 Move imports in uscis component (#27481) 2019-10-12 12:54:16 -07:00
bouni
5198f522c7 moved imports to top level (#27483) 2019-10-12 12:53:43 -07:00
Erik Montnemery
15820c6751 Add device condition support to the lock integration (#27488) 2019-10-12 12:53:15 -07:00
bouni
8436acbffa moved imports to top level (#27495) 2019-10-12 12:52:34 -07:00
bouni
2c8e24eb14 moved imports to top level (#27496) 2019-10-12 12:52:19 -07:00
thaohtp
468e6c30b3 Move imports in aruba component to top-level (#27497)
Issue: https://github.com/home-assistant/home-assistant/issues/27284
2019-10-12 12:52:04 -07:00
bouni
3ca74373d3 moved imports to top level (#27500) 2019-10-12 12:51:32 -07:00
Kevin Fronczak
3f9f8eb379 Update blink version to 0.14.2 (#27555)
* Update blink version to 0.14.2

* Ren gen_requirements_all script
2019-10-12 21:51:10 +02:00
bouni
4cded9782d moved imports to top level (#27498) 2019-10-12 12:50:30 -07:00
bouni
b825631676 moved imports to top level (#27501) 2019-10-12 12:48:30 -07:00
bouni
0331c8453a moved imports to top level (#27503) 2019-10-12 12:48:12 -07:00
thaohtp
1dcdc17202 Move imports in startca to top-level (#27510) 2019-10-12 12:46:26 -07:00
bouni
b9d54de09b moved imports to top level (#27509) 2019-10-12 12:45:40 -07:00
bouni
ae5cb82908 moved imports to top level (#27508) 2019-10-12 12:45:31 -07:00
SukramJ
f979eca83a Add test to Homematic IP Cloud climate (#27472) 2019-10-12 12:45:11 -07:00
bouni
6317ef1324 moved imports to top level (#27512) 2019-10-12 12:44:47 -07:00
SukramJ
28e3cf29b3 Add test to Homematic IP Cloud sensor (#27533) 2019-10-12 12:44:19 -07:00
SukramJ
bb1be5327e Add test to Homematic IP Cloud cover (#27535) 2019-10-12 12:44:13 -07:00
SukramJ
eb77db6569 Add test to Homematic IP Cloud alarm control panel (#27534) 2019-10-12 12:43:46 -07:00
SukramJ
5030be274a Add test to Homematic IP Cloud weather (#27536) 2019-10-12 12:43:06 -07:00
Moritz Fey
ddeac071b3 fill services.yaml for downloader (#27553) 2019-10-12 12:38:39 -07:00
javicalle
40e5beb0ed Move imports in rfxtrx component (#27549) 2019-10-12 12:37:59 -07:00
bouni
3873a1b070 moved imports to top level (#27494) 2019-10-12 12:35:39 -07:00
Erik Montnemery
42691b783e Handle empty service in script action gracefully (#27467)
* Handle empty service in script action gracefully

* Add test
2019-10-12 12:28:47 -07:00
Quentame
ee8b72fb71 Move imports in http component (#27474) 2019-10-12 12:27:27 -07:00
Rolf K
96d35379f2 Add improved scene support to input number integration (#27530)
* Added improved scene support to the input_number integration.

* Minor fix in test.

* Use snake case for variable names in test_reproduce_state.

* Remove redundant tests.
2019-10-12 11:46:09 -07:00
Patrik
86386912b9 Refactor Tradfri cover (#27413)
* Remove unused logging

* Refactor cover

* Remove method

* Fix typo and use consistent wording for gateway

* Revert changes
2019-10-12 17:53:25 +02:00
thaohtp
21ca936d33 Move imports in upcloud component to top-level (#27514)
* Move imports in upcloud component to top-level

* Additional isort ordering
2019-10-12 17:30:21 +03:00
Erik Montnemery
dbe366933f Fix typing for device condition scaffold (#27487) 2019-10-12 16:37:32 +03:00
Florent Thoumie
22eaff9897 iaqualink: set 5s timeout, use cookiejar defaults (#27426) 2019-10-12 08:17:02 -05:00
foreign-sub
9d7a218df5 Bump pygatt to 4.0.5 (#27526) 2019-10-12 15:08:57 +02:00
Quentame
3d05228ec1 Move imports in vizio component (#27452) 2019-10-12 14:09:39 +02:00
bouni
de4482e8d3 Move imports in acer_projector component (#27456) 2019-10-12 08:43:34 +02:00
Quentame
af4bcf8de6 Move imports in waqi component (#27450) 2019-10-12 07:44:22 +02:00
thaohtp
d516bc44fa Move trend imports to top level (#27507) 2019-10-12 07:40:44 +02:00
Jacob Mansfield
a712c9b9f5 SNMP Switch payloads are not guaranteed to be integers (#27422)
Fixes #27171
2019-10-12 07:23:55 +02:00
cgtobi
99e7808441 Move imports in rmvtransport (#27420) 2019-10-12 07:21:53 +02:00
Quentame
f236e84753 Move imports in updater component (#27485) 2019-10-12 07:19:53 +02:00
bouni
712628395e moved imports to top level (#27511) 2019-10-12 07:18:47 +02:00
John Mihalic
d58717d772 Bump pyhik to 0.2.4 (#27523) 2019-10-12 07:18:15 +02:00
HomeAssistant Azure
78a08d0425 [ci skip] Translation update 2019-10-12 00:31:47 +00:00
Quentame
8bd847ed39 Move imports in waterfurnace component (#27449) 2019-10-11 18:30:27 +02:00
cgtobi
cb30065a40 Update upstream (#27440) 2019-10-11 18:29:27 +02:00
Paolo Tuninetto
618cf5fa04 Move Arduino imports (#27438) 2019-10-11 17:52:38 +02:00
SukramJ
8bbf261302 Refactor home --> hap for Homematic IP Cloud (#27368)
* Refactor home to hap for Homematic IP Cloud

* Add some tests

* Rename ha_entity --> ha_state

* use asynctest.Mock
2019-10-11 16:36:46 +02:00
quthla
0c8e208fd8 Bump python-slugify to 3.0.6 (#27430)
* Bump python-slugify to 3.0.6

* Bump python-slugify to 3.0.6

* Bump python-slugify to 3.0.6
2019-10-11 00:27:07 -07:00
HomeAssistant Azure
4c71c6df6f [ci skip] Translation update 2019-10-11 00:31:40 +00:00
Teemu R
4b8a35dffb move songpal imports to top (#27402)
* move songpal imports to top

* Update media_player.py
2019-10-10 12:53:05 -07:00
Franck Nijhof
ed3516186b Bump sqlalchemy to 1.3.10 (#27408) 2019-10-10 12:52:54 -07:00
Franck Nijhof
aecf7e65ff Bump aiohttp to 3.6.2 (#27409) 2019-10-10 12:52:40 -07:00
Teemu R
4f4bbedc58 bump songpal to fix attrs usage when using its most recent version (#27410) 2019-10-10 12:52:29 -07:00
Paulus Schoutsen
2ab6eb4fa0 Revert "Allow Google Assistant relative volume control (#26585)" (#27416)
This reverts commit 95c537bee8.
2019-10-10 12:46:40 -07:00
Tsvi Mostovicz
9e3005133a Standardize times in time sensors Jewish calendar (#26940)
* Standardize times in time sensors Jewish calendar

* Fix pylint errors

* Add non-default time format test

* Make black happy

* Remove timestamp device class

Timestamp device class requires ISO 8601 format

* Revert "Remove timestamp device class"

This reverts commit 8a2fda39831bc750c3a77aa774b84b054d78032c.

* Remove time_format

As this is part of the UI decision, it should be decided by lovelace.

A nice addition for a future PR, might be the option to hint to lovelace the preferred way to display some data.

* Update name of state_attributes

* State of timestamp variable to be shown in UTC

Although I don't understand it, I give up :)

* Remove unnecessary attributes

I don't really see the value in these attributes, if there are any they should be implemented in
the sensor component for the timestamp device class
2019-10-10 20:57:48 +02:00
Franck Nijhof
2e9e8a16bd Remove hydroquebec integration (ADR-0004) (#27407) 2019-10-10 20:51:04 +02:00
Quentame
7e91677362 Move imports in apple_tv component (#27356)
* Move imports in apple_tv component

* Fix pylint
2019-10-10 11:39:09 -07:00
Robert Van Gorkom
77490a3246 Vangorra withings fix (#27404)
* Fixing connection issues with withings API by switching to a maintained client codebase.

* Updating requirements files.

* Adding withings api to requirements script.

* Using version of withings api with static version in setup.py.

* Updating requirements files.
2019-10-10 11:22:36 -07:00
Markus Nigbur
27f036c691 Move imports in eufy component (#27405) 2019-10-10 11:16:30 -07:00
Markus Nigbur
13ac6ac315 Move imports in github component (#27406) 2019-10-10 11:16:19 -07:00
Kevin Eifinger
99885b9acf Move imports in google_travel_time component (#27381) 2019-10-10 09:57:14 -07:00
Quentame
fc7a20d180 Move imports in yr component (#27382) 2019-10-10 09:57:00 -07:00
Quentame
6364da1150 Move imports in zigbee component (#27383) 2019-10-10 09:56:07 -07:00
Quentame
ec08c251ea Move imports in zestimate component (#27386) 2019-10-10 09:54:20 -07:00
Quentame
f5560e2b18 Move imports in zengge component (#27387) 2019-10-10 09:53:52 -07:00
Quentame
19c8710698 Move imports in yamaha + yamaha_musiccast component (#27389) 2019-10-10 09:53:27 -07:00
Quentame
a5ee138d56 Move imports in xmpp component (#27390) 2019-10-10 09:52:19 -07:00
Quentame
84d1c0ca31 Move imports in wunderlist component (#27391) 2019-10-10 09:52:03 -07:00
Quentame
91379b0ff7 Move imports in wink component (#27392) 2019-10-10 09:51:28 -07:00
Quentame
7b13f0caf7 Move imports in wemo component (#27393) 2019-10-10 09:50:58 -07:00
Kevin Eifinger
e93ffa5688 Move imports in waze_travel_time component (#27384) 2019-10-10 09:48:59 -07:00
Teemu R
6c945c845e Bump python-songpal (#27398)
Fixes #24269 and fixes #26776 - potentially also #22116
2019-10-10 09:30:30 -07:00
Fabian Affolter
1719bc6fd3 Remove hipchat (#27399)
* Delete hipchat integration

* Remove hipchat
2019-10-10 09:30:15 -07:00
Paulus Schoutsen
dfcab456c6 Merge remote-tracking branch 'origin/master' into dev 2019-10-10 09:13:56 -07:00
Paulus Schoutsen
8f384e6b82 Merge pull request #27396 from home-assistant/rc
0.100.1
2019-10-10 09:08:22 -07:00
Ryan Ewen
95c537bee8 Allow Google Assistant relative volume control (#26585)
* Allow Google Assistant volume control without volume_level

* Add test for relative volume control w/o volume_level
2019-10-10 17:53:52 +03:00
Bram Kragten
7398e06c78 fix withings nokia test req 2019-10-10 15:03:39 +02:00
Bram Kragten
9f32e5cf46 Bumped version to 0.100.1 2019-10-10 14:32:40 +02:00
Martin Hjelmare
65372da241 Revert "Fix connection issues with withings API by switching to a maintained codebase (#27310)" (#27385)
This reverts commit 071476343c.
2019-10-10 14:29:38 +02:00
Martin Hjelmare
c188ecf79b Revert "Fix connection issues with withings API by switching to a maintained codebase (#27310)" (#27385)
This reverts commit 071476343c.
2019-10-10 14:21:42 +02:00
Malte Franken
d337b71725 move import to top-level (#27352) 2019-10-10 00:25:21 -07:00
Malte Franken
0cc2d0d557 move import to top-level (#27353) 2019-10-10 00:24:38 -07:00
Quentame
7718d61cd7 Move imports in netatmo component (#27360) 2019-10-10 00:22:10 -07:00
Quentame
6c739f4be5 Move imports in nissan_leaf component (#27359) 2019-10-10 00:21:40 -07:00
Quentame
549c79b6ce Move imports in season component (#27358) 2019-10-10 00:21:18 -07:00
Markus Nigbur
a2591e696c Move imports in vlc component (#27361) 2019-10-10 00:19:46 -07:00
Mark Coombes
829cffd5de Fix ecobee weather platform (#27369)
* Fix ecobee weather platform

* Remove custom forecast attributes

* Tidy up process forecast method

* Fix lint complaints

* Add missed weather symbol
2019-10-10 00:05:46 -07:00
Paulus Schoutsen
baa750a3c7 Merge remote-tracking branch 'origin/master' into dev 2019-10-09 23:46:48 -07:00
Santobert
80f6781f21 Migrate Neato to use top-level imports (#27363)
* Neato move imports up

* Move one last import

* Fix tests
2019-10-10 08:08:11 +02:00
Paulus Schoutsen
e2d2f69cb0 Merge pull request #27374 from home-assistant/rc
0.100.0
2019-10-09 18:05:46 -07:00
HomeAssistant Azure
762a714d87 [ci skip] Translation update 2019-10-10 00:31:40 +00:00
Paulus Schoutsen
54c24de158 Install requirements for all deps with tests (#27362)
* Install requirements for all deps with tests

* Remove unused REQUIREMENTS var

* Print diff if not the same

* Simplify

* Update command line

* Fix detecting empty dirs

* Install non-integration

* Fix upnp tests

* Lint

* Fix ZHA test
2019-10-09 16:16:29 -07:00
Paulus Schoutsen
6e86b8c42f Bumped version to 0.100.0 2019-10-09 15:24:20 -07:00
Bram Kragten
4dc50107cd Updated frontend to 20191002.2 (#27370) 2019-10-09 23:08:00 +02:00
Sébastien RAMAGE
f9c4bb04e3 Update zigpy-zigate to 0.4.1 (#27345)
* Update zigpy-zigate to 0.4.1

Fix #27297

* Update zigpy-zigate to 0.4.1

Fix #27297
2019-10-09 23:07:59 +02:00
Robert Van Gorkom
a57642833b Fix connection issues with withings API by switching to a maintained codebase (#27310)
* Fixing connection issues with withings API by switching to a maintained client codebase.

* Updating requirements files.

* Adding withings api to requirements script.
2019-10-09 23:07:58 +02:00
Bram Kragten
74ef1358da Updated frontend to 20191002.2 (#27370) 2019-10-09 23:06:27 +02:00
Patrik
78e9bba279 Refactor Tradfri constants (#27334)
* Refactor constants

* Rename constant

* Rename constant

* Rename constant

* Review update

* Remove duplicate constant

* Reorder constants

* Dont refresh features

* Order package imports

* Fix bug

* Put back features in refresh

* Fix import order

* Refactor supported features

* Refactor supported features, take 2
2019-10-09 12:56:16 -07:00
Robert Svensson
a8db8d8c0b deCONZ - Update discovery address (#27365) 2019-10-09 21:44:02 +02:00
Erik Montnemery
fdf4f398a7 Support async validation of device trigger (#27333) 2019-10-09 21:04:11 +02:00
Oncleben31
3194dd3456 Add documentation for logger.set_level service (#27211)
* Add set_level doc

* use only yaml

* reformat

* improvements
2019-10-09 10:58:36 -07:00
Sébastien RAMAGE
1257706bd9 Update zigpy-zigate to 0.4.1 (#27345)
* Update zigpy-zigate to 0.4.1

Fix #27297

* Update zigpy-zigate to 0.4.1

Fix #27297
2019-10-09 08:47:43 -04:00
Malte Franken
9ea58b970e Move imports in caldav component (#27349) 2019-10-09 12:02:09 +02:00
Malte Franken
3d937bfd8a move import to top-level (#27348) 2019-10-09 10:57:51 +02:00
HomeAssistant Azure
768bb00177 [ci skip] Translation update 2019-10-09 00:32:17 +00:00
Ville Skyttä
3e6b9a17cc Run mypy in pre-commit (#27339)
* Move mypy files config to setup.cfg

* Add mypy in pre-commit
2019-10-08 14:45:24 -07:00
Robert Svensson
d345b58ce6 Improve UniFi config flow tests and add options flow test (#27340) 2019-10-08 14:44:33 -07:00
Erik Montnemery
7f20210e93 Include unit_of_measurement in sensor device trigger capabilities (#27265)
* Expose unit_of_measurement in sensor device trigger

* Update test
2019-10-08 12:52:25 -07:00
Paulus Schoutsen
d97943575a Bumped version to 0.100.0b3 2019-10-08 11:19:46 -07:00
Paulus Schoutsen
d4436951c5 Update translations 2019-10-08 11:19:39 -07:00
Erik Montnemery
58f444c779 Fix translations for binary_sensor triggers (#27330) 2019-10-08 11:18:36 -07:00
Bram Kragten
579c91da1b Updated frontend to 20191002.1 (#27329) 2019-10-08 11:18:36 -07:00
jjlawren
07b1976f7d Fix single Plex server case (#27326) 2019-10-08 11:18:36 -07:00
Paulus Schoutsen
c214d7a972 Google: Report all states on activating report state (#27312) 2019-10-08 11:18:35 -07:00
Robert Van Gorkom
071476343c Fix connection issues with withings API by switching to a maintained codebase (#27310)
* Fixing connection issues with withings API by switching to a maintained client codebase.

* Updating requirements files.

* Adding withings api to requirements script.
2019-10-08 20:14:52 +02:00
SukramJ
55e10d552e Cleanup handling of attributes for HomematicIP Cloud (#27331)
* Cleanup handling of attributes for HomematicIP Cloud

* Remove special climate handling
2019-10-08 19:52:43 +02:00
Erik Montnemery
0ba4ee1398 Validate generated device actions (#27262)
* Validate generated actions

* Use hass.services.async_call instead of service.async_call_from_config
2019-10-08 10:06:17 -07:00
Santobert
1a9d07dbdc Improve Neato login process (#27327)
* initial commit

* Readded log message

* Clean up try-except
2019-10-08 10:05:35 -07:00
Paulus Schoutsen
f5bd0f29b4 Add scene.apply service (#27298)
* Add scene.apply service

* Use return value entity ID validator"

* Require entities field in service call

* Simplify scene service
2019-10-08 09:59:32 -07:00
Paulus Schoutsen
a51e0d7a5f Google: Report all states on activating report state (#27312) 2019-10-08 09:58:36 -07:00
Erik Montnemery
0cfd0388d6 Fix translations for binary_sensor triggers (#27330) 2019-10-08 09:57:24 -07:00
Bram Kragten
cf555428d0 Updated frontend to 20191002.1 (#27329) 2019-10-08 09:33:14 -07:00
Evan Bruhn
15c54f34df Fix Logi Circle cameras not responding to turn on/off commands (#27317) 2019-10-08 09:31:52 -07:00
Fabian Affolter
13956d3516 Upgrade sqlalchemy to 1.3.9 (#27322) 2019-10-08 09:30:18 -07:00
Fabian Affolter
396e68a4b9 Upgrade beautifulsoup4 to 4.8.1 (#27325) 2019-10-08 09:28:37 -07:00
ottersen
0a66a03de6 Align user name vs username (#27328)
Align to be Username as all other integrations
2019-10-08 09:27:49 -07:00
Fabian Affolter
937d348867 Upgrade certifi to >=2019.9.11 (#27323) 2019-10-08 09:00:11 -07:00
jjlawren
df8bf51598 Fix single Plex server case (#27326) 2019-10-08 08:54:01 -07:00
Fabian Affolter
7a57c3a66a Set pytz to >=2019.03 2019-10-08 16:23:21 +02:00
Malte Franken
e176f16141 move import to top-level (#27320) 2019-10-08 16:14:50 +02:00
Malte Franken
15c56f1f64 Move imports in geo_rss_events component (#27313)
* move imports to top-level

* fixed patch path

* added myself as codeowner

* regenerated codeowners
2019-10-08 12:50:45 +02:00
Malte Franken
5645d43bd1 move import to top-level (#27314) 2019-10-08 12:50:23 +02:00
Brendon Baumgartner
15870e0185 Do not fail smtp notify service on connection error (#27240)
* smtp notify dont disable service

* auth fails smtp notify service
2019-10-08 10:14:17 +02:00
Robert Van Gorkom
50b5dba43e Making withings logs less noisy. (#27311) 2019-10-07 22:22:13 -07:00
Paulus Schoutsen
4322310d36 Bumped version to 0.100.0b2 2019-10-07 21:28:58 -07:00
Paulus Schoutsen
1614e0d866 Improve speed websocket sends messages (#27295)
* Improve speed websocket sends messages

* return -> continue
2019-10-07 21:28:52 -07:00
jjlawren
463c2e8d45 Remove manual config flow step (#27291) 2019-10-07 21:28:51 -07:00
jjlawren
73aa341ed8 Fix Plex media_player.play_media service (#27278)
* First attempt to fix play_media

* More changes to media playback

* Use playqueues, clean up play_media

* Use similar function name, add docstring
2019-10-07 21:28:50 -07:00
Aaron Godfrey
c416541814 Fix the todoist integration (#27273)
* Fixed the todoist integration.

* Removing unused import

* Flake8 fixes.

* Added username to codeowners.

* Updated global codeowners
2019-10-07 21:28:50 -07:00
Sergio Conde Gómez
8de942f00f Fix onvif PTZ service freeze (#27250) 2019-10-07 21:28:49 -07:00
jjlawren
d39e320b9e Fix update on cert_expiry startup (#27137)
* Don't force extra update on startup

* Skip on entity add instead

* Conditional update based on HA state

* Only force entity state update when postponed

* Clean up state updating

* Delay YAML import
2019-10-07 21:28:49 -07:00
Pierre Sicot
2ccd0039d7 Fix closed status for non horizontal awnings. (#26840) 2019-10-07 21:28:48 -07:00
Erik Montnemery
c72ac87c73 Fix device condition scaffold (#27300) 2019-10-07 20:10:21 -07:00
Paulus Schoutsen
c9e26b6fd0 Improve speed websocket sends messages (#27295)
* Improve speed websocket sends messages

* return -> continue
2019-10-07 20:08:07 -07:00
HomeAssistant Azure
1087abd3b5 [ci skip] Translation update 2019-10-08 00:32:12 +00:00
Erik Montnemery
dabdf8b577 Validate generated device triggers (#27264)
* Validate generated trigger

* Update scaffold
2019-10-07 13:09:48 -07:00
Robert Svensson
6565c17828 UniFi - Improve controller tests (#27261)
* Improve controller tests and harmonize setup_unifi_integration to one
* Store listeners to dispatchers to be used during reset
2019-10-07 21:55:35 +02:00
Santobert
1febb32dd9 Neato clean up (#27294)
* Replace hass with neato

* Clean up try-except blocks

* Add some new try-except blocks

* Clean up vacuum

* Minor fix

* Another fix
2019-10-07 12:49:54 -07:00
jjlawren
a3c98440e0 Remove manual config flow step (#27291) 2019-10-07 11:29:12 -07:00
Daniel Shokouhi
35bca702b4 Neato battery sensor (#27286)
* initial commit

* Pring log only once if available

* Update coverage

* Review comments

* Move variables
2019-10-07 11:09:08 -07:00
Patrik
fe155faf6a Refactor tradfri light (#27259)
* Refactor light file

* Update following review
2019-10-07 10:43:47 -07:00
Edgardo Ramírez
7cdb76eedb FIX: Typo (#27267) 2019-10-07 10:41:26 -07:00
Aaron Godfrey
feb1986459 Fix the todoist integration (#27273)
* Fixed the todoist integration.

* Removing unused import

* Flake8 fixes.

* Added username to codeowners.

* Updated global codeowners
2019-10-07 10:40:52 -07:00
Chandan Rai
eb10f8dcd3 fixed minor typo in docs/source/api/helpers.rst (#27282) 2019-10-07 10:25:36 -07:00
Ville Skyttä
761d7f21e9 Upgrade pylint (#27279)
* Upgrade pylint to 2.4.2 and astroid to 2.3.1

https://pylint.readthedocs.io/en/latest/whatsnew/2.4.html
https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-1
https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-2

* unnecessary-comprehension fixes

* invalid-name fixes

* self-assigning-variable fixes

* Re-enable not-an-iterable

* used-before-assignment fix

* invalid-overridden-method fixes

* undefined-variable __class__ workarounds

https://github.com/PyCQA/pylint/issues/3090

* no-member false positive disabling

* Remove some no longer needed disables

* using-constant-test fix

* Disable import-outside-toplevel for now

* Disable some apparent no-value-for-parameter false positives

* invalid-overridden-method false positive disables

https://github.com/PyCQA/pylint/issues/3150

* Fix unintentional Entity.force_update override in AfterShipSensor
2019-10-07 08:17:39 -07:00
Ville Skyttä
3adac699c7 Note snake_case state attribute name convention in entity docs (#27287)
https://github.com/home-assistant/home-assistant/pull/26675#discussion_r331763063
2019-10-07 08:16:26 -07:00
Sergio Conde Gómez
f6b8cffeaf Add PTZ support to Foscam camera component (#27238)
* Add PTZ support to Foscam camera component

* Address review comments:

 - Move service to foscam domain
 - Use `dict[key]` for required schema keys or with defaults
 - Fix sync operations in async context
 - Remove excessive logging

* Fix import order

* Move all the initialization to setup_platform and fix motion detection status logic

* Move function dictionary out of the function.

* Change user input to lowercase snake case

* Change user input to lowercase snake case

* Fix service example value

* Omit foscam const module from code coverage tests

* Add myself to foscam codeowners
2019-10-07 13:17:43 +02:00
Santobert
4124211095 Add attributes to neato integration (#27260)
* inital commit

* simplify self.neato
2019-10-07 08:30:49 +02:00
Erik Montnemery
5d1dd6390d Validate generated condition (#27263) 2019-10-06 21:06:16 -07:00
jjlawren
0915d927df Fix Plex media_player.play_media service (#27278)
* First attempt to fix play_media

* More changes to media playback

* Use playqueues, clean up play_media

* Use similar function name, add docstring
2019-10-06 21:02:58 -07:00
HomeAssistant Azure
073bdd672a [ci skip] Translation update 2019-10-07 00:32:19 +00:00
Oncleben31
3b9f0062a2 Add missing documentation for some Hassio services (#27215)
* Add services doc

* Add missing services doc and reformat

* improve readability

* content improvement

* HassIO to Hass.io
2019-10-06 23:02:15 +02:00
CQoute
02c983d332 Add 'flash_length' to esphome light async_turn_off (#27214)
flash_length was overlooked when fixing the asyn_turn_on flash attribute. async_turn_off is now fixed with the flash attribute.
2019-10-06 21:49:31 +02:00
Santobert
dae8cd8801 Bump pybotvac and use new exceptions (#27249)
* Bump pybotvac

* Fix tests

* Remove super calls

* Surround some more statements

* Correct logger message for vacuum
2019-10-06 20:10:11 +02:00
Patrik
1059cea28f Refactor IKEA Tradfri, part 2 (#27245)
* Add more device info data

* Add attributes to device_info

* Refactor sensor

* Filter
devices

* Update following review

* Update following review

* Add device_Class
2019-10-06 19:24:56 +02:00
Robbert Müller
7a156059e9 Switch on/off all lights, and wait for the result (#27078)
* Switch on/off all lights, and wait for the result

Reuses the parallel_updates semaphore.
This is a small crutch which serializes platforms which already do tis
for updates. Platforms which can parallelize everything, this makes it
go faster

* Fix broken unittest

With manual validation, with help from @frenck, we found out that the
assertions are wrong and the test should be failing.

The sequence requested is
OFF
ON

without cancelation, this code should result in:
off,off,off,on,on,on

testable, by adding a `await hass.async_block_till_done()` between the
off and on call.

with cancelation. there should be less off call's so
off,on,on,on

* Adding tests for async_request_call

* Process review feedback

* Switch gather with wait

* 👕 running black
2019-10-06 08:23:12 -07:00
Robert Svensson
c7c88b2b68 UniFi - Bandwidth sensors (#27229)
* First draft of UniFi bandwidth sensors

* Clean up

* Add tests for sensors
2019-10-06 08:17:40 -07:00
Sergio Conde Gómez
6cc71db385 Fix onvif PTZ service freeze (#27250) 2019-10-06 17:00:44 +02:00
ktnrg45
1ecc883ef4 PS4 bump to renamed dependency (#27144)
* Change to renamed dependency pyps4-2ndscreen 0.9.0

* Rename / bump to ps4 dependency to 1.0.0

* update requirements

* Rename test req

* Fix import

* Bump 1.0.1

* Fix flaky test leaving files behind
2019-10-06 14:43:34 +02:00
Santobert
bd6bbcd5af Neato config flow (#26579)
* initial commit

* Minor changes

* add async setup entry

* Add translations and some other stuff

* add and remove entry

* use async_setup_entry

* Update config_flows.py

* dshokouhi's changes

* Improve workflow

* Add valid_vendors

* Add entity registry

* Add device registry

* Update entry from configuration.yaml

* Revert unneccesary changes

* Update .coveragerc

* Prepared tests

* Add dshokouhi and Santobert as codeowners

* Fix unload entry and abort when already_configured

* First tests

* Add test for abort cases

* Add test for invalid credentials on import

* Add one last test

* Add test_init.py with some tests

* Address reviews, part 1

* Update outdated entry

* await instead of add_job

* run IO inside an executor

* remove faulty test

* Fix pylint issues

* Move IO out of constructur

* Edit error translations

* Edit imports

* Minor changes

* Remove test for invalid vendor

* Async setup platform

* Edit login function

* Moved IO out if init

* Update switches after added to hass

* Revert update outdated entry

* try and update new entrys from config.yaml

* Add test invalid vendor

* Default to neato
2019-10-06 13:05:51 +02:00
SukramJ
476f24e451 Add basic test support to Homematic IP Cloud (#27228)
* Add basic test support to Homematic IP Cloud

* move test data address comments
2019-10-06 11:54:26 +02:00
HomeAssistant Azure
2c6a869bc6 [ci skip] Translation update 2019-10-06 00:32:15 +00:00
Jens
bd92532ebb Add io:SomfyBasicContactIOSystemSensor to TaHoma component (#27234) 2019-10-06 01:12:50 +02:00
Paulus Schoutsen
1e1f79e45b Bumped version to 0.100.0b1 2019-10-05 13:40:29 -07:00
Jeff Irion
df0a233b64 Bump adb-shell to 0.0.4; bump androidtv to 0.0.30 (#27224) 2019-10-05 13:40:21 -07:00
Mark Coombes
33da7d341d Fix ecobee binary sensor and sensor unique ids (#27208)
* Fix sensor unique id

* Fix binary sensor unique id
2019-10-05 13:40:20 -07:00
Erik Montnemery
756e22290d Fix validation when automation is saved from frontend (#27195) 2019-10-05 13:40:20 -07:00
Pascal Vizeli
8c3f743efd Update connect-box to fix issue with attrs (#27194) 2019-10-05 13:40:19 -07:00
Erik Montnemery
143e42362b Add above and below to sensor trigger extra_fields (#27160) 2019-10-05 13:39:42 -07:00
Erik Montnemery
fdb6035275 Only generate device trigger for sensor with unit (#27152) 2019-10-05 13:39:42 -07:00
Sebastian Muszynski
5c01dd483f Add Xiaomi Air Humidifier CB1 (zhimi.humidifier.cb1) support (#27232) 2019-10-05 13:31:10 -07:00
Sebastian Muszynski
be60b065a3 Bump python-miio version to 0.4.6 (#27231) 2019-10-05 13:31:01 -07:00
Matthew Donoughe
d16edb3ef0 add script shortcut for activating scenes (#27223)
* add script shortcut for activating scenes

use `- scene: scene.<scene name>` in a script to activate a scene

* Update validation
2019-10-05 13:30:43 -07:00
Pierre Sicot
43d1413050 Fix closed status for non horizontal awnings. (#26840) 2019-10-05 13:28:19 -07:00
scheric
99859485e2 Repair SolarEdge_local inverter fahrenheit temperature (#27096)
* Add Fahrenheit check

* Rounding values

* add missing bracket

* Fix spelling

* round fahrenheit to 1 decimal

* Change unit on the fly

* Use new sensor names

* Use TEMP_FAHRENHEIT constant

* Pass new sensors fully to SolarEdgeSensor

* applying snake_case

* applying snake_case lower case

* Update sensor.py

* applying feedback
2019-10-05 13:07:01 -07:00
Santobert
601d15701b Add initial state to Flux Switch (#27089)
* flux restore state

* Add config options

* Add tests

* Add more tests

* just restores state
2019-10-05 12:57:12 -07:00
Patrik
5ae497bfdc Refactor Tradfri switch device (#26864)
* Refactor Tradfri switch device

* Lint

* Lint

* Removed unused constant

* Add base_class

* Lint

* Improvements after review

* Typo
2019-10-05 12:46:16 -07:00
Jeff Irion
0b838f88c1 Bump adb-shell to 0.0.4; bump androidtv to 0.0.30 (#27224) 2019-10-05 12:44:51 -07:00
definitio
9c08c35881 Improve influxdb error handling (#27225) 2019-10-05 12:43:57 -07:00
Santobert
46ac98379e Add improved scene support to the light integration (#27182)
* light reproduce state

* Add types

* Fix linting error

* Add tests

* Improve test

* Fix failing tests

* Another try

* avoid repetition

* simplified if

* Remove attributes that are no attributes
2019-10-05 12:43:12 -07:00
Santobert
e088119d6d fan_reproduce_state (#27227) 2019-10-05 12:42:37 -07:00
Oncleben31
3d1e743b0c Add set_location service doc (#27216) 2019-10-05 12:34:18 -07:00
Santobert
cc1cca0a14 automation_reproduce_state (#27222) 2019-10-05 12:31:51 -07:00
Ville Skyttä
25bfdbc8df Require Python >= 3.6.1 (#27226)
https://github.com/home-assistant/architecture/issues/278
2019-10-05 12:20:11 -07:00
Robert Svensson
a8567a746b UniFi - Improve switch tests (#27200)
* Continue rewriting tests for UniFi
2019-10-05 16:16:08 +02:00
MagicalTrev89
a9073451f8 Add hive trv support (#27033)
* TRV-Support

* pyhive import update

* Moved HVAC to new line

* updated pyhiveapi version

* Update for pylint errors

* Fix Pylint Errors

* Fixed Pylint 2

* removed whitespace

* Black

* Updates following review

* updated phyhive to 0.2.19.3

* Corrected logic on TRV name

* updated requirements as requested

* Black run
2019-10-05 15:52:42 +02:00
Franck Nijhof
2e17ad86af Adds guards for missing information in call stack frames (#27217) 2019-10-05 11:59:33 +02:00
Josh
71a3516053 Guard against network errors for Dark Sky (#27141)
* Guard against network errors for Dark Sky

- Prevents network errors from throwing an exception during
  state updates for the Dark Sky weather component.

* Implement `available` for Dark Sky component

* unknown -> unavailable
2019-10-04 19:28:55 -07:00
Zach
bbd2078986 Add doods contains flags on areas to allow specifying overlap (#27035)
* Add support for the contains flags on areas to allow specifying overlap vs contains

* Remove draw_box

* Add timeout option

* Fix import for CONF_TIMEOUT

* Change contains to covers
2019-10-04 17:48:45 -07:00
mvn23
6ae908b883 Add opentherm_gw config flow (#27148)
* Add config flow support to opentherm_gw.
Bump pyotgw to 0.5b0 (required for connection testing)
Existing entries in configuration.yaml will be converted to config entries and ignored in future runs.

* Fix not connecting to Gateway on startup.
Pylint fixes.

* Add tests for config flow.
Remove non-essential options from config flow.
Restructure config entry data.

* Make sure gw_id is slugified
2019-10-04 17:38:26 -07:00
Mark Coombes
2e49303401 Add turn_on method to ecobee climate platform (#27103)
* Add turn on method to ecobee climate

* Update climate.py

* Update value in async_update

* Fix update in async_update

* Simplify async_update

* Fix lint complaining about log string

* Cleanup inline if statement
2019-10-04 17:35:31 -07:00
HomeAssistant Azure
7e7868f0a6 [ci skip] Translation update 2019-10-05 00:32:19 +00:00
Santobert
9c96ec858a switch reproduce state (#27202) 2019-10-04 14:32:10 -07:00
Santobert
cc4926afb1 lock_reproduce_state (#27203) 2019-10-04 14:29:53 -07:00
SukramJ
0be1269b20 Add acceleration sensor to Homematic IP Cloud (#27199) 2019-10-04 14:21:19 -07:00
Mark Coombes
c62d1a77ec Fix ecobee binary sensor and sensor unique ids (#27208)
* Fix sensor unique id

* Fix binary sensor unique id
2019-10-04 14:15:43 -07:00
Santobert
de246fa7d8 lock open service data (#27204) 2019-10-04 14:14:47 -07:00
Paulus Schoutsen
23686710b1 Fix tests running in hass.io image (#27169)
* Fix tests running in hass.io image

* Real fix now

* Only remove wheel links
2019-10-04 22:49:51 +02:00
Sergio Mayoral Martínez
e5a2e18881 Fix template fan turn_on action (#27181)
* Fix template fan turn_on action

The turn_on action of a template fan should
receive the 'speed' attribute in order to give
the user the possibility of define the behaviour
of this action as he desires

Fixes #27176

* Format

* Update fan.py
2019-10-04 12:07:19 -07:00
Erik Montnemery
e27051aa61 Fix validation when automation is saved from frontend (#27195) 2019-10-04 10:17:57 -07:00
Erik Montnemery
b8f41dbb75 Add device condition support to sensor entities (#27163)
* Add device condition support to sensor entities

* Fix typing
2019-10-04 10:11:14 -07:00
David Bonnes
45d4586bc2 Improve evohome debug logging (#27178)
* add debug logging for schedule updates

* add debug logging for schedules

* change back to debug from warn
2019-10-04 08:54:15 -07:00
Santobert
3547b8691e Add examples to lights service (#27192) 2019-10-04 08:46:23 -07:00
ochlocracy
9a5c1fbaed Add SecurityPanelController for alarm_control_panel to alexa (#27081)
* Implemented Alexa.SecurityPanelController Interface for alarm_control_panel
https://developer.amazon.com/docs/device-apis/alexa-securitypanelcontroller.html

* Implemented Tests for Alexa.SecurityPanelController Interface for alarm_control_panel

* Added additional AuthorizationRequired error handling

* Removed optional exitDelayInSeconds

* Updating elif to if to please pylint

* Adding self to code owners.

* Adding self to code owners.

* Added AlexaEndpointHealth Interface to alarm_control_panel entities.

* Added additional entity tests.

* Code reformatted with Black.

* Updated alexa alarm_control_panel tests for more coverage.

* Updated alexa alarm_control_panel tests for more coverage. Fixed Test.

* Adding self to code owners.
2019-10-04 08:41:47 -07:00
Pascal Vizeli
f169e84d21 Update connect-box to fix issue with attrs (#27194) 2019-10-04 17:05:52 +02:00
Maciej Bieniek
8ba4ee1012 Add Airly integration (#26375)
* Add Airly integration

* Update .coveragerc file

* Remove AVAILABLE_CONDITIONS and fix device_class

* Don't create client on every update

* Rename client to session

* Rename state_attributes to device_state_attributes

* Remove log latitude and longitude

* Fix try...except

* Change latitude and longitude to HA defaults

* _show_config_form doesn't need coroutine

* Simplify config_flow errors handlig

* Preetier

* Remove unnecessary condition

* Change sensor platform to air_quality

* Remove PM1

* Make unique_id more unique

* Remove ,

* Add tests for config_flow

* Move conf to CONFIG

* Remove domain from unique_id

* Change the way update of attrs

* Language and attrs

* Fix attrs

* Add aiohttp error handling

* Throttle as decorator

* Suggested change

* Suggested change

* Invert condition

* Cleaning

* Add tests

* Polish no sesnor error handling

* Better strings

* Fix test_invalid_api_key

* Fix documentation url

* Remove unnecessary test

* Remove language option

* Fix test_invalid_api_key once again

* Sort imports

* Remove splits in strings
2019-10-04 13:58:29 +02:00
Daniel Shokouhi
4b4a290f71 WAQI add unique ID and availability (#27086)
* WAQI add unique ID and availability

* Review comments

* Fix unique ID

* Fix unique ID
2019-10-04 10:37:30 +02:00
Mark Coombes
98eaecf61d Add device registry support to ecobee integration (#27109)
* Add manufacturer const

* Add device_info to binary sensor

* Add device info to climate

* Add device info to sensor

* Add device info to weather

* Add constant for device info

* Fix log messages

* Use guard clauses
2019-10-04 08:31:45 +02:00
David Bonnes
f500367721 Handle all single zone thermostats (#27168) 2019-10-03 18:04:30 -07:00
Hugh Eaves
d36d123cf7 Support zone expanders in alarmdecoder (#27167) 2019-10-03 18:01:06 -07:00
Javier González Calleja
c6b08b28b2 Fix homekit temperaturesensor round (#27047)
* Fix homekit temperature sensor for round with one decimal

* Removing unnecesary operations

* Adapting tests for new temperature_to_homekit() result precision
2019-10-03 17:44:07 -07:00
HomeAssistant Azure
85947591c5 [ci skip] Translation update 2019-10-04 00:32:16 +00:00
Dan Cinnamon
f2c5c249d2 Envisalink startup reconnect (#27063)
* Added retry capability to the component initialization.

* Removed extra chars

* Black formatting.

* Removed issue with block upon setup. Now setup will only fail if auth failed to the device.
2019-10-03 17:15:52 -07:00
David Bonnes
b63b207519 Handle all single zone thermostats (#27168) 2019-10-03 17:10:26 -07:00
jjlawren
adab228012 Unload cert_expiry config entries (#27150)
* Allow cert_expiry unloading

* Update codeowners
2019-10-03 16:50:15 -07:00
Erik Montnemery
89ebc17fb1 Only generate device trigger for sensor with unit (#27152) 2019-10-03 13:30:59 -07:00
Erik Montnemery
cda7692f24 Add support for for to binary_sensor, light and switch device conditions (#27153)
* Add support for `for` to binary_sensor, light and switch device conditions

* Fix typing

* Fixup

* Fixup
2019-10-03 13:29:57 -07:00
Franck Nijhof
4733fea416 Adds fields to light.toggle service description (#27155) 2019-10-03 13:28:53 -07:00
Daniel Høyer Iversen
2f251104e3 update broadlink library (#27157) 2019-10-03 13:28:12 -07:00
ochlocracy
af81878d08 Add PowerLevelController for fan to alexa (#27158)
* Implement AlexaPowerLevelController

* Implement AlexaPowerLevelController Tests
2019-10-03 13:28:02 -07:00
Robert Svensson
565302ed34 Improve device tracker tests (#27159) 2019-10-03 13:23:25 -07:00
Erik Montnemery
9902209ad2 Add above and below to sensor trigger extra_fields (#27160) 2019-10-03 22:17:58 +02:00
jjlawren
bb45bdd8dd Fix update on cert_expiry startup (#27137)
* Don't force extra update on startup

* Skip on entity add instead

* Conditional update based on HA state

* Only force entity state update when postponed

* Clean up state updating

* Delay YAML import
2019-10-03 17:39:14 +02:00
jjlawren
2307cac942 Add unique_id to cert_expiry (#27140)
* Add unique_id to cert_expiry

* Simplify ID
2019-10-03 14:26:19 +02:00
Pascal Vizeli
69bdce768c Bump version 0.101.0dev0 2019-10-03 11:19:02 +00:00
Pascal Vizeli
bd7adf9585 Bump version 0.100.0b0 2019-10-03 11:15:43 +00:00
Paulus Schoutsen
f184bf4d85 Add Google Report State (#27112)
* Add Google Report State

* UPDATE codeowners"

* Add config option for dev mode

* update library

* lint

* Bug fixes
2019-10-03 13:02:38 +02:00
Erik Montnemery
3e99743244 Add device trigger support to sensor entities (#27133)
* Add device trigger support to sensor entities

* Fix typing

* Fix tests, add test helper for comparing lists
2019-10-03 06:14:35 +02:00
HomeAssistant Azure
e005f6f23a [ci skip] Translation update 2019-10-03 00:34:28 +00:00
ochlocracy
9c1feacd47 Fix colorTemperatureInKelvin in Alexa report when light is off (#27107)
* Fixes #26405 Return None if light state is off since attribute is unavailable, prevents property from being reported with invalid value of 0.

* Update Test to check property is not reported when light state is off.
2019-10-02 15:59:21 -07:00
Erik Montnemery
c43eeee62f Improve validation of device condition config (#27131)
* Improve validation of device condition config

* Fix typing
2019-10-02 15:58:14 -07:00
ochlocracy
363873dfcb Display Fan entity as Fan category in Alexa (#27135)
* Added Fan to display categories.

* Added Doorbell to display categories.

* Added Microwave to display categories.

* Added Security Panel to display categories.

* Updated FanCapabilities to use FAN display category.

* Updated Tests for FanCapabilities to use FAN display category.
2019-10-02 15:55:01 -07:00
Matthias Alphart
75bce84ad5 Update KNX integration to xknx 0.11.2 (#27130) 2019-10-02 15:53:55 -07:00
Brendon Baumgartner
39c7d069b8 gpiozero requirement ver (#27129) 2019-10-02 15:53:37 -07:00
ochlocracy
6dfeed6cd1 Fix unavailable climate entities in Alexa StateReport (#27128)
* Return None for AlexaThermostatController and AlexaTemperatureSensor properties if climate state is unavailable. Preserves raising an error for UnsupportedProperty, and allows Alexa.EndpointHealth to handle the unavailable state.

* Added additional tests for climate state reporting.
2019-10-02 15:53:04 -07:00
Alexei Chetroi
e011a94ce9 Bump up ZHA dependencies. (#27127) 2019-10-02 15:51:52 -07:00
jjlawren
30245f6874 Fix error on failed Plex setup (#27132) 2019-10-02 15:51:18 -07:00
Bram Kragten
743cb848e8 Updated frontend to 20191002.0 (#27134) 2019-10-03 00:08:01 +02:00
Erik Montnemery
65ce3b49c1 Add support for for to binary_sensor, light and switch device triggers (#26658)
* Add support for `for` to binary_sensor, light and switch device triggers

* Add WS API device_automation/trigger/capabilities
2019-10-02 22:14:52 +02:00
Robert Svensson
d8c6b281b8 deCONZ - Support Symfonisk sound controller with device triggers (#26913)
* Device trigger tests shall use the common gateway mock

* Follow ebaauws clarification of signals

* Fix translations
2019-10-02 22:12:59 +02:00
Robert Svensson
09c5b9feb3 UniFi - Try to handle when UniFi erroneously marks offline client as wired (#26960)
* Add controls to catch when client goes offline and UniFi bug marks client as wired
* Device trackers shouldn't jump between going away and home
* POE control shouldn't add normally wireless clients as POE control switches
2019-10-02 21:43:14 +02:00
Erik Montnemery
0eb1d49046 Disable flaky/slow test (#27125) 2019-10-02 20:52:15 +02:00
Felix Eckhofer
9c49b8dfc1 Fix generated comment in CODEOWNERS (#27115)
codeowners.py was moved from `/script/manifest/` to `/script/hassfest/`
in e8343452cd.
2019-10-02 09:34:27 -07:00
Franck Nijhof
d4a67e3a30 Update documentation link URL for integrations (part2) (#27117) 2019-10-02 09:34:07 -07:00
Kevin Eifinger
04ead6f273 move ATTR_MODE to homeassistant.const (#27118) 2019-10-02 09:33:47 -07:00
David Bonnes
c78b3a4439 Tweak geniushub and bump client to v0.6.26 (#26640)
* use state attribute rather than type

* HA style tweaks

* small tweak

* bump client

* add more device_state_attributes

* bump client

* small tweak

* bump client for concurrent IO

* force snake_case, and refactor (consolidate) Devices/Zones

* force snake_case, and refactor (consolidate) Devices/Zones 2

* force snake_case, and refactor (consolidate) Devices/Zones 3

* refactor last_comms / wakeup_interval check

* movement sensor is dynamic, and tweaking

* tweak

* bump client to v0.6.20

* dummy

* dummy 2

* bump client to handle another edge case

* use entity_id fro zones

* small tweak

* bump client to 0.6.22

* add recursive snake_case converter

* fix regression

* fix regression 2

* fix regression 3

* remove Awaitables

* don't dynamically create function every scan_interval

* log kast_comms as localtime, delint dt_util

* add sensors fro v1 API

* tweak entity_id

* bump client

* bump client to v0.6.24

* bump client to v0.6.25

* explicit device attrs, dt as UTC

* add unique_id, remove entity_id

* Bump client to 0.6.26 - add Hub UID

* remove convert_dict()

* add mac_address (uid) for v1 API

* tweak var names

* add UID.upper() to avoid unwanted unique_id changes

* Update homeassistant/components/geniushub/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/geniushub/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* remove underscores

* refactor for broker

* ready now

* validate UID (MAC address)

* move uid to broker

* use existing constant

* pass client to broker
2019-10-02 17:27:13 +01:00
Franck Nijhof
c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Jeff Irion
ed49b2f155 Bump androidtv to 0.0.29 (#27120) 2019-10-02 17:38:14 +02:00
Brendon Baumgartner
8488b57215 Add neural support to amazon polly (#27101)
* amazon polly - add neural support

* bumped boto3 for route53 to 1.9.233
2019-10-02 10:25:35 +02:00
Chris Colohan
ce2e80339c Add Vera last user and low battery attributes (#27043)
* Add in attributes to track when a user unlocks the lock with a PIN, and when the battery runs low.

* Vera attributes for who entered PIN on lock, and low battery warning.

* Changed last_user_id to use changed_by interface.

* Bump pyvera version to 0.3.6; remove guard code for earlier pyvera versions.

* Bump pyvera version to 0.3.6
2019-10-02 09:50:45 +02:00
Jeff Irion
7d2a8b8137 Bump adb-shell to 0.0.3 (#27108) 2019-10-02 08:17:30 +02:00
Erik Montnemery
5a1da72d5e Improve validation of device action config (#27029) 2019-10-01 20:35:36 -07:00
HomeAssistant Azure
2090d650c6 [ci skip] Translation update 2019-10-02 00:32:11 +00:00
mvn23
26d78cab60 Update opentherm_gw.climate to match Climate 1.0 (#25931)
* Update opentherm_gw.climate to match Climate 1.0

* Change hvac_mode to reflect last active hvac_action
2019-10-01 14:38:48 -07:00
Mark Coombes
ee45431d0e Add entity registry support to ecobee integration (#27088)
* Add unique id to platforms

Add unique id for binary sensor, climate, and sensor.

* Add unique id to weather platform

* Simplify unique_id for weather platform

* Fix lint for unique_id in sensor

* Fix lint for unique_id in binary sensor
2019-10-01 14:28:13 -07:00
jjlawren
e033c46c91 Add missing http dependency (#27097) 2019-10-01 14:26:33 -07:00
Kevin Eifinger
8d251c190f Delete here_travel_time dead code COORDINATE_SCHEMA (#27090) 2019-10-01 22:02:43 +02:00
chriscla
2e4c92104d Nzbget services (#26900)
* Add NZBGet Queue control.

* Fix error message

* Addressing review comments

* Moving import to top of file.
2019-10-01 21:51:11 +02:00
rolfberkenbosch
ca9b3b5a4c Update meteoalertapi to version 0.1.6 (#27099) 2019-10-01 15:20:28 -04:00
Franck Nijhof
3b0744d021 Bump attrs to 19.2.0 (#27102) 2019-10-01 15:19:50 -04:00
jjlawren
571ab5a978 Plex external config flow (#26936)
* Plex external auth config flow

* Update requirements_all

* Test dependency

* Bad await, delay variable

* Use hass aiohttp session, bump plexauth

* Bump requirements

* Bump library version again

* Use callback view instead of polling

* Update tests for callback view

* Reduce timeout with callback

* Review feedback

* F-string

* Wrap sync call

* Unused

* Revert unnecessary async wrap
2019-10-01 17:20:30 +02:00
Pascal Vizeli
c1851a2d94 Cleanup coroutine threadsafe (#27080)
* Cleanup coroutine threadsafe

* fix lint

* Fix typing

* Fix tests

* Fix black
2019-10-01 16:59:06 +02:00
Gil Peeters
f4a1f2809b Add availability_template to Template Lock platform (#26517)
* Added availability_template to Template Lock platform

* Added to test for invalid values in availability_template

* Black and Lint fix

* black formatting

* Updated AVAILABILITY_TEMPLATE Rendering error

* Moved const to package Const.py

* Fix import order (pylint)

* Moved availability_template rendering to common loop

* Brought contant into line

* Cleaned up const and compare lowercase result to 'true'

* reverted _available back to boolean

* Fixed tests (async, magic values and state checks)
2019-10-01 08:15:15 -04:00
fredericvl
2e3bc5964d Add saj component (#26902)
* Add saj component

* Performed requested changes after review

* Performed requested changes after review 2

* Performed requested changes after review 3

* Black

* Bump pysaj library version

* Changes after review

* Fix flake8

* Review changes + isort
2019-10-01 13:25:57 +02:00
David Bonnes
a1997ee891 Bugfix evohome (#26810)
* address issues #25984, #25985

* small tweak

* refactor - fix bugs, coding erros, consolidate

* some zones don't have schedules

* some zones don't have schedules 2

* some zones don't have schedules 3

* fix water_heater, add away mode

* readbility tweak

* bugfix: no refesh after state change

* bugfix: no refesh after state change 2

* temove dodgy wrappers (protected-access), fix until logic

* remove dodgy _set_zone_mode wrapper

* tweak

* tweak docstrings

* refactor as per PR review

* refactor as per PR review 3

* refactor to use dt_util

* small tweak

* tweak doc strings

* remove packet from _refresh

* set_temp() don't have until

* add unique_id

* add unique_id 2
2019-09-30 21:35:10 -07:00
Robert Svensson
e2d7a01d65 Remove last of device tracker scanner (#27082) 2019-09-30 21:19:51 -07:00
Malte Franken
a9398a362f bumped version of upstream library (#27083) 2019-09-30 17:46:33 -07:00
Daniel Shokouhi
bce49233ca Add some icons for Obihai (#27075)
* Add some icons for Obihai

* Lint

* Lint

* Lint fixes
2019-09-30 17:42:06 -07:00
HomeAssistant Azure
513d2652e4 [ci skip] Translation update 2019-10-01 00:32:19 +00:00
Franck Nijhof
9615ba3d99 Bump shodan to 1.19.0 (#27079) 2019-09-30 17:46:58 -04:00
John Luetke
8c01ed8a1f Fix SSL connections to Pi-hole (#27073) 2019-09-30 20:26:26 +02:00
Mark Coombes
d28980b097 Bump pyecobee to 0.1.4 (#27074) 2019-09-30 12:56:58 -04:00
Pascal Vizeli
d116d2c1a4 Update azure-pipelines-release.yml for Azure Pipelines 2019-09-30 14:49:08 +02:00
Tiit Rätsep
48d07467d9 Add support for SOMA Smartshades devices (#26226)
* Add Soma integration

* Fixed cover position get/set

* Try to list devices before creating config entries to see if Soma Connect can be polled

* Style fixes

* Updated requirements

* Updated .coveragerc to ignore Soma component

* Fixed linter errors

* Implemented stop command

* Test coverage fixes according to feedback

* Fixes to code according to feedback

* Added error logging and tested config from yaml

* Indentation fix

* Removed unnecessary method

* Wrong indentation

* Added some tests

* Added test for import step leading to entry creation

* Added feedback to user form in case of connection error

* Minor fixes according to feedback

* Changed exception type in error handling for connection to Connect

* To keep API consistent for Google Home and Alexa we swapped the open/closed position values back and I reversed them in this integration as well

* regenerated requirements, ran black, addde __init__.py to ignore file

* Added pysoma library to gen_requirements_all.py

* Added missing test case

* removed useless return value
2019-09-30 14:23:08 +02:00
Pascal Vizeli
21453df73e Update devcontainer.json 2019-09-30 11:01:08 +02:00
David Bonnes
fa92d0e6d8 Fix incomfort and Bump client to 0.3.5 (#26802)
* remove superfluous device state attributes
* fix water_heater icon
* add type hints
* fix issue #26760
* bump client to v0.3.5
* add unique_id
2019-09-30 09:31:35 +01:00
Sebastian Kügler
c527e0f164 Fix rest_command when server is unreachable (#26948)
* fix rest_command when server is unreachable

When a server doesn't exist, the connection fails immediately, rather
than waiting for a timeout. This means that the async handler is never
reached, and the request variable never filled, yet it's used in the
client error exception handler, so this one bugs out.

By using the command_config, we avoid using the potentially unassigned
request variable, avoiding this problem.

This patch makes scripts work that have a rest_command in them which
fails due to a server being offline.

* render template_url

instead of printing the template object

* fix formatting

* fix format using black

* only render url once

* blacken...
2019-09-30 09:06:10 +02:00
MatthewFlamm
43bd116852 add utc tz to forecast (#27049) 2019-09-30 08:56:02 +02:00
John Luetke
245e51df7a Add Pi-hole enable and disable services (#27055)
* Add service to disable pihole

* Add service to enable pihole

* Redefine optional string validator

* code review changes

* Change service parameter to timedelta

* code review changes
2019-09-29 20:35:56 -04:00
David F. Mulcahey
5bd3d4aa0b Bump zha quirks to 0.0.26 (#27051) 2019-09-29 20:33:42 -04:00
HomeAssistant Azure
cdb469f711 [ci skip] Translation update 2019-09-30 00:32:17 +00:00
Ville Skyttä
52bbb6242c Upgrade pytest to 5.2.0 (#27058)
https://docs.pytest.org/en/latest/changelog.html#pytest-5-2-0-2019-09-28
2019-09-29 23:00:39 +02:00
Ville Skyttä
f259ff17d5 Type hint additions (#26831)
* Type hint additions

* Remove optional from sidebar_icon comment

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>

* Remove optional from sidebar_title comment

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>

* Fix issues after rebase and mypy 0.730
2019-09-29 20:07:49 +03:00
David K
4f55235aa2 Return esphome cover position as Integer (#27039)
cover position is specified as integer 0-100, we should not return
float here.
fixes #25738
2019-09-29 12:06:51 +02:00
Khole
2ebc1901ab Change hive hotwater to hot_water + bug fix (#27038)
* Updated hotwater to hot_water + bug fix

* Updated version seperating dependancy
2019-09-29 11:38:43 +02:00
david81
f464a78088 Add venstar support for hvac action (#26956)
* Added support for current fan state and hvac action

* Corrected handling of fan_mode
2019-09-29 05:36:35 +02:00
HomeAssistant Azure
560ac3df3a [ci skip] Translation update 2019-09-29 00:32:13 +00:00
SukramJ
61a7d8e3d2 Add create, remove of devices for HomematicIP_Cloud (#27030) 2019-09-28 22:34:13 +02:00
Gil Peeters
11c9bab078 Add availability_template to Template Vacuum platform (#26514)
* Added availability_template to Template Vacuum platform

* Added to test for invalid values in availability_template

* Updated AVAILABILITY_TEMPLATE Rendering error

* Moved const to package Const.py

* Removed 'Magic' string

* Cleaned up const and compare lowercase result to 'true'

* reverted _available back to boolean

* Fixed tests (async, magic values and state checks)
2019-09-28 08:02:46 -04:00
Gil Peeters
ed82ec5d8e Add availability_template to Template Light platform (#26512)
* Added availability_template to Template Light platform

* Added to test for invalid values in availability_template

* Updated AVAILABILITY_TEMPLATE Rendering error

* Moved const to package Const.py

* Fix import order (pylint)

* Moved availability_template rendering to common loop

* Removed 'Magic' string

* Cleaned up const and compare lowercase result to 'true'

* reverted _available back to boolean

* Fixed tests (async, magic values and state checks)
2019-09-28 08:01:18 -04:00
Gil Peeters
74196eaf8b Add availability_template to Template Fan platform (#26511)
* Added availability_template to Template Fan platform

* Added to test for invalid values in availability_template

* fixed component ID in test

* Made availability_template redering erorr more concise

* Updated AVAILABILITY_TEMPLATE Rendering error

* Moved const to package Const.py

* Fix import order (pylint)

* Removed 'Magic' string

* Cleaned up const and compare lowercase result to 'true'

* reverted _available back to boolean

* Fixed tests (magic values and state checks)
2019-09-28 07:59:40 -04:00
Gil Peeters
5c5f6a21af Add availability_template to Template Binary Sensor platform (#26510)
* Added availability_template to Template Binary Sensor platform

* Added to test for invalid values in availability_template

* black

* simplified exception handler

* Updated AVAILABILITY_TEMPLATE Rendering error

* Moved const to package Const.py

* Fix import order (pylint)

* Moved availability_template rendering to common loop

* Removed 'Magic' string

* Cleaned up const and compare lowercase result to 'true'

* reverted _available back to boolean

* Fixed tests (magic values and state checks)
2019-09-28 07:55:29 -04:00
Gil Peeters
6d773198a1 Add availability_template to Template Cover platform (#26509)
* Added availability_template to Template Cover platform

* Added to test for invalid values in availability_template

* Updated AVAILABILITY_TEMPLATE Rendering error

* Moved const to package Const.py

* Fix import order (pylint)

* Moved availability_template rendering to common loop

* Removed 'Magic' string and removed duplicate code

* Cleaned up const and compare lowercase result to 'true'

* reverted _available back to boolean

* Fixed tests (async, magic values and state checks)
2019-09-28 07:53:16 -04:00
Josef Schlehofer
f3d408aca4 Upgrade youtube_dl to 2019.09.28 (#27031) 2019-09-28 07:13:11 -04:00
Florian Klien
f9ac204cc5 Add more providers, bump yessssms version to 0.4.1 (#26874)
* bump yessssms version to 0.4.0

adds 'provider' config parameter
adds support for providers:

* billitel
* EDUCOM
* fenercell
* georg
* goood
* kronemobile
* kuriermobil
* SIMfonie
* teleplanet
* WOWWW
* yooopi

* black formatting

* moved CONF_PROVIDER to component

* black formatting

* moved error handling on init to get_service

* return None, init logging moved to get_service

* moved YesssSMS import to top of module

* test login data on init. add flag for login data test. removed KeyError

* catch connection error, remove CONF_TEST_LOGIN_DATA config flag

* requirements updated

* lint

* lint: use getters for protected members, bump version to 0.4.1b4

* requirements updated to 0.4.1b4

* fix logging messages, info to warning, clear up login_data check

* change valid login data message to debug

* fix tests

* add tests for get_service

* bump yessssms version 0.4.1

* tests for get_service refurbished

* test refactoring with fixtures

* polish fixtures 

* replace Mock with patch 🔄

* tiny string fixes, removed unused return_value 🐈
2019-09-28 11:33:48 +02:00
Mark Coombes
2dfdc5f6f8 Improve ecobee service schemas (#26955)
* Validate date and time in create vaction

Improve validation with utility functions.

* Improve validate ATTR_VACATION_NAME

* Add tests for ecobee.util functions

* Revise tests as standalone functions
2019-09-28 11:32:22 +02:00
SneakSnackSnake
1c72a246a0 Update pythonegardia to 1.0.40 (#27009) 2019-09-28 08:15:29 +02:00
HomeAssistant Azure
2af34b461a [ci skip] Translation update 2019-09-28 00:32:10 +00:00
Aaron Bach
ce97c27a7f Fix possible OpenUV exception due to missing data (#26958) 2019-09-27 17:03:15 -07:00
Ville Skyttä
ac634d71f4 Remove no longer needed Python < 3.6 compatibility code (#27024) 2019-09-27 17:02:48 -07:00
Ville Skyttä
b0df14db14 Bump Travis timeout to 50 minutes (#26978) 2019-09-27 14:20:00 -07:00
Khole
fc3f5163f1 Add hive boost to climate and water_heater (#26789)
* Start the Boost work

* Add services.yaml

* Added Services #2

* Start the Boost work

* Add services.yaml

* Added Services #2

* Working Services

* pyhiveapi to 0.2.19

* Update Libary to 0.2.19

* Update Water_heater boost

* Added Async hass add function

* Update Services

* Reviewed Changes

* Fixed Refresh System

* Review 2

* Moved device iteration to the platform

* update

* Updates #2

* Review#3 New Base Class

* Review #5

* Update homeassistant/components/hive/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/hive/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/hive/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Review 6

* Review 7

* Removed Child classes to inhertit from the parent
2019-09-27 23:18:34 +02:00
Paulus Schoutsen
58446c79fc Update scaffold text 2019-09-27 13:08:38 -07:00
Ville Skyttä
fde128d66c Upgrade mypy to 0.730, address raised issues (#26959)
https://mypy-lang.blogspot.com/2019/09/mypy-730-released.html
2019-09-27 22:57:59 +03:00
Paulus Schoutsen
77654da341 Add templates to scaffold device_trigger, device_condition, (#26871)
device_action
2019-09-27 12:54:17 -07:00
Bram Kragten
80bc15e24b Update Alexa discovery description (#26933)
* Update Alexa discovery description

* Update description

* Fix test

* Filter special chars
2019-09-27 21:51:46 +02:00
Andrew Onyshchuk
eeffd090a3 Add support for Z-Wave battery level (#26943)
* Add support for Z-Wave battery level

* Improve coverage
2019-09-27 10:21:04 -07:00
David F. Mulcahey
b1a9fa47ca Add device action support for ZHA (#26903)
* start implementing device actions

* rename file

* cleanup and add tests

* fix docstrings

* sort imports
2019-09-27 09:57:47 -07:00
Pascal Vizeli
f267b37105 Update azure-pipelines-release.yml for Azure Pipelines 2019-09-27 17:58:16 +02:00
Erik Montnemery
e57e7e8449 Improve validation of device trigger config (#26910)
* Improve validation of device trigger config

* Remove action and condition checks

* Move config validation to own file

* Fix tests

* Fixes

* Fixes

* Small tweak
2019-09-27 17:48:48 +02:00
Michał Mrozek
588bc26661 Add CO2 level reading for Kaiterra integration (#26935) 2019-09-27 17:42:32 +02:00
Pascal Vizeli
4d92e76f19 Update azure-pipelines-release.yml for Azure Pipelines 2019-09-27 16:59:07 +02:00
Mark Coombes
1de002013f Fix ecobee integration (#26951)
* Check for DATA_ECOBEE_CONFIG

* Update homeassistant/components/ecobee/config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
2019-09-27 16:45:50 +02:00
Pascal Vizeli
e989239e19 Update azure-pipelines-release.yml for Azure Pipelines 2019-09-27 16:43:23 +02:00
Pascal Vizeli
62d515fa03 Update azure-pipelines-release.yml for Azure Pipelines 2019-09-27 16:26:06 +02:00
joe248
b88772eea0 Revert Nest HVAC mode when disabling Eco mode (#26934) 2019-09-27 15:31:01 +02:00
jaburges
454d479b36 Bump pyowlet to 1.0.3 (#26892)
* API URLs

API URLs have been updated which prevented 1.0.2 from authenticating per this thread:
https://community.home-assistant.io/t/owlet-setup/130751
```
https://user-field-1a2039d9.aylanetworks.com/users/sign_in
https://ads-field-1a2039d9.aylanetworks.com/apiv1
```
have been updated in PyOwlet.py 1.0.3

* bump pyowlet to 1.0.3
2019-09-27 12:52:58 +02:00
Paulus Schoutsen
fc700c7937 Guard against non supported entities (#26941) 2019-09-27 08:49:51 +02:00
Martin Hjelmare
9f6fade236 Add xbox live custom update interval (#26939)
* Add xbox_live custom update schedule

* Set a default update interval that is within the free limit. Consider
  number of users per api key when setting interval.

* Add codeowner

* Add callback decorator
2019-09-27 08:02:58 +02:00
Oleksandr Omelchuk
77b7e4665b Add more ebusd Vaillant "bai" sensors (#26750)
* Added support for more ebus "bai" sensors.

* Using common constants for measuring unit names.

Fixed review item

* dummy commit to restart CI

* Fixed review item

* Fixed formatting

black --fast homeassistant

* Removed trailing spaces

* Fixed black formatting

* trigger new build
2019-09-27 07:54:40 +02:00
Jeff Irion
45c548ae47 Bump androidtv to 0.0.28 (#26906)
* Bump androidtv to 0.0.28

* Address reviewer comments

* Remove adb-shell from requirements_test_all.txt

* Use a one-liner to avoid a coverage failure
2019-09-27 07:53:26 +02:00
HomeAssistant Azure
b04a70995e [ci skip] Translation update 2019-09-27 00:32:12 +00:00
Mark Coombes
c194f4a813 Add ecobee services to create and delete vacations (#26923)
* Bump pyecobee to 0.1.3

* Add functions, attrs, and services to climate

Fixes

* Update requirements

* Update service strings

* Fix typo

* Fix log msg string formatting for lint

* Change some parameters to Inclusive

start_date, start_time, end_date, and end_time must be specified together.

* Use built-in convert util for temps

* Match other service variable names
2019-09-26 21:23:44 +02:00
Petr Vraník
3efdf29dfa Centralize rainbird config and add binary sensor platform (#26393)
* Update pyrainbird to version 0.2.0 to fix zone number issue:

- home-assistant/home-assistant/issues/24519
- jbarrancos/pyrainbird/issues/5
- https://community.home-assistant.io/t/rainbird-zone-switches-5-8-dont-correspond/104705

* requirements_all.txt regenerated

* code formatting

* pyrainbird version 0.3.0

* zone id

* rainsensor return state

* updating rainsensor

* new version of pyrainbird

* binary sensor state

* quiet in check format

* is_on instead of state for binary_sensor

* no unit of measurement for binary sensor

* no monitored conditions config

* get keys of dict directly

* removed redundant update of state

* simplified switch

* right states for switch

* raindelay sensor

* raindelay sensor

* binary sensor state

* binary sensor state

* reorganized imports

* doc on public method

* reformatted

* add irrigation service to rain bird, which allows you to set the duration

* rebased on konikvranik and solved some feedback

* add irrigation service to rain bird

* sensor types to constants

* synchronized register service

* patform discovery

* binary sensor as wrapper to sensor

* version 0.4.0

* new config approach

* sensors cleanup

* bypass if no zones found

* platform schema removed

* Change config schema to list of controllers

some small code improvements as suggested in CR:
 - dictionary acces by []
 - just return instead of return False
 - import order
 - no optional parameter name

* some small code improvements as suggested in CR:
 - supported platforms in constant
 - just return instead of return False
 - removed unused constant

* No single controller configuration

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* pyrainbird 0.4.1

* individual switch configuration

* imports order

* generate default name out of entity

* trigger time required for controller

* incorporated CR remarks:
- constant fo rzones
- removed SCAN_INTERVAL
- detection of success on initialization
- removed underscore
- refactored if/else
- empty line on end of file
- hass as first parameter

* import of library on top

* refactored

* Update homeassistant/components/rainbird/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* validate time and set defaults

* set defaults on right place

* pylint bypass

* iterate over values

* codeowner

* reverted changes:

* irrigation time just as positive integer. Making it complex does make
sense
* zone edfaults fullfiled at runtime. There is no information about
available zones in configuration time.

* codeowners updated

* accept timedelta in irrigation time

* simplified time calculation

* call total_seconds

* irrigation time as seconds.

* simplified schema
2019-09-26 11:24:03 +02:00
Rami Mosleh
82b77c2d29 Add config flow to transmission (#26434)
* Add config flow to transmission

* Reworked code to add all sensors and switches

* applied fixes

* final touches

* Add tests

* fixed tests

* fix get_api errors and entities availabilty update

* update config_flows.py

* fix pylint error

* update .coveragerc

* add codeowner

* add test_options

* fixed test_options
2019-09-26 11:14:57 +02:00
jjlawren
9b204ad162 Add Plex config options support (#26870)
* Add config options support

* Actually copy dict

* Move media_player options to PlexServer class

* Handle updated config options

* Move callback out of server
2019-09-26 11:10:20 +02:00
Daniel Shokouhi
62cea2b7ac Bump pyobihai, add unique ID and availability (#26922)
* Bump pyobihai, add unique ID and availability

* Fix unique ID

* Fetch serial correctly
2019-09-26 10:53:31 +02:00
Martin Hjelmare
770ad86f12 Add mysensors codeowner (#26917) 2019-09-26 07:42:46 +02:00
HomeAssistant Azure
ba92d781b4 [ci skip] Translation update 2019-09-26 00:32:13 +00:00
petewill
d1b4bd22ce Add MySensors ACK (#26894)
* Add MySensors ACK

The addition of the ACK will ask sensors to respond to commands sent to them which will update the MySensors device in Home Assistant.
 Currently, if a default MySensors sketch is used the device will update but Home Assistant does not reflect the update and custom code has to be added to tell Home Assistant the command was received.  With the ACK set to 1 in the message all this is taken care of by MySensors.

* Run black
2019-09-25 23:20:02 +02:00
Bram Kragten
b75639d9d1 Remove lamps and groups from ha when removed from Hue (#26881)
* Remove light when removed from hue

* add remove_config_entry_id

* Review + bump aiohue

* lint

* Add tests
2019-09-25 14:00:18 -07:00
Mark Coombes
f6995b8d17 Add config flow to ecobee (#26634)
* Add basic config flow

* Fix json files

* Update __init__.py

* Fix json errors

* Move constants to const.py

* Add ecobee to generated config flows

* Update config_flow for updated API

* Update manifest to include new dependencies

Bump pyecobee, add aiofiles.

* Update constants for ecobee

* Modify ecobee setup to use config flow

* Bump dependency

* Update binary_sensor to use config_entry

* Update sensor to use config_entry

* Update __init__.py

* Update weather to use config_entry

* Update notify.py

* Update ecobee constants

* Update climate to use config_entry

* Avoid a breaking change on ecobee services

* Store api key from old config entry

* Allow unloading of config entry

* Show user a form before import

* Refine import flow

* Update strings.json to remove import step

Not needed.

* Move third party imports to top of module

* Remove periods from end of log messages

* Make configuration.yaml config optional

* Remove unused strings

* Reorganize config flow

* Remove unneeded requirement

* No need to store API key

* Update async_unload_entry

* Clean up if/else statements

* Update requirements_all.txt

* Fix config schema

* Update __init__.py

* Remove check for DATA_ECOBEE_CONFIG

* Remove redundant check

* Add check for DATA_ECOBEE_CONFIG

* Change setup_platform to async

* Fix state unknown and imports

* Change init step to user

* Have import step raise specific exceptions

* Rearrange try/except block in import flow

* Convert update() and refresh() to coroutines

...and update platforms to use async_update coroutine.

* Finish converting init to async

* Preliminary tests

* Test full implementation

* Update test_config_flow.py

* Update test_config_flow.py

* Add self to codeowners

* Update test_config_flow.py

* Use MockConfigEntry

* Update test_config_flow.py

* Update CODEOWNERS

* pylint fixes

* Register services under ecobee domain

Breaking change!

* Pylint fixes

* Pylint fixes

* Pylint fixes

* Move service strings to ecobee domain

* Fix log message capitalization

* Fix import formatting

* Update .coveragerc

* Add __init__ to coveragerc

* Add option flow test

* Update .coveragerc

* Act on updated options

* Revert "Act on updated options"

This reverts commit 56b0a859f2e3e80b6f4c77a8f784a2b29ee2cce9.

* Remove hold_temp from climate

* Remove hold_temp and options from init

* Remove options handler from config flow

* Remove options strings

* Remove options flow test

* Remove hold_temp constants

* Fix climate tests

* Pass api key to user step in import flow

* Update test_config_flow.py

Ensure that the import step calls the user step with the user's api key as user input if importing from ecobee.conf/validating imported keys fails.
2019-09-25 22:38:21 +02:00
Robert Svensson
cff7fd0ef3 deCONZ - Increase bridge discovery robustness in config flow (#26911) 2019-09-25 21:50:14 +02:00
Paulus Schoutsen
cbbdb95003 Merge remote-tracking branch 'origin/master' into dev 2019-09-25 11:29:26 -07:00
Daniel Shokouhi
36f604f79d Add call direction sensor for Obihai (#26867)
* Add call direction sensor for obihai

* Check user credentials

* Review comments

* Fix return
2019-09-25 20:26:15 +02:00
Paulus Schoutsen
e715c43e0d Merge pull request #26912 from home-assistant/rc
0.99.3
2019-09-25 11:25:29 -07:00
Paulus Schoutsen
4bab1612a3 Bumped version to 0.99.3 2019-09-25 10:28:20 -07:00
MajestyIV
7566a38f01 HM-CC-TC was not recognized (#26623)
* HM-CC-TC was not recognized

* guard instead of exception
2019-09-25 10:28:08 -07:00
Rami Mosleh
d1adb28c6b Add google_assistant alarm_control_panel (#26249)
* add alarm_control_panel to google_assistant

* add cancel arming option

* raise error if requested state is same as current

* rework executing command logic

* Add tests

* fixed tests

* fixed level synonyms
2019-09-25 10:13:31 -07:00
Robert Svensson
4582b6e668 deCONZ - Improve ssdp discovery by storing uuid in config entry (#26882)
* Improve ssdp discovery by storing uuid in config entry so discovery can update any deconz entry, loaded or not
2019-09-25 18:56:31 +02:00
Jeff Irion
cc611615aa Fix missing whitespace around arithmetic operator (#26908) 2019-09-25 18:04:34 +02:00
zhumuht
626b61b58f Fix bed_activity history chart of the Xiaomi Aqara vibration sensor (#26875) 2019-09-25 15:39:01 +02:00
zhumuht
f5018e91b5 Add voltage attribute to Xiaomi Aqara devices (#26876) 2019-09-25 15:04:27 +02:00
Andrey Kupreychik
aaf013da6e Bump ndms2-client to 0.0.9 (#26899) 2019-09-25 10:20:46 +02:00
Gil Peeters
cd976b65ae Add availability_template to Template Switch platform (#26513)
* Added availability_template to Template Switch platform

* Fixed Entity discovery big and coverage

* flake8

* Cleaned template setup

* I'll remember to run black every time one of these days...

* Updated AVAILABILITY_TEMPLATE Rendering error

* Moved const to package Const.py

* Fix import order (pylint)

* Refactored availability_tempalte rendering to common loop

* Cleaned up const and compare lowercase result to 'true'

* reverted _available back to boolean

* Fixed tests (async, magic values and state checks)

* Fixed Enity Extraction
2019-09-24 21:30:48 -07:00
Franck Nijhof
1f03508bfe Removes unnecessary print_function future import (#26888) 2019-09-24 21:29:57 -07:00
Franck Nijhof
87f1f6cc9f Removes unnecessary utf8 source encoding declarations (#26887) 2019-09-24 21:28:50 -07:00
tleegaard
2ffbe5b99f Inverting states for opening/closing Homekit covers (#26872)
* Update cover.py

* Update test_cover.py
2019-09-24 21:16:08 -07:00
Sébastien RAMAGE
dc229ed569 Update zigpy_zigate to 0.4.0 (#26883)
* zigpy-zigate==0.4.0

* zigpy-zigate==0.4.0
2019-09-24 21:02:23 -07:00
David F. Mulcahey
31964d0f49 bump quirks (#26885) 2019-09-24 21:01:38 -07:00
Paulus Schoutsen
51a090cfdc Fix CI 2019-09-24 20:47:24 -07:00
HomeAssistant Azure
24c8db0121 [ci skip] Translation update 2019-09-25 00:32:16 +00:00
Franck Nijhof
9c9c921922 Use Python3 new super syntax sugar (#26890) 2019-09-24 15:38:20 -07:00
Paulus Schoutsen
6fdff9ffab Reorg device automation (#26880)
* async_trigger -> async_attach_trigger

* Reorg device automations

* Update docstrings

* Fix types

* Fix extending schemas
2019-09-24 14:57:05 -07:00
Franck Nijhof
b52cfd3409 Add comment for clarity to helper.entity.enabled() (#26793)
* Fixes entity enabled expression

* Ensure True is returned when there is no registry_entity

* Add comment for clarity to helper.entity.enabled()
2019-09-24 14:21:00 -07:00
Franck Nijhof
6f9ccb5434 Add and corrects typehints in Entity helper & core class (#26805)
* Add and corrects typehints in Entity class

* Adjust state type based on comments
2019-09-24 14:20:04 -07:00
Franck Nijhof
b1118cb8ff Removes unnecessary else/elif blocks (#26884) 2019-09-24 13:53:03 -07:00
David F. Mulcahey
18873d202d Add device automation support to ZHA (#26821)
* beginning ZHA device automations

* add cube

* load triggers from zigpy devices

* cleanup

* add face_any for aqara cube

* add endpoint id to events

* add cluster id to events

* cleanup

* add device tilt

* add test

* fix copy paste error

* add event trigger test

* add test for no triggers for device

* add exception test

* better exception tests
2019-09-24 08:54:41 -07:00
Gil Peeters
161c8aada6 Add availability_template to Template Sensor platform (#26516)
* Added availability_template to Template Sensor platform

* Added to test for invalid values in availability_template

* Updated AVAILABILITY_TEMPLATE Rendering error

* Moved const to package Const.py

* Fix import order (pylint)

* Moved availability_template rendering to common loop

* Removed 'Magic' string

* Cleaned up const and compare lowercase result to 'true'

* Device is unavailbale if value template render fails

* Converted test ot Async and fixed states

* Comverted back to using boolean for _availability

* Fixed state check in test
2019-09-24 16:05:19 +02:00
majuss
930dadb722 Move elv integration to component and bump pypca (#26552)
* fixing elv integration

* black formatting

* linting

* rebase

* removed logger warning for failed conf

* rebase; coverage
2019-09-24 13:10:03 +02:00
Robin
1d60cccc21 Put draw_box in image_processing (#26712)
* Put draw_box in image_processing

* Update draw_box

* Update __init__.py

* run isort

* Fix lints

* Update __init__.py

* Update requirements_all.txt

* Adds type hints

* Update gen_requirements_all.py

* Update requirements_test_all.txt

* rerun script/gen_requirements_all.py

* Change Pillow to pillow

* Update manifest.json

* Run script/gen_requirements_all.py
2019-09-24 12:09:16 +02:00
Paulus Schoutsen
53e6b8ade6 Add reproduce state template (#26866)
* Add reproduce state template

* Handle invalid state
2019-09-23 23:23:53 -07:00
Tim McCormick
6fe5582c6a Add unit to 'charging_level_hv' bwm_connected_drive sensor (#26861)
* Update sensor.py

Add unit to charging_level_hv, which allows correct graphing in UI

* Update sensor.py

Add space after #
2019-09-24 03:45:14 +02:00
Paul Bottein
44082869b4 Group Linky sensors to Linky meter device (#26738)
* Group Linky sensors to Llnky meter device

* Fix Linky meter identifiers
2019-09-24 02:55:10 +02:00
HomeAssistant Azure
5d49d9c951 [ci skip] Translation update 2019-09-24 00:32:13 +00:00
Paulus Schoutsen
9401d9e286 Fix frontend 2019-09-23 14:20:27 -07:00
Sébastien RAMAGE
9919f5f924 Bump zigpy-zigate to 0.3.1 (#26600)
* Bump zigpy-zigate to 0.3.1

Bump zigpy-zigate to 0.3.1 (fix Rpi.GPIO dependency)

* Bump zigpy-zigate to 0.3.1

Bump zigpy-zigate to 0.3.1 (fix Rpi.GPIO dependency)
2019-09-23 14:19:34 -07:00
Paulus Schoutsen
7bed79255e Updated frontend to 20190919.1 2019-09-23 13:35:06 -07:00
Paulus Schoutsen
0c78f9e20c Updated frontend to 20190919.1 2019-09-23 13:18:28 -07:00
SukramJ
a757992409 Bump homematicip_cloud to 0.10.11 (#26852) 2019-09-23 13:42:09 -04:00
Balazs Sandor
5e6840d8f4 fix onvif/camera setting up error (#26825) 2019-09-23 13:41:35 -04:00
Alexei Chetroi
9c0fbfd101 Bump up ZHA dependencies (#26746)
* Update ZHA to track zigpy changes.
* Update ZHA dependencies.
* Update tests.
* Make coverage happy again.
2019-09-23 13:35:27 -04:00
Franck Nijhof
911d289333 Remove deprecated linksys_ap integration (ADR-0004) (#26847) 2019-09-23 16:05:02 +02:00
Franck Nijhof
8a9e47d3c7 Bump pyotp to 2.3.0 (#26849) 2019-09-23 15:43:48 +02:00
Abílio Costa
61634d0a64 Store ZHA light brightness when fading off to turn on at the correct brightness (#26680)
* Use light's on_level in ZHA to turn on at the correct brightness

Previously, if the light is turned off with a time transition, the
brightness level stored in the light will be 1. The next time the light
is turned on with no explicit brightness, it will be at 1.

This is solved by storing the current brightness in on_level before
turning off, and then using that when turning on (by calling the
onOff cluster 'on' command).

* store off light level locally to avoid wearing device's flash memory

* store off brightness in HA attributes

* improve set/clear of off_brightness

* fix device_state_attributes; clear off_brightness when light goes on

* fix tests
2019-09-23 09:08:44 -04:00
MajestyIV
2c80ce3195 HM-CC-TC was not recognized (#26623)
* HM-CC-TC was not recognized

* guard instead of exception
2019-09-23 14:39:10 +02:00
Franck Nijhof
ad9daa922b Remove deprecated fedex integration (ADR-0004) (#26822) 2019-09-23 12:16:41 +02:00
Franck Nijhof
9fd9ccc2a3 Remove deprecated srp_energy integration (ADR-0004) (#26826) 2019-09-23 12:13:12 +02:00
Kevin Eifinger
5c0fa35d4a Add here_travel_time (#24603)
* Add here_travel_time

* Bump herepy version to 0.6.2

* Update requirements_all.txt

* Disable pylint and catch errors

* Add herepy to requirements_test_all

* Correctly place test req for herepy

* use homeassistant.const.LENGTH_METERS

* Implemented Requested Changes

* Better error message for cryptic error code

* add requested changes

* add_entities instead of async

* Add route attr and distance in km instead of m

* fix linting errors

* attribute duration in minutes instead of seconds

* Correct pattern for longitude

* dont split attribute but rather local var

* move strings to const and use travelTime

* Add tests

* Add route for pedestrian and public

* fix public transport route generation

* remove print statement

* Standalone pytest

* Use hass fixture and increase test cov
_resolve_zone is redundant

* Clean up redundant code

* Add type annotations

* Readd _resolve_zone and add a test for it

* Full test cov

* use caplog

* Add origin/destination attributes
According to https://github.com/home-assistant/home-assistant/pull/24956

* Add mode: bicycle

* black

* Add mode: publicTransportTimeTable

* Fix error for publicTransportTimeTable
Switch route_mode and travel_mode in api request.

* split up config options

* More type hints

* implement *_entity_id

* align attributes with google_travel_time

* route in lib
apply requested changes

* Update requirements_all.txt

* remove DATA_KEY

* Use ATTR_MODE

* add attribution

* Only add attribution if not none

* Add debug log for raw response

* Add _build_hass_attribution

* clearer var names in credentials check

* async _are_valid_client_credentials
2019-09-23 11:50:18 +02:00
Franck Nijhof
5c7f869f9b Remove deprecated sytadin integration (ADR-0004) (#26819)
* Remove deprecated sytadin integration (ADR-0004)

* Update code owners file

* Cleanup coveragerc
2019-09-23 08:44:38 +02:00
Franck Nijhof
38ad573b96 Remove deprecated usps integration (ADR-0004) (#26823) 2019-09-23 08:44:17 +02:00
Franck Nijhof
2f277c4ea7 Remove deprecated ups integration (ADR-0004) (#26824) 2019-09-23 08:43:55 +02:00
Paulus Schoutsen
5a4a3e17cc Split scaffolding script (#26832)
* Add scaffolding split

* Add second config flow method
2019-09-22 21:46:50 -06:00
Paulus Schoutsen
2e4cc7e5a0 Prevent Wemo doing I/O in event loop (#26835)
* Prevent Wemo doing I/O in event loop

* Update config_flow.py
2019-09-22 21:46:32 -06:00
HomeAssistant Azure
d162e39ec9 [ci skip] Translation update 2019-09-23 00:32:13 +00:00
Tommy Larsson
60f0988435 Add Ombi integration (#26755)
* Add Ombi integration

* Black

* Remove trailing comma

* Change dict.get to dict[key] for known keys

* Remove monitored conditions from config

* Define SCAN_INTERVAL for default scan interval

* Adjust requests syntax and add music_requests

* Remove Ombi object initialization

* Move constants to const.py

* Fix imports

* Set pyombi requirement to version 0.1.3

* Add services.yaml

* Add config schema and setup for integration

* Set pyombi requirement to version 0.1.3

* Fix syntax for scan interval

* Fix datetime import

* Add all files from ombi component

* Move imports around

* Move imports around

* Move pyombi import to top of module

* Move scan_interval to sensor module

* Add custom validator for urlbase

* Add guard clause for discovery_info

* Add service validation schemas and constants

* Bump pyombi version

* Adjust urlbase validation

* Add exception warnings for irretrievable media

* Bump pyombi

* Change from .get to dict[key]

* Change schema and conf variable names

* Set return to return false

* Remove unneeded return
2019-09-23 00:57:39 +02:00
jjlawren
5914475fe5 Add manual step to Plex config flow (#26773)
* Add manual config step

* Pass token to manual step

* Fix for no token

* Show error

* Specify key location

* Cast discovery port to int
2019-09-23 00:23:14 +02:00
Michał Mrozek
fbe85a2eb2 Add Kaiterra integration (#26661)
* add Kaiterra integration

* fix: split to multiple platforms

* fix lint issues

* fix formmating

* fix: docstrings

* fix: pylint issues

* Apply suggestions from code review

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Adjust code based on suggestions

* Update homeassistant/components/kaiterra/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
2019-09-22 23:49:09 +02:00
jjlawren
f82f30dc62 Unload Plex config entries (#26771)
* Unload config entries

* Await coroutines

* Unnecessary ensure
2019-09-22 23:47:41 +02:00
Patrik
49fef9a6a0 Add basic support for IKEA Fyrtur blinds (#26659)
* Add basic support for IKEA Fyrtur blinds

* Update coveragerc

* Fix typo

* Fix typos

* Update following review

* Fix incorrect rebase

* Fix error

* Update to new format of unique id

* Add cover

* Remove reference to cover in unique id
2019-09-22 23:01:32 +02:00
Kevin McCormack
2d906b111a Update Vivotek camera component (#26754)
* Update Vivotek camera component

Load model name to instance attribute

* Update Vivotek camera component

Ensure `update` is called when the entity is added.

* Update libpyvivotek to 0.2.2

https://pypi.org/project/libpyvivotek/0.2.2/
- Retrieve camera model name anonymously
- Raise a more helpful error for invalid creds
2019-09-22 22:06:02 +02:00
Erik Montnemery
e5f6f33340 Add device automation support to binary_sensor entities (#26643)
* Add device automation support to binary_sensor entities

* turn_on -> turned_on

* Correct spelling of present

* Improve tests

* Fix strings

* Fix stale comment
2019-09-22 11:13:17 -07:00
Franck Nijhof
14647f5391 Exempt 'Help wanted' issue from stale bot (#26829) 2019-09-22 08:31:01 -07:00
Fabian Affolter
5624e3efd4 Upgrade sendgrid to 6.1.0 (#26809)
* Upgrade sendgrid to 6.1.0

* Move import (could to be a Black issue)
2019-09-22 11:43:41 +02:00
Dima Zavin
04cae0818d Bump pylutron to 0.2.5 (#26815) 2019-09-22 11:41:59 +02:00
Franck Nijhof
4f7a4b93da Bump request_mock to 1.7.0 (#26799) 2019-09-22 11:02:23 +03:00
Franck Nijhof
48369ad08f Bump shodan to 1.17.0 (#26797)
* Bump shodan to 1.16.0

* Bump shodan to 1.17.0
2019-09-22 10:57:11 +03:00
Franck Nijhof
a5ebf9f38d Bump iperf3 to 0.1.11 (#26795) 2019-09-22 10:57:02 +03:00
Franck Nijhof
6bdfab1124 Bump pytest to 5.1.3 (#26794) 2019-09-22 10:56:43 +03:00
Franck Nijhof
ef0dd689fa Bump python-slugify to 3.0.4 (#26801) 2019-09-21 22:10:34 -07:00
Franck Nijhof
6135b862ba Bump hbmqtt to 0.9.5 (#26804) 2019-09-21 22:10:21 -07:00
CQoute
544cdae67c Update light.py (#26703)
Fix for esphome lights to use the flash feature
2019-09-22 01:29:52 +02:00
bouni
dc52b858a4 Fix spaceapi (#26453)
* fixed latitude/longitude keys to be conform with spaceapi specification

* version is now a string as required by the spaceapi specification

* add spacefed

* fixed lat/lon in spaceapi tests

* extended tests

* add feeds

* extended tests

* add cache

* add more tests

* add projects

* more tests

* add radio_show

* more tests

* add additional contact attributes

* corrected valid issue_repoer_channel options

* validate min length of contact/keymasters

* fixed location as address is not required by spec

* Update homeassistant/components/spaceapi/__init__.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/spaceapi/__init__.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* fixed issue with name change for longitude/latitude
2019-09-22 01:22:33 +02:00
John Luetke
88dcecab39 Add myself as a pi_hole codeowner (#26796) 2019-09-21 21:39:49 +02:00
Zach
9e79920c9c Fix doods missing detector name kwarg (#26784)
* Fix missing detector name kwarg

* Updated requirements_all.txt

* Reformatted
2019-09-21 14:53:19 -04:00
Fabian Affolter
a9ff15077c Upgrade python-whois to 0.7.2 (#26788) 2019-09-21 14:52:46 -04:00
Fabian Affolter
8c580209a6 Upgrade importlib-metadata to 0.23 (#26787) 2019-09-21 14:52:35 -04:00
Albert Gouws
e394be7337 Mqtt binary sensor expire after (#26058)
* Added expire_after to mqtt binary_sensor. Updated mqtt test_binary_sensor test.

* Cleanup MQTT Binary Sensor and tests after suggestions

* Updated to not alter state at all

* Change to include custom expired variable, and override available property to check expired

* Added # pylint: disable=no-member
2019-09-21 20:42:03 +02:00
scheric
9d0cb899ec Add optimizer data to solaredge_local (#26708)
* making SENSOR_TYPES universal

* bump solaredge-local version 0.2.0

* add maintenance data

* add calculations for optimizer data

* add new sensors

* add statistics lib

* update sensor data setting

* making api requests universal

* fix Cl

* Update requirements_all.txt

* fix temperature

* fix f-strings

* Style guidelines

* shortening line length

* PEP8 test

* flake8

* Black test

* revert line length to 80

* Repair line 12

* black

* style change

* Black

* black using pip

* fix for pylint

* added proper variable name

* for loop cleanup

* fix capitals

* Update units

* black

* add check for good connection to inverter

* Roundig large numbers

* Add myself to codeowners

* Fix layout manifest

* Fix layout manifest

* Update manifest.json

* repair manifest layout

* remove newline in manifest

* add myself to CODEOWNERS
2019-09-21 20:07:53 +02:00
MatthewFlamm
0e15785602 Bump pynws version to 0.8.1 (#26770)
* Bump to version 0.8.1

Fixes #26753.

* gen_requirements.py changes

* fix default params change in tests
2019-09-21 15:56:40 +02:00
Jc2k
ed21019b7a Bump HAP-python to 2.6.0 for homekit (#26783) 2019-09-21 15:34:08 +02:00
HomeAssistant Azure
24cbae6ec3 [ci skip] Translation update 2019-09-21 00:32:16 +00:00
Paulus Schoutsen
8502f7c7d4 Add integration scaffolding script (#26777)
* Add integration scaffolding script

* Make easier to develop

* Update py.test -> pytest
2019-09-20 17:02:18 -07:00
Aaron Bach
5cf9ba51df Bump simplisafe-python to 5.0.1 (#26775) 2019-09-20 22:41:46 +02:00
Aaron Bach
f6be61c6b7 Bump aiowwlln to 2.0.2 (#26769) 2019-09-20 13:32:41 -06:00
David F. Mulcahey
62adff23f9 ZHA siren and warning device support (#26046)
* add ias warning device support
* use channel only clusters for warning devices
* squawk service
* add warning device warning service
* update services.yaml
* remove debugging statement
* update required attr access
* fix constant
* add error logging to IASWD services
2019-09-20 15:11:24 -04:00
Askarov Rishat
aaf0f9890d Add transport data from maps.yandex.ru api (#26766)
* adding feature obtaining Moscow transport data from maps.yandex.ru api

* extracting the YandexMapsRequester to pypi

* fix code review comments

* fix stop_name, state in datetime, logger formating

* fix comments

* add docstring to init

* rename, because it works not only Moscow, but many another big cities in Russia

* fix comments

* Try to solve relative view in sensor timestamp

* back to isoformat

* add tests, update external library version

* flake8 and black tests for sensor.py

* fix manifest.json

* update tests, migrate to pytest, async, Using MockDependency

* move json to tests/fixtures

* script/lint fixes

* fix comments

* removing check_filter function

* fix typo

* up version on manifest.json

* up version to 0.3.7 in requirements_all.txt
2019-09-20 18:12:36 +02:00
Ville Skyttä
54242cd65c Type hint additions (#26765) 2019-09-20 08:23:34 -07:00
Florian Klien
6a3132344c Bump openwrt-luci-rpc to version 1.1.1 (#26759)
* Revert "luci device-tracker dependency fix (#26215)"

This reverts commit 1e61d50fc5.

* bump openwrt-luci-rpc to 1.1.1 fix missing dependency

permanent fix for #26215
2019-09-20 15:58:46 +02:00
Pascal Vizeli
9e44d1af19 Revert "Add transport data from maps.yandex.ru api (#26252)" (#26762)
This reverts commit 9e2cd5116a.
2019-09-20 15:55:43 +02:00
HomeAssistant Azure
20e61fb41b [ci skip] Translation update 2019-09-20 00:32:11 +00:00
Paulus Schoutsen
b3420cbf93 Merge pull request #26751 from home-assistant/rc
0.99.2
2019-09-19 15:29:19 -07:00
Paulus Schoutsen
616b36527b Bumped version to 0.99.2 2019-09-19 15:26:49 -07:00
Paulus Schoutsen
c2e108d2b5 Merge remote-tracking branch 'origin/master' into dev 2019-09-19 15:24:51 -07:00
Paulus Schoutsen
794c26a66e Updated frontend to 20190919.0 2019-09-19 15:23:42 -07:00
Paulus Schoutsen
7a1bfa7a1f Updated frontend to 20190919.0 2019-09-19 15:23:29 -07:00
Paulus Schoutsen
1892ae5bfc Merge pull request #26748 from home-assistant/rc
0.99.1
2019-09-19 15:22:01 -07:00
Robert Svensson
f5d12669a5 deCONZ improve gateway tests (#26709)
* Improve gateway tests

* Harmonize all tests to use the same gateway initialization method

* Improve scene tests

* Add gateway resync call to platform tests

* Forgot to change switch tests to use common gateway method

* Improve event tests
2019-09-19 14:44:09 -07:00
Askarov Rishat
9e2cd5116a Add transport data from maps.yandex.ru api (#26252)
* adding feature obtaining Moscow transport data from maps.yandex.ru api

* extracting the YandexMapsRequester to pypi

* fix code review comments

* fix stop_name, state in datetime, logger formating

* fix comments

* add docstring to init

* rename, because it works not only Moscow, but many another big cities in Russia

* fix comments

* Try to solve relative view in sensor timestamp

* back to isoformat

* add tests, update external library version

* flake8 and black tests for sensor.py

* fix manifest.json

* update tests, migrate to pytest, async, Using MockDependency

* move json to tests/fixtures

* script/lint fixes

* fix comments

* removing check_filter function

* fix typo
2019-09-19 23:41:44 +02:00
Anders Melchiorsen
aac2c3e91c Update codeowners (#26733) 2019-09-19 14:39:57 -07:00
Franck Nijhof
d26273a9e9 Bump influxdb to 5.2.3 (#26743) 2019-09-19 14:38:58 -07:00
Penny Wood
b68b8430a4 Izone component (#24550)
* iZone component

* Rename constants to const.

* Changes as per code review.

* Stop listening if discovery times out.

* Unload properly

* Changes as per code review

* Climate 1.0

* Use dispatcher instead of listener

* Free air settings

* Test case for config flow.

* Changes as per code review

* Fix error on shutdown

* Changes as per code review

* Lint fix

* Black formatting

* Black on test

* Fix test

* Lint fix

* Formatting

* Updated requirements

* Remaining patches

* Per code r/v
2019-09-19 23:31:54 +02:00
Franck Nijhof
c8fb7ce98b Bump restrictedpython to 5.0 (#26741) 2019-09-19 14:30:25 -07:00
Paulus Schoutsen
8439329b04 Bumped version to 0.99.1 2019-09-19 14:29:43 -07:00
jjlawren
2d12bac0e2 Add Plex config flow support (#26548)
* Add config flow support

* Log error on failed connection

* Review comments

* Unused errors

* Move form to step

* Use instance var instead of passing argument

* Only share servers created by component

* Return errors early to avoid try:else

* Separate debug for validation vs setup

* Unnecessary

* Unnecessary checks

* Combine import flows, move logic to component

* Use config entry discovery handler

* Temporary lint fix

* Filter out servers already configured

* Remove manual config flow

* Skip discovery if a config exists

* Swap conditional to reduce indenting

* Only discover when no configs created or creating

* Un-nest function

* Proper async use

* Move legacy file import to discovery

* Fix, bad else

* Separate validate step

* Unused without manual setup step

* Async oops

* First attempt at tests

* Test cleanup

* Full test coverage for config_flow, enable tests

* Lint

* Fix lint vs black

* Add test init

* Add test package requirement

* Actually run script

* Use 'not None' convention

* Group exceptions by result

* Improve logic, add new error and test

* Test cleanup

* Add more asserts
2019-09-19 23:29:26 +02:00
Daniel Shokouhi
3551c39bad Bump pyobihai to fix issue with user account (#26736) 2019-09-19 14:28:34 -07:00
Paulus Schoutsen
66405d5651 Bump TRADFRI (#26731)
* Bump TRADFRI

* Fix test
2019-09-19 14:28:33 -07:00
Andrew Rowson
120c8bad50 Encode prometheus metric names per the prom spec (#26639)
Referencing issue #26418.

Prometheus metric names can only contain chars a-zA-Z0-9, : and _
(https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).

HA currently generates invalid prometheus names, e.g. if the unit for a
sensor is a non-ASCII character containing  ° or μ. To resolve, we need
to sanitize the name before creating, replacing non-valid characters
with a valid representation. In this case, I've used
"u{unicode-hex-code}".

Also updated the test case to make sure that the ° case is handled.
2019-09-19 14:28:30 -07:00
Franck Nijhof
246a611a7c Bump aiohttp to 3.6.1 (#26739) 2019-09-19 14:05:02 -07:00
Daniel Shokouhi
94192ecd7d Bump pyobihai to fix issue with user account (#26736) 2019-09-19 22:27:18 +02:00
Robin Wohlers-Reichel
0e201fd859 Update Solax Library to 0.2.2 (#26705)
* bump version and adjust

* Address review comments

* Fix import order

* bump solax version

* Trigger Azure

* default port
2019-09-19 20:52:15 +02:00
Franck Nijhof
44cde5fb73 Bumps pre-commit to 1.18.3 (#26717) 2019-09-19 20:50:45 +02:00
Paulus Schoutsen
1e5de9e9e4 Bump TRADFRI (#26731)
* Bump TRADFRI

* Fix test
2019-09-19 20:49:47 +02:00
Franck Nijhof
a8a485abf7 Bumps aiohttp to 3.6.0 (#26728) 2019-09-19 20:34:41 +02:00
Franck Nijhof
468deef326 Bumps pytest to 5.1.2 (#26718) 2019-09-19 20:02:21 +02:00
Tsvi Mostovicz
1041b10616 Move alexa integration to use dt_util (#26723) 2019-09-19 09:19:27 -07:00
Andrew Rowson
770eeaf82f Encode prometheus metric names per the prom spec (#26639)
Referencing issue #26418.

Prometheus metric names can only contain chars a-zA-Z0-9, : and _
(https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).

HA currently generates invalid prometheus names, e.g. if the unit for a
sensor is a non-ASCII character containing  ° or μ. To resolve, we need
to sanitize the name before creating, replacing non-valid characters
with a valid representation. In this case, I've used
"u{unicode-hex-code}".

Also updated the test case to make sure that the ° case is handled.
2019-09-19 12:51:49 +02:00
Martin Brooksbank
5e15675593 Add additional needles to glances cpu_temp attribute (#22311)
* Added additional needles to the cpu_temp attribute

* Fix conflict
2019-09-19 09:55:07 +02:00
Tsvi Mostovicz
80136f3591 Change datetime.now() to dt_util.now() (#26582)
* Change datetime.now() to dt_util.now() in cases where the functionality should stay the same

These changes should not affect the functionality, rather cleanup our codebase.

In general we would like integrations to not to use datetime.now() unless there's a very good
reason for it, rather use our own dt_util.now() which makes the code aware of our current time
zone.

* Use datetime.utcnow() for season sensor to get offset-naive utc time

* Revert "Use datetime.utcnow() for season sensor to get offset-naive utc time"

This reverts commit 5f36463d9c7d52f8e11ffcec7e57dfbc7b21bdd1.

* BOM sensor last_updated should be UTC as well

* Run black

* Remove unused last_partition_update variable
2019-09-19 08:39:09 +02:00
HomeAssistant Azure
fccbaf3805 [ci skip] Translation update 2019-09-19 00:32:15 +00:00
Paulus Schoutsen
88154074c1 Update translations 2019-09-18 17:29:34 -07:00
Paulus Schoutsen
884591a105 Merge pull request #26710 from home-assistant/rc
0.99.0
2019-09-18 15:29:01 -07:00
Paulus Schoutsen
9f08e2b718 Bumped version to 0.99.0 2019-09-18 14:47:50 -07:00
zewelor
e3f25eb730 Fix yeelight inheritance order (#26706) 2019-09-18 14:47:42 -07:00
Paulus Schoutsen
1af5d20601 Updated frontend to 20190918.1 2019-09-18 13:40:28 -07:00
Paulus Schoutsen
f66a42d521 Updated frontend to 20190918.1 2019-09-18 13:40:17 -07:00
roblandry
873d331ee3 Fix torque degree char (#26183)
* Fix for \xC2\xB0 char instead of degree symbol

* Remove comment

* Black
2019-09-18 11:11:26 -07:00
Robert Svensson
886d8bd6e2 deCONZ rewrite sensor tests (#26679)
* Improve binary sensor tests

* Fix sensor tests

* Improve readability of binary sensor

* Fix climate tests
Fix sensor platform not loading climate devices as sensors

* Add test to verify adding new sensor after start up
2019-09-18 10:07:32 -07:00
zewelor
ce42b46ccd Fix yeelight inheritance order (#26706) 2019-09-18 10:07:07 -07:00
Bram Kragten
1a9b4b82f5 Bump version to 0.99.0b4 2019-09-18 18:44:57 +02:00
Bram Kragten
e7d5e08780 Updated frontend to 20190918.0 (#26704) 2019-09-18 18:43:34 +02:00
Paulus Schoutsen
ef9b3321c1 Verify withings config (#26698) 2019-09-18 18:43:33 +02:00
Bram Kragten
46a55ed723 Updated frontend to 20190917.2 (#26696) 2019-09-18 18:43:33 +02:00
Pascal Vizeli
7d525ff2f3 Fix release access for bram (#26693) 2019-09-18 18:43:32 +02:00
Maikel Punie
5b0cbad953 Fix cert expiry config flow check and update (#26638)
* Fix typo in translations

* Work on bug #26619

* readd the homeassistant.start event

* Remove the callback

* Added the executor_job for _test_connection

* Update test_config_flow.py
2019-09-18 18:43:31 +02:00
Erik Montnemery
bc7ff8323c Fix translation, adjust trigger names (#26635) 2019-09-18 18:43:31 +02:00
Erik Montnemery
4a30c1023c Rename MockToggleDevice to MockToggleEntity (#26644)
* Rename MockToggleDevice to MockToggleEntity

* Fix tests
2019-09-18 18:41:58 +02:00
definitio
9cd5c5471d Hide "PTZ is not available on this camera" warning (#26649)
* Hide "PTZ is not available" warning

* Change log level to "debug"
2019-09-18 09:00:12 -07:00
Bram Kragten
fe5a4cef7f Updated frontend to 20190918.0 (#26704) 2019-09-18 15:37:04 +02:00
Robert Svensson
8a39924b37 deCONZ improve light tests (#26697)
* Improve light tests
* Small improvements on light and group classes
2019-09-18 12:47:26 +02:00
Daniel Høyer Iversen
72baf563fa Add alternative name for Tibber sensors (#26685)
* Add alternative name for Tibber sensors

* refactor tibber sensor
2019-09-18 08:30:59 +03:00
HomeAssistant Azure
a390cf7c6a [ci skip] Translation update 2019-09-18 00:32:12 +00:00
Bram Kragten
d33ecbb5be Updated frontend to 20190917.2 (#26696) 2019-09-17 13:46:11 -07:00
Paulus Schoutsen
c6fc677f5b Verify withings config (#26698) 2019-09-17 13:45:48 -07:00
Maikel Punie
9114ed36cd Fix cert expiry config flow check and update (#26638)
* Fix typo in translations

* Work on bug #26619

* readd the homeassistant.start event

* Remove the callback

* Added the executor_job for _test_connection

* Update test_config_flow.py
2019-09-17 13:39:46 -07:00
Erik Montnemery
504b8c7685 Fix translation, adjust trigger names (#26635) 2019-09-17 21:55:01 +02:00
Erik Montnemery
10572a62b1 Add support for automation description (#26662)
* Add support for automation annotation

* Rename annotation to description
2019-09-17 12:12:54 -07:00
Martin Hjelmare
c17057de4b Fix mysensors validation for composite entities (#26666)
* Composite entities require multiple value types to be present in
  child values to function. Any of those value types should trigger an
  entity update if updated.
* Always write platform v names as sets.
* Run black.
2019-09-17 12:00:17 -07:00
zewelor
39edc45e4e Fix volumio set shuffle (#26660) 2019-09-17 20:29:46 +02:00
Jesse Rizzo
4060f1346a Improve Envoy detection and support multiple Envoys (#26665)
* Bump envoy_reader to 0.8.6, fix missing dependency

* Support for optional name in config

* Replace str.format with f-strings
2019-09-17 20:24:03 +02:00
gibman
ed13cab8d6 Disconnect velux on hass stop (#26266)
* velux KLF200 device did not disconnect properly when rebooting the hass device.
disconnect is now being called on the 'EVENT_HOMEASSISTANT_STOP' event

* removed comment

* removed comment

* trigger bot

* trigger bot

* trigger bot

* logging casing fixed. code moved from init.

* logger level debug

logger level moved from info to debug
only config[DOMAIN] exposed to module
imports moved to top

* DOMAIN part of config passed to module.

* removed trailing whitespaces etc.

* black --fast changes

* added missing docstring

* D400 First line should end with a period

* black formatting
2019-09-17 20:22:39 +02:00
Ian
12f68af107 Switch py_nextbus to py_nextbusnext (#26681)
The orignal package maintainer seems to be unresponsive. I've forked
the package and added the bug fixes to the new fork

Fixes #24561
2019-09-17 17:53:12 +02:00
Pascal Vizeli
15bb12f48e Fix release access for bram (#26693) 2019-09-17 15:59:12 +02:00
Bram Kragten
e9fe90a873 Bump version to 0.99.0b3 2019-09-17 15:47:39 +02:00
Bram Kragten
7d79d281c1 Updated frontend to 20190917.1 (#26691) 2019-09-17 15:43:14 +02:00
Pascal Vizeli
d8ccc7751f Bump connect-box library to fix logging (#26690) 2019-09-17 15:43:14 +02:00
Pascal Vizeli
6853f99e30 Fix Nuki issues (#26689)
* Fix Nuki issues

* remove stale code

* Add comments

* Fix lint
2019-09-17 15:43:13 +02:00
Bram Kragten
a3bdbf3188 Updated frontend to 20190917.1 (#26691) 2019-09-17 15:41:49 +02:00
Pascal Vizeli
b7f7d545d1 Bump connect-box library to fix logging (#26690) 2019-09-17 13:48:01 +02:00
Pascal Vizeli
4be0c057d2 Fix Nuki issues (#26689)
* Fix Nuki issues

* remove stale code

* Add comments

* Fix lint
2019-09-17 11:44:43 +02:00
Pascal Vizeli
1b57ea51be Bump version to 0.99.0b2 2019-09-17 07:43:09 +00:00
Bram Kragten
8d44e0cc0c Updated frontend to 20190917.0 (#26686) 2019-09-17 07:41:41 +00:00
Paulus Schoutsen
fe8ff200bc Use Nabu Casa url if no https url set (#26682)
* Use Nabu Casa url if no https url set

* Update test_home_assistant_cast.py
2019-09-17 07:38:43 +00:00
Bram Kragten
e0f1677296 Updated frontend to 20190917.0 (#26686) 2019-09-17 09:34:34 +02:00
Paulus Schoutsen
0ef79da281 Use Nabu Casa url if no https url set (#26682)
* Use Nabu Casa url if no https url set

* Update test_home_assistant_cast.py
2019-09-17 09:23:31 +02:00
HomeAssistant Azure
771c674e90 [ci skip] Translation update 2019-09-17 00:32:14 +00:00
Fredrik Erlandsson
c088e8fd95 pytfiac version bump to 0.4 (#26669) 2019-09-16 21:20:48 +02:00
Abílio Costa
8de84c53a1 zha: fix 0 second transitions being ignored. (#26654)
Allow turning a light on instantly, with no transition time.
This is actually required for IKEA lights to be able to set brightness
and color temp in a single call.
2019-09-16 07:14:05 -04:00
Pascal Vizeli
db48d5effd Update azure-pipelines-ci.yml for Azure Pipelines 2019-09-16 10:34:31 +02:00
Robert Svensson
5116d02747 deCONZ - Improve service tests (#26663)
* Improve configure service tests

* Add refresh device service test

* Add tests for setup and unload services

* Remove refresh device test from test_init

* Extra verification of deconz services existance in hass.data
2019-09-16 10:08:13 +02:00
chriscla
719a601880 Use pynzbgetapi exceptions consistently (#26667) 2019-09-16 07:06:21 +02:00
Bryan York
f45f8f2f3d Emulate color temperature for non-ct lights in light groups (#23495)
* Emulate color temperature for non-ct lights in light groups

* fix tests

* Address review comments

* Fix black formatting

* Fix for pylint

* Address comments

* Fix black formatting

* Address comments
2019-09-15 20:53:05 +02:00
michaeldavie
fd359c6222 Fix Environment Canada weather forecast, retain icon_code sensor (#26646)
* Bump env_canada to 0.0.25

* Keep icon_code
2019-09-15 11:55:20 +02:00
Erik Montnemery
6a60ebdb30 Rename MockToggleDevice to MockToggleEntity (#26644)
* Rename MockToggleDevice to MockToggleEntity

* Fix tests
2019-09-15 09:50:17 +02:00
chriscla
57833f5b1e Refactor nzbget to support future platform changes (#26462)
* Re-factor nzbget platform to enable future features.

* Re-factor nzbget platform to enable future features.

* Re-factor nzbget platform to enable future features.

* Re-factor nzbget platform to enable future features.

* Use pynzbgetapi instead of raw HTTP requests

* Using pynzbgetapi

* Pinning pynzbgetapi version.

* Requiring pynzbgetapi 0.2.0

* Addressing review comments

* Refreshing requirements (adding pynzbgetapi)

* Remove period from logging message

* Updating requirements file

* Add nzbget init to .coveragerc

* Adding nzbget codeowner

* Updating codeowners file
2019-09-15 02:44:19 +02:00
Robert Svensson
9c2053a251 deCONZ - Remove mechanisms to import a configuration from configuration.yaml (#26648) 2019-09-14 22:53:59 +02:00
Robert Svensson
41c9ed5d51 deCONZ - battery sensor instead of battery attribute (#26591)
* Allow all sensors to create battery sensors
* Neither binary sensor, climate nor sensor will have battery attributes
2019-09-14 19:15:18 +02:00
SukramJ
24f1ff0aef Add built in weather to Homematic IP Cloud (#26642) 2019-09-14 17:23:23 +02:00
Robert Svensson
5885c3f353 Move deCONZ services to their own file (#26645) 2019-09-14 15:15:06 +02:00
Pascal Vizeli
36ab3d3421 Bumped version to 0.99.0b1 2019-09-14 11:53:52 +00:00
Paulus Schoutsen
a1a44d47b9 Update PyChromecast (#26594) 2019-09-14 11:52:36 +00:00
Gerard
ffee50bd7a Fix CCM messages (#26589) 2019-09-14 11:52:34 +00:00
SukramJ
1d3f2d20d2 Add group attribute to Homematic IP Cloud (#26618)
* Add group attribute to Homematic IP Cloud

* Fix docstring
2019-09-14 07:12:19 +02:00
Florent Thoumie
a71cd6e90e Add iaqualink binary sensor and unique_id (#26616)
* Add binary_platform to iaqualink integration, add unique_id

* Revert Mixin changes, move self.dev to AqualinkEntity

* Style fixes
2019-09-14 07:05:47 +02:00
Dan Ponte
bca7363a80 zha ZCL color loop effect (#26549)
* Initial implementation of ZCL color loop effect
* Fix linter complaints
* Use const for action
* Reformat with Black
* Cleanup after review.
* Handle effect being None
2019-09-13 22:06:09 -04:00
HomeAssistant Azure
6a9ecf0015 [ci skip] Translation update 2019-09-14 00:32:15 +00:00
Robert Svensson
fb1acfccc9 deCONZ - create deconz_events through sensor platform (#26592)
* Move event creation into sensor platform where it belongs
* Fixed the weird failing test observed during device automation PR
2019-09-14 00:16:37 +02:00
Pascal Vizeli
357f2421c8 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-09-13 22:29:39 +02:00
Pascal Vizeli
e4bf2c4716 Update azure-pipelines-wheels.yml 2019-09-13 22:04:02 +02:00
Gilad Peleg
2f6d567657 Refactor Bluetooth Tracker to async (#26614)
* Convert bluetooth device tracker to async

* WIP

* WIP

* Fix callback

* Fix tracked devices

* Perform synchornized updates

* Add doc

* Run in executor

* Improve execution

* Improve execution

* Don't create a redundant task

* Optimize see_device to run concurrently

* Remove redundant initialization scan
2019-09-13 21:09:45 +02:00
SNoof85
7e7ec498ca Fix Typo (#26612) 2019-09-13 07:33:14 +02:00
HomeAssistant Azure
10f742d552 [ci skip] Translation update 2019-09-13 00:33:08 +00:00
PoofyTeddy
32a6a76d6a Disable Watson TTS Telemetry (#26253) 2019-09-12 21:50:24 +02:00
Gilad Peleg
25ef4a156f Improve bluetooth tracker device code (#26067)
* Improve bluetooth device tracker code

* Don't use set operations

* Fix logging template interpolation

* Warn if not tracking new devices and not devices to track

* Updates due to CR

* Fix pylint warning

* Fix pylint import warning

* Merge with dev
2019-09-12 18:01:55 +02:00
Sébastien RAMAGE
284ae01560 Bump zigpy-zigate to 0.3.1 (#26600)
* Bump zigpy-zigate to 0.3.1

Bump zigpy-zigate to 0.3.1 (fix Rpi.GPIO dependency)

* Bump zigpy-zigate to 0.3.1

Bump zigpy-zigate to 0.3.1 (fix Rpi.GPIO dependency)
2019-09-12 14:00:58 +02:00
Pascal Vizeli
c6a73e9ef7 Update azure-pipelines-wheels.yml 2019-09-12 13:28:48 +02:00
Gerard
41f96a315e Fix CCM messages (#26589) 2019-09-12 09:50:02 +02:00
Pascal Vizeli
dfcffa14fb Update azure-pipelines-release.yml 2019-09-12 08:30:57 +02:00
Pascal Vizeli
63cf21296c Update azure-pipelines-release.yml 2019-09-12 08:30:28 +02:00
Josef Schlehofer
c06487fa5e Upgrade youtube_dl to 2019.09.12.1 (#26593) 2019-09-12 08:30:04 +02:00
HomeAssistant Azure
d4c5cf3967 [ci skip] Translation update 2019-09-12 00:33:41 +00:00
Sébastien RAMAGE
3fda07a4ea Bump zigate to 0.3.0 (#26586)
* Bump zigate to 0.3.0
2019-09-11 20:03:02 -04:00
Paulus Schoutsen
fc21bdbe27 Update PyChromecast (#26594) 2019-09-11 17:27:56 -06:00
Zach
1eef758ecc Add support for DOODS Image Processing (#26208)
* Add support for doods

* Move connection to external module

* Fix for CI

* Another update for CI

* Reformatted via black

* Updated linting stuff

* Updated per code review

* Removed none check for something with a default

* Updated config parsing

* Updated if statements, need to disable lint check

* Fixed formatting and bug that should make linter happy

* Fixed one more issue with box drawing for areas

* removed extra imports

* Reworked per suggestion

* Changed output to debug for informational detection message
2019-09-11 22:51:05 +02:00
Paulus Schoutsen
2ec86a2349 Bumped version to 0.99.0b0 2019-09-11 13:36:12 -06:00
Robert Svensson
0221d136de Remove support of UniFi device tracker configuration import (#26587) 2019-09-11 13:35:30 -06:00
Paulus Schoutsen
0f204b34fa Merge remote-tracking branch 'origin/master' into dev 2019-09-11 13:32:41 -06:00
Paulus Schoutsen
df390bc9ab Check if git is dirty before committing (#26588) 2019-09-11 13:30:51 -06:00
Paulus Schoutsen
3fbdc89db1 Updated frontend to 20190911.1 2019-09-11 13:21:22 -06:00
Pascal Vizeli
182bf1edef Deprecate Python 3.6.0 (#26575)
* Deprecate Python 3.6.1

* Update msg
2019-09-11 12:42:54 -06:00
Paulus Schoutsen
adaa200935 Home Assistant Cast (#26566)
* Add backend support for Home Assistant Cast

* Update test reqs
2019-09-11 12:34:10 -06:00
jjlawren
6eeb01edc4 Remove default host for Plex config (#26583)
* Remove default host, allow config with token(+server)

* Require one of host or token

* Oops

* Adjust schema

* Fix schema

* Add self as codeowner

* Update CODEOWNERS
2019-09-11 20:21:08 +02:00
Daniel Shokouhi
2b30f47f4b Add Obihai integration (#26537)
* Add Obihai integration

* Lint

* Lint and bump library for multiple ports fix

* Review comments

* Review comments

* Correct errors

* Review comments

* Review comments
2019-09-11 19:26:50 +02:00
Florent Thoumie
1a73e6b44e Add switch platform to iaqualink integration (#26545)
* Add switch platform to iaqualink component

* Remove unnecessary call to constructor
2019-09-11 19:24:41 +02:00
Tsvi Mostovicz
7dfdec531c Fix GTFS sensor wrong timezone (#26580) 2019-09-11 18:00:18 +02:00
Tsvi Mostovicz
f53fcacf49 Make uk_transport sensor timezone/DST aware (#26577)
* Make uk_transport sensor timezone/DST aware

* Fix offset-naive and offset-aware datetime comparison
2019-09-11 16:37:09 +02:00
Bram Kragten
faeb95581a Updated frontend to 20190911.0 (#26578) 2019-09-11 15:28:06 +02:00
David F. Mulcahey
c31efe50ca bump dependencies (#26576) 2019-09-11 09:18:31 -04:00
Pascal Vizeli
f3fa073045 Bump UPC connect / fix auth issue (#26570)
* Bump UPC connect / fix auth issue

* Fix lint

* Fix platform schema

* Fix config value

* Address comment / add session cleanup

* Fix device handling
2019-09-11 13:17:07 +02:00
Pascal Vizeli
e6ecabd6e1 Cleanup stale script stuff (#26573) 2019-09-11 11:33:35 +02:00
Pascal Vizeli
702a524b55 Improve startup of devcontainer (#26572) 2019-09-11 11:20:21 +02:00
Pascal Vizeli
02466ed8ab Ignore test output 2019-09-11 08:28:57 +02:00
HomeAssistant Azure
53a3f2e83d [ci skip] Translation update 2019-09-11 00:33:50 +00:00
Robert Svensson
c680c07c65 deCONZ device automations (#26366)
* Early draft

* Getting there

* Working fully with Hue dimmer remote

* Fix Balloobs comments

* No side effects in constructor

* Improve hue dimmer

* Add Ikea remote control

* Add xiaomi button support

* Refactor getting deconz event

* Added xiaomi devices and tradfri wireless dimmer

* Resolve unique id from device id

* Add Hue Tap and Tradfri on off switch

* More triggers for ikea on off switch and Aqara double wall switch

* Add support for Tradfri open close remote

* Fix changes after rebase

* Initial test

* Change id to event_id

* Fix translations and add subtypes

* Try if tests pass without the new tests

* Revert disabling tests
Add new exception InvalidDeviceAutomationConfig

* Ignore places calling remotes

* Enable all gateway tests

* Found the issue, now to identify which test creates it

* Remove block till done

* See if device automation test passes in azure

* Register event to device registry

* Enable test sensors

* Skip deconz event tests currently failing

* Added reason why skipping tests
2019-09-10 16:56:28 -07:00
Pascal Vizeli
bee566f893 Nuki less strict (#26542) 2019-09-10 23:23:27 +02:00
David F. Mulcahey
1cea3a6abc osram cluster (#26555) 2019-09-10 13:44:41 -07:00
David F. Mulcahey
4f3a2c0443 fix events for smartthings acceleration cluster (#26557) 2019-09-10 13:14:22 -07:00
Paulus Schoutsen
6f27c5ae46 Fix tests 2019-09-10 13:07:55 -07:00
Paulus Schoutsen
7468cc21be Refactor Cast (#26550)
* Refactor Cast

* Fix tests & address comments

* Update reqs
2019-09-10 13:05:46 -07:00
Florent Thoumie
a7830bc2d2 Add sensor platform to iaqualink component (#26544)
* Add sensor platform to iaqualink component

* Remove unnecessary icon, fix case where value is 0
2019-09-10 22:01:12 +02:00
David Bonnes
fbc3376c32 Bump geniushub-client to 0.6.13 (#26554)
* bump geniushub client
2019-09-10 16:19:08 +01:00
Pascal Vizeli
b321ed2fdb Update azure-pipelines-ci.yml for Azure Pipelines 2019-09-10 17:15:35 +02:00
Quentame
d746035a91 Add Météo France icons + device_class (#26441)
* Add Météo France icons

* Add Météo France device_class (temperature) + use constants

* Fix weather alert info log

* Use new f"{...} {...}" format for sensor name
2019-09-10 13:17:10 +02:00
Florent Thoumie
adf6852acc Remove unnecessary force_refresh=True, clarify system behavior (#26543)
* Remove unnecessary force_refresh=True, clarify system behavior

* Fix lint.
2019-09-10 13:12:20 +02:00
HomeAssistant Azure
9df5c0ab86 [ci skip] Translation update 2019-09-10 00:32:37 +00:00
lifeisafractal
5d5102e1a2 Add zwave application version (#26205)
* Set application version in zwave

* update tests for more coverage
2019-09-09 23:59:40 +02:00
indykoning
a4fd991ab5 Add growatt server integration (#25635)
* Added growatt server integration

* Ran black formatter

* Processed feedback.

* Made attributes more readable.

* Create a sensor for each property.

* Added unique_ids

* Accidentally flipped functions

* Added dynamic device classes.

* Fixed stale session.
2019-09-09 23:47:44 +02:00
Hans Oischinger
051639b6ad Add more attributes to vicare climate entity (#26521)
Add some device information as attributes to the climate device:
 - room_temperature
 - supply_temperature
 - outside_temperature
 - active_vicare_program
 - active_vicare_mode
 - heating_curve_slope
 - heating_curve_shift
 - month_since_last_service
 - date_last_service
 - error_history
 - active_error
 - circulationpump_active
2019-09-09 23:46:11 +02:00
Tsvi Mostovicz
f3123ee0ca Fix radiotherm local time (#26526)
We want to use our own dt_util.now() which takes into consideration the globally set DEFAULT_TIME_ZONE
2019-09-09 23:41:47 +02:00
jjlawren
30fb4ddc98 Move config and connections to Plex component (#26488)
* Move config and connections to component

* Separate imports

* Set a unique_id on sensor

* Set a platforms const

* Add SERVERS dict, hardcode to single server

* Move to debug

* Return false

* More debug

* Import at top to fix lint

* Guard against legacy setup attempts

* Refactor to add setup callback

* Review comments

* Log levels

* Return result of callback

* Store CONFIGURING in hass.data

* Set up discovery if no config data

* Use schema to set defaults

* Remove media_player options to remove entities

* Improve error handling
2019-09-09 23:28:20 +02:00
Florent Thoumie
3c629db096 Add light platform to iaqualink integration (#26484)
* Add light platform to iaqualink component.

* Style changes.

* Polling moved to timer in the component
2019-09-09 23:10:25 +02:00
SukramJ
ff136a19d9 Add Delta Counter of HmIP-SPDR to Homematic IP Cloud (#26538) 2019-09-09 22:02:53 +02:00
tyjtyj
702e63e6e8 Fix Tuya Light without brightness (#26534)
Return none if there is brightness data from tuya

https://github.com/home-assistant/home-assistant/issues/25896
2019-09-09 21:44:00 +02:00
Paulus Schoutsen
7d71976e01 Do not complain about automatic generated files (#26540)
* Do not complain about automatic generated files

* Update generated files
2019-09-09 12:01:49 -07:00
Florent Thoumie
f167914951 Move iaqualink update from climate to component (#26505)
* Move iaqualink update from climate to component

* Typing fix
2019-09-09 20:06:05 +02:00
Erik Montnemery
02ded7a4a8 Remove device from device action schema (#26536) 2019-09-09 10:40:22 -07:00
Erik Montnemery
b14b14c3c9 Add device automation support to switch entities (#26466)
* Add device automation support to switch entities

* Update switch translations

* Address review comments
2019-09-09 16:55:47 +02:00
Pascal Vizeli
5f13cdf760 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-09-09 16:24:24 +02:00
David F. Mulcahey
fec6706bf7 use newly added is_server for cluster reporting (#26533) 2019-09-09 09:21:34 -04:00
Maikel Punie
28beebac61 Enable SolarEdge config entries (#26282)
* Initial commit for the solaredge configflow

* rerun the hassfest script

* Adding testcases

* Rerun hassfest, problem with black?

* Requirements for the tests

* Remove CONF_MONITORED_CONDITIONS from configuration.yaml

* Remove the options flow strings

* Resolve some comments

* Comments

* More comments

* Move the config from the sensor platform to the component itself

* More comments

* More comments

* Added solaredge __init__

* Added more test to increase coverage
2019-09-08 21:49:20 +02:00
Kevin McCormack
0983367abe Add vivotek camera component (#26071)
* Add vivotek camera component

* Update vivotek camera compontent

Use async request to enable/disable motion detection

* Update Vivotek camera

- Use HTTPS
- Use IP address for still and stream

* Update vivotek component

- Add brand and model properties
- Add state property
- Use attribute to save motion detection status

* Add vivotek camera to .coveragerc

* Update vivotek camera

Fix lint errors

* Update vivotek camera

Remove unused method

* Update Vivotek integration to use libpyvivotek

Use libpyvivotek instead of directly making HTTPS API calls.

* Update Vivotek component

Address code review.

- Remove unused code
- Replace async methods with synchronous methods
- Update docstrings

* Linter fixes for Vivotek component

* Update Vivotek camera component

- Add SSL option
- Remove authentication options as only basic authentication
  is currently working

* Update Vivotek camera component

- Make frame rate configurable
- Require username and password

* Remove unused constants in Vivotek component

* Update Vivotek camera integration

- Use libpyvivotek v0.2.1 with better response parsing
- Use add_entities instead of async_add_entities

* Update Vivotek camera component

- Build camera and stream source ouside VivotekCam
- Remove unnecessary _stream_source attribute

* Update Vivotek camera component

- Move brand to constant
- Move _supported_features to property

* Update Vivotek camera compontent to remove unused property
2019-09-08 21:36:48 +02:00
Bram Kragten
036e0ade1f Updated frontend to 20190908.0 (#26524) 2019-09-08 20:59:09 +02:00
Steven Looman
4390ccfd4d Update to async_upnp_client==0.14.11 (#26515) 2019-09-08 16:02:31 +02:00
David Bonnes
7614f9f3fb Bump geniushubclient (#26519)
* bump client

* bump again
2019-09-08 15:11:40 +02:00
Alexei Chetroi
3544f3d7e0 Bump ZHA dependencies. (#26504) 2019-09-07 21:14:32 -05:00
HomeAssistant Azure
e204d22a9e [ci skip] Translation update 2019-09-08 00:32:16 +00:00
Erik Montnemery
28b9416b0c Device automations: Rename name to entity_name in translations (#26491) 2019-09-07 19:07:11 -05:00
Jeff Irion
da88be3827 Bump androidtv to 0.0.27 (#26497) 2019-09-07 20:47:24 +02:00
David F. Mulcahey
5237bd3fd1 fix cluster configuration (#26494) 2019-09-07 10:39:56 -04:00
Santobert
ece023bfee Restructure Z-Wave Climate (#25724) 2019-09-07 09:35:51 -04:00
Ville Skyttä
33e1b44b3a Use PEP 526 type annotations, add some type hints (#26464)
* Add some more type hints to helpers.event

* Change most type comments to variable types

* Remove some superfluous type hints
2019-09-07 09:48:58 +03:00
Paulus Schoutsen
c07227a53f Merge pull request #26487 from home-assistant/rc
0.98.5
2019-09-06 18:44:42 -07:00
Paulus Schoutsen
6ad87e52a8 Bumped version to 0.98.5 2019-09-06 18:01:30 -07:00
Paulus Schoutsen
c1671bbb28 Updated frontend to 20190828.1 2019-09-06 17:56:18 -07:00
Hans Oischinger
5b3004c7b0 Vicare: Avoid invalid temperature values (#26485)
The PyVicare API can return the string "error" in case of connection
or authentication errors.
The current_temperature value could be set to "error" instead of a
nueric value or None which breaks the climate component.

This commit sets the current_temperature to None instead.
2019-09-06 19:41:34 -05:00
Aaron Bach
078a72d102 Bump aiowwlln to 2.0.1 (#26486) 2019-09-06 19:41:19 -05:00
HomeAssistant Azure
0b1f389c76 [ci skip] Translation update 2019-09-07 00:32:45 +00:00
Matthias Alphart
a5ccb03e2e Fix KNX light tunable white rounding error (#26364)
* KNX light - tunable white rounding error

mitigate rounding errors in kelvin - mired conversion for lights with relative color temperature
fixes https://github.com/home-assistant/home-assistant/issues/26357

* typo _min_kelvin <> _max_kelvin

* black
2019-09-07 01:38:09 +02:00
Magnus Brange
48dea59517 Add protocol and model as an optional restriction for tellstick sensors (#26026)
* Add protocl and model as restriction for tellstick sensors

A tellstick sensors is uniq identified by id, protocol and model, not
just the id.

This will add an optional restriction for "named sensors" for protocol
and model.

* Don't default config to empty string

* Compare None with 'is not'
2019-09-06 22:28:31 +02:00
Florent Thoumie
0abb2f3eb8 Add new integration for Jandy iAqualink pool control (#26034)
* Import new iaqualink component with climate platform.

* Style and unittest changes, fix async_step_import.

* Reorder imports.

* Fix stale doctstrings and add unittest.
2019-09-06 22:21:56 +02:00
Hans Oischinger
a72d9da9f4 Add Viessmann ViCare Climate platform (#26151)
* Add Viessmann ViCare Climate platform

* Add water_heater and fix review comments
Update to latest PyVicare (0.1.0)

* Move PyVicare API creation to component

* More review fixes

* Return false if api creation fails

* Fix logging format

* Update PyVicare 0.1.1 to fix json issues

* Formatting fixes
2019-09-06 22:09:03 +02:00
dieselrabbit
f9445c9488 Update radiotherm climate attributes (#26465)
* Update radiotherm for lovelace

-Adds hvac_action property to better support the Lovelace Climate card.
-Clean up "fan" attribute. Now called "fan_action", as "mode" is supported via hvac_action.
-Update current operation label from "Off" to "Idle".

* black formatting
2019-09-06 22:05:46 +02:00
Quentame
b3e574d5b2 Add device_info to Linky integration (#26477)
* Add device_info to Linky integration

* Remove useless SENSORS const

* Review: remove DOMAIN from the unique_id
2019-09-06 22:01:23 +02:00
zewelor
9e8f4a589f Add set scene service calls to yeelight (#26255)
* Add set scene service calls to yeelight

* Simplify code

* DRY valid brightness validation

* Fix services description

* PR fixes
2019-09-06 14:46:14 -04:00
zewelor
c847cc20fc Add yeelight nightlight support via separate light entity (#26224)
* Add yeelight nightligh support via separate light entity

* Fix lint too many ancestors

* PR fixes
2019-09-06 14:33:03 -04:00
SukramJ
f540d74b65 Unify device_state_attributes handling for Homematic IP Cloud (#26449)
*  unifi DSA for Homematic IP Cloud

* sabotage is not relevant for state

* TODAY_SUNSHINE_DURATION is not a group attribute

* Separated the words as requested

* add missing underscores
2019-09-06 15:28:24 +02:00
David Bonnes
a202afcac2 bump geniushub client (#26476)
fixes #26440
2019-09-06 12:25:46 +01:00
Tsvi Mostovicz
815e7a70e9 Jewish calendar binary sensor (#26200)
* Move jewish calendar to its own platform

* Fix tests for Jewish Calendar platform

As part of this, move tests to use async_setup_component instead of
testing JewishCalendarSensor as suggested by @MartinHjelmare here:

https://github.com/home-assistant/home-assistant/pull/24958#pullrequestreview-259394226

* Get sensors to update during test

* Use hass.config.set_time_zone instead of directly calling set_default_time_zone in tests

* Cleanup log messages

* Rename result from weekly_portion to parshat_hashavua

* Fix english/hebrew tests

* Fix updating of issue melacha binary sensor

* Fix docstrings of binary sensor

* Reset timezones before and after each test

* Use correct entity_id for day of the omer tests

* Fix omer tests

* Cleanup and rearrange tests

* Remove the old issur_melacha_in_effect sensor

* Rename variables to make the code clearer

Instead of using lagging_date, use after_tzais and after_shkia

* Use dt_util.set_default_time_zone instead of hass.config.set_time_zone so as not to break other tests

* Remove should_poll set to false (accidental copy/paste)

* Remove _LOGGER messaging during init and impossible cases

* Move binary tests to standalone test functions

Move sensor tests to standalone test functions

* Collect entities before calling add_entities

* Fix pylint errors

* Simplify logic in binary sensor until a future a PR adds more sensors

* Rename test_id holyness to holiday_type

* Fix time zone for binary sensor tests

Fix time zone for sensor tests

* Don't use unnecessary alter_time in sensors

Don't use unnecessary alter time in binary sensor

Remove unused alter_time

* Simply set hass.config.time_zone instead of murking around with global values

* Use async_fire_time_changed instead of directly calling async_update_entity

* Removing debug messaging during init of integration

* Capitalize constants

* Collect all Entities before calling async_add_entities

* Revert "Don't use unnecessary alter_time in sensors"

This reverts commit 74371740eaeb6e73c1a374725b05207071648ee1.

* Use test time instead of utc_now

* Remove superfluous testing

* Fix triggering of time changed

* Fix failing tests due to side-effects

* Use dt_util.as_utc instead of reimplementing it's functionality

* Use dict[key] for default values

* Move 3rd party imports to the top of the module

* Fix imports
2019-09-06 13:24:10 +02:00
Marius
50cec91cf0 Change darksky icon for clear night (#26452)
* change icon for clear night

change mdi:weather-sunny to mdi:night for condition clear night

* changed erroneous mdi:night to mdi:weather-night
2019-09-06 11:19:31 +02:00
Paulus Schoutsen
b870980456 Merge pull request #26463 from home-assistant/rc
0.98.4
2019-09-05 22:19:39 -07:00
Paulus Schoutsen
f23ab2af8c Bumped version to 0.98.4 2019-09-05 22:10:37 -07:00
Johann Kellerman
5994f82fc5 Add person to device_sun_light_trigger (#25877)
* Add person to device_sun_light_trigger

* tests

* fix test
2019-09-05 20:41:57 -07:00
HomeAssistant Azure
3714cdaa6d [ci skip] Translation update 2019-09-06 00:33:40 +00:00
Robert Svensson
518d2c31bb deCONZ - use entity registry disabled_by to control available entities (#26219)
* First draft

* Support enabling disabled entities

* Clean up

* Move import

* Local entity enabled replaced during rebase

* Add option flow test

* Mark options properties with option
2019-09-05 16:38:00 -07:00
Erik Montnemery
b1c2a5fa08 Add device automation action (#26455)
* Add support for device actions, with light as example.

* Add translation; return list
2019-09-05 16:26:22 -07:00
jjlawren
23fdc04554 Add plex server config options to media_player platform (#26458)
* Add server config options to media_player platform

* Unnecessary else

* Default host

* No need to try for default values

* Use const
2019-09-05 22:20:58 +02:00
jjlawren
2cd845fb25 Standardize Plex server connections (#26444)
* Common connection class

* Omit tests for new Plex files

* Oops

* Add missing properties

* Remove redundant log message

* Stopgap to avoid duplicate setups

* Cleaner check for server setup

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Cleaner check for server setup

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Not needed with previous setup check

* Remove username/password support

* Reduce log level

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Don't do setup in __init__

* Oops

* Committing too fast...

* Connect after init

* Catch update exceptions like media_player

* Pass in validated PlexServer instance

* Remove unnecessary check

* Counter should be unknown on init

* Remove servername config option
2019-09-05 19:50:26 +02:00
Malte Franken
a000125729 Queensland Bushfire Alert icon for geolocation entities (#26439)
* define icon

* reordered const imports
2019-09-05 17:11:48 +02:00
Erik Montnemery
f7dc537275 Add device automation condition (#26313)
* Add support for device conditions

* Lint

* Update test case

* Make and+or conditions async, adjust tests

* Cleanup tests

* Remove non callback versions of conditions, correct typing

* Correct typing

* Update light/strings.json

* Address review comments

* Make device automation lists simple lists, not dicts

* Add device_automation/const.py

* Use IS_ON/IS_OFF everywhere for conditions
2019-09-05 16:49:32 +02:00
Pascal Vizeli
c50faaef3c Cleanup Dockerfile.dev (#26451) 2019-09-05 14:20:08 +02:00
HomeAssistant Azure
1cbb895d20 [ci skip] Translation update 2019-09-05 10:11:41 +00:00
Pascal Vizeli
a85f89c5a6 Update azure-pipelines-translation.yml for Azure Pipelines 2019-09-05 12:09:21 +02:00
HomeAssistant Azure
1bd22a129b [ci skip] Translation update 2019-09-05 00:32:29 +00:00
Pierre
6acfede512 Add atome sensor platform (#26197)
* Atome sensor platform - provides live data from Linky energy meters with Atome device from Total/Direct energie

* Proper requirements, added code ownership

* Do not cover atome component

* Proper PEP8 import, proper use of const, added missing docstring etc

* Proper PEP8 import, proper use of const, added missing docstring etc

* Integrate recommendations from MartinHjelmare

* Init shall remain as clean as possible, we don't want side effect

* Add daily,weekly,monthly,yearly sensors. Now depends on pyatome 0.1

* Requirements regenerated for atome component

* Refactored the way we update sensors

* Removed some un-necessary returns and unused variable
2019-09-04 20:20:20 +02:00
Franck Nijhof
0df1b4c7a1 Replaces IOError by OSError (#26428) 2019-09-04 19:09:24 +02:00
Penny Wood
4004879ae0 Entity registry doesn't overwrite with None (#24275) 2019-09-04 09:49:22 -07:00
Paulus Schoutsen
79045f2da1 Undo accidental Tuya change 2019-09-04 09:23:56 -07:00
Paulus Schoutsen
fba06049d2 Merge remote-tracking branch 'origin/master' into dev 2019-09-04 09:18:32 -07:00
zewelor
c4c21d3e99 Add device to mqtt camera (#26238)
* Add device to mqtt camera

* Support discovery device info update and add tests
2019-09-04 16:15:40 +02:00
Bram Kragten
2c65e02491 Updated frontend to 20190904.0 (#26421)
* Updated frontend to 20190904.0

* Updated frontend to 20190904.0
2019-09-04 15:51:15 +02:00
Pascal Vizeli
6bef5a98fe Add prettier to vscode (#26417) 2019-09-04 11:47:13 +02:00
Malte Franken
d1bc0c1dd9 NSW Rural Fire Service icon for geolocation entities (#26416)
* define icon

* add myself as codeowner
2019-09-04 11:33:29 +02:00
Pascal Vizeli
c191551091 Update azure-pipelines-translation.yml for Azure Pipelines 2019-09-04 09:56:25 +02:00
HomeAssistant Azure
3b1a4a52e9 [ci skip] Translation update 2019-09-04 07:41:09 +00:00
Pascal Vizeli
e59eea3044 Merge pull request #26414 from home-assistant/rc
0.98.3
2019-09-04 09:33:30 +02:00
Pascal Vizeli
9e9859a959 Update azure-pipelines-translation.yml for Azure Pipelines 2019-09-04 09:02:35 +02:00
Pascal Vizeli
6ae2aacdb2 Update azure-pipelines-translation.yml for Azure Pipelines 2019-09-04 08:57:09 +02:00
Pascal Vizeli
90aaa36206 Update azure-pipelines-translation.yml for Azure Pipelines 2019-09-04 08:49:34 +02:00
Pascal Vizeli
7995bf9e66 Update azure-pipelines-translation.yml for Azure Pipelines 2019-09-04 08:36:49 +02:00
Paulus Schoutsen
b8f9319cb0 Bumped version to 0.98.3 2019-09-03 23:20:25 -07:00
Greg Laabs
860843ada1 Bump ISY994's PyISY dependency to 1.1.2 (#26413)
Fixed a major bug that was responsible for ISY events getting seemingly random delays up to 24 seconds
2019-09-03 23:20:17 -07:00
Paulus Schoutsen
7bccbcbcc3 Fix state report (#26406)
* Fix state report

* Update test
2019-09-03 23:20:17 -07:00
ehendrix23
8cf02e0b22 Update to 0.1.13 (#26402)
Update to 0.1.13
2019-09-03 23:20:16 -07:00
Daniel Høyer Iversen
93e4cd6bb2 Met, check for existing location (#26400) 2019-09-03 23:20:15 -07:00
Paulus Schoutsen
d4905477b8 Allow core config updated (#26398) 2019-09-03 23:20:15 -07:00
Anders Melchiorsen
a980eedd22 Fix race during initial Sonos group construction (#26371)
* Fix race during initial Sonos group construction

* Update homeassistant/components/sonos/media_player.py
2019-09-03 23:20:14 -07:00
Robert Svensson
a74bb3fd5e String has nothing to do with class method naming (#26368) 2019-09-03 23:20:14 -07:00
Fabian Affolter
b50ac6f486 Upgrade pyhaversion to 3.1.0 (#26232) 2019-09-03 23:20:13 -07:00
David Bonnes
4661f2a6df Initial commit (#26383) 2019-09-03 23:16:31 -07:00
David Bonnes
d5c61be651 Initial commit (#26385) 2019-09-03 23:15:40 -07:00
David Bonnes
525a434511 Use literal string interpolation in honeywell (#26386)
* Initial commit

* fix lint hints
2019-09-03 23:14:29 -07:00
Franck Nijhof
60ef41cc69 Correct file permissions in slide integration (#26390) 2019-09-03 23:13:53 -07:00
Paulus Schoutsen
92f8362883 Allow core config updated (#26398) 2019-09-03 23:13:34 -07:00
Daniel Høyer Iversen
b9923ca109 Met, check for existing location (#26400) 2019-09-03 23:13:17 -07:00
Greg Laabs
22d3cf4117 Bump ISY994's PyISY dependency to 1.1.2 (#26413)
Fixed a major bug that was responsible for ISY events getting seemingly random delays up to 24 seconds
2019-09-03 23:11:30 -07:00
Quentame
b4058b5c7f Add config flow to linky (#26076)
* Linky: setup ConfigFlow

* async_track_time_interval

* Review from @MartinHjelmare 1

* Review from @MartinHjelmare 2

* Review from @MartinHjelmare 3

* Review from @MartinHjelmare 4

* black --fast homeassistant tests

* Bump pylinky to 0.4.0 and add error user feedback

* Fix .coveragerc

* Linky platform moved to integration in config.yml and with multiple accounts

* Remove useless logs

* Review from @MartinHjelmare 5

* Add config flow tests

* Add config flow tests : login + fetch on failed
2019-09-04 07:04:26 +02:00
Taylor Silva
ca97bba4b4 Add X10 devices as ISY994 switches (#26342)
* Add X10 devices as switches

Signed-off-by: Taylor Silva <taylorsilva@outlook.com>

* Add logging message for when unsupported device is found.

This will help a user figure out why they aren't seeing all devices.

Signed-off-by: Taylor Silva <taylorsilva@outlook.com>

* Update homeassistant/components/isy994/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/isy994/__init__.py

100 is too generic of an ISY uom. We don't want to accidentally add non-switch devices.
2019-09-04 07:00:19 +02:00
Franck Nijhof
2f0eb07624 Migrate legacy typehints in core to PEP-526 (#26403)
* Migrate legacy typehints in core to PEP-526

* Fix one type
2019-09-03 20:36:04 -07:00
ehendrix23
2dc90be94f Update to 0.1.13 (#26402)
Update to 0.1.13
2019-09-03 21:00:05 -05:00
Malte Franken
2f9de2a5a5 IGN Sismologia icon for geolocation entities (#26408)
* define icon

* fixed tests
2019-09-03 20:58:40 -05:00
Paulus Schoutsen
4e2fcdb9a3 Fix state report (#26406)
* Fix state report

* Update test
2019-09-03 20:57:32 -05:00
Paulus Schoutsen
53720c5c48 Allow passing None as input_text config (#26409) 2019-09-03 20:55:58 -05:00
croghostrider
b968b53e38 Fix Emulated Hue AttributeError: 'NoneType' object has no attribute '… (#26018)
* Fix Emulated Hue AttributeError: 'NoneType' object has no attribute 'lower'

* Fix debug

* Update error message
2019-09-03 17:33:48 -07:00
Sriram Vaidyanathan
f7a58cc19e Change xiaomi camera conf_host to template (#25799)
* changed conf_host to template

Changed conf_host to template to accommodate dynamic ips

* Update camera.py

* Updated per comment

* update for black formatter

* black changes
2019-09-03 17:06:11 -07:00
John Luetke
757482ee85 Refactor pihole integration (#25837)
* Adds tests for pi_hole integration

* Refactor pi_hole component to an integration supporting multiple platforms

* Adds mock of Hole dependency

* Aborts platform setup when discovery_info is none

* Removes use of monitored_conditions

* Adds integration setup test

* Removes PlatformNotReady check

* Adds sensor test

* Code review updates

* Refactor tests to assert state through hass

* Reorder imports
2019-09-03 16:18:06 -07:00
Franck Nijhof
9035efee10 Fixes invalid JSON files and whitespace corrections in YAML files (#26396) 2019-09-03 16:02:42 -07:00
Pascal Vizeli
b6cd5ab27b Update azure-pipelines-translation.yml for Azure Pipelines 2019-09-03 22:15:25 +02:00
Pascal Vizeli
e7ccb6f047 Update azure-pipelines-translation.yml for Azure Pipelines 2019-09-03 22:09:21 +02:00
Franck Nijhof
dae6895a95 Use literal string interpolation in integrations X-Z (f-strings) (#26395) 2019-09-03 21:15:31 +02:00
Franck Nijhof
445c741b30 Use literal string interpolation in integrations R-S (f-strings) (#26392) 2019-09-03 21:14:39 +02:00
Franck Nijhof
7203027cbf Use literal string interpolation in integrations K-M (f-strings) (#26389) 2019-09-03 21:14:00 +02:00
Franck Nijhof
ef0e9431b6 Use literal string interpolation in integrations T-W (f-strings) (#26394) 2019-09-03 21:12:51 +02:00
Pascal Vizeli
cde09062c4 Update OpenCV 4.1.1 / Numpy 1.17.1 (#26387) 2019-09-03 21:04:38 +02:00
Franck Nijhof
1c5e0123c9 Use literal string interpolation in integrations N-Q (f-strings) (#26391) 2019-09-03 11:35:00 -07:00
Alexander
330ae0d885 Add support Slide cover (#25913)
* Add support GoSlide cover

* Fixed Parameters differ from overridden
Fixed Removed other pylint warnings

* Renamed GoSlide to Slide, because of Innovation in Motion rebranding

* Fixed codeowners file

* Fixed requirements file

* Removed pylint: disable=unused-argument
Removed DOMAIN not exist check
Changed if to min/max
Changed 3rd party import to top of the module
Removed timeout/retry parameters
Removed unused constants
Added check for discovery_info is none
Changed pass slide object instead of full hass object
Changed pass api object instead of full hass object
Added unique_id functionality
Removed entity_id/name properties
Removed supported_features/state functions

* Fixed unused variables

* Changed Slide API uses snake names
Changed Improved exception handling
Changed Updated Slide API to 0.50.0

* Changed moved exceptions into goslide-api
Changed retry setup into coroutine

* Changed str(err) to err
Changed invert if result to if not result
2019-09-03 10:09:25 -07:00
Pascal Vizeli
7d1e3af701 Update azure-pipelines-translation.yml for Azure Pipelines 2019-09-03 18:09:08 +02:00
Pascal Vizeli
7d27b4d2ab Update azure-pipelines-release.yml for Azure Pipelines 2019-09-03 18:07:23 +02:00
Pascal Vizeli
09a4a81d09 Update azure-pipelines-translation.yml for Azure Pipelines 2019-09-03 18:05:59 +02:00
Pascal Vizeli
fcbc2fda49 Update azure-pipelines-translation.yml for Azure Pipelines 2019-09-03 17:58:00 +02:00
Pascal Vizeli
12d470331c Update translations_upload 2019-09-03 17:56:41 +02:00
Franck Nijhof
09a350ba26 Removes executable but from hassfest codeowners (#26381) 2019-09-03 17:28:47 +02:00
Franck Nijhof
f9edec19ad Use literal string interpolation in integrations H-J (f-strings) (#26380) 2019-09-03 17:27:14 +02:00
Malte Franken
13bb2ea35a GeoNet NZ Quakes Sensor (#26078)
* working version of status sensor

* changed unit of measurement

* align naming with feed source

* simplified sensor name

* fix potential issue during initialisation

* fixed tests

* changed icon to constant

* added tests for new sensor

* split tests for geolocation vs sensor

* fixed lint

* fixed pylint

* fixed test

* removed config entry id from attributes

* moved entity manager to component

* fix issue with multiple config entries overriding each other's data

* creating async tasks instead of awaiting each unloading

* moved manager to component

* correctly triggering update only when this component is loaded

* fixed tests after major code refactorings

* fixed pylint

* moved actual creation of new events to geolocation platform

* changed all timestamps to utc

* changed the way platforms are setup and manager is updated

* simplify assert statement

* changed the way waiting for unloading platforms
2019-09-03 17:16:13 +02:00
Franck Nijhof
fa79ef1220 Use literal string interpolation in integrations E-G (f-strings) (#26379) 2019-09-03 17:10:56 +02:00
Franck Nijhof
6a24d893c8 Use literal string interpolation in integrations B-D (f-strings) (#26378) 2019-09-03 17:09:59 +02:00
ThaStealth
105461edb5 Remove solaredge_local duplicate code (#25941)
* Removed duplicate code

* Update sensor.py

Splitted exceptions into two seperate ones

* Update sensor.py

* Update sensor.py

* Update sensor.py

Fixed linting errors

* Update sensor.py
2019-09-03 17:05:23 +02:00
Franck Nijhof
ad51615718 Use literal string interpolation in integrations A (f-strings) (#26377)
* Use literal string interpolation in integrations A (f-strings)

* Black
2019-09-03 09:11:36 -05:00
Anders Melchiorsen
3534b8a977 Fix race during initial Sonos group construction (#26371)
* Fix race during initial Sonos group construction

* Update homeassistant/components/sonos/media_player.py
2019-09-03 14:14:33 +02:00
Franck Nijhof
617133e465 Correct file permissions, removing executable bits (#26376) 2019-09-03 14:13:44 +02:00
Pascal Vizeli
950f8343d3 Update azure-pipelines-wheels.yml 2019-09-03 10:39:23 +02:00
ruohan.chen
c2a752e34f Support new climate arch for zhong_hong (#26309)
* support new climate arch for zhong_hong

* use black to format

* mapping the states between lib and HA

* Add zhong_hong mapping constant
2019-09-03 10:18:08 +02:00
Fabian Affolter
245450a402 Upgrade pyhaversion to 3.1.0 (#26232) 2019-09-03 10:17:03 +02:00
Paulus Schoutsen
0cffd61481 Allow passing dictionaries to async_register_entity_service (#26370) 2019-09-03 09:50:24 +02:00
Pascal Vizeli
df9703d814 Add token support 2019-09-03 09:35:03 +02:00
Robert Svensson
c6d839f8ae String has nothing to do with class method naming (#26368) 2019-09-02 22:12:10 -07:00
Sébastien RAMAGE
6a5f7bd8e4 Update zigpy_zigate to 0.2.0 (#26327)
* Update zigpy_zigate to 0.2.0

* Update requirements_all.txt
2019-09-02 22:21:09 +02:00
Costas
df90e9c4fd Update google_maps dependency and improve error message (#26361)
* updated dependency and made error message a bit more accurate.

* updated dependency and made error message a bit more accurate.
2019-09-02 22:17:34 +02:00
Jeff Irion
85473d2c98 Bump androidtv to 0.0.26 and update tests (#26340)
* Move the patchers to a separate file

* Got a pytest test working (mostly)

* Checkpoint

* Switch to pytest for all tests

* Bump androidtv to 0.0.26 and update tests

* More robust patching

* Remove unused constants

* Combine two lines

* Add 2 additional checks

* Check that state objects are not None; add more description to tests

* Use f strings
2019-09-02 22:08:01 +02:00
Oliver
64465f0fbe Push to version 0.7.10 of denonavr (#26362) 2019-09-02 14:15:00 -05:00
Ville Skyttä
ed5d3dba0e Test with 3.6.1 in Travis (#26347)
https://github.com/home-assistant/architecture/issues/278
2019-09-02 15:51:59 +02:00
Malte Franken
ecaadfed3a USGS Earthquakes icon for geolocation entities (#26353)
* define icon

* updated tests

* added codeowner

* updated codeowners
2019-09-02 13:37:11 +02:00
Paulus Schoutsen
8ae5ece6bb Merge pull request #26345 from home-assistant/rc
0.98.2
2019-09-01 23:18:45 -07:00
Paulus Schoutsen
f6cf4c38e7 Bumped version to 0.98.2 2019-09-01 22:31:00 -07:00
tyjtyj
85a1726e69 Fix google_maps scan interval (#26328)
Reported on 
https://github.com/home-assistant/home-assistant/issues/26275
2019-09-01 22:30:46 -07:00
Robert Svensson
d1e3fbd622 deCONZ - Dont update entry if data is equal 2019-09-01 22:30:45 -07:00
Paulus Schoutsen
309d401e47 Fix alexa bad temp sensors (#26307) 2019-09-01 22:30:45 -07:00
Paulus Schoutsen
795d5405db Fix Alexa Report State (#26305)
* Fix Alexa Report State

* Forgot to save a file
2019-09-01 22:30:44 -07:00
Paul Annekov
732855e86c bump tuyaha 0.0.4 (#26303) 2019-09-01 22:30:44 -07:00
Paulus Schoutsen
47e76fcd5e Expose current direction properly on state machine (#26298)
* Expose current direction properly on state machine

* Fix template fan
2019-09-01 22:30:43 -07:00
Paulus Schoutsen
7a171dae33 Updated frontend to 20190901.0 2019-09-01 22:30:21 -07:00
Paulus Schoutsen
385a496944 Update translations 2019-09-01 22:30:09 -07:00
ChristianKuehnel
1b13c49541 added missing bluepy dependency for miflora (#26297)
fixes dependency issue #19362 (only part of the solution)
2019-09-01 21:44:50 -07:00
Paulus Schoutsen
aa7513bc5c Expose current direction properly on state machine (#26298)
* Expose current direction properly on state machine

* Fix template fan
2019-09-01 21:42:57 -07:00
Erik Montnemery
3aa2729716 Add improvements of device_automation from frontend PR 3514 (#26295)
* Add improvements from frontend PR 3514

* Fix test

* Tweak
2019-09-01 21:40:18 -07:00
Steven Rollason
79488daddf New template sensor attributes (#26127)
* updated sensor and test files

* Formatting fixes

* Updated attribute template code

* Black formatting

* Code improvements based on feedback on binary_sensor pull request

* Updated tests

* Remove duplicated code and fix tests

* Black formatting on tests

* Remove link from docstring

* Moved default to schema

* Formatting fix and change to use dict[key] to retrieve attribute_templates
2019-09-01 18:12:55 +02:00
Aleix Murtra
1617c2cd64 Add BeeWi SmartClim BLE sensors (#26174)
* Add BeeWi SmartClim BLE temperature and humidity sensor

* Update missing CODEOWNERS and .coveragerc files

* Updated requirements file

* Update documentation

* Fixed requested changes and decoupled IO library

* Add unique_id property

* Improve unique_id
2019-09-01 18:05:46 +02:00
Robert Svensson
b5426761f4 UniFi - Simplify getting controller from config entry (#26335)
* Simplify getting controller from config entry

* Lint ignore no longer needed

* Fix tests
2019-09-01 17:57:25 +02:00
fmartens
5b77a357e6 Inverted rflink cover (#26038)
* Added InvertedRflinkCover class to support COCO/KAKU ASUN-650 devices

* Rename TYPE_NORMAL to TYPE_STANDARD

* Cleaning up code and removed unused imports

* Added unit tests for InvertedRflinkCover

* less if/else statements

* Autoresolve type for newkaku

* Updated tests for InvertedRflinkCover

* Added unit test for standard cover without specifying type

* Updated comments in unit tests

* Updated unit test configuration and comments to be more explanatory

* Restore variable names in first part of the unit test that have been changed during a search and replace

* Reformated the code according to 4de97ab

* remove blank lines at end of rflink test_cover.py

* Replace single with double quote in test_cover.py

* Replaced single quotes with double qoutes and fixed formatting

* Black improvements

* Reformated the code of the unit test.

* entity_type_for_device_id should return 'TYPE_STANDARD' instead of 'None'
2019-09-01 17:52:43 +02:00
Daniel Høyer Iversen
597cd3e886 Upgrade tibber library (#26332) 2019-09-01 14:22:50 +02:00
Robert Svensson
6102eb9f1c Migrate Axis, deCONZ and UniFi to use config entry subclass (#26173)
* Use init_subclass for Config Entries

* Pylint cant handle subclass being the only user of imports
2019-09-01 13:15:48 +02:00
Josef Schlehofer
a80d26f0dc Upgrade sqlalchemy to 1.3.8 (#26331) 2019-09-01 14:10:58 +03:00
David Bonnes
f91dd4f5f8 Change evohome to asyncio client (#26042)
* fully async now
* add convergence (call update() 2 seconds after client API call) (issue#25400)
* handle dead TRVs (e.g. flat battery)
2019-09-01 11:45:41 +01:00
Rocik
298aafc79d Add support for Supla switches (#26188)
* add support for Supla switches

* remove blank line at the end of file

* Add comma on last element of a list

* Remove unnecessary supla dependencies variable
2019-09-01 10:42:17 +02:00
Jonathan Keljo
5ba436e3d8 Add a keypress service for AlarmDecoder (#26100)
* Add a keypress service for AlarmDecoder (like Envisalink has)

* Feedback

* Import DOMAIN
2019-09-01 10:38:58 +02:00
tyjtyj
fade2e991b Fix google_maps scan interval (#26328)
Reported on 
https://github.com/home-assistant/home-assistant/issues/26275
2019-09-01 10:24:54 +02:00
Josef Schlehofer
b31fde6255 Upgrade youtube_dl to 2019.09.01 (#26330) 2019-09-01 10:20:08 +02:00
Balazs Sandor
baa30aec9d Fix onvif camera setup error (#24585)
* fix: onvif setup error

* refactor: onvif camera init process

* onvif/camera: review fixes

* onvif/camera: review fixes

* onvif/camera: fix pydoc

* onvif: remove unrelated async-await

* Onvif review fix

* onvif/camera: remove log
2019-08-31 22:29:42 +02:00
Robert Svensson
d9ef92f6d2 UniFi - use entity registry disabled_by to control available entities (#26141)
* Move ignoring logic to entity registry enabled default

* Handle config to option import better

* Properly enable and disable entity registry entries on changes from config entry options

* Fix balloobs comments

* Fix some tests

* Fix tests

* Simplify updating disable on entities

* Simplify device tracker update function

* Local entity disabled replaced on rebase

* Only alter entities with changed options

* Proper tracking of changed options

* Back to straightforward updating of disabled
2019-08-31 22:04:04 +02:00
Pawel
922522b089 Fetch Onkyo current radio preset (#26211)
* atribute to show which preset is currently on in radio

* add attribute for onkyo zone

* change format string to f-strings
2019-08-31 21:56:29 +02:00
Diogo Gomes
9df2c3f8c9 Add precision argument to the Range Filter (#25874)
* add precision argument

* add precision testing to range_filter
2019-08-31 19:24:17 +02:00
Paulus Schoutsen
46b5b0cac7 Fix alexa bad temp sensors (#26307) 2019-08-31 09:46:26 -05:00
Robert Svensson
d1874d148a deCONZ - Dont update entry if data is equal 2019-08-31 15:56:43 +02:00
Robert Van Gorkom
614cf74225 Add Withings support (#25154)
* Rebasing with a clean branch.
Addressing PR feedback.
Cleaning up some static code checks.
Fixing bug with saving credentials.

* Removing unecessary change.

* Caching data manager.

* Removing configurable measures.

* Using import step in config flow.

* Updating config flows.

* Addressing PR feedback.

* Formatting source.

* Addressing PR feedback and rebasing.
2019-08-31 14:30:59 +02:00
Jc2k
944b544b2e Add support for Homekit accessory battery sensors (#26210)
* Add simple battery sensor
* Add test for battery sensor based on a real device
* Vary icon based on battery state
* Add test for battery sensory
* Read other battery related states from accessory
* Add a device class to the battery sensor
* Respect the low battery flag from the device
2019-08-31 13:18:18 +01:00
Paulus Schoutsen
7b05ede297 Fix Alexa Report State (#26305)
* Fix Alexa Report State

* Forgot to save a file
2019-08-30 20:34:40 -05:00
Paulus Schoutsen
37a3d5fd85 Add HEAD and PUT support to webhooks (#26299) 2019-08-30 20:32:38 -05:00
Paul Annekov
f01e106e6d bump tuyaha 0.0.4 (#26303) 2019-08-30 17:30:18 -07:00
Paulus Schoutsen
2f6bdc8643 Remove deprecated SMA config (#26306) 2019-08-30 16:41:07 -07:00
Pascal Vizeli
299695ca24 Update azure-pipelines-wheels.yml 2019-08-30 15:56:52 +02:00
Pascal Vizeli
b074337b9c Update azure-pipelines-wheels.yml 2019-08-30 15:50:49 +02:00
Pascal Vizeli
4d08e73e3e Enable py_noaa 2019-08-30 14:48:08 +02:00
5mauggy
62338dd28e Fix deConz thermostat integration (#26267)
* Fixed logger name to allow selective logging

* Fixed thermostat mode ('off' and 'heat' modes were not consistent with Eurotronic Spirit Zigbee Thermostat state) and added 'auto' to supported mode

* Added required blank lines in code

* Black formatting

* Revert logging code added to each files. Instead, only replaced "." by __package__ in const.py

* Added a test on self._device.state_on to determine hvac_mode

* Black formatting

* Added debug message when unsupported hvac_mode is encountered

* Applied formatting recommandations

* Updated tests for 'auto' hvac_mode
2019-08-30 14:28:39 +02:00
Paulus Schoutsen
ad6ede9ef7 Merge remote-tracking branch 'origin/master' into dev 2019-08-29 16:06:24 -07:00
Paulus Schoutsen
d1219d0b41 Merge pull request #26276 from home-assistant/rc
0.98.1
2019-08-29 16:03:33 -07:00
Robert Svensson
1ca2f1906a UniFi - dont schedule updates on disabled entities (#26278)
* Dont schedule updates on disabled entities

* Use entity enabled since it is available
2019-08-29 14:04:18 -07:00
Robert Svensson
0d7326168e UniFi - dont schedule updates on disabled entities (#26278)
* Dont schedule updates on disabled entities

* Use entity enabled since it is available
2019-08-29 14:04:01 -07:00
Paulus Schoutsen
5413cbd195 Fix partly cloudy (#26277) 2019-08-29 13:23:19 -07:00
mbo18
015adbbac0 Fix missing DarkSky mdi icon (#26274)
* Fix missing DarkSky mdi icon

Fix mdi icon for DarkSky

* fix icon

* Update weather.py
2019-08-29 13:23:19 -07:00
mbo18
6a02fd51b8 Fix missing DarkSky mdi icon (#26274)
* Fix missing DarkSky mdi icon

Fix mdi icon for DarkSky

* fix icon

* Update weather.py
2019-08-29 13:22:52 -07:00
Paulus Schoutsen
66b905776b Fix partly cloudy (#26277) 2019-08-29 13:22:29 -07:00
Paulus Schoutsen
5676f6fb86 Bumped version to 0.98.1 2019-08-29 13:06:34 -07:00
David F. Mulcahey
bb52e17364 Fix ZHA state restore by always restoring last seen on devices (#26271)
* fix state restore by always restoring last seen

* cleanup
2019-08-29 12:56:18 -07:00
SukramJ
069e762da0 Fix for 0.98: Don't update disabled entities (Homematic IP Cloud) (#26236)
* Homematic IP Cloud Fix: Don't update disabled entities

* Added enabled to entity.py

* Update test for enabled

* Update entity.py
2019-08-29 12:56:18 -07:00
Eliseo Martelli
5f850a7dc7 Update sensor.py (#26209) 2019-08-29 12:56:17 -07:00
David F. Mulcahey
25961df548 Fix ZHA state restore by always restoring last seen on devices (#26271)
* fix state restore by always restoring last seen

* cleanup
2019-08-29 12:44:53 -07:00
Eliseo Martelli
24a4a42664 Update sensor.py (#26209) 2019-08-29 12:36:21 -07:00
Paulus Schoutsen
04d2dbb573 Add translations 2019-08-29 12:32:46 -07:00
Paulus Schoutsen
36312bdef1 Add translations 2019-08-29 12:32:15 -07:00
Andrew Sayre
955bed8df4 Clean up HEOS strings (#26242)
* Clean up strings

* Shorten lines to ~ 88
2019-08-29 14:23:42 -05:00
StephenWetzel
16fff16082 Add two new methods to the OpenUV component that consume only a singl… (#26207)
* Add two new methods to the OpenUV component that consume only a single API call

* Two lines after class

* Rename methods to better reflect what they do, and DRY copy and pasted code

* More error handling down into methods, run api calls in parallel

* Fix import order

* Add new methods to services.yaml, and update error messages
2019-08-29 09:56:12 -06:00
Jeff Irion
789ad38c38 Bump androidtv to 0.0.25 and add tests (#26202)
* Add tests for androidtv

* Test that the error and reconnection attempts are logged correctly.

> "Handles device/service unavailable. Log a warning once when
> unavailable, log once when reconnected."

https://developers.home-assistant.io/docs/en/integration_quality_scale_index.html

* Clarify comment

* Add test for when the ADB shell command returns None

* Bump androidtv to 0.0.25
2019-08-29 12:03:03 +02:00
Maikel Punie
ec3d83c0cc Velbus config entries remove decorator (#26256) 2019-08-29 08:45:01 +02:00
Paulus Schoutsen
688f5b7698 Merge pull request #26254 from home-assistant/rc
0.98.0
2019-08-28 15:21:47 -07:00
Paulus Schoutsen
69ddca6f68 Updated frontend to 20190828.0 2019-08-28 13:44:02 -07:00
Paulus Schoutsen
d652bb23de Updated frontend to 20190828.0 2019-08-28 13:43:45 -07:00
Paulus Schoutsen
1c473487b1 Bumped version to 0.98.0 2019-08-28 13:38:56 -07:00
Johann Kellerman
bbc5049816 SMA beta fix #26225 (#26244) 2019-08-28 13:38:51 -07:00
Robert Svensson
d156648c55 deCONZ normalizes cover values to follow zigbee spec (#26240) 2019-08-28 13:38:50 -07:00
Florian Klien
1e61d50fc5 luci device-tracker dependency fix (#26215)
* luci device-tracker dependency fix

fixes issue #25758

* luci device-tracker fix, requirements_all
2019-08-28 13:38:49 -07:00
SukramJ
cf3bb300e6 Fix for 0.98: Don't update disabled entities (Homematic IP Cloud) (#26236)
* Homematic IP Cloud Fix: Don't update disabled entities

* Added enabled to entity.py

* Update test for enabled

* Update entity.py
2019-08-28 13:38:20 -07:00
Paulus Schoutsen
907ffdb762 Update translations 2019-08-28 12:46:02 -07:00
Paulus Schoutsen
e69953fe2d Update translations 2019-08-28 12:45:48 -07:00
Maikel Punie
33bd9c83fb Enable cert_expiry config entries (#25624)
* Enable cert_expiry config entries

* add black

* lint fixes

* Rerun black

* Black on json files is a bad idea

* Work on comments

* Forgot the lint

* More comment work

* Correctly set defaults

* More comments

* Add codeowner

* Fix black

* More comments implemented

* Removed the catch

* Add helper.py from cert_expiry to .coveragerc
2019-08-28 19:35:09 +02:00
Malte Franken
49ad527a37 Fix WWLLN entity management (#26250)
* added debug logging

* fixed manager to keep track of managed external ids
2019-08-28 08:42:39 -06:00
Johann Kellerman
a28e644def SMA beta fix #26225 (#26244) 2019-08-28 09:21:21 +02:00
Andrew Sayre
3c07a9b4c7 Cleanup strings (#26243) 2019-08-27 17:08:09 -06:00
Matt Schmitt
6525f8704a Bump dependency to add PLAY_STATE_STOPPED (#26239) 2019-08-27 14:30:19 -05:00
Robert Svensson
1f2e0d3949 deCONZ normalizes cover values to follow zigbee spec (#26240) 2019-08-27 21:06:14 +02:00
michaeldavie
d9ae63e239 Remove throttle from update (#26216) 2019-08-27 16:00:54 +02:00
Andrew Sayre
9dc40197e9 Fix flaky updater tests (#26221) 2019-08-27 10:30:41 +02:00
Florian Klien
c185c015ef luci device-tracker dependency fix (#26215)
* luci device-tracker dependency fix

fixes issue #25758

* luci device-tracker fix, requirements_all
2019-08-27 00:34:57 -05:00
presslab-us
8e5d272b5f Support formatting and scaling with ZHA Metering cluster (#26201)
* Support formatting and scaling with Metering cluster

* fix lint

* run black formatter
2019-08-26 23:16:54 -04:00
newbee112
03cfe7247b Update sensor.py (#26218)
Added more options for CPU temp.
2019-08-27 00:14:38 +02:00
Pascal Vizeli
d7df61f980 Update azure-pipelines-release.yml for Azure Pipelines 2019-08-26 21:12:49 +02:00
Pascal Vizeli
193881c4d1 Update azure-pipelines-release.yml for Azure Pipelines 2019-08-26 21:08:21 +02:00
Pascal Vizeli
efacfa3696 Update azure-pipelines-release.yml for Azure Pipelines 2019-08-26 21:03:37 +02:00
Pascal Vizeli
055eb69e2d Update azure-pipelines-wheels.yml for Azure Pipelines 2019-08-26 17:12:57 +02:00
Pascal Vizeli
54d85fa3dd Update azure-pipelines-release.yml for Azure Pipelines 2019-08-26 16:10:40 +02:00
David F. Mulcahey
6f2ac705eb Add web socket API command to get a single ZHA device (#26196)
* get single device web socket command

* test get single device

* add not found error

* fix handling when device doesn't exist

* add test for zha device not found
2019-08-26 09:54:19 -04:00
Pascal Vizeli
60256cca17 Nightly builds (#26204)
* Nightly docker builds / Hass.io dev HA

* use same style

* Finish nightly build

* Update builder version

* Fix style

* fix style part 2

* Last one

* Fix order
2019-08-26 10:50:41 +00:00
Pascal Vizeli
7a111bf863 Nightly builds (#26204)
* Nightly docker builds / Hass.io dev HA

* use same style

* Finish nightly build

* Update builder version

* Fix style

* fix style part 2

* Last one

* Fix order
2019-08-26 11:46:46 +02:00
Ville Skyttä
0c49c82015 Huawei LTE misc improvements (#26203)
* Constant and whitespace cleanups

* Upgrade huawei_lte_api to 1.3.0

https://github.com/Salamek/huawei-lte-api/releases

* Hush traceback if device does not support logout
2019-08-26 10:32:50 +02:00
Paulus Schoutsen
9ad1a1ca15 Bumped version to 0.98.0b2 2019-08-25 22:37:34 -07:00
David F. Mulcahey
9d51262559 bump quirks version (#26198) 2019-08-25 22:37:29 -07:00
Andrew Sayre
677995a05a Update pyheos to 0.6.0 (#26191) 2019-08-25 22:37:28 -07:00
Aaron Bach
afab0a9568 Fix possible KeyError in SimpliSafe (#26190) 2019-08-25 22:37:27 -07:00
Chao
b64ac5be85 fix issue setting scan_interval (#26165)
I was getting the following error when i set the scan_interval
```
    self.scan_interval = timedelta(seconds=config.get(CONF_SCAN_INTERVAL, 60))
TypeError: unsupported type for timedelta seconds component: datetime.timedelta
```
it turns out `config.get(CONF_SCAN_INTERVAL)` already returns `timedelta`

```('scan_interval', datetime.timedelta(seconds=180))```
2019-08-25 22:37:27 -07:00
Jeff Irion
ee03f5d7c1 Bump androidtv to 0.0.24 (#26158)
* Bump androidtv to 0.0.24

* Add unique ID for Fire TV (not just Android TV)
2019-08-25 22:37:26 -07:00
On Freund
45a454ba53 CoolMaster: Change auto to heat_cool (#26144) 2019-08-25 22:37:25 -07:00
Paulus Schoutsen
65cf5a6ef5 Reload config entry when entity enabled in entity registry, remove entity if disabled. (#26120)
* Reload config entry when disabled_by updated in entity registry

* Add types

* Remove entities that get disabled

* Remove unnecessary domain checks.

* Attach handler in async_setup

* Remove unused var

* Type

* Fix test

* Fix tests
2019-08-25 22:37:25 -07:00
David F. Mulcahey
bde572c91a bump quirks version (#26198) 2019-08-25 22:34:43 -07:00
Paulus Schoutsen
05ed3c44ea Updated frontend to 20190825.0 2019-08-25 22:25:05 -07:00
Paulus Schoutsen
2db9542338 Updated frontend to 20190825.0 2019-08-25 22:24:46 -07:00
Bram Kragten
248619a036 Speed up history get_states (#23881)
* Speed up history `get_states`

Adding a boundary of the start of the recorder run the point is in, significantly increases the time of the query. This speeds up the fetching of the history of 1 entity.

* Make single entity query easier

no need for joins with single entity

* Lint
2019-08-25 21:11:12 +02:00
Andrew Sayre
7bfb365f62 Update pyheos to 0.6.0 (#26191) 2019-08-25 20:57:43 +02:00
Daniel Høyer Iversen
d4bd5a180c Refactor open garage (#26179)
* Use defined constant in open garage

* refactor open garage

* style

* style

* refactor

* refactor

* refactor

* remove vehicle state
2019-08-25 12:05:42 +02:00
Aaron Bach
7238eb9bac Fix possible KeyError in SimpliSafe (#26190) 2019-08-25 02:18:31 +02:00
Daniel Høyer Iversen
059ae2bb68 Update ambiclimate library (#26182) 2019-08-24 11:15:21 -05:00
Paulus Schoutsen
691e3f6141 Allow bumping version for nightly builds (#26167) 2019-08-23 10:32:54 -07:00
Chao
3deeac6bf7 fix issue setting scan_interval (#26165)
I was getting the following error when i set the scan_interval
```
    self.scan_interval = timedelta(seconds=config.get(CONF_SCAN_INTERVAL, 60))
TypeError: unsupported type for timedelta seconds component: datetime.timedelta
```
it turns out `config.get(CONF_SCAN_INTERVAL)` already returns `timedelta`

```('scan_interval', datetime.timedelta(seconds=180))```
2019-08-23 10:14:18 -07:00
Franck Nijhof
decf13b948 Use literal string interpolation in core (f-strings) (#26166) 2019-08-23 09:53:33 -07:00
On Freund
1efa29d6ff CoolMaster: Change auto to heat_cool (#26144) 2019-08-23 15:59:25 +02:00
Jeff Irion
55031e6ea4 Bump androidtv to 0.0.24 (#26158)
* Bump androidtv to 0.0.24

* Add unique ID for Fire TV (not just Android TV)
2019-08-23 15:58:24 +02:00
MatthewFlamm
17750a604e Add NWS weather (#23647)
* Add nws weather.

* Hassfest

* Address multiple comments

* Add NWS icon weather code link

* Add metar fallback.

Use metar code from nws observation if normal api is missing data.

* only get 1 observation - we dont use more than 1

* add mocked metar for tests

* lint

* mock metar package for all tests

* add check for metar attributes

* catch errors in setup

* add timeout error

* handle request exceptions

* check and test for missing observations

* refactor to new pynws

* change to simpler api

* Make py3.5 compatible

Remove f string

* bump pynws version

* gen_requirements

* fix wind bearing observation

* Revert "Make py3.5 compatible"

This reverts commit 4946d91779.

* Precommit black missed a file?

* black test

* add exceptional weather condition

* bump pynws version

* update requirements_all

* address comments

* move observation and forecast outside try-except-else

* Revert "move observation and forecast outside try-except-else"

This reverts commit 53b78b3283.

* remove else from update forecast block

* remove unneeded ConfigEntryNotReady import

* add scan_interval, reduce min_time_between_updates

* pytest tests

* lint test docstring

* use async await

* lat and lon inclusive in config
2019-08-23 14:13:06 +02:00
Pascal Vizeli
e4906c277a Update azure-pipelines-release.yml for Azure Pipelines 2019-08-23 13:55:23 +02:00
Pascal Vizeli
2b6c5eeb1d Update azure-pipelines-release.yml for Azure Pipelines 2019-08-23 13:54:44 +02:00
Tyler Page
432f6569ad Venstar: define success for all branches of set_temperature() (#26148)
* define success for all branches

* add operation_mode to error when unexpected value

* fix black linting

* black linting

* fix weird black linting result
2019-08-23 10:23:19 +02:00
Paulus Schoutsen
f704a8e90e Reload config entry when entity enabled in entity registry, remove entity if disabled. (#26120)
* Reload config entry when disabled_by updated in entity registry

* Add types

* Remove entities that get disabled

* Remove unnecessary domain checks.

* Attach handler in async_setup

* Remove unused var

* Type

* Fix test

* Fix tests
2019-08-22 19:32:43 -05:00
Paulus Schoutsen
c7477f00f5 Bumped version to 0.98.0b1 2019-08-22 15:09:26 -07:00
Paul Annekov
4d656e130d Fix tuya switch state (#26145)
* bump tuyaha 0.0.3

* bump tuyaha 0.0.3
2019-08-22 15:09:09 -07:00
Paulus Schoutsen
7b62516e69 Log warning if disabled entities receive updates. (#26143)
* Log warning if disabled entities receive updates.

* Fix test

* Always set entity ID on disabled entities
2019-08-22 15:09:08 -07:00
Phil Cole
a582110629 Nissanleaf login fix (#26139)
* Upgrade to pycarwings2.9 per 25 July 2019 API change

* Remove rest of location tracker. Fix get_status_from_update call.
2019-08-22 15:09:08 -07:00
SukramJ
08471e3e52 Splitt device_state_attributes between device and group for Homematic IP Cloud (#26137)
* splitt device_state_attributes between device and group

* readd device_state_attributes for access point
2019-08-22 15:09:07 -07:00
Jeff Irion
49bc3d3769 Load user-provided descriptions for python_scripts (#26069)
* Load user-provided descriptions for python_scripts

* Import SERVICE_DESCRIPTION_CACHE

* Use async_set_service_schema to register service descriptions

* Add python_script tests for loading service descriptions

* Use async/await in test
2019-08-22 15:09:06 -07:00
Paulus Schoutsen
8856a1cda6 Updated frontend to 20190822.0 2019-08-22 15:06:37 -07:00
Paulus Schoutsen
a4eeaac24c Updated frontend to 20190822.0 2019-08-22 15:05:57 -07:00
Paulus Schoutsen
aa56b4dd30 Log warning if disabled entities receive updates. (#26143)
* Log warning if disabled entities receive updates.

* Fix test

* Always set entity ID on disabled entities
2019-08-22 14:12:24 -07:00
Phil Cole
bff5b00a09 Nissanleaf login fix (#26139)
* Upgrade to pycarwings2.9 per 25 July 2019 API change

* Remove rest of location tracker. Fix get_status_from_update call.
2019-08-22 12:40:48 -07:00
Paul Annekov
bc17170f95 Fix tuya switch state (#26145)
* bump tuyaha 0.0.3

* bump tuyaha 0.0.3
2019-08-22 12:26:08 -07:00
Jeff Irion
aff151c90a Load user-provided descriptions for python_scripts (#26069)
* Load user-provided descriptions for python_scripts

* Import SERVICE_DESCRIPTION_CACHE

* Use async_set_service_schema to register service descriptions

* Add python_script tests for loading service descriptions

* Use async/await in test
2019-08-22 11:01:56 -07:00
Johann Kellerman
2d432da14c DuckDNS setup backoff (#25899) 2019-08-22 18:19:27 +02:00
SukramJ
82b1b10c28 Splitt device_state_attributes between device and group for Homematic IP Cloud (#26137)
* splitt device_state_attributes between device and group

* readd device_state_attributes for access point
2019-08-22 09:02:35 -07:00
SukramJ
bc5cec97f4 Add myself as codeowner to HmIP Cloud (#26140) 2019-08-22 09:00:15 -07:00
Pascal Vizeli
5f8c3e6235 Update azure-pipelines-release.yml 2019-08-22 17:50:51 +02:00
Pascal Vizeli
be0739626b Update azure-pipelines-release.yml for Azure Pipelines 2019-08-22 17:49:17 +02:00
Pascal Vizeli
2b78bfaf78 Update azure-pipelines-release.yml for Azure Pipelines 2019-08-22 17:47:35 +02:00
Pascal Vizeli
82e5a38403 Update azure-pipelines-release.yml for Azure Pipelines 2019-08-22 17:47:04 +02:00
Pascal Vizeli
44a528dee2 Update azure-pipelines-release.yml for Azure Pipelines 2019-08-22 17:35:22 +02:00
Pascal Vizeli
f793c71f52 Update azure-pipelines-release.yml for Azure Pipelines 2019-08-22 17:34:54 +02:00
Pascal Vizeli
a71a029262 Update azure-pipelines-release.yml for Azure Pipelines 2019-08-22 09:29:03 +02:00
Pascal Vizeli
b3ae6a20ba Update azure-pipelines-release.yml for Azure Pipelines 2019-08-22 09:28:46 +02:00
Pascal Vizeli
e53ecfb5d5 Update azure-pipelines-release.yml for Azure Pipelines (#26128)
* Update azure-pipelines-release.yml for Azure Pipelines

* Update azure-pipelines-release.yml
2019-08-22 09:14:38 +02:00
Pascal Vizeli
9a16b7b0f6 Update azure-pipelines-release.yml for Azure Pipelines (#26128)
* Update azure-pipelines-release.yml for Azure Pipelines

* Update azure-pipelines-release.yml
2019-08-22 08:58:41 +02:00
Paulus Schoutsen
23cf8414b8 Bumped version to 0.98.0b0 2019-08-21 16:20:08 -07:00
Paulus Schoutsen
c90e8ba7de Merge remote-tracking branch 'origin/master' into dev 2019-08-21 16:18:42 -07:00
Franck Nijhof
12f964ca57 Statistics sensors repect given name (#26119) 2019-08-21 15:54:04 -07:00
Paulus Schoutsen
f9e518d868 Fix tests leaving files behind (#26121) 2019-08-21 15:53:10 -07:00
Paulus Schoutsen
4a6f722b6d Updated frontend to 20190821.0 2019-08-21 15:16:34 -07:00
Jeff Irion
7090970436 Add descriptive fields to script config (#26056)
* Add descriptive fields to script config

* Add script descriptions to hass.data["service_description_cache"]

* Import SERVICE_DESCRIPTION_CACHE

* Register script descriptions via async_set_service_schema

* Add scripts test for loading and reloading service descriptions

* Minor cleanup

* Clean up script schema
2019-08-21 14:08:46 -07:00
Steven Rollason
9bcb48985b Template binary sensor attributes (#22664)
* Added attribute support to template binary sensor with tests

Added attribute support to template binary sensor with tests

* fix dictionary update

fix dictionary update

* Fixed whitespace and line length issues

* Fixed indentation

* Simplify applying of attribute templates based on feedback

* Syntax and whitespace fixes

* Black formatting

* Black formatting on tests

* Check attribute_templates is not None

* Fixed test

* Added test for failure to render template

* Test fix

* Updated test

* Removed whitespace and applied Black formatting

* Fixed test assertion

* Updated test

* Code improvements folloing comments

Using chain to iterate over templates and attribute_templates
Replacing dict() with {}
Rmoving unused constant

* Applied Black formatting

* Fixed removed code

* Default attribute_templates to empty dict

* Black formatting

* Fixed imports
2019-08-21 14:07:27 -07:00
Robert Svensson
588eac82c7 UniFi config entry options (#26113)
Introduce config entry options for Unifi integration
Allow configuration.yaml options to be imported to new options
2019-08-21 22:22:42 +02:00
Anders Melchiorsen
7ab36e0381 Update eternalegypt to 0.0.10 (#26117) 2019-08-21 20:54:20 +02:00
SukramJ
95f660f0b4 remove ATTR_ID for groups (#26114) 2019-08-21 10:58:34 -07:00
Sylvia van Os
ce54ae3171 Update PyEssent (#26115) 2019-08-21 10:58:03 -07:00
Ville Skyttä
9b1315d8e5 Check and fix test suite leaving files behind (#25981)
* azure: run check_dirty at end of tests

* Fix ps4 media player tests to not write to files

* .gitignore coverage.xml and test-results.xml
2019-08-21 19:50:26 +03:00
Ville Skyttä
e033e46161 Remove coveralls test dependency (#26110)
Outdated and unused.
2019-08-21 19:49:46 +03:00
Ville Skyttä
48e9e53f66 Upgrade pytest to 5.1.1 (#26112)
https://docs.pytest.org/en/latest/changelog.html#pytest-5-1-0-2019-08-15
https://docs.pytest.org/en/latest/changelog.html#pytest-5-1-1-2019-08-20
2019-08-21 19:49:25 +03:00
Ville Skyttä
8f044cf52f Upgrade pydocstyle to 4.0.1 (#26111)
https://github.com/PyCQA/pydocstyle/blob/4.0.1/docs/release_notes.rst#401---august-14th-2019
2019-08-21 19:48:46 +03:00
Josef Schlehofer
39d62b43ac Upgrade ruamel_yaml to 0.15.100 (#26095) 2019-08-21 09:13:40 -07:00
David F. Mulcahey
46bfd5e9c8 bump quirks (#26106) 2019-08-21 09:13:04 -07:00
croghostrider
08d797edba check if a light supports brightness (#26055)
Fix black

Fix black
2019-08-21 08:42:26 -07:00
Pascal Vizeli
cf505c65b4 Update azure-pipelines-release.yml for Azure Pipelines 2019-08-21 17:12:31 +02:00
SukramJ
f80c9c93ca Add support for warning attributes to Homematic IP Cloud (#26103)
* add supported optional features

* use recommendations
2019-08-21 16:31:55 +02:00
Gerard
38ce4039c3 Update bimmer_connected to 0.6.0 (#26098)
* Update bimmer_connected to 0.6.0

* Correct file properties
2019-08-21 09:11:06 +02:00
Paulus Schoutsen
2fbe01fb33 Updated frontend to 20190820.1 2019-08-20 16:20:38 -07:00
Alexei Chetroi
21a946009d Bump up zha dependencies. (#26097) 2019-08-20 16:06:38 -07:00
Rick van Hattem
000d3d4fde [bugfix] Exception if vendor's servers are currently unavailable (#26093) 2019-08-20 23:27:59 +02:00
Paulus Schoutsen
5c91a6cd48 Fix open-ui cli arg (#26091)
* Fix open-ui cli command

* Align add_job typing with async_add_job
2019-08-20 21:43:50 +02:00
Sander
f34b84a5cf add id to state attributes (#26086) 2019-08-20 10:59:01 -07:00
Ville Skyttä
4bce1efeee Test with 3.6.0 in Travis (#26039)
https://github.com/home-assistant/home-assistant/pull/26030#issuecomment-522298190
2019-08-20 10:55:40 -07:00
Joakim Sørensen
d96edea6e2 Remove the googlehome integration (#26035) 2019-08-20 10:54:54 -07:00
ahertz
7fd53ac912 Sonos playlists play media (#26054)
* Add handling for Sonos playlists in media_player.play_media

* Avoid breaking change by falling back to previous behavior

* Use the proper MEDIA_TYPE_PLAYLIST constant.

* Addressed comments, restricting media_type to music or playlist
2019-08-20 10:53:45 -07:00
Paulus Schoutsen
cf2d927f14 Use init_subclass for Config Entries (#26059)
* Use init_subclass for Config Entries

* Ignore type
2019-08-20 10:46:51 -07:00
David Bonnes
33c35a6c3c Bump geniushub client (#26084)
* bump geniushub client

* delint

* remove unsused lint hints
2019-08-20 10:43:39 -07:00
Pascal Vizeli
97d3f49bb8 Docker ADR (#26085)
* Migrate Docker image to Hass.io / Multiarch

* Fix sudo

* Update CODEOWNERS

* Fix manifest

* Add more logic

* fix handling

* Move dockerfile

* Modify options
2019-08-20 10:37:55 -07:00
legacycode
daa0330da4 Update pylacrosse library to version 0.4.0 (#26088)
* Updated pylacrosse library to version 0.4.0. Adding support for remote serial port.

* Generated new requirements_all.txt file.
2019-08-20 10:35:39 -07:00
Petr Vraník
0e4504296e Update pyrainbird to version 0.2.1 to fix zone number (#26064)
* Update pyrainbird to version 0.2.0 to fix zone number issue:

- home-assistant/home-assistant/issues/24519
- jbarrancos/pyrainbird/issues/5
- https://community.home-assistant.io/t/rainbird-zone-switches-5-8-dont-correspond/104705

* requirements_all.txt regenerated

* code formatting

* code formatting

* response checking

* fixed switch state

* pyrainbird version bump

* formatting

* version bump

* if instead elif
2019-08-20 18:26:15 +02:00
Paulus Schoutsen
a347a41d3c Add strings for traccar config flow (#26089)
* Add strings for traccar config flow

* Update strings.json
2019-08-20 09:19:00 -07:00
Pascal Vizeli
178d0d2099 Update devcontainer.json 2019-08-20 17:49:21 +02:00
Chris Thornton
c5ca431894 Add path option to SABnzbd component (#25908)
* Add path option to SABnzbd component

Adds an optional `path` setting to the SABnzbd component. This allows support for SABnzbd installs that use a different `url_base` (typically a reverse proxied configuration; see https://sabnzbd.org/wiki/configuration/2.3/special).

This change passes the `path` along to pysabnzbd as its `web_root`, which in turn uses the path to build up it's api URLs.

* Use dict.get for Sabnzbd web_root path config
2019-08-20 12:01:19 +02:00
Tomas Kislan
eee2b2d543 Add Minio component (#23567)
* Add minio implementation

* Static check changes

* Added docstrings

* Update docstrings

* Update docstrings

* Fix linter errors

* Finally fix all docstring errors

* Create services.yaml

* Update CODEOWNERS

* Final changes

* Remove double underscores

* Minor changes

* Update config.yml

* Review changes

* Added tests

* Fix lint errors

* Move tests from unittest to pytest

* Add minio as test requirement

* Update test_minio_helper.py

* Better event thread handling, added hass test

* Update tests

* Fixed lint errors

* Update test_minio.py

* Review changes

* More review changes

* Removed tests

* Applied code style changes

* Reformat test code
2019-08-20 11:56:11 +02:00
Paulus Schoutsen
93a800a612 Convert progress API to WS (#26082) 2019-08-20 00:17:52 -07:00
Paulus Schoutsen
1fe3b147fa Updated frontend to 20190820.0 2019-08-20 00:15:53 -07:00
Paulus Schoutsen
a1dbdbba6a Save config entry after updating system options (#26077) 2019-08-19 18:45:17 -05:00
Johann Kellerman
d1483b6f29 pysma library update 0.3.4 (#26075) 2019-08-19 18:44:19 -05:00
Robert Svensson
e41c002f70 Add config entry options support to deCONZ (#26049) 2019-08-19 14:42:21 -07:00
Johann Kellerman
b867e3314b SMA simplify config (#25880) 2019-08-19 22:10:35 +02:00
flebourse
45aec2ea40 huawei_lte: support out of range values in default sensor formatter (#26052)
* Update sensor.py

Change regexp to cope with out of range values, ie "rssi" : ">=-51dBm".

* Add tests for format_default

* Fix black formatting
2019-08-19 20:34:33 +03:00
Jonathan Keljo
a38bdc4deb Remove reference to typing.Deque (added in Python 3.6.1) (#26030)
* Remove reference to typing.Deque (added in Python 3.6.1)

* Silence mypy

* Type as collections.deque
2019-08-19 20:08:07 +03:00
Pascal Vizeli
1077ec1704 Add packages version to Tensoflow for wheels packages (#26068)
* Add packages version to Tensoflow for wheels packages

* Uncomment tensorflow

* fix string

* Revert version
2019-08-19 16:56:57 +02:00
Philipp Danner
75e18d4282 Add Keba charging station/wallbox as component (#24484)
* Add Keba charging station wallbox component

* Added start/stop commands (ena 0 and ena 1)

* added refresh_interval parameter and fixed authorization

* fixed max line length

* deactivate failsafe mode if not set in configuration

* extracted I/O code to pypi library

* updated services.yaml

* pinned version of requirements

* fixed typos, indent and comments

* simplified sensor generation, fixed unique_id and name of sensors

* cleaned up data extraction

* flake8 fixes

* added fast polling, fixed unique_id, code cleanup

* updated requirements

* fixed pylint

* integrated code styling suggestions

* fixed pylint

* code style changes according to suggestions and pylint fixes

* formatted with black

* clarefied variables

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* fixed behaviour if no charging station was found

* fix pylint

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
2019-08-19 14:29:26 +02:00
Fredrik Erlandsson
15ab004e98 fix alarm webhooks (#26062) 2019-08-19 14:00:47 +02:00
Pascal Vizeli
6b80df9652 Bump nabucasa-cloud to 0.17 (#26066) 2019-08-19 12:15:41 +02:00
Pascal Vizeli
34f7bb5b8c Revert "Fix bmw_connected_drive and eq3btsmart components by updating their dependencies (#26012)" (#26065)
This reverts commit 9e5243929e.
2019-08-19 12:09:56 +02:00
Paulus Schoutsen
3463cc9cbd Make sure config flows extend ConfigFlow base class (#26051) 2019-08-18 11:36:23 -07:00
Robert Dunmire III
d4981a1143 Fix Mikrotik ARP ping (#25965)
* Reuse ssl_wraper

* Fix arp_ping

* Restore debug log

* Fix attributes
2019-08-18 17:14:54 +02:00
ThaSiouL
10d63e46d7 Fritz device tracker: set 'scanning' log to debug (#26043)
Changed the logging level for the polling of the fritz device tracker from info to debug.  The message was logged up to 6 times per minute and bloated the log file.
2019-08-18 18:08:26 +03:00
Sebastian Muszynski
2a39d1209c Add support of new Xiaomi Aqara Curtain models (#25942)
* Add support of new Xiaomi Aqara Curtain models (curtain.aq2, curtain.hagl04) (Closes: #25711)

* Fix requirements_all
2019-08-18 12:14:07 +03:00
Joakim Sørensen
ef8bc78c53 Remove the ruter integration (#26041) 2019-08-18 10:55:19 +02:00
Robert Svensson
a2589f56e1 Add system options to config entries (#25926)
* Add system options to config entries

* For feedback

* Follow most of balloobs comments

* Fix balloobs comments

* Improvements

* Fix second round of Balloobs comments

* Fix third round

* Add system options to mock config entry

* Fix integration tests

* Fix the last failing tests

* Fix disabled string

* Fix failing disabled_by tests

* New tests

* Config entry WS API tests

* Fix comments
2019-08-17 21:34:11 -07:00
michaeldavie
fc716a45c9 Updates to Environment Canada components (#25973)
* Bump env_canada to 0.0.21

* Add timestamp attribute to camera

* Bump env_canada to 0.0.23

* Clean up displayed values

* Validate radar station code

* Bump env_canada to 0.0.24

* Black

* Remove default "None" from sensor

* Switch to cv.matches_regex
2019-08-17 21:19:44 -07:00
Jay
6907e8e9dc Upgrade Dialogflow to work with V2 API (#25975)
* Handle v1 and v2 dialog api requests

* Stylistic changes
2019-08-17 21:19:13 -07:00
Jonathan Keljo
65aa4148a4 Upgrade sisyphus-control to 2.2.1 (#26033)
This picks up a bugfix for a crash on shutdown, so that the `sisyphus`
component can now shut down cleanly.
2019-08-17 21:16:13 -07:00
Ville Skyttä
4bcee4f7ce Run flake8 on pre-commit (#26028) 2019-08-17 21:15:55 -07:00
Jc2k
2bd832cd7a Skip homekit_controller polls when system is overloaded and still trying to process the previous one (#25968)
* Skip async_update if there are signs of backpressure

* Black

* Only warn once

* Log on recovery

* Formatting fix
2019-08-17 21:14:46 -07:00
Jonathan Keljo
8da1879599 Fix background crash in sisyphus integration (#26032)
I think I was thinking in another language, since this was not valid Python. Result was that the thread that maintained the SocketIO connection to the table would die early on, so no status updates were actually flowing from the table.
2019-08-17 21:32:01 -05:00
Fabian Affolter
88ff25b509 Update hole to 0.5.0 (#26022) 2019-08-17 21:28:46 -05:00
Ville Skyttä
fed789c770 Upgrade pre-commit to 1.18.2 (#26029)
https://github.com/pre-commit/pre-commit/blob/v1.18.2/CHANGELOG.md
2019-08-17 16:47:55 -06:00
Dima Zavin
6bf35232b9 Don't force a query to the main lutron repeater on update (#25939)
We only want to force a query if we don't have any previous state.
Otherwise, we should be tracking the state via continuous status
updates.

For lights (not switches) the extra query was also superfluous since
it was already querying on startup.

We should probably have a timeout on that so at some point we'll
requery in case remote end disconnected/rebooted, etc. Leaving for
another PR.
2019-08-17 23:50:15 +02:00
Ville Skyttä
9dff2e188b Tone down huawei_lte logging (#26020)
* Tone down huawei_lte logging

Refs https://github.com/home-assistant/home-assistant/pull/23809

* Fix import order
2019-08-17 21:50:41 +03:00
Oncleben31
ca74a23cf1 Fix unnecessary db entries for metro_france (#25957)
* fix #25911 avoid db unecessary entries

* use UTC timestamp for forecast

* simplify forecast timestamp
2019-08-17 11:47:28 +02:00
Fabian Affolter
c55241960c Upgrade voluptuous-serialize to 2.2.0 (#26008) 2019-08-17 11:40:50 +03:00
Paulus Schoutsen
eba6caf8a1 Entity registry api update disable (#26015)
* Clean up entity registry WS commands

* Allow updating disabled_by in entity registry

* Allow changing disabled_by via API

* Update tests/components/config/test_entity_registry.py

Co-Authored-By: Robert Svensson <Kane610@users.noreply.github.com>
2019-08-16 16:22:45 -07:00
Matthias Alphart
d4046cb6e4 Update KNX services.yaml (#26014)
Fixes wrong (outdated?) services.yaml for knx integration.
2019-08-17 01:22:12 +02:00
Paulus Schoutsen
8b66c11706 Fix config entry has options check (#25976)
* Fix config entry has options check

* Register webhook/discovery config flows with classes

* Fix types

* Apply suggestions from code review

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
2019-08-16 16:19:19 -07:00
Paulus Schoutsen
57ef721d5d Hue tweak registered device type + discovery exception (#25977)
* Include location name in create user

* Guard against no host in context

* Fix tests and typing
2019-08-16 16:19:00 -07:00
Paulus Schoutsen
6c292846be Allow entities to indicate they should be disabled by default (#26011) 2019-08-16 16:17:16 -07:00
Fabian Affolter
b5893a8a6e Upgrade beautifulsoup4 to 4.8.0 (#26006) 2019-08-16 16:16:46 -07:00
Fabian Affolter
2fdbb3b4df Upgrade pysnmp to 4.4.11 (#26010) 2019-08-16 16:16:04 -07:00
Fabian Affolter
b5061939c7 Upgrade luftdaten to 0.6.3 (#26009) 2019-08-16 16:15:44 -07:00
OliverRepo
9e5243929e Fix bmw_connected_drive and eq3btsmart components by updating their dependencies (#26012)
* Fix bmw_connected_drive by upgrading bimmer_connected module depencies

* Fix broken eq3btsmart by upgrading python-eq3bt module dependcies

* Run Development Checklist
2019-08-16 14:47:21 -07:00
Fabian Affolter
e21a677239 Upgrade pillow to 6.1.0 (#26005) 2019-08-16 13:49:28 -07:00
Fabian Affolter
b43ef6c0cf Upgrade pyyaml to 5.1.2 (#25994) 2019-08-16 13:48:44 -07:00
Fabian Affolter
2a2f7626de Upgrade voluptuous to 0.11.7 (#26007) 2019-08-16 21:31:28 +02:00
Robert Svensson
5ca6c990cf UniFi - add ap_mac to attributes (#26004) 2019-08-16 20:29:38 +02:00
Fabian Affolter
1be6a7b7ee Upgrade importlib-metadata to 0.19 (#26003) 2019-08-16 11:02:24 -07:00
Fabian Affolter
4c16531df5 Upgrade python-slugify to 3.0.3 (#25995) 2019-08-16 19:28:52 +03:00
Fabian Affolter
87f1a8ed0c Upgrade numpy to 1.17.0 (#25998) 2019-08-16 08:36:57 -07:00
Erik Montnemery
fad54cd6d8 Ensure sun conditions are using the right date (#23664)
* Ensure sun conditions are using the right date
2019-08-16 17:34:56 +02:00
Paulus Schoutsen
ce35f64d59 Guard against unavailable climate entities (#25978) 2019-08-16 16:17:43 +02:00
Fabian Affolter
715bb286c4 Upgrade shodan to 1.15.0 (#25990) 2019-08-16 16:17:02 +02:00
Fabian Affolter
74b6b8a9f6 Upgrade restrictedpython to 4.0 (#25993) 2019-08-16 16:16:42 +02:00
Fabian Affolter
3307b4421e Upgrade sqlalchemy to 1.3.7 (#25997) 2019-08-16 16:15:58 +02:00
Fabian Affolter
7fbdbb773c Upgrade pytz to >=2019.02 (#25991) 2019-08-16 16:15:12 +02:00
Fabian Affolter
1f28d8e742 Upgrade Mastodon.py to 1.4.6 (#25989) 2019-08-16 16:14:32 +02:00
Fabian Affolter
9b0e1a6620 Upgrade youtube_dl to 2019.08.13 (#25987) 2019-08-16 16:13:40 +02:00
Kareem Straker
8c419d7228 Update pyvera to 0.3.4 (#25986) 2019-08-16 16:13:02 +02:00
Paulus Schoutsen
23f26712f0 Fix ecobee preset and add climate mode back (#25970)
* Fix ecobee preset and add climate mode back

* Fix test
2019-08-16 10:29:25 +03:00
zhumuht
90d493a51a Add broadlink switch retry time option (#25873)
* add broadlink switch retry time in configuration

* add broadlink switch retry time in configuration

* formatted code by black tool

* Change retry default value to 2 to keep the current behavior
2019-08-16 10:26:11 +03:00
Anders Melchiorsen
26c99454a6 Add netgear_lte.disconnect_lte service (#25967) 2019-08-15 15:59:08 -07:00
Abílio Costa
a64dccc80b edp_redy: remove component (#25971)
The service has moved to a new portal and the previous API does not work
anymore.
2019-08-15 15:53:12 -07:00
Keith Pine
1bfe752dfa Remove zwave.update_config service call (#25959)
The python-openzwave API which provides the implementation of the config update
does not actually work in the homeassistant fork. To avoid confusion, remove
the service call for now.
2019-08-15 14:22:13 -07:00
Paulus Schoutsen
8a1ab8c0b5 Tweaks to options flow (#25969) 2019-08-15 14:11:55 -07:00
Paulus Schoutsen
9b3aa9bbd1 Remove uvloop from default install and warn about stream+shell_command (#25929)
* Add warning about uvloop and shell_command

* Remove uvloop from docker files"

* Add ffmpeg
2019-08-15 14:11:39 -07:00
Paulus Schoutsen
6d1d95394c Updated frontend to 20190815.0 2019-08-15 14:04:17 -07:00
Paulus Schoutsen
df3fbc5715 Update translations 2019-08-15 14:04:03 -07:00
Ville Skyttä
aa508b5106 Complete some incomplete type hints in helpers (#25953) 2019-08-15 08:53:25 -07:00
Alex Fung
3525728abc Fix Tile Errors (#25866)
* Fix Tile Errors

* Black formatting
2019-08-15 06:52:38 -06:00
zewelor
53ad33e84a Add volumio shuffle support (#25871)
* Add volumio shuffle support

* Black reformat

* Update homeassistant/components/volumio/media_player.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
2019-08-15 07:41:54 -04:00
Andrew Chatham
944ac4f3c2 Expose Lutron RA2 occupancy sensors (#25854)
* Expose Lutron RA2 motion sensors

* Remove unused _LOGGER

* Remove unused logging import
2019-08-15 07:40:39 -04:00
Aaron Bach
b8bd97b3fa Bump aioambient to 0.3.2 (#25956) 2019-08-15 03:56:53 +02:00
Aaron Bach
a71e8851ae Bump simplisafe-python to 4.3.0 (#25955) 2019-08-14 18:03:11 -06:00
Anders Melchiorsen
cbcf49a3ba Improve Sonos error handling on slow networks (#25902) 2019-08-14 09:17:58 -07:00
Phil Bruckner
bd8461b899 Handle more Life360 errors in config flow & bump package to 4.1.1 (#25930) 2019-08-14 09:15:37 -07:00
Jc2k
002f74c76b Update homekit_controller import style (#25940) 2019-08-14 09:14:15 -07:00
Ville Skyttä
d8e2518e0d Use canonical pre-commit black URL (#25948) 2019-08-14 09:13:24 -07:00
Jeff Irion
3b8668b2df Bump androidtv to 0.0.23 (#25950)
* Bump androidtv to 0.0.23

* Bump androidtv to 0.0.23

* Add missing space in logging statement
2019-08-14 09:12:32 -07:00
Twan Coenraad
76b781829e Add OTGW domestic hot water enable option as service (#25849) 2019-08-14 15:35:05 +02:00
Malte Franken
45bbd080f1 Bump version of library aio_geojson_geonetnz_quakes to v0.9 (#25946) 2019-08-14 15:32:18 +02:00
Niels Mündler
dc62671575 Update syncthru library to fix issue (#25924) 2019-08-13 12:09:07 -07:00
Diogo Gomes
1f2bab8e67 Fix Filter Sensor - check existing entity history (#25870)
* make sure we have entity history

* increase coverage

* increase coverage

* no need for list comprehension

* increase coverage
2019-08-13 11:07:05 -07:00
Teemu R
e0ea5f2b04 eq3bt: handle zero (closed valve) as a valid mode. fixes #25333 (#25905) 2019-08-13 10:25:27 +02:00
Jc2k
34cde21876 Fix for HomeKit controller state not updating after put (#25903) 2019-08-13 10:09:55 +02:00
Alexei Chetroi
61b687edec Bump ZHA dependencies. (#25898) 2019-08-12 18:34:16 -04:00
Paulus Schoutsen
172bbf806d Add reproduce state support to input_boolean (#25858)
* Add reproduce state support to input_boolean

* Catch unknown state
2019-08-12 16:45:04 +02:00
Paulus Schoutsen
6f357cb23e First pass fixing tests that raise exceptions caught by asyncio.gather (#25860)
* First pass fixing tests that raise exceptions caught by asyncio.gather

* Fix demo test

* lint
2019-08-12 16:42:12 +02:00
Pascal Vizeli
76f2e6015f Update devcontainer.json 2019-08-12 11:15:39 +02:00
Paulus Schoutsen
c58f3a4b4a Merge pull request #25884 from home-assistant/rc
0.97.2
2019-08-11 21:58:28 -07:00
Paulus Schoutsen
b38c40fb98 Updated frontend to 20190811.0 2019-08-11 21:17:32 -07:00
ejaviga
5f0334d208 Tado AIR_CONDITIONING module was not working propertly (#25677)
* Tado AIR_CONDITIONING module was not working propertly

AIR_CONDITIONING modules differs from HEATING module int he parameters.

* Tado Cooling Sensor was not read proprtly

* TADO correct file permissions

* Tado: Fix compilation error

* Fix Lint errors

* Fix Black formatting

* TADO More AC functionality

Also Black formatting

* Tado Fix Lint

* Tado Fix Lint II
2019-08-11 21:02:16 -07:00
Paulus Schoutsen
38c67389b2 Bumped version to 0.97.2 2019-08-11 20:49:31 -07:00
Pascal Vizeli
38412fd880 Fix issue with nuki new available state (#25881) 2019-08-11 20:49:22 -07:00
Robert Svensson
f03538f866 UniFi - Use state to know if device is online (#25876) 2019-08-11 20:49:21 -07:00
Andrew Sayre
a061310e78 Always populate hvac_modes in SmartThings climate platform (#25859)
* Always return list for hvac_modes

* Use climate constants
2019-08-11 20:49:20 -07:00
tombbo
0c815ea843 Fix KNX Climate mode change callback (#25851)
- fix KNX Climate not updating UI after receiving mode change telegram
  from KNX bus
2019-08-11 20:49:20 -07:00
cgtobi
9afb6c3876 Fix Netatmo climate issue (#25830)
* Bump pyatmo to v2.2.1

* Fix issue 25778
2019-08-11 20:49:19 -07:00
Brandon Davidson
0eb93db67e Update pyvera to 0.3.3 (#25820)
Fixes #24987
2019-08-11 20:49:18 -07:00
Cameron Morris
48e42d8595 Fix eco preset for Wink Air Conditioner (#25763)
* Add preset support for device
* Provide mappings between preset changes
2019-08-11 20:49:18 -07:00
Pascal Vizeli
af70b6da20 Fix issue with nuki new available state (#25881) 2019-08-11 20:48:56 -07:00
Paulus Schoutsen
87119472a3 Update translations 2019-08-11 20:42:50 -07:00
Quentame
ec2ce31204 Fix script/translations_develop launch + clean some unused error i18n (#25459)
* Fix : script/translations_develop launch + clean some unused error i18n

* Respecting strings.json order property

title
step
error
abort

* Review from @fredrike : remove Telldus Live all_configured
2019-08-11 20:40:18 -07:00
Ville Skyttä
b738082dad Type check various base components (#25878)
* Type check various component base classes, disabling bunch of checks for now

* Type hint fixes

* Help mypy out some

* Add more type hints
2019-08-11 20:38:18 -07:00
Paulus Schoutsen
cf90e49b50 Make reproduce state use platform instead of rely on function (#25856)
* Make reproduce state use platform instead of rely on function

* Fix types

* address comment Martin.
2019-08-11 20:03:21 -07:00
Robert Svensson
ab7db5fbd0 UniFi - Use state to know if device is online (#25876) 2019-08-11 22:40:44 +02:00
Andrew Sayre
b8460bb331 Always populate hvac_modes in SmartThings climate platform (#25859)
* Always return list for hvac_modes

* Use climate constants
2019-08-11 06:47:36 +02:00
Johann Kellerman
8b9d0593b1 Allow components with empty list config (i.e. person) in packages (#25827)
* Fix #23424

* mypy Lists
2019-08-10 16:30:33 -07:00
Antonio Pérez
ce0edf8360 Fix configuration field name (#25840) 2019-08-10 15:01:19 -07:00
Oncleben31
3648db7214 Add pip-wheel-metadata in .gitignore (#25832)
When developing in a container with VSC, the folder `pip-wheel-metadata` is created during the container building process.
2019-08-10 14:55:58 -07:00
MatsNl
a6f1773492 Update sensor.py (#25825)
exclude "unknown" values from measurements
2019-08-10 14:45:47 -07:00
Jeff Irion
68ee828674 Move Kodi services from 'media_player' domain to 'kodi' (#25753)
* Create const.py

* Register services to 'kodi' domain, not 'media_player'

* Add const.py to .coveragerc

* 'DATA_KODI' -> 'DOMAIN'

* Move the Kodi services descriptions to the Kodi component

* Register Kodi services in __init__.py

* Finish registering Kodi services in __init__.py

* Remove logging statement intended only for testing

* Combine homeassistant.const imports

* Add __init__.py to .coveragerc
2019-08-10 14:31:04 -07:00
Jeff Irion
ff92307d65 Bump androidtv to 0.0.22 (#25848) 2019-08-10 15:25:03 -05:00
tombbo
9041201c76 Fix KNX Climate mode change callback (#25851)
- fix KNX Climate not updating UI after receiving mode change telegram
  from KNX bus
2019-08-10 15:24:03 -05:00
Thomas Lovén
e7e083c547 Websocket call for rendering jinja2 templates subscription (#25614)
* Websocket call for rendering jinja2 templates

* Address review comments

* Address review comments

* Allow MATCH_ALL, but ignore it.

* Always register unsub method.
2019-08-10 12:46:49 -07:00
cgtobi
d89e8ead61 Fix Netatmo climate issue (#25830)
* Bump pyatmo to v2.2.1

* Fix issue 25778
2019-08-10 15:49:29 +02:00
Per Osbäck
e9705af055 Prometheus metrics naming based on device_class and unit_of_measurement (#24103)
* - Change how we extract the metrics for sensors
- Add component filtering as seen in influxdb
- Add metric override as seen in influxdb
- Add more unit tests with actual device data

* Extract sensor metric logic to separate handlers

* Update prometheus dependency

* Format using black

* Format using black

* Fix flake8

* Move sensor metric handler list to init

* Use f strings instead of .format
2019-08-10 14:35:04 +02:00
Robert Dunmire III
2e4905981e Fix device re-connect when API connection lost (#25842) 2019-08-10 13:53:20 +02:00
Malte Franken
9e6732e530 GeoNet NZ Quakes feed integration (#25736)
* initial working version

* support configured unit system and convert distance automatically

* properly unloading integration when removed and stopping refreshes

* ran isort

* fixed pylint

* introduced time filter of seven days into past

* adding unit tests

* fixed lint

* removed unused code

* added test case

* added test case for config flow

* fixed lint

* fixed comment

* removed unused test code

* increased test coverage

* fixed filtering by time

* changed wording in config flow

* reformatted with black

* removed unused logger

* fixed black

* changed default mmi

* reduced the options in the config flow form; fixed a few schema options and processing of data

* moved unsubscribing signals

* fixed minimum magnitude and modified tests

* fixed radius in imperial unit system

* increased test coverage

* simplified code

* fixed lint

* changed string formatting; simplified code

* removed unused strings

* added translation
2019-08-10 12:50:27 +02:00
Pascal Vizeli
e685f077ae Update Dockerfile 2019-08-10 12:27:32 +02:00
Pascal Vizeli
12f4076f70 Update Dockerfile 2019-08-10 12:15:36 +02:00
Cameron Morris
f30e54f01e Fix eco preset for Wink Air Conditioner (#25763)
* Add preset support for device
* Provide mappings between preset changes
2019-08-09 17:05:05 -07:00
Tomi Lehto
b79f1336be Fix 64-bit modbus sensor register reads (#25672)
* Fix 64-bit modbus sensor register reads

When reading four 16-bit modbus registers as a sensor value,
slave output is stored first as 64-bit integer, but before returning
that value is converted to double precision floating point. This
causes rounding errors for integer values bigger than 2^53.

After this change floating point conversion is done only if user
has configured scaling or offset using floating points.

* Formatting

* Review fixes
2019-08-09 17:03:12 -07:00
David F. Mulcahey
fafd228418 Refactor ZHA device initialized logic (#25796)
* refactor device initialized
* better names and update tests
* clean up last seen logic
* logging consistency
2019-08-09 18:52:47 -04:00
escoand
dc5c1783dc Webhook for Traccar (#24762)
* add initial traccar webhook support

* remove unused import

* add tests but disabled atm

* remove translations

* add timestamp parameter

* use post for tests

* rename config_flow

* format using black

* format tests using black

* Use str instead of float

* fix most comments

* check id

* add two device test

* reformat

* fix failuers

* Update tests/components/traccar/test_init.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update tests/components/traccar/test_init.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update tests/components/traccar/test_init.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update tests/components/traccar/test_init.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* black
2019-08-10 00:14:03 +02:00
Thomas Lovén
60dfa38717 Add error handling to !include command in yaml (#25801)
* Catch errors if !include file is not found

* Address review comments

* Add line number to error message
2019-08-09 13:21:08 -07:00
Brandon Davidson
f58106c7b7 Update pyvera to 0.3.3 (#25820)
Fixes #24987
2019-08-09 13:20:26 -07:00
Paulus Schoutsen
7cbb818dc3 Merge pull request #25819 from home-assistant/rc
0.97.1
2019-08-09 13:17:39 -07:00
Santobert
77d984e980 Add script to install locale (#25791) 2019-08-09 13:17:12 -07:00
Santobert
a66814c772 Add script to install locale (#25791) 2019-08-09 21:08:35 +02:00
Andrew Sayre
e57ecc9d7d Fix brightness type (#25818) 2019-08-09 11:42:09 -07:00
Andrew Sayre
6909235d8a Fix brightness type (#25818) 2019-08-09 11:41:50 -07:00
Paulus Schoutsen
e1fee1bd45 Bumped version to 0.97.1 2019-08-09 11:17:31 -07:00
Nikolay Vasilchuk
20e279a7ac Fix deconz allow_clip_sensor and allow_deconz_groups options (#25811) 2019-08-09 11:17:24 -07:00
jjlawren
34b5083c27 Don't track unstable attributes (#25787) 2019-08-09 11:17:23 -07:00
Finbarr Brady
ebf8d5fc66 Update Cisco Mobility Express module version (#25770)
* Update manifest.json

* Update requirements_all.txt
2019-08-09 11:17:22 -07:00
Dustin Essington
e355012229 Update HIBP sensor to use API v3 and API Key (#25699)
* Update HIBP sensor to use API v3 and API Key

* ran black code formatter

* fixed stray , that was invalid in multiple json formatters
2019-08-09 11:17:21 -07:00
Tomi Lehto
5b516fc0cd Add arcus trigonometry functions to templates (#25510) 2019-08-09 11:16:47 -07:00
Dustin Essington
a0494e44eb Update HIBP sensor to use API v3 and API Key (#25699)
* Update HIBP sensor to use API v3 and API Key

* ran black code formatter

* fixed stray , that was invalid in multiple json formatters
2019-08-09 10:54:33 -07:00
Nikolay Vasilchuk
8b6ddc22a5 Fix deconz allow_clip_sensor and allow_deconz_groups options (#25811) 2019-08-09 19:31:58 +02:00
miroslawkrol
ecddeb2dd1 Fix Broadlink MP1 unavailable error (#25806) 2019-08-09 18:21:18 +03:00
Franck Nijhof
e47ed0e182 Deprecates linksys_ap integration (ADR-0004) (#25804) 2019-08-09 16:47:08 +02:00
Finbarr Brady
4349b8640e Update Cisco Mobility Express module version (#25770)
* Update manifest.json

* Update requirements_all.txt
2019-08-08 22:59:33 +02:00
jjlawren
8f2f770837 Don't track unstable attributes (#25787) 2019-08-08 14:43:53 -05:00
Robert Dunmire III
4bcef25486 Add Mikrotik hub and rework device tracker (#25664)
* Add const.py for Mikrotik hub

* Add Mikrotik hub component

* Rework device tracker to use hub

* Fix validation errors

* Fix line spacing

* Bump librouteros version to 2.3.0

* Bump librouteros version to 2.3.0

* Used black code formatter

* Fix validation errors

* Fix errors

* Fix errors

* Renamed MikrotikAPI to MikrotikClient

* Fix method

* Fix device_tracker and rename ssl to use_ssl

* Moved device tracker functions into device tracker

* Fix missing constants

* Fix device tracker host_name

* Fix errors

* Fix device tracker typo

* Adding device tracker attributes

* Change attributes order

* Change attributes order

* Add one more attribute

* Reformat black

* Exclude Mikrotik modules

* Remove async calls

* Remove unused import

* Adding scan interval to device tracker

* Fix errors and update code

* Fix error

* Fix missing period

* Update device tracker to use setup_scanner

* Fix hass.data HOSTS

* Fix errors

* Fix errors

* Fixes and updates

* Fixing and reworking

* Fixes

* Fix constant INFO

* get_hostname fix and return value
2019-08-08 13:58:13 +02:00
Pascal Vizeli
0fa1e3ac92 Update azure-pipelines-release.yml 2019-08-08 11:32:52 +02:00
Joakim Plate
d1b9ebc7b2 Integration requirement check refactor (#25626)
* Factor out code getting requirements for integration

* Have process requirements raise an exception

* One more lint fix

* Blackify

* Catch new exception

* Let RequirementsNotFound be a HomeAssistantError

* Correct another test

* Split catching of exceptions and avoid complete log
2019-08-07 15:35:50 -07:00
Santobert
c3455efc11 Updater component is always available and shows on/off depending on whether an update is available or not (#25418)
* Updater Component is always available and shows on/off wether an update is available

* Use == instead of is to compare strings

* Edit log message  when local version is newer

* One more commit to trigger CI

* Add binary sensor

* Remove ATTR

* Use dispatcher

* Use callback instead of async

* Make flake happy

* Fix callback

* discover binary sensor

* flake

* Fix discovery

* prepared tests, TODO

* Fix tests

* Test release notes

* Add one more test

* Add another test

* Add docstring

* Revert "Add another test"

This reverts commit 3f896a4e3b.

* Remove unused file

* Update docstrings

* mock time

* Test renaming entity

* Add test_rename_entity

* Improve test_rename_entity
2019-08-07 15:28:22 -07:00
Pascal Vizeli
1739f50b59 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-08-07 21:58:11 +02:00
Franck Nijhof
07499faa9c Deprecates srp_energy integration (ADR-0004) (#25754) 2019-08-07 21:41:44 +02:00
Paulus Schoutsen
dffdbda8e2 Merge pull request #25756 from home-assistant/rc
0.97.0
2019-08-07 11:23:42 -07:00
Paulus Schoutsen
a20c631410 Update requirements 2019-08-07 10:35:24 -07:00
Paulus Schoutsen
0f8f4f4b54 Bumped version to 0.97.0 2019-08-07 09:25:10 -07:00
Robert Svensson
609118d3ac Fix last seen not available on certain devices (#25735) 2019-08-07 09:23:24 -07:00
Paulus Schoutsen
52de2f4ffb Revert emulated hue changes (#25732) 2019-08-07 09:23:23 -07:00
David Bonnes
a1302a9dfb initial commit (#25731) 2019-08-07 09:23:23 -07:00
Tsvi Mostovicz
3a78250cad Bump hdate==0.9.0 (use pytz instead of dateutil) (#25726)
Use new hdate version of library which uses pytz for timezones.
dateutil expects /usr/share/timezone files, as these are not available
in the docker image and in HASSIO, the timezone offsets are broken.

This should fix
 - #23032
 - #18731
2019-08-07 09:23:22 -07:00
Franck Nijhof
84f464d089 Deprecates fedex integration (ADR-0004) (#25745) 2019-08-07 15:26:43 +02:00
Franck Nijhof
b696f9ce5e Deprecates ups integration (ADR-0004) (#25746) 2019-08-07 13:41:35 +02:00
Franck Nijhof
d3aac13065 Deprecates sytadin integration (ADR-0004) (#25742) 2019-08-07 13:40:47 +02:00
Franck Nijhof
2b6674b27f Deprecates usps integration (ADR-0004) (#25743) 2019-08-07 13:40:30 +02:00
Alexei Chetroi
c3c45f8198 Manufacturer specific channel for SmartThings. (#25739)
* Manufacturer specific channel for SmartThings.
* Lint.
2019-08-06 20:59:18 -04:00
Erik Montnemery
e0be4efe3e Add test case to identify missing MQTT configuration abbreviations (#25616)
* Add missing abbreviations

* Move abbreviations to own file, add script to find missing abbreviations

* Move check from script to test case

* Lint

* Rewrite to use pathlib

* Lint
2019-08-06 17:32:15 -07:00
eyager1
506350da11 Implement "Aux Heat" support for Zwave Climate (#25694)
* Remove "Aux Heat" from Zwave climate mappings

* Implement Aux Heat support for zwave climate

* Pylint fix.

* Pylint fix 2nd try
2019-08-06 17:24:17 -07:00
Alexei Chetroi
152a9eb466 Use more decorators for ZHA Core registries. (#25737)
* Move ZIGBEE_CHANNEL_REGISTRY to ZHA core registries.
* Refactor more ZHA Core registries to use decorator.
* Cleanup.
* Use relative imports for component.
* Flake8.
* Make pylint happy again.
2019-08-06 20:01:14 -04:00
Ross Dargan
98eb8efc6b Add ring light platform (#25733)
* Add support for turning a flood light on and off

* changes following black

* update following code review, and test fix

* fix naming
2019-08-06 14:55:54 -07:00
Robert Svensson
c76531a366 Fix last seen not available on certain devices (#25735) 2019-08-06 14:55:36 -07:00
Paulus Schoutsen
e24d3f15fd Revert emulated hue changes (#25732) 2019-08-06 13:46:07 -05:00
Tsvi Mostovicz
54d6acf87a Bump hdate==0.9.0 (use pytz instead of dateutil) (#25726)
Use new hdate version of library which uses pytz for timezones.
dateutil expects /usr/share/timezone files, as these are not available
in the docker image and in HASSIO, the timezone offsets are broken.

This should fix
 - #23032
 - #18731
2019-08-06 11:03:52 -05:00
David Bonnes
a76bb5e82c initial commit (#25731) 2019-08-06 11:03:08 -05:00
Paulus Schoutsen
d702b17a4f Bumped version to 0.97.0b3 2019-08-06 09:00:20 -07:00
Robert Svensson
27cfda11f7 UniFi - handle device not having a name (#25713)
* Handle device not having a name
2019-08-06 08:59:00 -07:00
Paulus Schoutsen
fee1568a85 Update HTTP defaults (#25702)
* Update HTTP defaults

* Fix tests
2019-08-06 08:58:59 -07:00
Paulus Schoutsen
eceef82ffa Add service to reload scenes from configuration.yaml (#25680)
* Allow reloading scenes

* Update requirements

* address comments

* fix typing

* fix tests

* Update homeassistant/components/homeassistant/scene.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Address comments
2019-08-06 08:57:54 -07:00
Jesse Rizzo
b011dd0b02 Bump envoy_reader to 0.8.6, fix missing dependency (#25679)
* Bump envoy_reader to 0.8.6, fix missing dependency

* Bump envoy_reader to 0.8.6, fix missing dependency
2019-08-06 08:56:22 -07:00
SukramJ
e1c23b1686 Add HmIP-SCI to Homematic IP Cloud, Fix HmIP-SWDM (#25639)
* Add HmIP-SCI to Homematic IP Cloud

* Bump upstream dependency

* Fix HmIP-SWDM
2019-08-06 08:56:21 -07:00
Paulus Schoutsen
778cd7da32 Updated frontend to 20190805.0 2019-08-06 08:54:28 -07:00
Ross Dargan
9e8df936ac Add ring switch platform (#25612)
* Add in a switch platform to ring.

* Changes following code review

* remove tests for now

* remove the request to call update

* support the new type of test

* update after running black

* fix comment

* fixes following code review

* Remove ring cache file

* patch out io code

* Move the patches to within a fixture

* missing period
2019-08-06 14:39:07 +02:00
Paulus Schoutsen
387323a8c1 Updated frontend to 20190805.0 2019-08-05 22:32:18 -07:00
Robert Svensson
7ff7c7b9f5 UniFi - handle device not having a name (#25713)
* Handle device not having a name
2019-08-06 07:00:06 +02:00
Sébastien RAMAGE
5b02555255 Add zigate support to zha (#25552)
* Add zigpy-zigate support
* update requirements
* fix
* update
* fix flake8
* update requirements
* fix
* update
* add test to make codecov happy
* fix flake8
* Try to add test
* add test
* remove unneeded test
* exclude registries.py from coverage
exclude homeassistant/components/zha/core/registries.py  since untestable

* Fix merge: black formatting and flake8.
2019-08-05 18:05:07 -04:00
Alexei Chetroi
8dbac9176e Refactor ZHA Zigbee channel registry. (#25716)
* Update test to catch regression.

* Refactor ZHA Core channels.

Use channel decorator for Zigbee channel registry.

* Update tests.

* Pylint
2019-08-05 15:40:29 -06:00
Jesse Rizzo
8241193fa8 Bump envoy_reader to 0.8.6, fix missing dependency (#25679)
* Bump envoy_reader to 0.8.6, fix missing dependency

* Bump envoy_reader to 0.8.6, fix missing dependency
2019-08-05 23:15:42 +02:00
Paulus Schoutsen
7a90808e52 Add service to reload scenes from configuration.yaml (#25680)
* Allow reloading scenes

* Update requirements

* address comments

* fix typing

* fix tests

* Update homeassistant/components/homeassistant/scene.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Address comments
2019-08-05 23:04:19 +02:00
Jeff Irion
0449132c35 Bump androidtv to 0.0.21; add 'state_detection_rules' config parameter (#25647)
* Bump androidtv to 0.0.19; add 'state_detection_rules' config parameter

* Bump androidtv to 0.0.20

* Add detailed config check for 'state_detection_rules'

* Linting

* Remove unused variable

* Bump androidtv to 0.0.21, move config validation into backend package

* dict() -> {}

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
2019-08-05 18:58:41 +02:00
David F. Mulcahey
b073d87e08 stagger device init to avoid flooding network (#25709) 2019-08-05 10:14:19 -04:00
David F. Mulcahey
20b54c22f7 don't mark devices unavailable without ping try (#25710) 2019-08-05 09:50:48 -04:00
David F. Mulcahey
ac5fcff1cd fix unique id in cluster channels (#25707) 2019-08-05 08:47:42 -04:00
jaminh
5e00b546eb Zwave Climate: Fan state attribute missing (#25287) (#25573)
Add fan state back in to device state attributes
Change fan state to fan action
2019-08-05 12:25:48 +02:00
Pascal Vizeli
cecfb2d657 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-08-05 08:54:44 +02:00
Paulus Schoutsen
57f84cbbaa Update HTTP defaults (#25702)
* Update HTTP defaults

* Fix tests
2019-08-05 08:24:54 +02:00
Paulus Schoutsen
6e61b21919 Bumped version to 0.97.0b2 2019-08-04 22:50:46 -07:00
Pascal Vizeli
868c6f4f71 Fix roku lxml requirement (#25696) 2019-08-04 22:49:03 -07:00
Robert Svensson
4e2094c893 UniFi - reverse connectivity logic (#25691)
* Make connectivity control in line with other implementations
2019-08-04 22:49:02 -07:00
Robert Svensson
2925f9e57a In some circumstances device.last_seen can be None (#25690) 2019-08-04 22:49:01 -07:00
Aaron Bach
f8753a0c92 Fix issue with incorrect Notion bridge IDs (#25683)
* Fix issue with incorrect Notion bridge IDs

* Less aggressive

* Member comments
2019-08-04 22:49:01 -07:00
Robert Svensson
7a71669027 Options to not track wired clients (#25669) 2019-08-04 22:49:00 -07:00
Anders Melchiorsen
476607787a Revert flux_led to 0.89 (#25653)
* Revert Black

* Revert "Introduce support for color temperature (#25503)"

This reverts commit e1d884a484.

* Revert "Fix flux_led only-white controllers (#22210)"

This reverts commit 48138189b3.

* Revert "Fix MagicHome LEDs with flux_led component (#20733)"

This reverts commit 1444a684e0.

* Re-Black

* Use mode detection for scanned bulbs
2019-08-04 22:48:59 -07:00
Paulus Schoutsen
d95c86e964 Add preset to be away and eco (#25643) 2019-08-04 22:48:58 -07:00
Robert Svensson
b40d324e0e UniFi - allow configuration to not track clients or devices (#25642)
* Allow configuration to not track clients or devices
2019-08-04 22:48:57 -07:00
SukramJ
e001b12430 Add PRESET_AWAY to HomematicIP Cloud climate (#25641)
* enable climate away_mode and home.refresh

* Add Party eco modes
2019-08-04 22:48:57 -07:00
Santobert
8d1deef9cc Feature zwave preset modes (#25537)
* Initial commit

* Add some more code

* Local tests passing

* Remove unnecessary line

* Add preset attributes to __init__

* Remove some more debugger lines

* Add some tests

* Fix comparision to None

* Improve test coverage

* Use unknown modes as presets

* Bugfixes and test improvements

* Add tests for unknown preset modes

* linting

* Improve mappings

* Move PRESET_MANUFACTURER_SPECIFIC to zwave

* Replace isinstance with cast

* Add test for hvac_action

* hvac_mode is never None

* Improved mapping of current mode to hvac/preset modes

* Fix bugs where hvac_mode is None

* Add default hvac mode

* Fixed default hvac mode

* Fix linting

* Make flake happy

* Another linting

* Make black happy

* Complete list of default hvac modes

* Add mapping to heat/cool eco

* Fixed another bug where mapping goes wrong
2019-08-04 22:48:56 -07:00
Paulus Schoutsen
949875ae50 Updated frontend to 20190804.0 2019-08-04 22:30:54 -07:00
Paulus Schoutsen
6b511789d6 Updated frontend to 20190804.0 2019-08-04 22:30:31 -07:00
ktnrg45
069c1863eb PS4 Merge async_setup_platform into async_setup_entry (#25689)
* Merge async_setup_platform into async_setup_entry

* Pass async_setup_platform

* blank line

* add test setup platform

* white space
2019-08-04 22:01:40 -06:00
Charles Garwood
0a87a4bfda Add usb_path to Z-Wave network_status websocket response (#25617)
* Add usb stick path to zwave network_status websocket response

* Move to separate websocket command

* Return additional config options

* add tests
2019-08-04 17:21:37 -06:00
Jeff Irion
70dfe42adb Make myself the codeowner for androidtv (#25697) 2019-08-05 01:03:37 +02:00
Alexei Chetroi
f7cfe908f7 Refactor ZHA Zigbee Cluster report configuration (#25589)
* Move ZCL report configs to ZHA core channels.

* Refactor ZCL report configuratopm and cluster binding.

* Tests for ZHA channel configuration.

* Update tests.

* Remove INPUT_BIND_ONLY_CLUSTER ZHA core registry.

We always need bind a cluster, but not always need to configure
attribute reporting. No reporting is done on ZCL "client" clusters.

* Lint

* Black
2019-08-04 18:20:03 -04:00
Pascal Vizeli
03aec33f9e Fix roku lxml requirement (#25696) 2019-08-05 00:13:27 +02:00
Aaron Bach
3839eb0197 Fix issue with incorrect Notion bridge IDs (#25683)
* Fix issue with incorrect Notion bridge IDs

* Less aggressive

* Member comments
2019-08-05 00:11:28 +02:00
David Bonnes
b0c79c271d Bump geniushub client, handle dead devices, handle raise_for_status (#25687)
* Initial commit

* tweak error logging

* bump client

* correct regression

* small coding tweak

* debug logging to one entry

* refactor for self.data['attr']

* bump client

* small tidy-up
2019-08-05 00:06:36 +02:00
Tom
0d95ad3857 Plugwise haanna 0.10.1 (#25693)
* Update module dependency (py3.6 fix)

* Update module dependency (py3.6 fix) - update requirements
2019-08-04 19:17:30 +02:00
Ville Skyttä
49a5dda7a8 Upgrade pydocstyle to 4.0.0, do not run in tox (#25667)
* Upgrade pydocstyle to 4.0.0 and flake8-docstrings to 1.3.1

http://www.pydocstyle.org/en/4.0.0/release_notes.html#july-6th-2019

* Address pydocstyle D413's

* tox: do not run pydocstyle

Does not seem to add any value over flake8-docstrings (and would have
needed a D202 exclusion).
2019-08-04 17:05:43 +02:00
Pascal Vizeli
c748d8c0bd Merge branch 'dev' of https://github.com/home-assistant/home-assistant into dev 2019-08-04 17:04:32 +02:00
Pascal Vizeli
739e8ffee8 Add schedules to yml 2019-08-04 17:04:29 +02:00
Robert Svensson
576291779e UniFi - reverse connectivity logic (#25691)
* Make connectivity control in line with other implementations
2019-08-04 16:57:36 +02:00
Robert Svensson
5a90b49e27 In some circumstances device.last_seen can be None (#25690) 2019-08-04 16:12:16 +02:00
Pascal Vizeli
f8bd9dbe3e Azure ci templates (#25688)
* Use templates for Azure-CI steps

* Migrate ci

* fix endpoint
2019-08-04 14:32:35 +02:00
SukramJ
73f5575708 Add PRESET_AWAY to HomematicIP Cloud climate (#25641)
* enable climate away_mode and home.refresh

* Add Party eco modes
2019-08-03 18:49:34 +02:00
Robert Svensson
93dfd613aa Options to not track wired clients (#25669) 2019-08-02 23:51:06 +02:00
Ville Skyttä
a54ade1189 Spelling fixes (#25666) 2019-08-02 23:20:06 +02:00
Anders Melchiorsen
2f7c57b257 Revert flux_led to 0.89 (#25653)
* Revert Black

* Revert "Introduce support for color temperature (#25503)"

This reverts commit e1d884a484.

* Revert "Fix flux_led only-white controllers (#22210)"

This reverts commit 48138189b3.

* Revert "Fix MagicHome LEDs with flux_led component (#20733)"

This reverts commit 1444a684e0.

* Re-Black

* Use mode detection for scanned bulbs
2019-08-02 17:00:22 +02:00
Ville Skyttä
a2f9a5287d Azure mypy related tweaks (#25663)
* Revert "Add some debugging to azure mypy job (#25632)"

This reverts commit 767b8e9f25.

No longer needed.

* Install setup.py dependencies for mypy in Azure

For better coverage, and to match what tox does.
2019-08-02 16:59:47 +02:00
Alexei Chetroi
0c561aec4f isort ZHA imports. (#25660) 2019-08-02 10:37:21 -04:00
johnnychicago
10adae4b3b Add ELECTRICITY_IMPORTED_TOTAL obis to dsmr (#25655) 2019-08-02 14:07:33 +02:00
Alexei Chetroi
77e4ff94fd ZHA code cleanup. (#25644)
* isort ZHA imports.

* Sort zha channel registry.

* Sort ZHA core registry.

* Sort ZHA core consts.
2019-08-02 06:05:23 -04:00
Robert Svensson
39257164a9 UniFi - allow configuration to not track clients or devices (#25642)
* Allow configuration to not track clients or devices
2019-08-02 10:13:00 +02:00
Santobert
944cd70753 Feature zwave preset modes (#25537)
* Initial commit

* Add some more code

* Local tests passing

* Remove unnecessary line

* Add preset attributes to __init__

* Remove some more debugger lines

* Add some tests

* Fix comparision to None

* Improve test coverage

* Use unknown modes as presets

* Bugfixes and test improvements

* Add tests for unknown preset modes

* linting

* Improve mappings

* Move PRESET_MANUFACTURER_SPECIFIC to zwave

* Replace isinstance with cast

* Add test for hvac_action

* hvac_mode is never None

* Improved mapping of current mode to hvac/preset modes

* Fix bugs where hvac_mode is None

* Add default hvac mode

* Fixed default hvac mode

* Fix linting

* Make flake happy

* Another linting

* Make black happy

* Complete list of default hvac modes

* Add mapping to heat/cool eco

* Fixed another bug where mapping goes wrong
2019-08-02 10:00:33 +02:00
Maikel Punie
7ee3dd137b Fix velbus codeowner (#25649) 2019-08-02 09:49:24 +02:00
SukramJ
8a57255796 Add HmIP-SCI to Homematic IP Cloud, Fix HmIP-SWDM (#25639)
* Add HmIP-SCI to Homematic IP Cloud

* Bump upstream dependency

* Fix HmIP-SWDM
2019-08-01 18:43:08 -05:00
Paulus Schoutsen
b5e296238f Add preset to be away and eco (#25643) 2019-08-01 18:32:43 -05:00
Paulus Schoutsen
ad341e2152 Bumped version to 0.97.0b1 2019-08-01 13:36:24 -07:00
Paulus Schoutsen
d64730a3cf Updated frontend to 20190801.0 2019-08-01 13:35:20 -07:00
Paulus Schoutsen
a8c4fc33f6 Upgrade hass-nabucasa to 0.16 (#25636) 2019-08-01 13:35:13 -07:00
Paulus Schoutsen
476a727df3 Filter out empty results in history API (#25633) 2019-08-01 13:35:12 -07:00
Jc2k
1d5709f49f Bump homekit_python to 0.15 (#25631) 2019-08-01 13:35:11 -07:00
Oncleben31
725d5c636e Meteofrance improve log error messages (#25630)
* Improve log error messages

* remove unique_id not ready yet
2019-08-01 13:35:11 -07:00
Jc2k
414b85c253 Fix polling HomeKit devices with multiple services per accessory (#25629) 2019-08-01 13:35:10 -07:00
Robert Svensson
56ca0edaa7 Handle disabled devices (#25625) 2019-08-01 13:35:09 -07:00
David F. Mulcahey
7168dd6cec bump quirks (#25618) 2019-08-01 13:35:08 -07:00
Martin Eberhardt
d3f6c43bbd Fix handling of empty results from Rejseplanen (#25610)
* Improve handling of empty results from Rejseplanen (Fixes #25566)

* Exclude attributes with null value

* Add period back into docstring

* Fix formatting
2019-08-01 13:35:08 -07:00
Paulus Schoutsen
59b42b4236 Expose comfort presets as HA presets (#25491)
* Expose comfort presets as HA presets

* Fix bugs

* Handle unavailable

* log level debug on update

* Lint
2019-08-01 13:35:07 -07:00
Paulus Schoutsen
f4fce8fcc3 Updated frontend to 20190801.0 2019-08-01 13:34:28 -07:00
Tom
9f3e388b04 Add Plugwise component (#25533)
* Added Plugwise component

* pylint fixes

* Additional pylints (local tox not noticing these)

* Changes according to review

* CI flake8 correction

* Applying Black

* Review changes, without exception and schema

* Review changes, exception improvement

* Review changes, exception correctio and schema cleanup

* Further cleaning as per review

* Removed blank line

* Add debugging to API init

* Add debugging to API init without dot
2019-08-01 22:22:57 +02:00
Niels Mündler
87bc2134ad Add each fronius sensor as own template (#25608)
* Fix formatting in history test

* Add each sensor as own template

* Make adapters non-entities

* Externalize and organize data fetching, improve system view

* Small fixes

Rename fetching adapters to adapters
throw away non-working system overviews
slightly change naming
remove scan_interval from schema
formatting

* Scan interval is already timedelta and unnecessary return

* Formatting

* Ensure better codestyle by storing cell variables explicitely in different places
2019-08-01 22:18:52 +02:00
Paulus Schoutsen
35400b0db1 Upgrade hass-nabucasa to 0.16 (#25636) 2019-08-01 13:03:45 -07:00
Martin Eberhardt
c3cdd3e7d2 Fix handling of empty results from Rejseplanen (#25610)
* Improve handling of empty results from Rejseplanen (Fixes #25566)

* Exclude attributes with null value

* Add period back into docstring

* Fix formatting
2019-08-01 22:02:11 +02:00
Oncleben31
f7a47c6cab Meteofrance improve log error messages (#25630)
* Improve log error messages

* remove unique_id not ready yet
2019-08-01 12:45:16 -07:00
Jc2k
a177ef02e3 Bump homekit_python to 0.15 (#25631) 2019-08-01 12:44:30 -07:00
Ville Skyttä
767b8e9f25 Add some debugging to azure mypy job (#25632) 2019-08-01 12:44:02 -07:00
Paulus Schoutsen
a398b39e12 Expose comfort presets as HA presets (#25491)
* Expose comfort presets as HA presets

* Fix bugs

* Handle unavailable

* log level debug on update

* Lint
2019-08-01 12:32:48 -07:00
Paulus Schoutsen
3649a1b5e9 Filter out empty results in history API (#25633) 2019-08-01 11:52:57 -07:00
Ville Skyttä
c2556d90ea Huawei LTE sensor unique id improvements (#25609)
* Convert sensor setup to async

* Improve sensor unique ids

* Save some indent levels, use f-string formatting

* Require getmac in tests

* Fix RouterData init in tests

* Make discovery_info optional in async_setup_platform signature
2019-08-01 19:22:04 +03:00
Jc2k
36129af447 Fix polling HomeKit devices with multiple services per accessory (#25629) 2019-08-01 16:35:19 +01:00
Ville Skyttä
6b22dbcd0b Blacken top level *.py (#25621)
* Blacken top level *.py

* Tolerate double quotes too in setup.py dependency extraction
2019-08-01 08:30:49 -07:00
Robert Svensson
ceac35797e Handle disabled devices (#25625) 2019-08-01 17:22:08 +02:00
Joakim Plate
84abb57ebc Fix test_install_existing_package (#25627)
homeassistant.util.package.install_package is not
a corutine.
2019-08-01 09:37:37 -05:00
tleegaard
61c6838fa2 Add support for HomeKit CO2 sensors (#25603) 2019-08-01 11:24:46 +01:00
Pascal Vizeli
b97bef3ac8 Remove liner for editor. Not need with black 2019-08-01 11:41:29 +02:00
Ville Skyttä
f9b1a52259 Move mypy settings to setup.cfg (#25611) 2019-08-01 07:53:53 +02:00
Ville Skyttä
cfd600d72e script/test: fix tox env (#25620) 2019-08-01 08:45:58 +03:00
David F. Mulcahey
3bd7b15b3d bump quirks (#25618) 2019-07-31 21:33:12 -06:00
Paulus Schoutsen
78a0e21557 Version bump to 0.98.0.dev0 2019-07-31 16:22:05 -07:00
Paulus Schoutsen
207cf18a46 Bump version to 0.97.0b0 2019-07-31 16:19:46 -07:00
Paulus Schoutsen
5961fbb710 Merge remote-tracking branch 'origin/master' into dev 2019-07-31 16:17:17 -07:00
Paulus Schoutsen
37d78af42c Add translations 2019-07-31 16:16:40 -07:00
Paulus Schoutsen
05ecc5a135 Merge pull request #25584 from home-assistant/black
Black
2019-07-31 15:36:42 -07:00
Paulus Schoutsen
dcdbd08d23 Add constraints to key files 2019-07-31 14:49:38 -07:00
Paulus Schoutsen
11a4d36c69 Confirm deletion 2019-07-31 14:49:00 -07:00
Paulus Schoutsen
a4920d3afb Uninstall typing 2019-07-31 14:02:12 -07:00
Paulus Schoutsen
6b2d40327c Make sure typing matches stdlib 2019-07-31 13:46:57 -07:00
Paulus Schoutsen
620cb74050 Type 2019-07-31 13:08:31 -07:00
Paulus Schoutsen
93c0db2328 Lint 2019-07-31 12:53:07 -07:00
Paulus Schoutsen
0ccffc3e55 Lint 2019-07-31 12:46:17 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen
da05dfe708 Add Black 2019-07-31 12:23:23 -07:00
Ville Skyttä
0490167a12 Azure flake8 dep, docstring fixes (#25605)
* Fix Azure CI flake8 deps

* Docstyle fixes
2019-07-31 12:21:36 -07:00
Ville Skyttä
3cf8964c06 Python < 3.6 remainder cleanups (#25607) 2019-07-31 12:21:15 -07:00
Thomas Lovén
671cb0d092 Return history for entities in the order they were requested (#25560)
* Return history for entities in the order they were requested

* Fix problems. Add tests

* Update __init__.py
2019-07-31 11:59:25 -07:00
Paulus Schoutsen
fcdd66b33b Bump frontend to 20190731.0 2019-07-31 11:22:48 -07:00
cgtobi
4bef2412d2 Netatmo climate refactor (#25457)
* Refactor climate component to use home id rather than name

* Bump pyatmo version

* Add new exception

* Update pyatmo version
2019-07-31 11:13:12 -07:00
Daniyar Yeralin
e1d884a484 Introduce support for color temperature (#25503)
* Introduce support for color temperature

* Fix linter errors

* Remove extra whitespace for pylint
2019-07-31 11:10:52 -07:00
Ross Dargan
5e7465a261 Change how ring polls for changes to allow more platforms to be added (#25534)
* Add in a switch to control lights and sirens

* Improve the way sensors are updated

* fixes following flake8

* remove light platform, and fix breaking test.

* Resolve issues with tests

* add tests for the switch platform

* fix up flake8 errors

* fix the long strings

* fix naming on private method.

* updates following p/r

* further fixes following pr

* removed import

* add additional tests to improve code coverage

* forgot to check this in
2019-07-31 11:08:40 -07:00
ChristianKuehnel
92991b53c4 remove myself from CODEOWNDERS (#25593)
* remove myself from CODEOWNDERS

Sorry, I do not have time right now to work on HomeAssistant, so I'm removing myself from the CODEOWNERS.

* Update manifest.json
2019-07-31 10:59:56 -07:00
Tobias Perschon
11ebd8546c implemented timout setting for telnet switch (#25602) 2019-07-31 10:59:12 -07:00
David Bonnes
16a98359c3 Fix bug and bump geniushub client (#25599)
Fix bug, delint and bump client
2019-07-31 18:44:09 +01:00
croghostrider
8ffc6c05b7 Fix wrong exposed light for emulated hue (#25581)
* Add auto detect if brightness is supported

* Fix

* Fix tests

* Cleanup
2019-07-31 10:34:37 -07:00
Aaron Bach
3a3f70ef21 Add migration notification for Ambient PWS (#25561)
* Add migration notification for Ambient PWS

* Remove unnecessary kwarg

Co-Authored-By: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>

* Automatically recreate config entry

* Delete entities and devices

* Move imports
2019-07-31 10:31:40 -07:00
Martin Eberhardt
90dc81c1b3 Improve and align Rejseplanen with other transport components (Breaking) (#25375)
* Improve and align Rejseplanen with other transport components (Breaking)

* Fix empty list check

* Remove pointless list cast

* Clean up redundant definition of transport types

* Add docstring

* Simplify _times check
2019-07-31 18:48:54 +02:00
Joakim Plate
3d11c45edd Log platform import errors and correct reqs for config check (#25425)
* Log failures to load plaforms

* Drop unused exception variable

* Also load pip requirements with check config

* Fix lint

* More lint

* Drop invalid parameters for error call
2019-07-31 09:09:00 -07:00
Pascal Vizeli
35c048fe6b Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-31 09:26:47 +02:00
Pascal Vizeli
1c0d847353 Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-31 09:19:45 +02:00
Pascal Vizeli
96e84692ef Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-31 09:00:50 +02:00
Tyler Page
2e05431642 Bump venstarcolortouch to 0.9 (#25585)
* Update manifest.json

* Update requirements_all.txt
2019-07-31 08:56:37 +02:00
michaeldavie
255332aca8 Bump env_canada to 0.0.20 (#25594) 2019-07-31 08:56:11 +02:00
Manuel Díez
42c50c5b5e Add support for Roku TVs to be powered on or off (#25590) 2019-07-31 06:01:51 +02:00
Jon Gilmore
1e8a4dd0bc Fix status of lutron switches/lights after HA reboot (#25592) 2019-07-31 05:48:43 +02:00
Tom Harris
ffe6ddeba7 Bump insteonplm to 0.16.5 (#25580) 2019-07-31 04:40:22 +02:00
Paulus Schoutsen
39b8102ce6 Bump Python support to min Python 3.6.0 (#25582)
* Bump Python support to min Python 3.6.0

* Fix type
2019-07-30 16:44:39 -07:00
Aaron Bach
fe1e761a7a Add last event data (including "changed_by") to SimpliSafe (#25569)
* Add "last event" sensor for SimpliSafe

* Functionality round 1

* Cleanup

* Whitespace

* Whitespace

* Updated requirements

* Removed unused constants

* Member comments
2019-07-30 17:23:42 -06:00
Paulus Schoutsen
0257fe0375 Fix Ecobee HVAC action + available presets (#25488)
* Fix Ecobee HVAC action + available presets

* Update python-ecobee-api to 0.0.21

* Include proper operation list.

* Allows pass on preset to set_climate_hold

* Remove aux heat as a preset

* Fix test
2019-07-30 15:25:03 -07:00
Quentame
f8bb0e1229 Fix : Velbus translation error (#25575) 2019-07-30 14:26:06 -07:00
Alexei Chetroi
5aa35b52cc ZHA log helper (#25543)
* Logging helper.
* Use log helper for ZHA entities.
* Use log helper for ZHA core device.
* Log helper for ZHA core channels.
* Lint
* ZHA fixture fix.
2019-07-30 15:19:24 -04:00
Ben Lebherz
2c144bc412 add cleaning state code for roborock s6 (#25500) 2019-07-30 13:34:05 -04:00
Orson
2d10e61c23 Updated Workday Binary Sensor to use Holidays 0.9.11 and added support for Aruba Holidays. (#25568)
* Updated Workday Binary Sensor to use Holidays 0.9.11 and added support for Aruba Holidays.

* updated requirements_all.txts
2019-07-30 12:58:23 +02:00
Maikel Punie
15ae970941 Make the velbus component more robust in handling errors (#25567)
* Add some try excepts for velbus as the python-velbus lib is not good in handling these

* Only catch velbusExceptions

* only wrap the lines that can cause the exception

* Fix indentation mixup
2019-07-30 12:56:40 +02:00
Jon Gilmore
67cae00caa pylutron PyPI update (#25557)
* pylutron PyPI update

We've been working with the original maintainer of pylutron, and they've published an update to PyPI to support a couple different things: homeowner keypads, main repeater keypads

* added requirements
2019-07-30 12:18:26 +02:00
Robert Svensson
35900964cb UniFi - Track devices (#25570) 2019-07-30 10:05:51 +02:00
Aaron Bach
71acc6d3f8 Transition SimpliSafe data retrieval to its own object (#25546)
* Transition SimpliSafe data retrieval to its own object

* Don't overwrite a variable

* Member comments

* Member comments
2019-07-29 15:52:30 -06:00
Robert Svensson
891f19b43f UniFi device tracker restore clients (#25532) 2019-07-29 23:13:04 +02:00
Tobias Perschon
3a91c8f285 updated telegram trusted IPs (#25564)
updated telegram trusted IPs (Source: https://core.telegram.org/bots/webhooks)
2019-07-29 14:51:05 -05:00
Andre Lengwenus
c4f673c894 LCN cover control via output ports (#25511)
* LCN motor control via oputput ports

* Remove default value from cover validator
2019-07-29 20:49:44 +02:00
Robert Svensson
dc722adbb5 UniFi POE control restore clients (#25558)
* Restore POE controls on restart
2019-07-29 19:48:38 +02:00
ktnrg45
2e300aec5a Add PS4 tests for media player (#25415)
* Add tests for media_player

* remove ps4/media_player.py

* Add unsubscribe method to unload

* Add_to_hass instead of add_to_manager

* Use hass.states for states

* Fix assertions

* fix tests

* Add schedule update

* Remove entity assertions
2019-07-29 09:38:17 -04:00
Josh Anderson
b87b29dff6 Quiet noisy tado query logging (#25529)
* Quiet noisy tado query logging

* Lint fix
2019-07-29 09:37:19 -04:00
Yaroslav
65a29e3371 Expose last_video_id as property for Ring camera (#25553) 2019-07-29 07:38:53 -05:00
Finbarr Brady
7e6d47d64a Update Cisco Mobility Express module version (#25422)
* Update requirements_all.txt

* Update manifest.json

* Bump to remove f-strings

* Bump to remove f-strings
2019-07-29 13:47:59 +02:00
Anders Melchiorsen
a90ec88e5c Update eternalegypt to 0.0.8 (#25551) 2019-07-29 11:34:58 +02:00
Ville Skyttä
cc74b22ce8 Ignore .dmypy.json (#25528) 2019-07-29 11:34:19 +02:00
Ville Skyttä
f379bb4016 huawei_lte: try unsupported data retrievals only once (#25524)
* huawei_lte: try unsupported data retrievals only once

Refs https://github.com/home-assistant/home-assistant/pull/23809

* Move huawei_lte_api imports to top level
2019-07-29 10:08:49 +02:00
Maikel Punie
1f9f201571 Enable velbus config entries (#25308)
* Initial work on config_flow

* Finish config flow

* Pylint checks, make sure the import only happens once

* Added support for unloading, small fixes

* Check in the hassfest output files

* Flake8 fixes

* pylint mistake after flake8 fixes

* Work on comments

* Abort the import if it is already imported

* More comments resolved

* Added testcases for velbus config flow

* Fix pylint and flake8

* Added connection test to the config flow

* More sugestions

* renamed the abort reason

* excluded all but the config_flow.py from the velbus component in coveragerc

* Rewrote testcases with a patched version of _test_connection

* Docstyle fixes

* Updated the velbus testcases

* just yield

* flake8 fixes
2019-07-29 09:21:26 +02:00
Daniel Høyer Iversen
03052802a4 Tibber, off peak values (#25320)
* Tibber, off peak values

* style

* style

* refactor

* style
2019-07-29 09:29:45 +03:00
michaeldavie
1aae84173a Bump env_canada to 0.0.19 (#25548)
* Bump env_canada to 0.0.19

* Update requirements_all.txt
2019-07-28 21:52:16 -05:00
William Scanlon
bc38d394d5 Make cool_on and heat_on method calls. They aren't properties in python-wink (#25549) 2019-07-28 19:47:32 -05:00
Cameron Morris
e225243bc5 Fix WinkAC mode API calls to correct methods (#25545) 2019-07-28 16:27:02 -05:00
Aaron Bach
7ceedd15b3 Fix bug with WWLLN update interval (#25498)
* Fix bug with WWLLN update interval

* Match the docs
2019-07-28 14:09:14 -06:00
MJJ
14c3b38461 Update to buienradar json api; and additional monitored_conditions (#24463)
* Update to json api; and additional sensors

* remove unneeded coordinate rounding

* minor optimizations

* Update CODEOWNERS

* Update sensor.py

unit conversion for:
- windgust (ms to km/h)
- windspeed (m/s to km/h)
- windspeed_1d (ms/km/h)
- visibility (m to km)

* Update weather.py

unit conversion for windspeed (m/s to km/h)

* Update sensor.py

* Update weather.py

* Update weather.py

* Update CODEOWNERS

* Update manifest.json

* Update CODEOWNERS

* Update CODEOWNERS

yet another try to get CODEOWNERS accepted...

* update codeowners

* update codeowners

* update

* updated codeowners to match manifest
2019-07-28 22:08:20 +02:00
Robert Svensson
c6c4c07f2d deCONZ - cleanup sensor attributes (#25540)
* Improve attributes
2019-07-28 21:01:52 +02:00
Anglac
a14c299a78 Roombalocate (#25508)
* Add Roomba Locate

* Update vacuum.py
2019-07-28 20:37:25 +02:00
Thomas Germain
4936e55979 Improve seventeentrack (#25454)
* Code improvement + tests

* review

* review + moving to pytest test function

* move test to async

* remove code comment
2019-07-28 19:55:46 +02:00
Robert Svensson
da53e0a836 deCONZ - Add power attribute for consumption sensors (#25512)
* Add power attribute for consumption sensors

* Bump dependency to v62
2019-07-28 18:25:38 +02:00
Pascal Vizeli
3672a5f881 Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-28 12:39:06 +02:00
manonstreet
0be0353eed Add last_run_success boolean attribute to Switchbot for error trapping (#25474)
* Add last_run_error boolean attribute to Switchbot entity to allow for trapping of errors

* Add last_run_success boolean attribute to Switchbot for error trapping

* Add last_run_success boolean attribute to Switchbot for error trapping
2019-07-27 16:13:48 +02:00
Oncleben31
4d7fd8ae17 Add container settings for YAML extension to avoid Hass specific custom tags errors (#25504)
* Add settings for YAML extension to avoid !secret tag errors

* add other HA custom tags.
2019-07-27 10:43:18 +02:00
Pascal Vizeli
1f09967abb Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-27 10:41:17 +02:00
gjbadros
7d68def303 Support multiple Elk instances (#23839)
* Support multiple Elk instances

* Allow more than one Elk M1 alarm system to be integrated into a single hass instance.

* Introduces new "devices" schema at the top level, each of which has
  the prior configuration schema.

* Requires new version of elkm1, 0.7.14, that gwww and I just updated (thanks Glen!)

QUESTION: Should the "devices" section be optional to avoid breaking
old configuration files?  I chose not to do that for simplicity and
because I was following the doorbird code which requires the "devices"
section for all configurations even with only one device.

* Fixed a bunch of hound-raised issues

Fixed issues raised by hound -- there was clearly
a tool I was supposed to run to get those warnings
before submitting the PR.  Sorry!

Updated REQUIREMENTS.

* Fixed whitespace and line-length mistakes

Also fixed unused prefix local variable lint warning.

* Fixed missing blank line

* Fixed more lint warnings.

Not sure if I missed these on the first pass or if the linter stopped
after a certain number of warnings or something else.

Switched logging to use %d and %s instead of string concatenation (per
lint request and because I imagine it migth be better performing
in some (oldish, I presume) implementations of python.

* Fixed typo in last commit.

* Eliminate devices subsection in config schema

This eliminates the breaking change for configurations wanting a
singleton elk m1 instance (the majority of users, no doubt).  I did
not do it like this before because I was following the lead of the
doorbird component which introduced a devices: section when moving
to support multiple doorbells.  But Rohan Kapoor kindly pointed me
at the zoneminder component which sets the other (IMO) preferable
precedent. Will update the docs change shortly.

* Call async_add_entities once for all the elk controllers.

Just move async_add_entities() outside of the loops across the elk m1
controllers, so it's called once for each platform.

* Call async_add_entities only once per platform.

Move it to after the loop, so it's called only once
per platform even when there are multiple elk m1 controllers.

* Various improvements to be more idiomatic python + bug fixes

Thanks to Martin Hjelmare for the careful review and suggestions.
(All mistaken improvements and new bugs are my own.)

* Removed semicolon that lint caught.

* Idiomatic python improvements

Use dict.values() (instead of making it easier to add local looping variable
on the keys by using _, bar = ...items())

Use [] when the key is known to exist.

* Support multiple Elk instances

* Allow more than one Elk M1 alarm system to be integrated into a single hass instance.

* Introduces new "devices" schema at the top level, each of which has
  the prior configuration schema.

* Requires new version of elkm1, 0.7.14, that gwww and I just updated (thanks Glen!)

QUESTION: Should the "devices" section be optional to avoid breaking
old configuration files?  I chose not to do that for simplicity and
because I was following the doorbird code which requires the "devices"
section for all configurations even with only one device.

* Fixed a bunch of hound-raised issues

Fixed issues raised by hound -- there was clearly
a tool I was supposed to run to get those warnings
before submitting the PR.  Sorry!

Updated REQUIREMENTS.

* Fixed whitespace and line-length mistakes

Also fixed unused prefix local variable lint warning.

* Fixed missing blank line

* Fixed more lint warnings.

Not sure if I missed these on the first pass or if the linter stopped
after a certain number of warnings or something else.

Switched logging to use %d and %s instead of string concatenation (per
lint request and because I imagine it migth be better performing
in some (oldish, I presume) implementations of python.

* Fixed typo in last commit.

* Eliminate devices subsection in config schema

This eliminates the breaking change for configurations wanting a
singleton elk m1 instance (the majority of users, no doubt).  I did
not do it like this before because I was following the lead of the
doorbird component which introduced a devices: section when moving
to support multiple doorbells.  But Rohan Kapoor kindly pointed me
at the zoneminder component which sets the other (IMO) preferable
precedent. Will update the docs change shortly.

* Call async_add_entities once for all the elk controllers.

Just move async_add_entities() outside of the loops across the elk m1
controllers, so it's called once for each platform.

* Call async_add_entities only once per platform.

Move it to after the loop, so it's called only once
per platform even when there are multiple elk m1 controllers.

* Various improvements to be more idiomatic python + bug fixes

Thanks to Martin Hjelmare for the careful review and suggestions.
(All mistaken improvements and new bugs are my own.)

* Removed semicolon that lint caught.

* Idiomatic python improvements

Use dict.values() (instead of making it easier to add local looping variable
on the keys by using _, bar = ...items())

Use [] when the key is known to exist.

* Use dict[key] instead of .get (incl. fixing typo). Use .values() instead of .items() when ignoring keys.

* Gotta use devices.get(prefix) since we use no prefix for the singleton elk instance

* fix requirement to use newer elkm1 that supports my changes for multiple elk devices

* Removed spurious + between a string broken between two lines for formatting; was failing a lint check about logging needing to use %s

* Remove REQUIREMENTS and DEPENDENCIES since those are now taken care of by the manifest.json file.

* Add configuration check that the prefixes are all unique

* Use new dependency 'getmac' to get mac address of Elk M1 controllers and use that for uniqueid if possible, else use None.  Also removed some procedural checking of unique prefix since that's now handled at schema check time.

* Whitespace changes to make style checker happy and code more consistent

* Removed unused variable, added blank line

* Make getmac a requirement not dependency

I should've RTFM.

* ws only change; I really need to get Emacs to understand these style guidelines

* Ran script/gen_requirements_all.py; script/setup needed to be run so that was failing.

* More style check fixes and one bug fix.

* Incomplete set of changes from last push

* More conform-to-hass-style changes: use caps to start log message (and do not use function name even for debug message. And do not use string concatenation; prefer new-style .format.

* Style fixes.

* Switch back to using the prefix config field for setting the unique_id since the mac address approach has numerous shortcomings including: 1) new dependency; 2) lack of reliability; 3) doesn't work for serial connections; 4) breaks when a layer 4+ networking entity intermediates the elk m1 connection.

* Reran to update (removing getmac dependency)

* Skipped trailing ','; keep forgetting which languages are forgiving about this practical nicety of allowing trailing commas without changing the semantics.

* Validate uniqueness on lowercase versions of the prefix since we're gonna use .lower() on creating the entity id that has to be unique; do the _has_all_unique_prefixes check last so we get errors from the device schema before complaining about the uniqueness problem, if any

* Use vol.Lower to convert to lowercase instead of the map.  Also fixed a pair of bugs for the alarm control panel display message service -- since data templates always generate strings, the values subject to range/set restrictions need to be coerced to their proper type before the check

* Fix some flake8 warnings.

* Fixed typo; it's Coerce not coerce.

* Use elkm1m_ string to start unique_id when and only when there is a non-empty prefix given; this enables backward compatibility to avoid a breaking change by letting the elkm1_ start to unique_id keep working exactly as it used to.

* minor comment tweak to force automation tests to run again since they failed for unrelated reasons last time

* There's actually been a 0.7.15 release which was meta-information and tidying only so we might as well depend on it

* Forgot to update this with gen_requirements_all.py
2019-07-27 10:36:09 +02:00
Paulus Schoutsen
9efb759a98 Fire lovelace updated event when update detected (#25507) 2019-07-26 20:30:51 -07:00
Charles Garwood
0a6d49b293 Improve handling of Z-Wave config entry vs yaml config (#25112)
* Improved handling of config entry vs yaml config

* Address review comment
2019-07-26 20:27:17 -07:00
Paulus Schoutsen
297cd3dc13 Fix deprecation warning in test (#25506) 2019-07-26 17:40:40 -07:00
Paulus Schoutsen
0df1bb5029 Fix python 3.5 test 2019-07-26 16:15:46 -07:00
Pascal Vizeli
1c3e5988db Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-26 20:16:29 +02:00
Pascal Vizeli
230ca9b89d Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-26 20:03:30 +02:00
Pascal Vizeli
3c7be11c31 Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-26 18:48:29 +02:00
Pascal Vizeli
668deeb7bd Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-26 17:54:20 +02:00
Pascal Vizeli
8c61808ce4 Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-26 17:03:58 +02:00
Pascal Vizeli
36f3940c85 Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-26 16:56:38 +02:00
Pascal Vizeli
fc36927468 [skip ci] Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-26 16:52:42 +02:00
Bram Goolaerts
0fc2813177 Add De Lijn (Flemish Public Transport) component (#24265)
* Initial commit of De Lijn (Flemish Public Transport) component

* Code corrections as per HA dev's requests

* changes to variable naming, setting attribution and states, plus some smaller optimizations

* Overlooked some linting issues, these are now fixed

* Updated pydelijn version requirement to 0.5.1 so UTC timestamps can be used instead of relative/local times.
Removed unused definition

* Updated pydelijn version requirement to 0.5.1 in requirements_all.txt

* Update the self._attributes dict directly instead of replacing it
Assign ATTRIBUTION while creating the _attributes dict
Remove the ATTRIBUTION assignment in device_state_attributes as it's updated in the async_update now.

* Linting issue (lenght of 2 lines) solved

* Removed a relative time attribute
Updated a linting issue in the LOGGER (used % instead of the format)
2019-07-26 16:41:02 +02:00
Robin Wohlers-Reichel
a17e28cc78 Update solax to 0.1.2 (#25497) 2019-07-26 16:24:04 +02:00
Pascal Vizeli
2c8c8009ff Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-26 16:20:59 +02:00
Pascal Vizeli
2087358d58 Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-26 16:10:22 +02:00
aschamberger
3512d05467 Add ord() to template filters (#25398)
* Add ord() to template filters

* Remove trailing whitespace

* add test
2019-07-25 15:06:51 -07:00
Paulus Schoutsen
4f8a93fb3e Merge pull request #25486 from home-assistant/rc
0.96.5
2019-07-25 10:51:55 -07:00
Paulus Schoutsen
47f3be1fe4 Bumped version to 0.96.5 2019-07-25 09:51:43 -07:00
Paulus Schoutsen
e79af97fdc Fix Nest turning off eco (#25472)
* Fix Nest turning off eco

* Add hvac action
2019-07-25 09:51:25 -07:00
Paulus Schoutsen
46b9e9cdfb Allow cors for static files (#25468) 2019-07-25 09:51:24 -07:00
David Bonnes
94f5b262be Bump geniushub client (#25458) 2019-07-25 09:51:23 -07:00
Robert Svensson
ea5d3ce85a Add a unique identifier to deCONZ groups (#25485)
* Add a unique identifier to deconz groups
2019-07-25 18:39:38 +02:00
Robert Svensson
b6934f0cd0 UniFi block clients (#25478)
* Allow blocking clients on UniFi networks
2019-07-25 16:56:56 +02:00
michaeldavie
59c62a261b Add scan interval to config of Environment Canada sensor (#25414)
* Make refresh period configurable

* Remove throttle, set SCAN_INTERVAL

* Move SCAN_INTERVAL to module
2019-07-25 13:56:33 +02:00
Paulus Schoutsen
fae3546910 Allow cors for static files (#25468) 2019-07-25 13:52:27 +02:00
Ville Skyttä
b230562c76 Mypy config cleanups (#25475)
* Move file specific config to inline comments

* Disallow untyped defs by default everywhere
2019-07-25 08:08:20 +02:00
Paulus Schoutsen
a50f1ae614 Fix Nest turning off eco (#25472)
* Fix Nest turning off eco

* Add hvac action
2019-07-24 21:53:51 -07:00
Ville Skyttä
e8e84fb764 Type check homeassistant.scripts (#25464)
* Run mypy on homeassistant.scripts, disabling bunch of checks for now

* Declare async_initialize in AuthProvider

* Add some type hints

* Remove unreachable code

* Help mypy out

* Script docstring fixes
2019-07-24 13:18:40 -07:00
Santobert
10b120f11f Fix bloomsky unit system (#25460)
* initial commit - fix bloomsky unit system

* Add another warning

* Fix linting error

* Include metric sensor units

* Shorten a too long line
2019-07-24 19:37:36 +02:00
Ville Skyttä
408af6e842 Install requirements_test.txt for flake8 in Azure CI (#25463)
Was missing specified versions, as well as flake8-docstrings altogether.
2019-07-24 08:36:52 -07:00
Ville Skyttä
cd0277c2c3 Lint fixes (#25462) 2019-07-24 08:26:41 -07:00
Aaron Bach
00a5a5f3c0 Add area support to group service schemas (#25410) 2019-07-24 09:40:34 -05:00
plafü
18ba2f986e Allow configuring sources for older Pioneer receivers (#25305)
* Allow configuring sources for older Pioneer receivers

* Replace config.get calls with dict[key] syntax
2019-07-24 09:13:12 -05:00
David Bonnes
b0e4260562 Bump geniushub client (#25458) 2019-07-24 08:39:34 -04:00
Fredrik Erlandsson
f799bbf2a7 Daikin simplification and code cleanup (#25416)
* fix preset documentation

* Use pydaikin set holiday method

* update temperature readings, code simplification

* more temperature cleanup

* cleanup HVAC_MODE

* remove get() method and move code to respectivly place

* remove string constant in code

* remove get() method and move code to respectivly place

* isort results

* fixes in state method
2019-07-24 13:48:08 +02:00
Aaron Bach
9e36448f03 Add area support to vacuum service schemas (#25443)
* Add area support to vacuum service schemas

* Fixed tests

* De-couple platform schemas
2019-07-24 08:29:08 +02:00
Aaron Bach
561bbecd25 Remove unnecessary REMOTE_SERVICE_SCHEMA (#25453) 2019-07-24 08:27:37 +02:00
Aaron Bach
df51c07a88 Add area support to timer service schemas (#25440)
* Add area support to timer service schemas

* Base

* Remove unnecessary TIMER_SERVICE_SCHEMA
2019-07-24 08:26:25 +02:00
Pascal Vizeli
fb9ca0d4da Update azure-pipelines-release.yml for Azure Pipelines 2019-07-24 08:19:16 +02:00
Ville Skyttä
f07c714c01 Huawei LTE misc improvements (#25377)
* Rename traffic_statistics to monitoring_traffic_statistics

For better consistency with huawei-lte-api.

* Add default device name for sensors

In case the actual device name cannot be accessed for some reason.

* Support device class in sensor metadata

* Mark known signal strength sensors as such
2019-07-24 07:24:22 +03:00
Paulus Schoutsen
8a2fdb5045 Merge pull request #25452 from home-assistant/rc
0.96.4
2019-07-23 18:24:24 -07:00
Aaron Bach
f1e4153b2c Add area support to media player service schemas (#25436)
* Add area support to media player service schemas

* Re-establish MEDIA_PLAYER_SCHEMA

* Comment

* Localize platforms that used MEDIA_PLAYER_SCHEMA
2019-07-23 18:54:59 -06:00
Alexei Chetroi
c886d00bab Bump up ZHA dependencies. (#25450) 2019-07-23 20:51:40 -04:00
Paulus Schoutsen
065a5c5df6 Bumped version to 0.96.4 2019-07-23 17:12:08 -07:00
David Bonnes
e2e7d39527 [climate] Correct evohome hvac_action (#25407)
* inital commit

* take account of rounding up of curr_temp
2019-07-23 17:11:40 -07:00
Anders Melchiorsen
9fc4b878e2 Update pysonos to 0.0.22 (#25399) 2019-07-23 17:11:40 -07:00
Fredrik Erlandsson
638f5b1932 Update Daikin preset modes (#25395)
* fix preset documentation

* Use pydaikin set holiday method
2019-07-23 17:11:39 -07:00
David Bonnes
956cdba588 [climate] Bugfix/Tweak honeywell migration (#25369)
* refactor supported_features

add dr_data

delint

simplify code

refactor target_temps, and delinting

delint

fix typo

add min/max temps

delint

refactor target temps

refactor target temps 2

correct typo

tweak

fix potential bug

fix potential bug 2

bugfix entity_id

fix typo

* remove explicit entity_id

* refactor hvac_action

* refactor hvac_action

* bugfix - HVAC_MODE_HEAT_COOL incorrectly added to hvac_modes
2019-07-23 17:11:38 -07:00
cgtobi
f11f0956d3 Bump pyatmo version to 2.1.2 (#25296) 2019-07-23 17:11:37 -07:00
David Bonnes
1c861b9732 Tweak evohome migration (#25281)
* Initial commit

add hvac_action to zones, remove target_temp from controller

fix incorrect hvac_action

de-lint

Initial commit

de-lint & minor refactor

tweak docstrings, and type hints

tweak docstrings

* refactor setpoints property

* tweak docstring

* tweak docstring

* avoid a unnecessary I/O

* avoid unnecessary I/O

* refactor schedule/setpoints

* remove type hint

* remove type hint 2

* tweak code

* delint type hints

* fix regression
2019-07-23 17:11:37 -07:00
cgtobi
86d1bb651e Fix Netatmo climate battery level (#25165)
* Interpolate battery level

* Sort list
2019-07-23 17:11:36 -07:00
Fredrik Erlandsson
828f76ca57 Update Daikin preset modes (#25395)
* fix preset documentation

* Use pydaikin set holiday method
2019-07-23 17:10:28 -07:00
Kim Frellsen
f5d0f36caf Add new device tracker supporting Fortinet FortiGate (#23078)
* Create device_tracker.py

initial version

* Update device_tracker.py

set verify SSL to false as default. Normally users do not have a verified certificate at home

* Update device_tracker.py

pep8 compliant

* Update device_tracker.py

upgraded fortiosapi requirements

* Create __init__.py

* tox compliant

* Update device_tracker.py

* Create manifest.json

* Update .coveragerc

added fortios

* Update device_tracker.py

circle ci, blank line required

* Update manifest.json

removed code owners

* Update manifest.json

removed dependencies

* Update manifest.json

removed codeowners

* Update requirements_all.txt

added fortios

* Update requirements_all.txt

* Update device_tracker.py

pylint corrections

* Update device_tracker.py

pylint exceptions

* Update device_tracker.py

disable pylint broad exceptions

* Update device_tracker.py

pylint

* Update device_tracker.py

removed pointless string statements

* Update device_tracker.py

removed blank line

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update manifest.json

added codeowners

* Update CODEOWNERS

added kimfrellsen as codeowner

* fortiosapi 0.10.8

Updated to use latest version of fortiosapi 0.10.8

* Update requirements_all.txt

updated fortiosapi to 0.10.8

* Update device_tracker.py

fixed some requests.

* Update device_tracker.py

better exception handling.

* Update device_tracker.py

exception handling

* Update CODEOWNERS

* Update device_tracker.py

corrected exception handling

* Update device_tracker.py

exception handling.

* Update device_tracker.py

lint corrections

* Update device_tracker.py

removed broad exception.

* Update device_tracker.py

fix lint errors

* Update device_tracker.py

minor changes, mostly cosmetic
2019-07-24 01:18:58 +02:00
Farid
4fb1937f65 Suez water (#23844)
* Add suez water sensor

* flake8 test

* pylint test

* edition to fix flake8 and pylint issues

* edition to be okay with the musts

* Added a blank line to __init.py__ for flake8

* added blank line for flake8

* changer scan interval from 10 to 720 minutes

* use of pysuez

* bug fix and isort

* use of pysuez

* fixed flake8 and pylint errors

* update requirements_all.txt

* added a method to test login/password befire adding device

* flake8 edition

* update requirements_all.txt

* add of .coveragerc file with untested files

* update of .coveragerc

* Update homeassistant/components/suez_water/__init__.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* bug fix in check credentials

* flake8 and pylint fixes

* fix codeowner

* update requirements_all.txt

* Sorted suez_water line

* edition to answer comments from @MartinHjelmare on #23844

* Attribute keys formatting to lowercase snakecase, name and icon constants returned directly, and remove of  attribute. Update of .

* pylint edition

* correction wrong keys in client attributes

* remove of unnedeed return and move add_entities
2019-07-24 01:14:41 +02:00
Aaron Bach
e4b4551b35 Add area support to remote service schemas (#25437)
* Add area support to remote service schemas

* Base
2019-07-23 16:05:55 -07:00
Aaron Bach
5e2dfb14fb Add area support to lock service schemas (#25435)
* Add area support to lock service schemas

* extend

* Fixed tests

* Fixed tests
2019-07-23 16:05:21 -07:00
Sören
4c067ecff7 Add Elgato Avea integration (#24281)
* Adds Elgato Avea integration

* Revert "Adds Elgato Avea integration"

This reverts commit 8607a685eb.

* Adds Elgato Avea integration

* Removed debug

* Improved readability

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Adds Elgato Avea integration

* Fixes for flake8

* More Fixes for flake8

* Hopefully last fixes for flake8

* Unnecessary rounding and typo removed

* Duplicate calls removed

* raise PlatformNotReady if communication with bulb failes

* Fixes: flake8, missing import of exception and better handling of ble problems

* Update requirements_all.txt

Add requirements_all.txt file

* Revert "Update requirements_all.txt"

This reverts commit 2856025ed3.

* Update requirements_all.txt

* conform with snake_case naming style

https://circleci.com/gh/home-assistant/home-assistant/31823

* Fixed variable rename

* Unnecessary calculation removed

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Better Exception Handling

* Changed position of import, renamed add_entities to add_devices, remove unnecessary comment

* Unnecessary comments removed.
2019-07-24 01:02:00 +02:00
Aaron Bach
2fb03106ea Add area support to utility meter service schemas (#25442)
* Add area support to utility meter service schemas

* Reverted mistaken deletion
2019-07-23 16:43:48 -06:00
Joe Trabulsy
a8ec826ef7 Add Support for VeSync Devices - Outlets and Switches (#24953)
* Change dependency to pyvesync-v2 for vesync switch

* async vesync component

* FInish data_entry_flow

* Update config flow

* strings.json

* Minor fix

* Syntax fix

* Minor Fixs

* UI Fix

* Minor Correct

* Debug lines

* fix device dictionaries

* Light switch fix

* Cleanup

* pylint fixes

* Hassfest and setup scripts

* Flake8 fixes

* Add vesync light platform

* Fix typo

* Update Devices Service

* Fix update devices service

* Add initial test

* Add Config Flow Tests

* Remove Extra Platforms

* Fix requirements

* Update pypi package

* Add login to config_flow

Avoid setting up component if login credentials are invalid

* Fix variable import

* Update config_flow.py

* Update config_flow.py

* Put VS object into hass.data instead of config entry

* Update __init__.py

* Handle Login Error

* Fix invalid login error

* Fix typo

* Remove line

* PEP fixes

* Fix change requests

* Fix typo

* Update __init__.py

* Update switch.py

* Flake8 fix

* Update test requirements

* Fix permission

* Address change requests

* Address change requests

* Fix device discovery indent, add MockConfigEntry

* Fix vesynclightswitch classs

* Remove active time attribute

* Remove time_zone, grammar check
2019-07-23 23:40:55 +02:00
Andre Richter
738d00fb05 Increase vallox robustness on startup (#25382)
* Vallox: Increase robustness on startup

Experiments showed that timing of websocket requests to the Vallox firmware is
critical when fetching new metrics. Tests on different Raspberry Pis and x86
machines showed that those machines with little processing power tend to fail
the timing requirments during the busy startup phase of Home Assistant,
resulting in the Vallox integration failing to set itself up.

This patch catches Websocket's InvalidMessage, which is a symptom of failing the
timing requirements. Experiments again showed that on the Raspberry's, this
exception is catched once at startup, but the integration is running fine
afterwards.

* Update __init__.py

* Bump to new 2.1.0 version of api.

* Bump to api 2.2.0
2019-07-23 23:32:48 +02:00
Johnny Moore
5ce6ea2df5 Upgrade HPILO requirement to v4.3 (#25444)
* Update Python-HPILO to 4.3

Update of Python-HPILO requirement to 4.3 to resolve outstanding SSL connections for older HP servers (ILO 3)

* Update requirements_all.txt

Update HPILO to 4.3
2019-07-23 16:20:05 -05:00
Aaron Bach
2850f9d19e Add area support to climate service schemas (#25441)
* Add area support to climate service schemas

* Incorrect Voluptuous usage

* Fix typo
2019-07-23 14:33:41 -06:00
Aaron Bach
20ed07cc5c Add area support to input text service schemas (#25434) 2019-07-23 14:32:28 -06:00
Aaron Bach
2354108e6f Add area support to image processing service schemas (#25428) 2019-07-23 14:08:23 -06:00
Aaron Bach
a5c2a80db3 Add area support to input boolean service schemas (#25429) 2019-07-23 14:05:15 -06:00
Aaron Bach
bd2b107575 Add area support to Wink service schemas (#25445) 2019-07-23 14:04:59 -06:00
Aaron Bach
c92f287c73 Add area support to input datetime service schemas (#25430)
* Add area support to input datetime service schemas

* Fixed tests
2019-07-23 13:39:07 -06:00
Aaron Bach
3af77eb594 Add area support to input number service schemas (#25431) 2019-07-23 13:39:02 -06:00
Aaron Bach
8e4a234bbf Add area support to input select service schemas (#25432) 2019-07-23 13:38:20 -06:00
Aaron Bach
ee7ec5f234 Add area support to scene service schemas (#25438) 2019-07-23 13:38:08 -06:00
Aaron Bach
80051b7fc2 Add area support to script service schemas (#25439) 2019-07-23 13:37:47 -06:00
cgtobi
ca989cba44 Bump pyatmo version to 2.1.2 (#25296) 2019-07-23 21:29:04 +02:00
cgtobi
aa062176ca Clean up Netatmo sensor code (#25390)
* Clean up code

* Add parameter

* Make it a list

* Move loop and add debug message

* Further clean up

* Move manual config
2019-07-23 21:27:54 +02:00
David Bonnes
a1bccb1934 [climate] Bugfix/Tweak honeywell migration (#25369)
* refactor supported_features

add dr_data

delint

simplify code

refactor target_temps, and delinting

delint

fix typo

add min/max temps

delint

refactor target temps

refactor target temps 2

correct typo

tweak

fix potential bug

fix potential bug 2

bugfix entity_id

fix typo

* remove explicit entity_id

* refactor hvac_action

* refactor hvac_action

* bugfix - HVAC_MODE_HEAT_COOL incorrectly added to hvac_modes
2019-07-23 11:23:22 -07:00
Aaron Bach
9470829978 Add area support to alarm_control_panel service schemas (#25402)
* Add area support to alarm_control_panel service schemas

* Corrected import
2019-07-23 11:09:09 -06:00
Aaron Bach
b71cb73c80 Add area support to counter service schemas (#25401)
* Add area support to counter service schemas

* Updates
2019-07-23 11:08:32 -06:00
Aaron Bach
0caab133e6 Add area support to automation service schemas (#25403)
* Add area support to automation service schemas

* Fixed import

* Mispelling
2019-07-23 11:07:13 -06:00
Aaron Bach
e6445a602b Add area support to cover service schemas (#25408)
* Add area support to cover service schemas

* Linting
2019-07-23 11:05:53 -06:00
Aaron Bach
8f2de2bf1b Add area support to fan service schemas (#25409) 2019-07-23 11:05:28 -06:00
David Bonnes
7cf0684aa1 [climate] Correct evohome hvac_action (#25407)
* inital commit

* take account of rounding up of curr_temp
2019-07-23 07:14:42 +02:00
Anders Melchiorsen
5e805768aa Update pysonos to 0.0.22 (#25399) 2019-07-23 06:31:05 +02:00
Jc2k
8c69fd91ff Only poll HomeKit connection once for all entities on a single bridge/pairing (#25249)
* Stub for polling from a central location

* Allow connection to know the entity objects attached to it

* Move polling logic to connection

* Don't poll if no characteristics selected

* Loosen coupling between entity and HKDevice

* Disable track_time_interval when removing entry

* Revert self.entities changes

* Use @callback for async_state_changed

* Split out unload and remove and add a test

* Test that entity is gone and fix docstring
2019-07-22 09:22:44 -07:00
Paulus Schoutsen
58f946e452 Merge remote-tracking branch 'origin/master' into dev 2019-07-22 08:31:02 -07:00
David Bonnes
bf37cc8371 Tweak evohome migration (#25281)
* Initial commit

add hvac_action to zones, remove target_temp from controller

fix incorrect hvac_action

de-lint

Initial commit

de-lint & minor refactor

tweak docstrings, and type hints

tweak docstrings

* refactor setpoints property

* tweak docstring

* tweak docstring

* avoid a unnecessary I/O

* avoid unnecessary I/O

* refactor schedule/setpoints

* remove type hint

* remove type hint 2

* tweak code

* delint type hints

* fix regression
2019-07-22 10:45:31 +02:00
David Radcliffe
11c74cd0d7 Add support for contact binary sensors in homekit_controller (#25355) 2019-07-22 08:40:55 +01:00
Pierre Ståhl
797196dce9 Add add_torrent service to Transmission (#25144)
* Add add_torrent service to Transmission

* Fix services.yaml format

* Verify that torrent is whitelisted

* Add logging if adding failed

* Change warn to warning
2019-07-21 22:31:11 +02:00
Paulus Schoutsen
81bde77c04 Updated frontend to 20190721.1 2019-07-21 13:02:26 -07:00
Paulus Schoutsen
0be2dad651 Updated frontend to 20190721.1 2019-07-21 13:02:16 -07:00
Paulus Schoutsen
a652a4d9e9 Merge pull request #25376 from home-assistant/rc
0.96.3
2019-07-21 12:02:38 -07:00
cgtobi
2189cb0ee7 Add Netatmo climate battery level (#25143)
* Add battery level sensor

* Only update battery level if lower or nonexistent
2019-07-21 12:00:56 -07:00
Paulus Schoutsen
15064e83b4 Bumped version to 0.96.3 2019-07-21 11:10:36 -07:00
David F. Mulcahey
8538e69e28 change and condition to or condition (#25374) 2019-07-21 11:10:26 -07:00
David F. Mulcahey
35c719628d fix remove and re-add scenario (#25370) 2019-07-21 11:10:25 -07:00
Otto Winter
0eab89c8f4 Fix ESPHome climate migration (#25366) 2019-07-21 11:10:25 -07:00
David F. Mulcahey
a3043b9a90 bump quirks version (#25362) 2019-07-21 11:10:24 -07:00
Paulus Schoutsen
c795c93034 Introduce PRESET_NONE for climate (#25360)
* Introduce PRESET_NONE for climate

* Require preset mode to be a string

* Lint

* Fix tests
2019-07-21 11:10:24 -07:00
David Bonnes
2228a0dcac Improve geniushub logging and bump client (#25359)
* add debug logging

* bump geniushub client library

* delint

* bump again

* bump again, again
2019-07-21 11:10:23 -07:00
cgtobi
68e7f4ca5a Fix preset service call (#25358) 2019-07-21 11:09:59 -07:00
David F. Mulcahey
e052bcb03b add available to device info (#25349) 2019-07-21 11:08:21 -07:00
Michael Scherer
a56b604936 Fix for hvac_modes list being null (#25347)
* Fix for empty hvac_modes list

* Empty list instead of default value for hvac_modes
2019-07-21 11:08:21 -07:00
Fredrik Erlandsson
f6b6818fb0 Restore Daikin A/C on/off services (#25332) 2019-07-21 11:08:20 -07:00
eyager1
93a65bf507 Update zwave climate mappings (#25327)
hvac_action should be idle when thermostat is in Pending Heat or Pending Cool.
2019-07-21 11:08:19 -07:00
Paulus Schoutsen
ec302912a3 Restore sensiobo turn on/off methods (#25321) 2019-07-21 11:08:19 -07:00
Paulus Schoutsen
50d4921d0a Introduce PRESET_NONE for climate (#25360)
* Introduce PRESET_NONE for climate

* Require preset mode to be a string

* Lint

* Fix tests
2019-07-21 11:00:42 -07:00
Ville Skyttä
17d754dbbf Optional and Union simplifications (#25365) 2019-07-21 10:59:51 -07:00
eyager1
5e29d4d098 Update zwave climate mappings (#25327)
hvac_action should be idle when thermostat is in Pending Heat or Pending Cool.
2019-07-21 10:44:15 -07:00
David Bonnes
97a13bdcd4 Improve geniushub logging and bump client (#25359)
* add debug logging

* bump geniushub client library

* delint

* bump again

* bump again, again
2019-07-21 10:07:03 -07:00
Paulus Schoutsen
7f5607c918 Updated frontend to 20190721.0 2019-07-21 10:03:25 -07:00
David F. Mulcahey
d7bd7f2c4c bump quirks version (#25362) 2019-07-21 10:02:22 -07:00
Otto Winter
b6ba24de5d Fix ESPHome climate migration (#25366) 2019-07-21 10:01:16 -07:00
David F. Mulcahey
7a8130cd2b fix remove and re-add scenario (#25370) 2019-07-21 10:00:27 -07:00
Ville Skyttä
d64f1e767c Type check all helpers (#25373)
* Type check all helpers, add inline exclusions for work in progress

* Remove unused Script._template_cache

* Add some missing type hints

* Remove unneeded type: ignore

* Type hint fixes

* Mypy assistance tweaks

* Don't look for None in deprecated config "at most once" check

* Avoid None name slugify attempt when generating entity id

* Avoid None state store attempt on entity remove
2019-07-21 09:59:02 -07:00
David F. Mulcahey
0653f57fb4 change and condition to or condition (#25374) 2019-07-21 09:57:40 -07:00
Paulus Schoutsen
615af773e5 Updated frontend to 20190721.0 2019-07-21 09:56:12 -07:00
Aaron Bach
aa27e22b17 Automatically expand WWLLN window to 1 hour (if necessary) (#25357)
* Expand default window for WWLLN

* Fleshed out conditions

* Fixed tests

* Removed unused import

* Linting
2019-07-21 08:58:50 +02:00
Paulus Schoutsen
9c51650ea3 Updated frontend to 20190720.0 2019-07-20 18:01:47 -07:00
Paulus Schoutsen
95223cb9ea Updated frontend to 20190720.0 2019-07-20 18:01:28 -07:00
Michael Scherer
ba04ff17b2 Fix for hvac_modes list being null (#25347)
* Fix for empty hvac_modes list

* Empty list instead of default value for hvac_modes
2019-07-20 18:00:16 -07:00
cgtobi
b0b2b0d654 Fix preset service call (#25358) 2019-07-20 17:58:06 -07:00
Matthias Alphart
01430262cd temporary patch to fix KNX climate devices (#25356)
This is a temporary patch for knx climate devices. It should be reverted when #24738 is merged to release. 
It should fix https://github.com/home-assistant/home-assistant/issues/25247 for 0.96
2019-07-20 17:57:38 -07:00
shbatm
83581be4d5 Update Google Maps Location Tracker to use locationsharinglib==4.0.2 (#25316)
* Update google_maps: Bump locationsharinglib to 4.0.2

* Remove unused import.

* Corrections based on review.
2019-07-21 00:49:10 +02:00
Ville Skyttä
fc5b1c7005 Mypy config improvements (#25340)
* Specify python version

So that it type checks against the lowest common denominator version,
not the runtime one.

* Disallow incomplete definitions
2019-07-20 14:35:59 -07:00
Ville Skyttä
56e4a2aea6 Fix util.ruamel_yaml type errors (#25338) 2019-07-20 14:35:22 -07:00
David F. Mulcahey
7ea27c0f2a add available to device info (#25349) 2019-07-20 14:44:47 -04:00
Ville Skyttä
258dc80fbd Remove some Python 2 compatibility code (#25341) 2019-07-20 08:04:18 -05:00
Ville Skyttä
22d9a73e8e Doc lint fixes (#25339) 2019-07-20 15:30:36 +03:00
9R
1fddf47e8f Fix missing Nachteule in mvglive component (#25304) 2019-07-20 14:02:00 +02:00
Fredrik Erlandsson
0da0dda39c Restore Daikin A/C on/off services (#25332) 2019-07-20 13:41:33 +02:00
ktnrg45
48540fc21e Ps4 reformat media data (#25172)
* Reformat saved media data/ fix load + save helpers

* Add url constant

* Reformat saved media data

* Add tests for media data

* Refactor

* Revert deleted lines

* Set attrs after checking for lock

* Patch load games.

* remove unneeded imports

* fix tests

* Correct condition

* Handle errors with loading games

* Correct condition

* Fix select source

* add test

* Remove unneeded vars

* line break

* cleanup loading json

* remove test

* move check for dict

* Set games to {}
2019-07-20 07:36:45 +02:00
Aaron Bach
693fa15924 Return Ambient PWS brightness sensor unit and remove CONF_MONITORED_CONDITIONS (#25284)
* Revert "Change Ambient solar radiation units to lx (#24690)"

This reverts commit 40fa4463de.

* Re-add sensor for Ambient PWS outdoor brightness (W/m^2)

* Corrected available and comments

* Member feedback

* Member comments
2019-07-20 06:32:33 +02:00
Paulus Schoutsen
c8abbf6d76 Restore sensiobo turn on/off methods (#25321) 2019-07-19 21:04:13 -04:00
nierob
979f801488 Avoid creating temporary lists (#25317)
That gives nano performance improvements as *() is slightly faster
then *[].
2019-07-19 13:36:18 -07:00
lyghtnox
caa7a3a3d6 Multiroom support for snapcast (#24061)
* Multiroom support for snapcast

* Moving services to the snapcast domain

* Passing asyncio event via dispatcher instead of hass.data

* Fixing lint
2019-07-19 12:43:44 -07:00
Paulus Schoutsen
290d32267e Merge remote-tracking branch 'origin/master' into dev 2019-07-19 11:55:51 -07:00
Paulus Schoutsen
a6e3cc6617 Merge pull request #25313 from home-assistant/rc
0.96.2
2019-07-19 11:42:01 -07:00
Andrew Sayre
b4481269ec Turn on device before setting mode (#25314) 2019-07-19 10:19:51 -07:00
Andrew Sayre
752d0deb97 Turn on device before setting mode (#25314) 2019-07-19 10:19:34 -07:00
Paulus Schoutsen
662c33af85 Bumped version to 0.96.2 2019-07-19 09:44:53 -07:00
cgtobi
fc384ca6d5 Fix plant error when adding new value (#25302)
* Only add value if int or floar

* Simplify check

* Simplify check
2019-07-19 09:44:44 -07:00
Pascal Vizeli
49e2583b08 Fix HM with use wrong datapoint for off (#25298) 2019-07-19 09:44:43 -07:00
David Bonnes
8629b86186 [climate] Correct honeywell supported_features (#25292)
* Initial commit

* delint
2019-07-19 09:44:43 -07:00
William Scanlon
68c4e5c0c9 Fixed python-wink method names (#25285)
* Fixed python-wink method names

* Fixed aux heat
2019-07-19 09:44:42 -07:00
cgtobi
c4d1cd0e03 Fix fritzbox climate HVAC mode / temperature (#25275)
* Set the target temperature

* Update tests

* Update tests

* Fix linter complaints
2019-07-19 09:44:41 -07:00
Paulus Schoutsen
8b020ea5e6 Updated frontend to 20190719.0 2019-07-19 09:43:24 -07:00
Paulus Schoutsen
fd2d6c8a74 Updated frontend to 20190719.0 2019-07-19 09:43:03 -07:00
cgtobi
5552a5be70 Fix plant error when adding new value (#25302)
* Only add value if int or floar

* Simplify check

* Simplify check
2019-07-19 16:09:29 +02:00
Pascal Vizeli
b9c6758dba Fix HM with use wrong datapoint for off (#25298) 2019-07-19 11:18:13 +02:00
David Bonnes
5015311d6b [climate] Correct honeywell supported_features (#25292)
* Initial commit

* delint
2019-07-19 09:51:02 +02:00
cgtobi
1eb66f3657 Fix fritzbox climate HVAC mode / temperature (#25275)
* Set the target temperature

* Update tests

* Update tests

* Fix linter complaints
2019-07-19 09:49:28 +02:00
William Scanlon
bc7e1a3797 Fixed python-wink method names (#25285)
* Fixed python-wink method names

* Fixed aux heat
2019-07-19 08:54:09 +02:00
Aaron Bach
003f7865a9 Add services to set and remove Simplisafe PINs (#25207)
* Add services to set and remove SimpliSafe PINs

* Added services spec

* Add services to set and remove SimpliSafe PINs

* Member comments

* Missed one
2019-07-18 22:07:07 -06:00
Paulus Schoutsen
33cba4da85 Merge pull request #25280 from home-assistant/rc
0.96.1
2019-07-18 15:22:49 -07:00
Philip Rosenberg-Watt
1c6d55e51b Add MQTT climate precision (#25265)
* Add MQTT climate precision

* Remove stale code
2019-07-18 15:21:50 -07:00
Greg
3fd138bbdd Add support for Rainforest Eagle-200 (#24919)
* Add support for Rainforest Eagle-200

* Removed direct access selector to monitored conditions

* Refactored code to use throttle on the update function

* Fixed issue in new code to use only one EagleReader instance

* Resolve comments

* Resolved comments

* Resolved comments and added Debug statement

* Added return statements

* Fixed typo

* Resolved comments and added debug statements

* Moved get_status method into Data object and decorated it with @staticmethod

* Resolved comments
2019-07-18 23:37:26 +02:00
Pascal Vizeli
3db106c562 Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-18 23:20:56 +02:00
Pascal Vizeli
34c3d1ce47 Update azure-pipelines-ci.yml 2019-07-18 23:19:52 +02:00
Paulus Schoutsen
cc595632bd Bumped version to 0.96.1 2019-07-18 14:08:50 -07:00
stboch
f76700567e Added states and modes for zwave climate (#25274)
* Update climate.py

Added support for Fan Only State
Added additional missing modes and states this should correct issue #25216

* Correct line lint error

* Corrected mode spelling

* Lint
2019-07-18 14:08:43 -07:00
Paulus Schoutsen
86cf02739b Add hvac modes back to opentherm (#25268) 2019-07-18 14:08:42 -07:00
Andrew Sayre
46cdbd273a Restore SmartThings A/C on/off services (#25259)
* Restore ST A/C on/off services

* Use correct OFF const

* Support AC HVAC_MODE_OFF
2019-07-18 14:08:42 -07:00
William Sutton
ec3cb11e2f Update CT80 Humidity call (#25258)
Last PR was from a few versions before, not sure how I had it working, but functioning properly now on .96
2019-07-18 14:08:41 -07:00
geekofweek
2016cf872e ecobee Preset Fix (#25256)
* ecobee Preset Fix

* Celsius Fix

* Checks Fix

* Check Fix #2

* Check Fix #3
2019-07-18 14:08:40 -07:00
cgtobi
37810e010a Fix the unit of measurement for ecobee climate (#25246)
* Fix the unit of measurement

* Remove unused const
2019-07-18 14:08:40 -07:00
cgtobi
2b69904b94 Make presets prettier (#25245) 2019-07-18 14:08:39 -07:00
Pascal Vizeli
59cf6a0c79 Fix eq3btsmart (#25238) 2019-07-18 14:08:39 -07:00
Pascal Vizeli
39b249d202 Show off value (#25236) 2019-07-18 14:08:38 -07:00
Paulus Schoutsen
d57cf01cf2 Updated frontend to 20190718.0 2019-07-18 14:08:06 -07:00
Paulus Schoutsen
997187c7d3 Updated frontend to 20190718.0 2019-07-18 14:07:55 -07:00
stboch
217da36c86 Added states and modes for zwave climate (#25274)
* Update climate.py

Added support for Fan Only State
Added additional missing modes and states this should correct issue #25216

* Correct line lint error

* Corrected mode spelling

* Lint
2019-07-18 13:54:05 -07:00
William Sutton
be56851feb Update CT80 Humidity call (#25258)
Last PR was from a few versions before, not sure how I had it working, but functioning properly now on .96
2019-07-18 21:36:17 +02:00
Paulus Schoutsen
53954d6f8f Add hvac modes back to opentherm (#25268) 2019-07-18 21:32:17 +02:00
geekofweek
5c53257c23 ecobee Preset Fix (#25256)
* ecobee Preset Fix

* Celsius Fix

* Checks Fix

* Check Fix #2

* Check Fix #3
2019-07-18 10:39:53 -07:00
cgtobi
c7ebd109b8 Make presets prettier (#25245) 2019-07-18 10:27:04 -07:00
Daniel Shokouhi
32e89dcbb6 Add vendor support for vorwerk robots and fix zone retrieval (#25200)
* Add vendor support for vorwerk robots and fix zone retrieval

* Lint

* Review comments

* Lint

* Review commeent

* Remove unused variable

* Review comment

* Remove unused variable
2019-07-18 10:22:05 -07:00
definitio
93970b5621 Add hvac_action support for MQTT HVAC (#25260)
* Add hvac_action support

* Add tests
2019-07-18 10:17:26 -07:00
Andrew Sayre
cfc2c58fe0 Restore SmartThings A/C on/off services (#25259)
* Restore ST A/C on/off services

* Use correct OFF const

* Support AC HVAC_MODE_OFF
2019-07-18 10:14:58 -07:00
Finbarr Brady
516bab9969 OpenWrt Luci RPC Device Tracker Module Bump (#25234)
* Update manifest.json

* Update requirements_all.txt
2019-07-18 15:54:04 +02:00
cgtobi
89ed26eb86 Fix the unit of measurement for ecobee climate (#25246)
* Fix the unit of measurement

* Remove unused const
2019-07-18 13:27:56 +02:00
Pascal Vizeli
e13e4376f8 Fix eq3btsmart (#25238) 2019-07-18 11:25:11 +02:00
Pascal Vizeli
75ad5f8c9e Show off value (#25236) 2019-07-18 11:24:07 +02:00
Pascal Vizeli
2accd8ed1c Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-18 10:02:49 +02:00
Pascal Vizeli
d9e4050cdf Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-18 09:58:36 +02:00
Pascal Vizeli
bbf1ee4c68 Update azure-pipelines-ci.yml 2019-07-18 09:50:21 +02:00
Teemu R
70cab201db Add myself to songpal codeowners (#25221) 2019-07-18 08:05:17 +02:00
Paulus Schoutsen
9a79a0aa90 Merge pull request #25205 from home-assistant/rc
0.96.0
2019-07-17 16:23:24 -07:00
Paulus Schoutsen
7089188fd5 Updated frontend to 20190717.1 2019-07-17 15:27:25 -07:00
Khole
ccc4f628f1 Hive water heater - Remove Duplication of appending entities (#25210)
* climate_water_heater

* updated names

* Update water_heater

* Update requirements

* Updated reqirements

* Version update

* updated Versiojn

* Update device list

* Removed unused Attributes

* removed duplicate appending entities

* re-added missing hotwater

* Move call to async_added_to_hass

* Move session append to async_added_to_hass

* White space
2019-07-17 15:19:03 -07:00
cgtobi
90231c5e07 Fix schema validation for service calls (#25204)
* Fix schema validation for service calls

* No need for get

* No need for get
2019-07-17 15:19:02 -07:00
cgtobi
5b24e46a29 Fix schema validation for service calls (#25204)
* Fix schema validation for service calls

* No need for get

* No need for get
2019-07-17 15:18:07 -07:00
Khole
1215398aef Hive water heater - Remove Duplication of appending entities (#25210)
* climate_water_heater

* updated names

* Update water_heater

* Update requirements

* Updated reqirements

* Version update

* updated Versiojn

* Update device list

* Removed unused Attributes

* removed duplicate appending entities

* re-added missing hotwater

* Move call to async_added_to_hass

* Move session append to async_added_to_hass

* White space
2019-07-17 15:17:44 -07:00
Franck Nijhof
9550a38f22 Upgrades Dockerfiles to Debian Buster (#25208) 2019-07-17 15:16:15 -07:00
Aaron Bach
4e20e4964e Bump simplisafe-python to 4.0.0 + add additional SimpliSafe attributes (#25202)
* Bump simplisafe-python to 4.0.0 + add additional SimpliSafe attributes

* Fixed incorrect attr assignment

* Member comments

* Add system ID as a state attribute
2019-07-17 16:13:03 -06:00
Paulus Schoutsen
ff5dd0cf42 Updated frontend to 20190717.1 2019-07-17 15:10:57 -07:00
Paulus Schoutsen
5d7f420821 Fix ecobee missing preset mode support flag (#25211) 2019-07-17 15:08:14 -07:00
Paulus Schoutsen
a5012f39da Fix ecobee missing preset mode support flag (#25211) 2019-07-17 15:07:14 -07:00
Paulus Schoutsen
e4bb955498 Pin Docker to Debain Stretch (#25206)
* Pin Docker to Debain Stretch

* Update dev docker too"
2019-07-17 14:05:00 -07:00
Paulus Schoutsen
8f7767d5e5 Pin Docker to Debain Stretch (#25206)
* Pin Docker to Debain Stretch

* Update dev docker too"
2019-07-17 14:04:13 -07:00
Paulus Schoutsen
74d0e65958 Bumped version to 0.96.0 2019-07-17 13:42:32 -07:00
Paulus Schoutsen
3cfbbdc720 Only include target temp if has right support flag (#25193)
* Only include target temp if has right support flag

* Remove comma
2019-07-17 13:09:07 -07:00
David Bonnes
3d5c773670 [climate] Tweak evohome migration (#25187)
* de-lint

* use _evo_tcs instead of _evo_device for TCS

* add hvac_action to zones, remove target_temp from controller

* fix incorrect hvac_action

* de-lint
2019-07-17 13:09:06 -07:00
David F. Mulcahey
b5b0f56ae7 Fix device name customization on ZHA add devices page (#25180)
* ensure new device exists

* clean up dev reg handling

* update test

* fix tests
2019-07-17 13:09:05 -07:00
Paulus Schoutsen
c03d5f1a73 Correctly set property decorator on preset modes (#25151) 2019-07-17 13:09:05 -07:00
Paulus Schoutsen
5abe4dd1f7 Updated frontend to 20190717.0 2019-07-17 13:08:13 -07:00
Paulus Schoutsen
b507822280 Updated frontend to 20190717.0 2019-07-17 13:08:02 -07:00
Markus Jankowski
ded9eb89bb Add HmIP-PCBS2, HmIP-PCBS-BAT to Homematic IP Cloud (#25201)
* Add HmIP-PCBS2, HmIP-PCBS-BAT to Homematic IP Cloud

* fix lint
2019-07-17 21:29:25 +02:00
Kees Schollaart
bc4f91a89a Simplify cache restore (#25186)
* Simplify cache restore

* Missed the task version

* RestoreAndSaveCache1@1 > RestoreAndSaveCache@1

* Revert changes on cache saving & add comment

* Trim whitespaces
2019-07-17 21:23:36 +02:00
Paulus Schoutsen
971223de19 Only include target temp if has right support flag (#25193)
* Only include target temp if has right support flag

* Remove comma
2019-07-17 12:09:44 -07:00
tgermain
60ca8b95a4 Fix issue #24495 (#25199) 2019-07-17 13:05:26 -06:00
tetienne
a012c61762 Handle somfy expired token (#25195)
* HANDLE expired token

* RENAME constant

* FIX typo
2019-07-17 11:09:46 -04:00
bouni
21f68b80ea Add login_method config option to fix login issue with RouterOS Version > 6.43 (#25194)
* added login_method config option to fix login issue with RouterOS Version > 6.43

* minor changes so that users don't have to change their config

* removed default config value to make the fallback without config change work as expected
2019-07-17 15:02:15 +02:00
Markus Jankowski
8bae7a45a5 Add HMIP-FCI / HMIP-FBL / HmIP-BBL (#25188) 2019-07-16 18:05:57 -07:00
David Bonnes
2bac24fbb7 [climate] Tweak evohome migration (#25187)
* de-lint

* use _evo_tcs instead of _evo_device for TCS

* add hvac_action to zones, remove target_temp from controller

* fix incorrect hvac_action

* de-lint
2019-07-16 15:18:21 -07:00
David F. Mulcahey
ac91423d71 Fix device name customization on ZHA add devices page (#25180)
* ensure new device exists

* clean up dev reg handling

* update test

* fix tests
2019-07-16 15:16:49 -07:00
Ville Skyttä
56841da2d3 Upgrade mypy to 0.720, turn on unreachability warnings (#25157)
* Upgrade mypy to 0.720

* Turn on mypy unreachability warnings, address raised issues
2019-07-16 15:11:38 -07:00
Paulus Schoutsen
026dbffa77 Bumped version to 0.96.0b4 2019-07-16 14:59:46 -07:00
Fabian Affolter
e74fc9836d Upgrade luftdaten to 0.6.2 (#25177) 2019-07-16 14:59:38 -07:00
Alexei Chetroi
c7dfec702d Fix climate is_aux_heat type hint. (#25170) 2019-07-16 14:59:37 -07:00
Anders Melchiorsen
0f8f9db319 Update pysonos to 0.0.21 (#25168) 2019-07-16 14:59:37 -07:00
Daniel Perna
366ad8202a Fix device types for some HomeMatic IP sensors (#25167)
* Update pyhomematic to 0.1.60

* Devicetype for pyhomematic classes, fixes #24080
2019-07-16 14:59:36 -07:00
Andrew Sayre
20301ae888 Use MockConfigEntry (#25190) 2019-07-16 14:51:30 -07:00
Ryan Claussen
de3d28d9d5 Add severe weather sensor to Dark Sky (#22701)
* Add severe weather alert sensor to Dark Sky

* fixup test case

* address review comments and fixup testcases

* address comments, fix assertion order

* remove extra line

* remove index increment
2019-07-16 18:03:05 +02:00
Paulus Schoutsen
b52848d376 Fix typo in azure-pipelines-ci.yml 2019-07-16 08:47:07 -07:00
cgtobi
9c2625f0a5 Raise not ready when no data from API is retrieved (#25182) 2019-07-16 17:16:35 +02:00
Fran
4afc19ff3a Improve Nuki lock (#22888)
Using port on bridge initialization
Service: check_connection
Attribute: available
Updated requeriments_all.txt
Change unlatch service for open service

Removed extra info

nuki_lock_n_go renamed to lock_n_go
nuki_check_connection renamed to check_connection
2019-07-16 17:06:47 +02:00
Pascal Vizeli
91d065314c Delete config.yml (#25181) 2019-07-16 14:13:44 +02:00
Fabian Affolter
8a6515936d Upgrade luftdaten to 0.6.2 (#25177) 2019-07-16 11:32:38 +02:00
Fabian Affolter
3381fa0ac4 Upgrade Mastodon.py to 1.4.5 (#25176) 2019-07-16 11:26:07 +02:00
Fabian Affolter
aac01aaa50 Upgrade ruamel.yaml to 0.15.99 (#25175) 2019-07-16 11:16:43 +02:00
Fabian Affolter
a096858426 Upgrade discord.py to 1.2.3 (#25174) 2019-07-16 11:16:34 +02:00
Thomas Le Gentil
3d3dd05789 Add Fortigate integration (#24908)
* Add Fortigate integration

* added feedback changes

* removed the only case

* fixed a description

* removed the CONFIG_PLATFORM

* deleted README

* added return from setup

* added return from setup

* fixed reviews

* Link updated

* Rename var and a couple of other minor changes

* Typos
2019-07-16 11:15:59 +02:00
Fabian Affolter
f9ae6f6ce7 Upgrade youtube_dl to 2019.07.16 (#25173) 2019-07-16 10:48:10 +02:00
Alexei Chetroi
e8fd01bea5 Fix climate is_aux_heat type hint. (#25170) 2019-07-16 09:32:09 +02:00
Leonardo Merza
64b9102206 Add travel time attribution/coordinates (#24956)
* add google travel time attribution

* add origin/destination

* update waze origin/destination

* add attribution and origin/destination

* add google attribution
2019-07-16 04:51:51 +02:00
Leandro Loureiro
dcb12a992a Add spotify service to allow to play music from playlist (#24991)
* adding custom service to Spotify component to allow to play random playlist music

* fixing findings

* improving naming

* improving way of using required parameters
2019-07-16 04:41:16 +02:00
cgtobi
25285ef6a7 Fix Netatmo climate battery level (#25165)
* Interpolate battery level

* Sort list
2019-07-16 04:27:28 +02:00
Anders Melchiorsen
5e5abf77da Update pysonos to 0.0.21 (#25168) 2019-07-16 04:22:41 +02:00
Austin Drummond
c2f4f06005 Add HomeKit Reset Accessory (#25158)
* added the ability to reset homekit accessories

* added tests for homekit reset accessory

* minor fixes
2019-07-16 03:43:37 +02:00
Paulus Schoutsen
28bd7b6a4e Bumped version to 0.96.0b3 2019-07-15 13:57:41 -07:00
Paulus Schoutsen
c04049d6f6 Make dev tools titlte translatable (#25166) 2019-07-15 13:57:35 -07:00
Joakim Sørensen
ff79e437d2 Version sensor update (#25162)
* component -> integration

* Bump pyhaversion to 3.0.2

* Update requirements

* Formating
2019-07-15 13:57:34 -07:00
Daniel Perna
c8b495f224 Update pyhomematic to 0.1.60 (#25152) 2019-07-15 13:57:33 -07:00
Josh Anderson
842c1a2274 Remove check and restore temp/mode changes (#25149) 2019-07-15 13:57:33 -07:00
Khole
50b145cf05 [Climate] Hive Add water heater Component post the refresh of the climate component. (#25148)
* climate_water_heater

* updated names

* Update water_heater

* Update requirements

* Updated reqirements

* Version update

* updated Versiojn

* Update device list

* Removed unused Attributes
2019-07-15 13:57:32 -07:00
David Bonnes
78a0d72a5c [climate-1.0] Add RoundThermostat to evohome (#25141)
* initial commit

* improve enumeration of zone(s)

* remove unused self._config

* remove unused self._config 2

* remove unused self._id

* clean up device_state_attributes

* remove some pylint: disable=protected-access

* remove LOGGER.warn(

* refactor for RoundThermostat

* ready for review

* small tweak

* small tweak 2

* fix regression, tweak

* tidy up docstring

* simplify code
2019-07-15 13:57:32 -07:00
Markus Jankowski
97ca0d81e7 remove comfort mode (#25140) 2019-07-15 13:57:31 -07:00
David Bonnes
02e8ee137f [climate-1.0] Bugfix evohome showstopper (#25139)
* initial commit

* small tweak
2019-07-15 13:57:31 -07:00
Anders Melchiorsen
2643bbc228 Handle Sonos connection errors during setup (#25135) 2019-07-15 13:57:30 -07:00
Joakim Plate
c8d7e1346c Load requirements for platforms (#25133)
Fixes #25124 and fixes #25126
2019-07-15 13:57:30 -07:00
Paulus Schoutsen
7dedf173ad Allow area ID in service call schemas (#25121)
* Allow area ID in service call schemas

* Remove ATTR_ENTITY_ID from service light turn off schcema
2019-07-15 13:57:29 -07:00
Paulus Schoutsen
65593e36b1 Verify cloud user exists during boot (#25119) 2019-07-15 13:57:28 -07:00
Paulus Schoutsen
8996e330b8 Simplify Alexa/Google for new climate turn_on/off (#25115) 2019-07-15 13:57:28 -07:00
Markus Jankowski
e85d434f4e Add climate related services to Homematic IP Cloud (#25079)
* add hmip climate services

* Rename accesspoint_id to hapid

to comply with config

* Revert "Rename accesspoint_id to hapid"

This reverts commit 4a3cd14e1482fb508273c728ad8020945b02e426.
2019-07-15 13:57:27 -07:00
Paulus Schoutsen
82d9488ec8 Updated frontend to 20190715.0 2019-07-15 13:55:59 -07:00
Paulus Schoutsen
cca50a8339 Updated frontend to 20190715.0 2019-07-15 13:54:30 -07:00
Daniel Perna
84373ce754 Fix device types for some HomeMatic IP sensors (#25167)
* Update pyhomematic to 0.1.60

* Devicetype for pyhomematic classes, fixes #24080
2019-07-15 13:39:52 -07:00
Paulus Schoutsen
67546ce0b1 Make dev tools titlte translatable (#25166) 2019-07-15 13:39:04 -07:00
Pascal Vizeli
4fc302b67a Update azure-pipelines-release.yml for Azure Pipelines 2019-07-15 22:38:48 +02:00
Pascal Vizeli
ac33c22689 Update azure-pipelines-release.yml for Azure Pipelines 2019-07-15 22:38:12 +02:00
Paulus Schoutsen
7aae490a85 Allow area ID in service call schemas (#25121)
* Allow area ID in service call schemas

* Remove ATTR_ENTITY_ID from service light turn off schcema
2019-07-15 11:31:53 -07:00
Joakim Sørensen
50f9117982 Version sensor update (#25162)
* component -> integration

* Bump pyhaversion to 3.0.2

* Update requirements

* Formating
2019-07-15 19:38:21 +02:00
ktnrg45
99c6c60bec PS4 Add tests for init (#25161)
* Add some tests for init

* Remove init

* Add config entry version

* Use const for version

* Remove var
2019-07-15 08:47:47 -07:00
Pascal Vizeli
9548345ed0 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-07-15 15:23:08 +02:00
Pascal Vizeli
d444ba397b Update azure-pipelines-wheels.yml for Azure Pipelines 2019-07-15 15:22:41 +02:00
Pascal Vizeli
62df3c00df Update azure-pipelines-wheels.yml for Azure Pipelines 2019-07-15 15:22:19 +02:00
cgtobi
831564784a Add Netatmo climate battery level (#25143)
* Add battery level sensor

* Only update battery level if lower or nonexistent
2019-07-15 09:46:48 +02:00
Daniel Perna
17013c7c2c Update pyhomematic to 0.1.60 (#25152) 2019-07-14 20:21:37 -07:00
David Bonnes
3ddd482cc1 [climate-1.0] Add RoundThermostat to evohome (#25141)
* initial commit

* improve enumeration of zone(s)

* remove unused self._config

* remove unused self._config 2

* remove unused self._id

* clean up device_state_attributes

* remove some pylint: disable=protected-access

* remove LOGGER.warn(

* refactor for RoundThermostat

* ready for review

* small tweak

* small tweak 2

* fix regression, tweak

* tidy up docstring

* simplify code
2019-07-14 20:14:24 -07:00
Khole
bcf85a0df1 [Climate] Hive Add water heater Component post the refresh of the climate component. (#25148)
* climate_water_heater

* updated names

* Update water_heater

* Update requirements

* Updated reqirements

* Version update

* updated Versiojn

* Update device list

* Removed unused Attributes
2019-07-14 23:54:07 +02:00
Paulus Schoutsen
0a8b68fd4d Correctly set property decorator on preset modes (#25151) 2019-07-14 14:45:44 -07:00
Josh Anderson
08f12750f1 Remove check and restore temp/mode changes (#25149) 2019-07-14 17:38:57 -04:00
Anders Melchiorsen
1798522ec8 Handle Sonos connection errors during setup (#25135) 2019-07-14 14:36:05 -07:00
Markus Jankowski
d91e5a6b66 remove comfort mode (#25140) 2019-07-14 14:31:32 -07:00
Joakim Plate
b57c60ad7a Load requirements for platforms (#25133)
Fixes #25124 and fixes #25126
2019-07-14 14:13:36 -07:00
Frederik Bolding
fa8ae0865e Small changes to bluetooth RSSI tracking (#25056)
* Updated bt_proximity dependency

* Closed bluetooth socket after RSSI request

* Updated bt_proximity requirement in manifest
2019-07-14 23:11:54 +02:00
Robert Svensson
01b890f426 Merge UniFi device tracker to config entry (#24367)
* Move device tracker to use config entry

* Remove monitored conditions attributes based on ADR0003

* Add support for import of device tracker config to be backwards compatible

* Remove unnecessary configuration options from device tracker

* Add component configuration support
2019-07-14 21:57:09 +02:00
David Bonnes
3480e6229a [climate-1.0] Bugfix evohome showstopper (#25139)
* initial commit

* small tweak
2019-07-14 09:40:06 -07:00
cgtobi
e6a2dde19a Fix aggregation in Netatmo public sensor (#25132)
* Clean up values

* Fix divisor
2019-07-14 12:46:17 +02:00
Franck Nijhof
9d4b5ee58d Add Twente Milieu integration (#25129)
* Adds Twente Milieu integration

* Addresses flake8 warnings

* Adds required test deps

* Fixes path typo in coveragerc

* dispatcher_send -> async_dispatcher_send

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Removes not needed __init__

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Remove explicitly setting None default value on get call

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Correct typo in comment

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Clean storage for only the unloaded entry

Signed-off-by: Franck Nijhof <frenck@addons.community>

* asyncio.wait on updating all integrations

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Use string formatting

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Set a more sane SCAN_INTERVAL

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Small refactor around services

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Small styling correction

* Extract update logic into own function

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Addresses flake8 warnings
2019-07-14 12:30:23 +02:00
Austin Mroczek
369e6a3905 Move totalconnect from platform to component config (#24427)
* Move totalconnect component toward being a multi-platform integration.  Bump total_connect_client to 0.28.

* add missing total-connect alarm state mappings

* Made recommended changes of MartinHjelmare at
https://github.com/home-assistant/home-assistant/pull/24427

* Update __init__.py

* Updates per MartinHjelmare comments

* flake8/pydocstyle fixes

* removed . at end of log message

* added blank line between logging and voluptuous

* more fixes
2019-07-14 09:24:40 +02:00
ktnrg45
b77d060304 PS4 move load_games and save_games helpers to init from media_player (#25127)
* Add constant for games_file

* move load and save games to init from media_player

* Move save and load games to init

* Missed arg

* missed arg
2019-07-13 20:11:19 +02:00
michaeldavie
a147a189ca Update Environment Canada platforms (#24884)
* Add support for French

* Move labels to env_canada

* Bump env_canada to 0.0.17, change update frequency to 1 minute

* Update requirements_all.txt

* Set entity IDs separate from labels

* Flake error

* Remove monitored conditions

* Use next hourly forecast for missing conditions

* Switch sensors to unique_id

* Flake error

* Requested changes

* Simplify setting location parameters
2019-07-13 18:14:29 +02:00
Fabian Affolter
1e474bb5da Upgrade youtube_dl to 2019.07.12 (#25128) 2019-07-13 18:10:09 +02:00
Paulus Schoutsen
d37d1ce4ad Simplify Alexa/Google for new climate turn_on/off (#25115) 2019-07-13 10:27:50 +02:00
Paulus Schoutsen
8ec75cf883 Verify cloud user exists during boot (#25119) 2019-07-13 09:33:31 +02:00
Ville Skyttä
59f6fd7630 Upgrade flake8 to 3.7.8 (#25120)
http://flake8.pycqa.org/en/latest/release-notes/3.7.8.html
2019-07-13 09:32:08 +02:00
ktnrg45
68edf10270 PS4 handle no connection/ fix spamming of logs when device is off (#25091)
* Bump 0.8.7

* Bump 0.8.7

* 0.8.7

* Handle exception. Handle  device unavailable.

* Typo

* Blank line
2019-07-12 20:45:04 -06:00
cgtobi
c6b63b15b8 Add more public rain sensors (#25117) 2019-07-12 22:05:54 -04:00
Alex S
f705a1e62e Splunk component filter support (#25071)
* Added code to support entity and domain filters in the config for splunk component, and the code to enforce the filter.

* * Moved code for posting splunk request to separate function, primarily to more easily write a test case where I can mock the point where the post would occur and validate that filtering is working correctly.
* Test cases created for full config check and to test the filtering

* Correcting static check errors/issues

* Correcting flake8 static check issue (introduced when addressing prior static check issues)

* Removing unused parameter to setup function - cleanup from reviewer request.
2019-07-13 00:35:23 +02:00
Paulus Schoutsen
c884f9edbc Bumped version to 0.96.0b2 2019-07-12 15:09:02 -07:00
Aaron Bach
d0af73efe1 Fix missing sensor unit in RainMachine (#25101) 2019-07-12 15:08:56 -07:00
Aaron Bach
5eb7268ae7 Fix window exception in WWLLN (#25100)
* Beta fix: handle window exception in WWLLN

* Fixed test

* Fix bug

* Member comments

* Removed unused import
2019-07-12 15:08:55 -07:00
On Freund
60c2e5e2e2 Add turn on/off to coolmaster (#25097) 2019-07-12 15:08:54 -07:00
cgtobi
4e69b5b45f Fix Netatmo climate issue when device out of reach (#25096)
* Fix valve/thermostat out of reach

* Fix boost for valves

* Set netatmo default max temp to 30

* Remove unnecessary get

* Remove unnecessary default value

* Readd get
2019-07-12 15:08:54 -07:00
David Bonnes
1d784bdc05 [climate] Add water_heater to evohome (#25035)
* initial commit

* refactor for sync

* minor tweak

* refactor convert code

* fix regression

* remove bad await

* de-lint

* de-lint 2

* address edge case - invalid tokens

* address edge case - delint

* handle no schedule

* improve support for RoundThermostat

* tweak logging

* delint

* refactor for greatness

* use time_zone: for state attributes

* small tweak

* small tweak 2

* have datetime state attributes as UTC

* have datetime state attributes as UTC - delint

* have datetime state attributes as UTC - tweak

* missed this - remove

* de-lint type hint

* use parse_datetime instead of datetime.strptime)

* remove debug code

* state atrribute datetimes are UTC now

* revert

* de-lint (again)

* tweak type hints

* de-lint (again, again)

* tweak type hints

* Convert datetime closer to sending it out
2019-07-12 15:08:53 -07:00
Paulus Schoutsen
9181660497 Updated frontend to 20190712.0 2019-07-12 15:05:02 -07:00
Paulus Schoutsen
f7aa1b026f Updated frontend to 20190712.0 2019-07-12 14:58:50 -07:00
Aaron Bach
c73fa6157d Add additional WWLLN test (#25111) 2019-07-12 14:36:49 -06:00
David Bonnes
de43237f6d [climate] Add water_heater to evohome (#25035)
* initial commit

* refactor for sync

* minor tweak

* refactor convert code

* fix regression

* remove bad await

* de-lint

* de-lint 2

* address edge case - invalid tokens

* address edge case - delint

* handle no schedule

* improve support for RoundThermostat

* tweak logging

* delint

* refactor for greatness

* use time_zone: for state attributes

* small tweak

* small tweak 2

* have datetime state attributes as UTC

* have datetime state attributes as UTC - delint

* have datetime state attributes as UTC - tweak

* missed this - remove

* de-lint type hint

* use parse_datetime instead of datetime.strptime)

* remove debug code

* state atrribute datetimes are UTC now

* revert

* de-lint (again)

* tweak type hints

* de-lint (again, again)

* tweak type hints

* Convert datetime closer to sending it out
2019-07-12 21:29:45 +02:00
escoand
49abda2d49 Use more compatible samsungtv TV key (#25083)
* use more compatible TV key

* Remove extra spaces
2019-07-12 11:28:30 -07:00
Tom Harris
1368501cba Bump insteonplm to 0.16.3 (#25108) 2019-07-12 19:47:59 +02:00
Victor Vostrikov
eae63cd231 Add support for multiple N26 accounts (#25086)
* Added support of multiple accounts for n26

* Code cleanup

* Added check for proper config

* Fiexed lints
2019-07-12 18:59:40 +02:00
Aaron Bach
b69663857b Fix missing sensor unit in RainMachine (#25101) 2019-07-12 17:59:04 +02:00
cgtobi
a9980c8be0 Fix Netatmo climate issue when device out of reach (#25096)
* Fix valve/thermostat out of reach

* Fix boost for valves

* Set netatmo default max temp to 30

* Remove unnecessary get

* Remove unnecessary default value

* Readd get
2019-07-12 17:43:18 +02:00
Aaron Bach
31dd6364c3 Fix window exception in WWLLN (#25100)
* Beta fix: handle window exception in WWLLN

* Fixed test

* Fix bug

* Member comments

* Removed unused import
2019-07-12 17:41:47 +02:00
On Freund
0478e7f41d Add turn on/off to coolmaster (#25097) 2019-07-12 17:40:28 +02:00
Wim Haanstra
f25f44a75b Rename RitAssist to FleetGO (#25093) 2019-07-12 16:14:58 +02:00
ktnrg45
bbe45cbd4b Ps4 move send_command service to init (#25094)
* Move services from media_player

* Move services to init

* add COMMANDS to const

* change service handler to sync
2019-07-12 13:14:35 +02:00
Aaron Bach
69cc6affd5 Add support for recording history to Apache Kafka (#25085)
* Add support for Apache Kafka

* Simplified

* Revert "Simplified"

This reverts commit fde4624e07.

* Revert "Revert "Simplified""

This reverts commit 5ae57e64c2.

* Completed

* Updated requirements

* Updated .coveragerc

* Removed unused import

* Updated codeowner
2019-07-12 13:13:51 +02:00
Pascal Vizeli
8fdebf4f8f Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-12 12:08:53 +02:00
Pascal Vizeli
f2ae2c128d Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-12 11:27:31 +02:00
Pascal Vizeli
95abd91354 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-07-12 09:42:21 +02:00
Pascal Vizeli
aaeca69bd5 Update azure-pipelines-ci.yml for Azure Pipelines 2019-07-12 09:29:55 +02:00
Pascal Vizeli
7fc8ff982b Version bump to 0.96.0b1 2019-07-12 07:24:30 +00:00
Paulus Schoutsen
155c75c54a Guard module being None (#25077) 2019-07-12 07:23:30 +00:00
Anders Melchiorsen
afade4e997 Support podcast episodes as Sonos favorites (#25087) 2019-07-12 07:22:02 +00:00
Pascal Vizeli
53111f6426 Fix powercontrol media player alexa (#25080) 2019-07-12 07:21:59 +00:00
Aaron Bach
53a701b12c Change unique_id formula for Notion entities (#25076)
* Change unique_id formula for Notion entities

* Don't use name
2019-07-12 07:21:57 +00:00
Pascal Vizeli
a0e45cce79 Add support for on/off climate (#25026)
* Add support for on/off climate

* address comments

* Add test for sync overwrite

* Add more tests
2019-07-12 07:21:54 +00:00
Paulus Schoutsen
2b62ea1f0e Do not reverse open/close calls (#24879) 2019-07-12 07:19:26 +00:00
Pascal Vizeli
cc7b65a6c8 Support hass-release inside devcontainer (#25090) 2019-07-12 07:18:31 +00:00
Pascal Vizeli
60fe4c9ae0 Support hass-release inside devcontainer (#25090) 2019-07-12 09:16:14 +02:00
Anders Melchiorsen
6173d7c8a0 Support podcast episodes as Sonos favorites (#25087) 2019-07-12 07:08:57 +02:00
Pascal Vizeli
d47905d119 Add support for on/off climate (#25026)
* Add support for on/off climate

* address comments

* Add test for sync overwrite

* Add more tests
2019-07-11 15:28:11 -07:00
Pascal Vizeli
f5a4af40ee Update azure-pipelines-wheels.yml 2019-07-11 22:10:40 +02:00
Matthias Alphart
e299d7b3d6 Update KNX component to xknx 0.11 (#24738)
* update component for xknx 0.11.0

- expose sensor state is not casted to float anymore
- climate mode operation list has no more None values
- light supports white_value (rgbw)
- sensor expects `group_address_state` now instead of `group_address`
- sensor forwards device_class if available

* update manifest to use xknx 0.11.0

* update requirements_all for xknx 0.11.0

* update for xknx 0.11.1

- require xknx 0.11.1
- use 'state_address' instead of 'address' in sensor and binary_sensor configuration
- optional 'sync_state' for sensors and binary_sensors

* remove questionable `del kwargs`
2019-07-11 22:01:37 +02:00
Pascal Vizeli
78a5dc71ac Fix powercontrol media player alexa (#25080) 2019-07-11 08:35:46 -07:00
Markus Jankowski
04b4284746 Add climate related services to Homematic IP Cloud (#25079)
* add hmip climate services

* Rename accesspoint_id to hapid

to comply with config

* Revert "Rename accesspoint_id to hapid"

This reverts commit 4a3cd14e1482fb508273c728ad8020945b02e426.
2019-07-11 15:14:05 +02:00
Pascal Vizeli
2be5e0dcf9 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-07-11 12:21:01 +02:00
Niels Mündler
71ddebbf41 Remove monitored conditions from syncthru (#25052) 2019-07-11 11:13:34 +02:00
Paulus Schoutsen
27d750db1c Guard module being None (#25077) 2019-07-11 09:38:58 +02:00
Pascal Vizeli
3b6b421152 Update azure-pipelines-release.yml for Azure Pipelines 2019-07-11 09:24:45 +02:00
Pascal Vizeli
b8ee3536b3 Update azure-pipelines-release.yml for Azure Pipelines 2019-07-11 09:24:15 +02:00
Pascal Vizeli
fcb1783f56 Update azure-pipelines-release.yml for Azure Pipelines 2019-07-11 09:22:37 +02:00
Pascal Vizeli
8937d44399 Update azure-pipelines-release.yml for Azure Pipelines 2019-07-11 09:21:58 +02:00
Pascal Vizeli
8041339052 Update azure-pipelines-release.yml for Azure Pipelines 2019-07-11 09:17:44 +02:00
Pascal Vizeli
f0fe865798 Update azure-pipelines-release.yml for Azure Pipelines 2019-07-11 09:15:14 +02:00
Paulus Schoutsen
2eecb08b51 Do not reverse open/close calls (#24879) 2019-07-10 23:33:38 -07:00
Aaron Bach
51a40c0441 Change unique_id formula for Notion entities (#25076)
* Change unique_id formula for Notion entities

* Don't use name
2019-07-11 07:31:03 +02:00
Martin Hjelmare
177f5a35ae Rewrite calendar component (#24950)
* Correct google calendar test name

* Rewrite calendar component

* Save component in hass.data.
* Rename device_state_attributes to state_attributes.
* Remove offset attribute from base state_attributes.
* Extract offset helpers to calendar component.
* Clean imports.
* Remove stale constants.
* Remove name and add async_get_events.
* Add normalize_event helper function. Copied from #21495.
* Add event property to base entity.
* Use event property for calendar state.
* Ensure event start and end.
* Remove entity init.
* Add comment about event data class.
* Temporary keep old start and end datetime format.

* Convert demo calendar

* Convert google calendar

* Convert google calendar.
* Clean up google component.
* Keep offset feature by using offset helpers.

* Convert caldav calendar

* Clean up caldav calendar.
* Update caldav cal on addition.
* Bring back offset to caldav calendar.
* Copy caldav event on update.

* Convert todoist calendar
2019-07-10 20:59:37 -07:00
Paulus Schoutsen
87d3680630 Merge commit 'df920b4eda1d64368ed3bf166bcb0a90aeec6c44' into rc 2019-07-10 20:54:06 -07:00
Paulus Schoutsen
c6af8811fb Version bump to 0.97.0dev0 2019-07-10 20:50:31 -07:00
Paulus Schoutsen
bd7c0e87d5 Version bump to 0.96.0b0 2019-07-10 20:49:56 -07:00
Paulus Schoutsen
df920b4eda Merge remote-tracking branch 'origin/master' into dev 2019-07-10 20:48:54 -07:00
Paulus Schoutsen
cde3f670c2 pylint 2019-07-10 20:47:27 -07:00
Phil Bruckner
c80683bb15 Restore automation last_triggered as datetime & fix test (#24951)
* Restore automation last_triggered as datetime & fix test

* last_triggered is always a string
2019-07-10 20:42:38 -07:00
Paulus Schoutsen
073327831f Correctly store removed entities for restore state (#25073)
* Correctly store removed entities for restore state

* Lint

* Do not assume about set encoding
2019-07-10 20:41:03 -07:00
Charles Garwood
312fceeaf6 Add websocket API command for Z-Wave network status (#25066)
* Add websocket API command for Z-Wave network status

* lint

* Add callback decorator

* Remove state_str, fix lint
2019-07-10 19:50:42 -07:00
monte-monte
42d2f30ab8 Complete OPERATION_MODES (#25069)
XKNX library has complete list of KNX controller modes, but current version of HA KNX climate plugin uses only two of them and one is named incorrectly ("Dehumidification" instead of "Dry"). https://github.com/XKNX/xknx/blob/master/xknx/knx/dpt_hvac_mode.py
I've added missing control modes, which has corresponding operation mode in HA. Tested this patch on my KNX IntesisBox which is used with Mitsubishi split AC, all modes were detected correctly and working as expected.
I've also corrected datapoint number in a comment, because it was pointing to a wrong one: http://www.sti.uniurb.it/romanell/Domotica_e_Edifici_Intelligenti/110504-Lez10a-KNX-Datapoint%20Types%20v1.5.00%20AS.pdf see page 94.
2019-07-10 15:59:43 -07:00
Jeff Irion
4844477d3a Make sure volume level is valid when incrementing/decrementing (#25061)
* Make sure volume level is not None before incrementing/decrementing

* Pass linting checks
2019-07-10 15:58:29 -07:00
Martijn van Zal
ca8118138c Change phrases in the logbook component for persons and binary_sensors (#25053)
Persons are now threated the same as device trackers, so the logbook states
"<name> is at <location>" or "<name> is away" instead of "<name> changed to <location|not_home>"

Binary sensors now show phrases that relate to their device_class attribute.
So "Front door is closed" instead of "Front door turned off" or "Hallway PIR detected movement"
instead of "Hallway PIR turned on"
2019-07-10 15:56:41 -07:00
Johann Kellerman
e51b5e801e SMA catch error (#25045)
* SMA small fix

* lib update

* req
2019-07-10 15:55:40 -07:00
Aaron Bach
9ccb85d959 Add support for World Wide Lightning Location Network (#25001)
* Add support for World Wide Lightning Location Network

* Updated .coveragerc

* Added test

* Updated requirements

* Fixed tests

* Use local time for nearest strike

* Base geo location in place

* Finished geolocation work

* Fixed tests

* Cleanup

* Removed no-longer-needed method

* Updated requirements

* Add support for window and attrs

* Add strike ID to entity name

* Member comments
2019-07-10 16:40:11 -06:00
Alexei Chetroi
cea857e18a Bump up ZHA dependencies. (#25062)
Bump zigpy-homeassistant to 0.7.0
Bump zigpy-deconz to 0.2.1
Bump zigpy-xbee-homeassistant to 0.4.0
2019-07-10 12:20:37 -07:00
Anders Melchiorsen
1afa136fc0 Fix for Sonos debug logging (#25064)
* Fix for Sonos debug logging

* Start logging messages with capital letters
2019-07-10 12:19:28 -07:00
Paulus Schoutsen
7d33b0a259 Fix broken test in Python 3.7 (#25067) 2019-07-10 12:17:10 -07:00
David F. Mulcahey
777e1ca832 bump zha-quirks version (#25059) 2019-07-10 11:59:06 -07:00
Johann Kellerman
2e26f0bd2b Add check_config helper (#24557)
* check_config

* no ignore

* tests

* try tests again
2019-07-10 11:56:50 -07:00
Penny Wood
236debb455 Avoid flooding steam API (#23941) 2019-07-10 11:15:42 -07:00
Paulus Schoutsen
5f5c541f2f Update translations 2019-07-10 10:50:50 -07:00
Paulus Schoutsen
f0f7dc4884 Updated frontend to 20190710.0 2019-07-10 10:49:07 -07:00
Anders Melchiorsen
18d27c997d Add Sonos debug logging (#25063) 2019-07-10 09:30:45 -07:00
David Bonnes
a44686389c [climate] Bugfix honeywell misleading error message (#25048)
* initial commit

* refactor for sync

* minor tweak

* refactor convert code

* fix regression

* remove bad await

* de-lint

* de-lint 2

* improve error message

* rebase

* tweak

* de-lint
2019-07-10 08:38:31 -07:00
cdce8p
98ba015f06 Remove myself as codeowner (#25043) 2019-07-10 08:36:17 -07:00
Matte23
c1c2159dee Added marker sensor to CUPS integration (#25037) 2019-07-10 08:35:30 -07:00
Paul Annekov
a30c37017b Update tuyaha to 0.0.2 to catch API exceptions (#25050)
* Update tuyaha to 0.0.2 to catch API exceptions

* Updated tuyaha version in requirements
2019-07-10 01:54:19 +02:00
Aaron Bach
195b034abc Add config flow support to Geolocation (#25046) 2019-07-10 00:50:16 +02:00
William Sutton
c5239c6176 Add radiotherm CT80 current humidity support (#25024)
* Added CT80 Current Humidity Support

Added a check for if device is a CT80, and if so, queries the humidity object to get the current measured humidity reading.

* Update climate.py

Removed whitespace on line 229

* Update climate.py

Added humidity property. Version on local machine had that from previous tinkering.

* Update climate.py

Removed whitespace

* Update climate.py

Fixed tstat error handling for humidity data.
2019-07-09 21:18:05 +02:00
jlrgraham
5be695c49c Bump pyvera to 0.3.2, null/missing value protection (#25041)
* Bump pyvera to 0.3.2, null/missing value protection.

* Add another place where the pyvera version is set.
2019-07-09 20:06:45 +02:00
cgtobi
8652c84745 Fix Netatmo rain gauge precision (#25036) 2019-07-09 19:57:29 +02:00
Franck Nijhof
36ed725ab4 Improve toon climate (#25040)
* Renames internal climate state variable to preset

* Shorten function comments

* Updates local variables on preset and temp changes

* Adds support for hvac_action
2019-07-09 19:52:38 +02:00
Malte Franken
cf5a35a421 updated geojson_client library to version 0.4 (#25039) 2019-07-09 13:06:10 -04:00
Fabian Affolter
8256d72f6d Upgrade youtube_dl to 2019.07.02 (#24990)
* Upgrade youtube_dl to 2019.07.01

* Update homeassistant/components/media_extractor/manifest.json

Co-Authored-By: Josef Schlehofer <pepe.schlehofer@gmail.com>

* Update requirements_all.txt

Co-Authored-By: Josef Schlehofer <pepe.schlehofer@gmail.com>
2019-07-09 13:03:52 -04:00
Pascal Vizeli
25745e9e27 Update build pipeline 2019-07-09 15:32:09 +02:00
Franck Nijhof
3ce1049d21 Centralizes Toon data, reducing API calls (#23988)
* Centralizes Toon data, reducing API calls

Fixes #21825

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Fixes bad copy past action in services.yaml

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Addresses review comments

Signed-off-by: Franck Nijhof <frenck@addons.community>

* 👕 Fixes too many blank lines

* Unsub dispatcher
2019-07-09 14:18:51 +02:00
arigilder
f3e542542a Add missing support for jewish_calendar.omer_count sensor (#24958)
* Add missing support for omer_count to jewish_calendar

* Add tests for omer sensor

* Add tests for omer after tzeit hakochavim

* Lint fixes
2019-07-09 11:58:57 +02:00
cgtobi
07b635e7aa Fix Netatmo climate presets (#25029)
* Fix netatmo presets

* Remove off mode for valves

* Revert usage of global const

* Flip values

* Remove try...except block
2019-07-09 10:40:02 +02:00
Aaron Bach
c2e843cbc3 Add support for Notion Home Monitoring (#24634)
* Add support for Notion Home Monitoring

* Updated coverage

* Removed auto-generated translations

* Stale docstrings

* Corrected hardware version

* Fixed binary sensor representation

* Cleanup and update protection

* Updated log message

* Cleaned up is_on

* Updated docstring

* Modified which data is updated during async_update

* Added more checks during update

* More cleanup

* Fixed unhandled exception

* Owner-requested changes (round 1)

* Fixed incorrect scan interval retrieval

* Ugh

* Removed unnecessary import

* Simplified everything via dict lookups

* Ensure bridges are properly registered

* Fixed tests

* Added catch for invalid credentials

* Ensure bridge ID is updated as necessary

* Updated method name

* Simplified bridge update

* Add support for updating bridge via_device_id

* Device update guard clause

* Removed excess whitespace

* Whitespace

* Owner comments

* Member comments
2019-07-09 10:29:06 +02:00
Andrew Sayre
7a5fca69af Add hvac fan state (#25030) 2019-07-09 09:59:48 +02:00
Franck Nijhof
3016d3a186 Toon fixes for Climate 1.0 (#25027) 2019-07-09 08:44:30 +02:00
Andrew Sayre
a31e49c857 Improve SmartThings test mocking (#25028)
* Migrate to asynctest

* Simplify mock access

* Use mocks
2019-07-08 22:39:55 -04:00
Joakim Plate
2fbbcafaed Support config flow on custom components (#24946)
* Support populating list of flows from custom components

* Re-allow custom component config flows

* Add tests for custom component retrieval

* Don't crash view if no handler exist

* Use get_custom_components instead fo resolve_from_root

* Switch to using an event instead of lock

* Leave list of integrations as set

* The returned list is not guaranteed to be ordered

Backend uses a set to represent them.
2019-07-09 01:19:37 +02:00
Pascal Vizeli
a2237ce5d4 homematic add off support for climate (#25017)
* homematic add off support for climate

* fix lint
2019-07-09 00:00:25 +02:00
Daniel Høyer Iversen
af7f61fec2 ambiclimate hvac_modes (#25015)
* ambiclimate hvac_modes

* style
2019-07-08 14:12:23 -07:00
Paulus Schoutsen
26a66276cd Fix Nest sensor (#25023) 2019-07-08 14:12:02 -07:00
Phil Bruckner
9944e675a5 Add template support to state trigger's for option (#24912) 2019-07-08 13:59:58 -07:00
Phil Bruckner
f9b9883aba Add template support to numeric_state trigger's for option (#24955) 2019-07-08 13:58:50 -07:00
Phil Bruckner
1431fd6fbd Add datetime option to input_datetime.set_datetime service (#24975) 2019-07-08 13:18:42 -07:00
Paulus Schoutsen
b11171aaeb Fix mimetypes on borked Windows machines (#25018) 2019-07-08 13:16:22 -07:00
Paulus Schoutsen
0b7a901c81 Fix ecobee flaky test (#25019) 2019-07-08 13:10:01 -07:00
Daniel Høyer Iversen
662e0dde80 Sensibo, add HVAC_MODE_OFF (#25016) 2019-07-08 13:17:59 -04:00
Joakim Plate
ab832cda71 Add support for arcam fmj receivers (#24621)
* Add arcam_fmj support

* Just use use state in player avoid direct client access

* Avoid leaking exceptions on invalid data

* Fix return value for volume in case of 0

* Mark component as having no coverage

* Add new requirement

* Add myself as maintainer

* Correct linting errors

* Use async_create_task instead of async_add_job

* Use new style string format instead of concat

* Don't call init of base class without init

* Annotate callbacks with @callback

Otherwise they won't be called in loop

* Reduce log level to debug

* Use async_timeout instead of wait_for

* Bump to version of arcam_fmj supporting 3.5

* Fix extra spaces

* Drop somewhat flaky unique_id

* Un-blackify ident to satisy pylint

* Un-blackify ident to satisy pylint

* Move default name calculation to config validation

* Add test folder

* Drop unused code

* Add tests for config flow import
2019-07-08 17:14:19 +02:00
Jesse Rizzo
f90fe7e628 Enphase envoy individual inverter production (#24445)
* bump envoy_reader version to 0.4

* bump dependency envoy_reader to 0.4

* Enphase envoy get individual inverter production

* Add period in function description

* Fix dumb typo

* Define _attributes in __init__

* Better error messages, make update async

* Fix format error

* Fix pylint errors

* set unknown state to None

* Bump envoy_reader version to 0.8

* Change attributes to separate sensors

* Fix dumb thing

* Improve platform_setup for inverters

* Remove unneeded self._attributes, refactor platform setup

* Refactor platform setup
2019-07-08 10:21:08 -04:00
Chris Johnston
32685f16bf Implement Twilio SMS notify MediaUrl support (#24971)
* Implement Twilio SMS notify MediaUrl support

Adds support for setting the `media_url` parameter of the twilio API
client with an optional attribute under the notify `data`
attribute.

Per the twilio docs (https://www.twilio.com/docs/sms/send-messages#include-medi$
this feature is only available in the US and Canada, for
GIF, PNG, or JPEG content.

* lint: fix 80 char ruler

* use kwargs to set the media_url

after testing locally, seems like the previous way of using
object() was not working. this seems to be working

* re-use the ATTR_MEDIAURL attribute
2019-07-08 14:05:15 +02:00
Pascal Vizeli
84cf76ba36 Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3

* fix flake

* Lint

* Update Google Assistant

* ambiclimate to climate 1.0 (#24911)

* Fix Alexa

* Lint

* Migrate zhong_hong

* Migrate tuya

* Migrate honeywell to new climate schema (#24257)

* Update one

* Fix model climate v2

* Cleanup p4

* Add comfort hold mode

* Fix old code

* Update homeassistant/components/climate/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/climate/const.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* First renaming

* Rename operation to hvac for paulus

* Rename hold mode to preset mode

* Cleanup & update comments

* Remove on/off

* Fix supported feature count

* Update services

* Update demo

* Fix tests & use current_hvac

* Update comment

* Fix tests & add typing

* Add more typing

* Update modes

* Fix tests

* Cleanup low/high with range

* Update homematic part 1

* Finish homematic

* Fix lint

* fix hm mapping

* Support simple devices

* convert lcn

* migrate oem

* Fix xs1

* update hive

* update mil

* Update toon

* migrate deconz

* cleanup

* update tesla

* Fix lint

* Fix vera

* Migrate zwave

* Migrate velbus

* Cleanup humity feature

* Cleanup

* Migrate wink

* migrate dyson

* Fix current hvac

* Renaming

* Fix lint

* Migrate tfiac

* migrate tado

* Fix PRESET can be None

* apply PR#23913 from dev

* remove EU component, etc.

* remove EU component, etc.

* ready to test now

* de-linted

* some tweaks

* de-lint

* better handling of edge cases

* delint

* fix set_mode typos

* apply PR#23913 from dev

* remove EU component, etc.

* ready to test now

* de-linted

* some tweaks

* de-lint

* better handling of edge cases

* delint

* fix set_mode typos

* delint, move debug code

* away preset now working

* code tidy-up

* code tidy-up 2

* code tidy-up 3

* address issues #18932, #15063

* address issues #18932, #15063 - 2/2

* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C

* add low/high to set_temp

* add low/high to set_temp 2

* add low/high to set_temp - delint

* run HA scripts

* port changes from PR #24402

* manual rebase

* manual rebase 2

* delint

* minor change

* remove SUPPORT_HVAC_ACTION

* Migrate radiotherm

* Convert touchline

* Migrate flexit

* Migrate nuheat

* Migrate maxcube

* Fix names maxcube const

* Migrate proliphix

* Migrate heatmiser

* Migrate fritzbox

* Migrate opentherm_gw

* Migrate venstar

* Migrate daikin

* Migrate modbus

* Fix elif

* Migrate Homematic IP Cloud to climate-1.0 (#24913)

* hmip climate fix

* Update hvac_mode and preset_mode

* fix lint

* Fix lint

* Migrate generic_thermostat

* Migrate incomfort to new climate schema (#24915)

* initial commit

* Update climate.py

* Migrate eq3btsmart

* Lint

* cleanup PRESET_MANUAL

* Migrate ecobee

* No conditional features

* KNX: Migrate climate component to new climate platform (#24931)

* Migrate climate component

* Remove unused code

* Corrected line length

* Lint

* Lint

* fix tests

* Fix value

* Migrate geniushub to new climate schema (#24191)

* Update one

* Fix model climate v2

* Cleanup p4

* Add comfort hold mode

* Fix old code

* Update homeassistant/components/climate/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/climate/const.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* First renaming

* Rename operation to hvac for paulus

* Rename hold mode to preset mode

* Cleanup & update comments

* Remove on/off

* Fix supported feature count

* Update services

* Update demo

* Fix tests & use current_hvac

* Update comment

* Fix tests & add typing

* Add more typing

* Update modes

* Fix tests

* Cleanup low/high with range

* Update homematic part 1

* Finish homematic

* Fix lint

* fix hm mapping

* Support simple devices

* convert lcn

* migrate oem

* Fix xs1

* update hive

* update mil

* Update toon

* migrate deconz

* cleanup

* update tesla

* Fix lint

* Fix vera

* Migrate zwave

* Migrate velbus

* Cleanup humity feature

* Cleanup

* Migrate wink

* migrate dyson

* Fix current hvac

* Renaming

* Fix lint

* Migrate tfiac

* migrate tado

* delinted

* delinted

* use latest client

* clean up mappings

* clean up mappings

* add duration to set_temperature

* add duration to set_temperature

* manual rebase

* tweak

* fix regression

* small fix

* fix rebase mixup

* address comments

* finish refactor

* fix regression

* tweak type hints

* delint

* manual rebase

* WIP: Fixes for honeywell migration to climate-1.0 (#24938)

* add type hints

* code tidy-up

* Fixes for incomfort migration to climate-1.0 (#24936)

* delint type hints

* no async unless await

* revert: no async unless await

* revert: no async unless await 2

* delint

* fix typo

* Fix homekit_controller on climate-1.0 (#24948)

* Fix tests on climate-1.0 branch

* As part of climate-1.0, make state return the heating-cooling.current characteristic

* Fixes from review

* lint

* Fix imports

* Migrate stibel_eltron

* Fix lint

* Migrate coolmaster to climate 1.0 (#24967)

* Migrate coolmaster to climate 1.0

* fix lint errors

* More lint fixes

* Fix demo to work with UI

* Migrate spider

* Demo update

* Updated frontend to 20190705.0

* Fix boost mode (#24980)

* Prepare Netatmo for climate 1.0 (#24973)

* Migration Netatmo

* Address comments

* Update climate.py

* Migrate ephember

* Migrate Sensibo

* Implemented review comments (#24942)

* Migrate ESPHome

* Migrate MQTT

* Migrate Nest

* Migrate melissa

* Initial/partial migration of ST

* Migrate ST

* Remove Away mode (#24995)

* Migrate evohome, cache access tokens (#24491)

* add water_heater, add storage - initial commit

* add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

delint

* Add Broker, Water Heater & Refactor

add missing code

desiderata

* update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

* bugfix - loc_idx may not be 0

more refactor - ensure pure async

more refactoring

appears all r/o attributes are working

tweak precsion, DHW & delint

remove unused code

remove unused code 2

remove unused code, refactor _save_auth_tokens()

* support RoundThermostat

bugfix opmode, switch to util.dt, add until=1h

revert breaking change

* store at_expires as naive UTC

remove debug code

delint

tidy up exception handling

delint

add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

delint

bugfix - loc_idx may not be 0

more refactor - ensure pure async

more refactoring

appears all r/o attributes are working

tweak precsion, DHW & delint

remove unused code

remove unused code 2

remove unused code, refactor _save_auth_tokens()

support RoundThermostat

bugfix opmode, switch to util.dt, add until=1h

revert breaking change

store at_expires as naive UTC

remove debug code

delint

tidy up exception handling

delint

* update CODEOWNERS

* fix regression

* fix requirements

* migrate to climate-1.0

* tweaking

* de-lint

* TCS working? & delint

* tweaking

* TCS code finalised

* remove available() logic

* refactor _switchpoints()

* tidy up switchpoint code

* tweak

* teaking device_state_attributes

* some refactoring

* move PRESET_CUSTOM back to evohome

* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome

* refactor SP code and dt conversion

* delinted

* delinted

* remove water_heater

* fix regression

* Migrate homekit

* Cleanup away mode

* Fix tests

* add helpers

* fix tests melissa

* Fix nehueat

* fix zwave

* add more tests

* fix deconz

* Fix climate test emulate_hue

* fix tests

* fix dyson tests

* fix demo with new layout

* fix honeywell

* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)

* Lint

* PyLint

* Pylint

* fix fritzbox tests

* Fix google

* Fix all tests

* Fix lint

* Fix auto for homekit like controler

* Fix lint

* fix lint
2019-07-08 14:00:24 +02:00
Joakim Plate
c2f1c4b981 Correct socket use in cert_expiry platform (#25011)
* Make sure we use same family for ssl socket and connection

getaddrinfo result could be different from what connection
was made with. It also blocks potential use of
happy eye balls algorithm

This also fixes lingering sockets until python garbage
collection.

* Add availability value if unable to get expiry

* Fix lint issue
2019-07-08 11:33:23 +02:00
Seweryn Zeman
31d7b702a6 Added missing yeelight models mapping (#24963) 2019-07-07 23:50:48 -04:00
Joakim Sørensen
df4caf41d0 Install requirements for integrations in packages before importing them. (#25005)
* Process requirements for integrations in packages before loading

* trigger buld
2019-07-07 12:04:30 -07:00
Tom Harris
0595fc3097 Upgrade insteonplm to 0.16.0 and add INSTEON scene triggering (#24765)
* Upgrade insteonplm to 0.16.0 and add INSTEON scene triggering

* Fix spacing issue

* Dummy commit to trigger CLA

* Remove dummy change

* Code review changes

* Use ENTITY_MATCH_ALL keyword from const and lint cleanup

* Make entity method print_aldb private
2019-07-07 20:31:04 +02:00
Tsvi Mostovicz
b0dc782c98 Upgrade hdate==0.8.8 (#25008)
This should fix incosistencies between issur_melacha_in_effect sensor and candle_lighting time.

Probably fixes #24479 and #23852
2019-07-07 17:32:54 +02:00
Daniel Høyer Iversen
ecd7f86df0 upgrade switchmate to latest lib (#25006) 2019-07-07 13:02:13 +02:00
Ville Skyttä
b834671555 Test dependency updates (#25004)
* Upgrade pytest to 5.0.1

https://docs.pytest.org/en/latest/changelog.html#pytest-5-0-1-2019-07-04

* Upgrade asynctest to 0.13.0

* Upgrade requests_mock to 1.6.0
2019-07-07 12:30:31 +02:00
Dave T
6e24b52a7e Add support for aurora ABB Powerone solar photovoltaic inverter (#24809)
* Add support for aurora ABB Powerone solar photovoltaic inverter

* Add support for aurora ABB Powerone solar photovoltaic inverter

* Update stale docstring

* Fixed whitespace lint errors

* Remove test code

* Delete README.md

Website documentation contains setup instructions.  README not needed here.

* Only close the serial line once.

* Correct newlines between imports

* Change add_devices to add_entites and remove unnecessary logging.

* Use new style string formatting instead of concatenation

* Directly access variables rather than via config.get

* Update sensor.py
2019-07-07 11:22:21 +02:00
David Winn
628e12c944 Sleepiq single sleeper crash (#24941)
* Update sleepyq to 0.7

Fixes crash when working with a single sleeper.

* sleepiq: Handle null side definitions

These happen if no sleeper is defined for a side of the bed. Don't
create sensors for null sides; they'll crash every time we try to use
them.

* sleepiq: Fix urls mocked to match sleepyq 0.7

* sleepi: Fix test_sensor.TestSleepIQSensorSetup

Sleepyq 0.7 throws on empty strings, so we have to specify them.

* sleepiq: Test for ValueError thrown by sleepyq 0.7

* sleepiq: Drop no longer used HTTPError import

* sleepiq: Add tests for single sleeper case

* sleepiq: Shorten comments to not overflow line length

* sleepiq: Use formatted string literals for adding suffixes to test files

* sleepiq: Use str.format() for test suffixing
2019-07-07 08:40:02 +02:00
Penny Wood
adbec5bffc Changes as per code review of #24646 (#24917) 2019-07-07 07:36:57 +02:00
Ville Skyttä
e8a5306c23 Upgrade mypy to 0.711, drop no longer needed workarounds (#24998)
https://mypy-lang.blogspot.com/2019/06/mypy-0711-released.html
2019-07-07 03:58:33 +02:00
Franck Nijhof
b274b10f38 Adds Stale Probot for issues (#24985)
* Adds Stale Probot for issues

* Do not ignore assigned issues

* Small language tweak in mark comment
2019-07-06 20:18:20 +02:00
Franck Nijhof
ac4f2c9f73 Adds Lock Threads Probot (#24984) 2019-07-06 19:48:08 +02:00
Paul Annekov
97ed7fbb3f Switched from tuyapy to tuyaha as 1st one is not maintained (#24821) 2019-07-06 10:39:49 -07:00
Robert Dunmire III
003ca655ee Fix errors if rest source becomes unavailable (#24986)
* Fix errors if rest source becomes unavailable

* Remove exclamation mark
2019-07-06 19:33:37 +02:00
Adriaan Peeters
412910ca65 Add sonos.play_queue service (#24974)
* Add sonos.play_queue service

* Add SERVICE_PLAY_QUEUE import in alphabetical order

* Add queue_position parameter for sonos.play_queue service

* Move queue_position default to schema definition
2019-07-06 17:19:03 +02:00
Franck Nijhof
31f569ada9 Batch of Component(s) -> Integration(s) (#24972) 2019-07-05 15:24:26 -07:00
Niels Mündler
e75c9efb3f Fix monitoring of trays in syncthru component (#24961) 2019-07-05 11:23:17 +02:00
cgtobi
e93919673e Implement ADR0003 for Netatmo sensor (#24944)
* Remove configurable monitored conditions

* Only process existing modules

* Remove unused import

* Fix linter error
2019-07-05 09:41:18 +02:00
John Mihalic
c814b39fdb Update pyHik library to 0.2.3 (#24957) 2019-07-05 09:29:35 +02:00
Aaron Bach
a491f97eb9 Allow updating of via_device in device registry (#24921)
* Allow updating of via_device in device registry

* Added test
2019-07-04 19:10:23 -04:00
David F. Mulcahey
3c487928d4 New scanner device tracker and ZHA device tracker support (#24584)
* initial implementation for zha device trackers

* constant

* review comments

* Revert "review comments"

This reverts commit 2130823566820dfc114dbeda08fcdf76ed47a4e7.

* rename device tracker entity

* update trackers

* raise when not implemented

* Update homeassistant/components/device_tracker/config_entry.py

Review comment

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* move source type to base state attrs

* review comments

* review comments

* review comments

* fix super call

* fix battery and use last seen from device

* add test

* cleanup and add more to test

* cleanup post zha entity removal PR

* add tests for base entities

* rework entity tests
2019-07-04 12:44:39 +02:00
Steven Rollason
e824c553ca Fix exclusion of routes with excl_filter (#24928)
Fix exclusion of routes with excl_filter (was including instead of excluding)
2019-07-03 19:48:01 -04:00
Chris Soyars
2634f35b4e Add support for Yale YRL256 lock (#24932) 2019-07-03 19:29:21 -04:00
Anders Melchiorsen
a1aaeab33a Update pysonos to 0.0.19 (#24930) 2019-07-03 19:26:16 -04:00
Jeff Irion
e9816f7e30 Bump androidtv to 0.0.18 (#24927)
* Bump androidtv to 0.0.18

* Bump androidtv to 0.0.18
2019-07-03 20:18:37 +02:00
David F. Mulcahey
a9459c6d92 Remove ZHA device entity (#24909)
* move availability handling to device

* update last_seen format

* add battery sensor

* fix interval

* fix battery reporting now that it is a sensor

* remove zha entities and add battery sensor
2019-07-03 13:36:36 -04:00
Дубовик Максим
eec67d8b1a New languages that looks like supported by Google but not documented: (#24881)
* cs-CZ – Czech, Czech Republic
* el-GR – Modern Greek (1453-), Greece
* en-IN – English, India
* fi-FI – Finnish, Finland
* fil-PH – Filipino, Philippines
* hi-IN – Hindi, India
* id-ID – Indonesian, Indonesia
* vi-VN – Vietnamese, Viet Nam
Fixed regex expression to match language codes like fil-PH
2019-07-03 16:40:14 +02:00
cgtobi
e8d9fe0aa8 Fix home coach discovery (#24902)
* Fix home coach discovery

* Update requirements file
2019-07-02 21:55:01 -04:00
Paulus Schoutsen
aa03550f6b Updated frontend to 20190702.0 2019-07-02 10:34:22 -07:00
kreegahbundolo
61c88db8a1 Add ability to send attachments in pushover notifications (#24806)
* Added ability to send attachments in pushover notifications

* Added full name for exception to satisfy static check

* Fixed hanging indent lint problem

* Added path checking, removed import re, changed url check method to use
startswith.

* Removed argument from logging statement.

* Changed IOError to OSError, fixed logging, added logging statement.
2019-07-02 17:56:12 +02:00
Phil Bruckner
8dca73d08e Add missing trigger.for variable to template trigger (#24893) 2019-07-02 17:46:26 +02:00
Phil Bruckner
3f4ce70414 Fix 'same state' monitoring in state trigger (#24904) 2019-07-02 17:29:38 +02:00
Phil Bruckner
945afbc6d4 Fix 'same state' monitoring in numeric_state trigger (#24910) 2019-07-02 17:28:02 +02:00
Anders Melchiorsen
c0a342d790 Stability improvements for Sonos availability (#24880)
* Stability improvements for Sonos availability

* Handle seen reentrancy
2019-07-02 09:25:02 -04:00
Pascal Vizeli
6de6c10bc3 Update devcontainer.json 2019-07-02 14:31:06 +02:00
Pascal Vizeli
6c25c9760a Update devcontainer.json 2019-07-02 13:34:50 +02:00
Pascal Vizeli
7bf140f921 Update devcontainer.json 2019-07-02 13:32:35 +02:00
Phil Bruckner
e3d281b3c4 Bump life360 package to 4.0.1 (#24905) 2019-07-02 12:14:46 +02:00
Pascal Vizeli
0c43c4b5e1 Add git editor / app port 2019-07-02 10:39:02 +02:00
Penny Wood
23dd644f4a Update IDs for rename node/value (#24646)
* Update IDs for rename node/value

* Rename devices and entities

* Improved coverage
2019-07-01 15:54:19 -07:00
David F. Mulcahey
7f90a1cab2 go back to signals and no hard entity references (#24894) 2019-07-01 16:32:57 -04:00
kevank
b6e0f538c5 Update tts.py (#24892) 2019-07-01 10:49:27 -07:00
Dennis Keitzel
8cd138608c Support mqtt discovery topic prefix with slashes (#24840) 2019-07-01 10:23:01 -07:00
David Bonnes
846575b7fb Tweak geniushub battery icons according to device state (#24798)
* tweak battery icons according to device state/availability

* tweak battery icons according to device state/availability 2

* make dt objects aware

* make dt objects aware 2

* woops - use util.dt in favour of datetime

* woops - use util.dt in favour of datetime 2

* refactor battery icon code, remove parallel_updates
2019-07-01 10:19:14 -07:00
Daniel Høyer Iversen
3d2f843c1d Upgrade pytest to 5.0.0 (#24885)
* Upgrade pytest to 5.0.0

* exception message for pytest 5
2019-07-01 10:47:42 -04:00
Jeff Irion
5ba83d4dfb Bump androidtv to 0.0.17 (#24886)
* Bump androidtv to 0.0.17

* Bump androidtv to 0.0.17
2019-07-01 10:47:21 -04:00
Paulus Schoutsen
0dd19ed49c Updated frontend to 20190630.0 2019-06-30 22:53:35 -07:00
Paulus Schoutsen
77b83b9e4d Update translations 2019-06-30 22:53:27 -07:00
Andrew Sayre
7db4eeaf7f Move SmartThings imports to top (#24878)
* Move imports to top

* use lib constants

* Add missing three_axis mapping
2019-06-30 22:29:21 -04:00
David F. Mulcahey
7d651e2b7a Fix traceback during ZHA device removal (#24882)
* fix device remove lifecycle
* clean up remove signal
* add guard
2019-06-30 21:12:27 -04:00
Fabian Affolter
40c424e793 Upgrade bcrypt to 3.1.7 (#24850) 2019-06-30 20:23:47 -04:00
Fabian Affolter
a6ea5d43b4 Upgrade importlib-metadata to 0.18 (#24848) 2019-06-30 20:23:27 -04:00
Maikel Punie
bf70e91a0d Velbus: autodiscover covers (#24877)
* Added covers to the velbus component with autodicovery, bumped python velbus version

* Fixed some pylint stuff
2019-06-30 13:02:07 -07:00
Fabian Affolter
5cf923ead6 Upgrade youtube_dl to 2019.06.27 (#24875) 2019-06-30 13:52:08 -04:00
realthk
fec2461e0e Hungarian is also supported in Google Cloud TTS (#24861)
* Hungarian is also a supported language

* Hungarian is also a supported language

* Hungarian is also a supported language
2019-06-30 13:50:06 -04:00
Fabian Affolter
c71a5643ff Update praw to 6.3.1 (#23737)
* Upgrade praw to 6.3.1

* Update praw to 6.3.1
2019-06-30 16:49:16 +02:00
zewelor
b0387c4428 Fix mysensors icon name (#24871) 2019-06-30 12:15:29 +02:00
Fabian Affolter
1e149a704b Upgrade cryptography to 2.7 (#24852) 2019-06-30 07:21:35 +02:00
Fabian Affolter
cb71b4a657 Upgrade psutil to 5.6.3 (#24854) 2019-06-29 11:40:57 -04:00
Fabian Affolter
26cc41094d Upgrade jinja2 to >=2.10.1 (#24851) 2019-06-29 15:47:22 +02:00
Fabian Affolter
9946b19735 Upgrade pyyaml to 5.1.1 (#24847) 2019-06-29 14:34:55 +02:00
Fabian Affolter
6ad9a97f0d Upgrade certifi to >= 2019.6.16 (#24846) 2019-06-29 14:34:27 +02:00
Fabian Affolter
a91ad0189e Upgrade numpy to 1.16.4 (#24845) 2019-06-29 07:15:32 -04:00
Fabian Affolter
67b6657bcd Upgrade sqlalchemy to 1.3.5 (#24844) 2019-06-29 07:14:47 -04:00
Fabian Affolter
e1a34c8030 Upgrade luftdaten to 0.6.1 (#24842)
* Upgrade luftdaten to 0.6.0

* Upgrade luftdaten to 0.6.1
2019-06-29 11:03:38 +02:00
zewelor
b70f907d25 Fix yeelight color temp getter (#24830)
* Fix yeelight color temp getter

* Remove wrong types
2019-06-28 22:56:11 -07:00
Jonathan Keljo
cde855f67d Upgrade sisyphus-control to 2.2 (#24837)
PR #22457 added some code that used new methods in `sisyphus-control` 2.2.
Unfortunately, because of the move to manifests it was merged still depending
on 2.1.

Fixes #24834
2019-06-28 22:45:57 -07:00
Paulus Schoutsen
9cf43dd8ff Merge pull request #24839 from home-assistant/rc
0.95.4
2019-06-28 22:42:23 -07:00
Phil Bruckner
03e6a92cf3 Add template support to template trigger's for option (#24810) 2019-06-28 22:30:47 -07:00
Paulus Schoutsen
21c2e8da6e Bumped version to 0.95.4 2019-06-28 22:23:22 -07:00
Paulus Schoutsen
b3963e56ec Guard for None entity config (#24838) 2019-06-28 22:23:17 -07:00
zewelor
c6e8e2398c Improve autodiscovered yeelights model detection (#24671)
* Improve autodiscovered yeelights model detection

* Lint fixes

* Logger warn fix
2019-06-28 22:23:17 -07:00
Paulus Schoutsen
4b5718431d Guard for None entity config (#24838) 2019-06-28 22:23:00 -07:00
Niels Mündler
333e1d6789 Fronius (solar energy and inverter) component (#22316)
* Introduced fronius component that adds ability to track Fronius devices from Home Assistant

* Use device parameter for fetching inverter data

* Fixed handling of default scope

* Handle exceptions from yield

* Fulfill PR requirements

* Fixed houndci violations

* Found the last hound violation

* Fixed docstring (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165776934)

* Fixed import order with isort (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165776957)

* CONF_DEVICE is now CONF_DEVICEID (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165777161)

* Added docstring to class FroniusSensor (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165777792)

* Fixed docstring for state (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165777885)

* Added/fixed docstrings (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165778108 & https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165778125)

* Remove redundant log entry (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779213)

* Fixed error message if sensor update fails (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779435)

* Fixed error log messages (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779751 & https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779761)

* Satisfy hound

* Handle exceptions explicit (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168940902)

* Removed unnecessary call of update (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168940894)

* The point makes the difference.

* Removed unrelated requirements

* Remove config logging (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168968748)

* Reorder and fix imports (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168968725, https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168968691)

* Update fronius requirement

* Various small fixes

* Small fixes

* Formatting

* Add fronius to coverage

* New structure and formatting

* Add manifest.json

* Fix data loading

* Make pylint happy

* Fix issues

* Fix parse_attributes

* Fix docstring and platform schema

* Make use of default HA-Const config values

* Change configuration setup, introducing list of monitored conditions

* Change the structure slightly, allowing for a list of sensors

* Remove periods from logging

* Formatting

* Change name generation, use variable instead of string

* small fixes

* Update sensor.py

* Incorporate correction proposals

* Setting default device inside validation

* Move import on top and small format

* Formatting fix

* Rename validation method to _device_id_validator
2019-06-28 20:48:52 -07:00
Paulus Schoutsen
2e9c71f2c0 Merge pull request #24836 from home-assistant/rc
0.95.3
2019-06-28 20:45:21 -07:00
Paulus Schoutsen
072879cc6e Bumped version to 0.95.3 2019-06-28 20:44:23 -07:00
Paulus Schoutsen
cc75adfed6 Alexa sync state report (#24835)
* Do a sync after changing state reporting

* Fix entity config being None
2019-06-28 20:44:19 -07:00
Paulus Schoutsen
3cafc1f2c6 Alexa sync state report (#24835)
* Do a sync after changing state reporting

* Fix entity config being None
2019-06-28 20:43:57 -07:00
Aaron Bach
19a65f8db6 Remove temperature attribute from SimpliSafe alarm control panel (#24833) 2019-06-28 20:38:07 -07:00
Paulus Schoutsen
e8d1d28fdd Make sure alert is set up after notify (#24829) 2019-06-28 16:28:33 -06:00
Pascal Vizeli
9ad063ce03 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-28 22:55:04 +02:00
Paulus Schoutsen
f67693c56c Fix vacuum tests 2019-06-28 13:41:25 -07:00
Pascal Vizeli
9616fbdc36 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-28 22:31:27 +02:00
Pascal Vizeli
48dd5af9e3 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-28 22:18:52 +02:00
Pascal Vizeli
bc0fb5e3d9 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-28 22:08:29 +02:00
Pascal Vizeli
8e2bbf8c82 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-28 19:38:13 +02:00
Pascal Vizeli
538caafac2 Full speed azure 2019-06-28 17:35:17 +00:00
Paulus Schoutsen
0871d6c9c6 Merge pull request #24828 from home-assistant/rc
0.95.2
2019-06-28 10:30:01 -07:00
Luuk
468b0e8934 Add template vacuum support (#22904)
* Add template vacuum component

* Fix linting issues

* Make vacuum state optional

* Fix pylint issues

* Add context to template vacuum service calls

* Added tests to template vacuum

* Fix indent

* Fix docstrings

* Move files for new component folder structure

* Revert additions for template_vacuum tests to common.py

* Use existing constants for template vacuum config

* Handle invalid templates

* Add tests for unused services

* Add test for invalid templates

* Fix line too long

* Do not start template change tracking in case of MATCH_ALL

* Resolve review comments
2019-06-28 12:19:00 -04:00
Paulus Schoutsen
6cbfc63311 Bumped version to 0.95.2 2019-06-28 08:50:23 -07:00
Paulus Schoutsen
2886b217ab Fix calling empty script turn off (#24827) 2019-06-28 08:50:16 -07:00
Phil Bruckner
fafc68673a Fix another Life360 bug (#24805) 2019-06-28 08:50:16 -07:00
David F. Mulcahey
1990df63aa Bump ZHA quirks module (#24802)
* bump quirks version

* bump version - mija magnet
2019-06-28 08:50:15 -07:00
Paulus Schoutsen
e39f0f3e25 Make sure entity config is never none (#24801) 2019-06-28 08:50:14 -07:00
Pascal Vizeli
1f5e2fa3ce Update azure-pipelines-release.yml for Azure Pipelines (#24800) 2019-06-28 08:50:14 -07:00
cgtobi
204dd77404 Fix netatmo weatherstation setup error (#24788)
* Check if station data exists and reduce calls

* Fix module names list

* Add warning

* Remove dead code
2019-06-28 08:50:13 -07:00
Paulus Schoutsen
4e5b1ccde6 Fix calling empty script turn off (#24827) 2019-06-28 08:49:33 -07:00
Paulus Schoutsen
80844ae2ee Add developer tools panel (#24812) 2019-06-28 08:34:53 -07:00
cgtobi
a69a00785f Fix netatmo weatherstation setup error (#24788)
* Check if station data exists and reduce calls

* Fix module names list

* Add warning

* Remove dead code
2019-06-27 20:16:46 -07:00
Tejpal Sahota
41dd70f644 Changed default encoding to mp3 (#24808) 2019-06-27 20:16:22 -07:00
Paulus Schoutsen
e5b8d5f7ea Updated frontend to 20190627.0 2019-06-27 17:57:02 -07:00
Josh Anderson
c49869160b Use step from tado rather than assuming 0.1 (#24807) 2019-06-27 16:17:15 -07:00
Josh Anderson
69089da88e Use climate device's target temp step value (#24804) 2019-06-27 15:14:23 -07:00
Phil Bruckner
e43a733017 Fix another Life360 bug (#24805) 2019-06-27 15:11:32 -07:00
dreed47
3eb6b9d297 Zestimate fix for issue #23837 (#23838)
* Zestimate fix for issue #23837

removed references to MIN_TIME_BETWEEN_UPDATES
and replaced with SCAN_INTERVAL

* Zestimate fix for issue #23837

removed references to MIN_TIME_BETWEEN_UPDATES
and replaced with SCAN_INTERVAL
2019-06-27 15:09:33 -07:00
David F. Mulcahey
ac5ab52d01 Bump ZHA quirks module (#24802)
* bump quirks version

* bump version - mija magnet
2019-06-27 15:28:56 -04:00
Paulus Schoutsen
0d89b82bff Make sure entity config is never none (#24801) 2019-06-27 15:17:42 -04:00
Pascal Vizeli
0cde24e103 Update azure-pipelines-release.yml for Azure Pipelines (#24800) 2019-06-27 18:26:13 +02:00
Paulus Schoutsen
5598f05dee Merge pull request #24787 from home-assistant/rc
0.95.1
2019-06-27 08:55:10 -07:00
h3ndrik
e932fc832c Add time delta option when searching for deutsche_bahn connections (#24600)
* Add time delta option when searching for connections

Add another option 'in' to search for upcoming connections in the future.
Handy if you need a few minutes to get to the train station and need to add that to the queried departure time.

* correct style errors

* rename new option

* rename new option (2/2)

* add offset correctly
2019-06-27 15:53:05 +02:00
Paulus Schoutsen
01b6830fd2 Bumped version to 0.95.1 2019-06-26 21:25:33 -07:00
Paulus Schoutsen
c1d0ac7b9d Catch uncaught Alexa error (#24785) 2019-06-26 20:24:52 -07:00
William Scanlon
dce667fa07 Pubnub to 1.0.8 (#24781) 2019-06-26 20:24:52 -07:00
Phil Bruckner
a78361341e Fix life360 exception when no location provided (#24777) 2019-06-26 20:24:51 -07:00
Paulus Schoutsen
c87d6e4720 Catch uncaught Alexa error (#24785) 2019-06-26 20:24:20 -07:00
Ville Skyttä
71346760d0 Upgrade pytest to 4.6.3 (#24782)
* Upgrade pytest to 4.6.3

https://docs.pytest.org/en/latest/changelog.html#pytest-4-6-2-2019-06-03
https://docs.pytest.org/en/latest/changelog.html#pytest-4-6-3-2019-06-11

* Make litejet switch test work with pytest 4.6.3

Essentially reverts the corresponing change that was made for pytest
4.2 compatibility.
2019-06-26 20:01:03 -07:00
William Scanlon
f6c1f336d4 Pubnub to 1.0.8 (#24781) 2019-06-26 16:14:00 -07:00
Phil Bruckner
638c958acd Fix life360 exception when no location provided (#24777) 2019-06-26 16:03:11 -07:00
Paulus Schoutsen
b2231945dc Merge branch 'master' into dev 2019-06-26 10:42:25 -07:00
Paulus Schoutsen
4dbfafa8ca Merge pull request #24776 from home-assistant/rc
0.95.0
2019-06-26 10:41:11 -07:00
Andre Richter
56b8da133c Upgrade vallox to async client API (#24774) 2019-06-26 18:40:34 +02:00
Paulus Schoutsen
06af6f19a3 Entity to handle updates via events (#24733)
* Entity to handle updates via events

* Fix a bug

* Update entity.py
2019-06-26 09:22:51 -07:00
Paulus Schoutsen
5f37852695 Bumped version to 0.95.0 2019-06-26 09:17:45 -07:00
Daniel Høyer Iversen
5fe8a43e36 Return correct name for met.no (#24763) 2019-06-26 09:17:35 -07:00
Paulus Schoutsen
760b62e068 Ignore duplicate tradfri discovery (#24759)
* Ignore duplicate tradfri discovery

* Update name
2019-06-26 09:17:35 -07:00
John Dyer
9205334235 Update Waze route dependency to 0.10 (#24754)
* Update manifest.json

Update waze calculator to 0.10, this was supposed to have been done in #22428 but was missed. See discussion [here](https://community.home-assistant.io/t/waze-travel-time-update/50955/201)

* Update requirements_all.txt
2019-06-26 09:17:34 -07:00
cgtobi
ca4c6ffe8d Handle timeouts gracefully (#24752) 2019-06-26 09:17:33 -07:00
cgtobi
b47b555c4f Bump pyatmo to v2.1.0 (#24724) 2019-06-26 09:17:33 -07:00
Paulus Schoutsen
5d2f97de74 Updated frontend to 20190626.0 2019-06-26 09:16:04 -07:00
Paulus Schoutsen
9e0636eefa Updated frontend to 20190626.0 2019-06-26 09:15:54 -07:00
Alexei Chetroi
6ae1228e61 Enhancement/zha model manuf (#24771)
* Cleanup ZHA entities model and manufacturer usage.
Zigpy includes manufacturer and model as attributes of a zigpy
Device class, which simplifies handling of manufacturer and/or model
derived properties for the ZHA platform.

* Sort ZHA imports.
* Lint.
2019-06-26 09:31:19 -04:00
Matte23
29311e6391 Add support for IPP Printers to the CUPS integration (#24756)
* Add support for IPP Printers to the CUPS integration

* Fixed lint error

* Addressed comments, removed redundant check

* Simplified check, improved code readability
2019-06-25 16:13:08 -07:00
John Dyer
bd4f66fda3 Update Waze route dependency to 0.10 (#24754)
* Update manifest.json

Update waze calculator to 0.10, this was supposed to have been done in #22428 but was missed. See discussion [here](https://community.home-assistant.io/t/waze-travel-time-update/50955/201)

* Update requirements_all.txt
2019-06-25 15:25:53 -07:00
Daniel Høyer Iversen
dc89499116 Return correct name for met.no (#24763) 2019-06-25 13:09:04 -07:00
Alain Tavan
41b58b8bc1 fix an error in the description (#24735) 2019-06-25 10:37:25 -07:00
Emilv2
58df05a7e7 Remove obsolete comments in Dockerfile (#24748)
relevant lines were removed in e49b970665
2019-06-25 10:16:05 -07:00
Andre Richter
fb940e4269 Vallox: Fix missing hass member (#24753) 2019-06-25 10:15:41 -07:00
Paulus Schoutsen
26fc57d1b3 Ignore duplicate tradfri discovery (#24759)
* Ignore duplicate tradfri discovery

* Update name
2019-06-25 09:54:40 -07:00
cgtobi
da57f92796 Handle timeouts gracefully (#24752) 2019-06-25 08:57:43 -07:00
Andre Richter
236820d093 Add integration for Vallox Ventilation Units (#24660)
* Add integration for Vallox Ventilation Units.

* Address review comments #1

* Address review comments #2

* Replace IOError with OSError.

* Bump to fixed version of vallox_websocket_api.
2019-06-25 11:38:24 +02:00
Paulus Schoutsen
87712b9fa5 Bumped version to 0.95.0b4 2019-06-24 22:23:41 -07:00
Paulus Schoutsen
510d6d7874 Improve Alexa error handling (#24745) 2019-06-24 22:08:15 -07:00
Martin Hjelmare
8830054fad Fix locative device update (#24744)
* Add a test for two devices

* Fix locative updating all devices

* Add a guard clause that checks if correct device is passed.
2019-06-24 22:08:14 -07:00
Paulus Schoutsen
327fe63047 Clean up Google Config (#24663)
* Clean up Google Config

* Lint

* pylint

* pylint2
2019-06-24 22:08:13 -07:00
Paulus Schoutsen
0f5c9b4af3 Updated frontend to 20190624.1 2019-06-24 22:07:50 -07:00
Paulus Schoutsen
9813396880 Updated frontend to 20190624.1 2019-06-24 22:07:39 -07:00
Paulus Schoutsen
f5f86993f1 Improve Alexa error handling (#24745) 2019-06-24 22:04:31 -07:00
Martin Hjelmare
d4fc22add4 Fix locative device update (#24744)
* Add a test for two devices

* Fix locative updating all devices

* Add a guard clause that checks if correct device is passed.
2019-06-24 20:00:28 -07:00
Paulus Schoutsen
d699a550c8 Bumped version to 0.95.0b3 2019-06-24 15:01:17 -07:00
Anders Melchiorsen
f71d4312e2 Update pysonos to 0.0.17 (#24740) 2019-06-24 15:00:11 -07:00
Paulus Schoutsen
ec777a802c AdGuard to update entry (#24737) 2019-06-24 15:00:10 -07:00
Alexei Chetroi
82cad58b8d Update ZHA dependencies. (#24736) 2019-06-24 15:00:09 -07:00
Evan Bruhn
34231383ec Save cached logi_circle tokens in config folder (#24726)
Instead of the working directory, which it's doing currently. Matches pattern observed on Abode, Ring, Skybell integrations.
2019-06-24 15:00:08 -07:00
Anders Melchiorsen
6e14e8ed91 Update pysonos to 0.0.17 (#24740) 2019-06-24 14:59:15 -07:00
Paulus Schoutsen
4aedd3a09a AdGuard to update entry (#24737) 2019-06-24 14:46:32 -07:00
Alexei Chetroi
26dea0f247 Update ZHA dependencies. (#24736) 2019-06-24 16:57:07 -04:00
Conrad Juhl Andersen
0792e72f71 Add support for sensor state STATE_UNAVAILABLE (#24641)
* Fixed integration with ESPhome, which caused an error if ESPhome did not update fast enough on startup

* Set state to problem if sensor is unavailable

* Fix line length.
2019-06-24 11:30:44 -07:00
David F. Mulcahey
d9420c1f73 Remove device and entity registry entries when removing a ZHA device (#24369)
* cleanup when device is removed

fixes

* cleanup
2019-06-24 11:26:44 -07:00
Evan Bruhn
ee1884423a Save cached logi_circle tokens in config folder (#24726)
Instead of the working directory, which it's doing currently. Matches pattern observed on Abode, Ring, Skybell integrations.
2019-06-24 09:36:39 -07:00
Robin Wohlers-Reichel
17480a0398 Add 'unique_id' Property to Inverter Sensors (#24707)
* Option to change sensor names

* Python 3.5 compatibility

* Oops

* Get serial number at start

* Remove config opportunity

* Oops comma

* Changes from review

* Check yourself before you commit.
2019-06-24 08:34:20 -07:00
Paulus Schoutsen
75ec855822 Bumped version to 0.95.0b2 2019-06-24 08:33:21 -07:00
Phil Bruckner
2c5080e382 Add show_as_state options to Life360 (#24725) 2019-06-24 08:33:14 -07:00
David F. Mulcahey
48e9742658 Update ZHA dependencies (#24718)
* update deps and remove legacy constants bridge

* run deps script and fix test import
2019-06-24 08:33:13 -07:00
Oleg Kurapov
14b62120fd Extend websocket method usage to port 8002 in Samsung TV media player (#24716) 2019-06-24 08:33:12 -07:00
cgtobi
4a8149627e Bump version pyatmo to 2.0.1 (#24703) 2019-06-24 08:33:11 -07:00
David F. Mulcahey
9c85ba5b66 ZHA fix device type mappings (#24699) 2019-06-24 08:33:11 -07:00
Anders Melchiorsen
fb0cb43261 Fix time expression parsing (#24696) 2019-06-24 08:33:10 -07:00
Thomas Lovén
23722dc291 Allow extra js modules to be included in frontend (#24675)
* Add extra_module_url and extra_module_url_es5 to frontend options

* Address review comments
2019-06-24 08:33:09 -07:00
Paulus Schoutsen
e841f568c1 Update translations 2019-06-24 08:27:46 -07:00
Paulus Schoutsen
9b096322e1 Updated frontend to 20190624.0 2019-06-24 08:27:04 -07:00
Paulus Schoutsen
df32a81165 Updated frontend to 20190624.0 2019-06-24 08:26:50 -07:00
Phil Bruckner
8924d657a4 Add show_as_state options to Life360 (#24725) 2019-06-24 08:05:34 -07:00
endor
98ba529ead Add Trafikverket train component (#23470)
* Added Trafikverket train component

* Updated manifest with proper name and codeowner

* Updated requirements and manifest

* Updated CODEOWNERS

* Corrected requirements

* Added trafikverket_train/sensor.py to .coveragerc

* Added error handling and log if API call fails

* Corrected styles, removed dev log, improved validation

* Method calls to async_update(), improved error handling

* Minor cleanup/reorg for effeciency

* Added station cache and corrected to fit standards

* Simplified trainstop id  and cleaned up dict.get

* Corrected mistake after change from dict to array

* Change device class to timestamp
2019-06-24 10:38:50 +02:00
cgtobi
9a01cd84c2 Bump pyatmo to v2.1.0 (#24724) 2019-06-24 07:43:49 +02:00
John Luetke
09c6f57364 Expose ports 8123, 8300 and 51827 in Dockerfile (#24389) 2019-06-23 21:44:26 +02:00
Pascal Vizeli
a807572382 Add initial support for remote dev container (#24681)
* Add initial support for remote container

* Use constrain
2019-06-23 12:18:33 -07:00
Oleg Kurapov
dc6a44d0eb Extend websocket method usage to port 8002 in Samsung TV media player (#24716) 2019-06-23 12:11:25 -07:00
Paulus Schoutsen
c296e9b9bb Update owner stream integration 2019-06-23 12:00:06 -07:00
David F. Mulcahey
d22bb8fc7d Update ZHA dependencies (#24718)
* update deps and remove legacy constants bridge

* run deps script and fix test import
2019-06-23 13:43:19 -04:00
ktnrg45
b99275f6a5 Fix PS4 entities with shared host not updating and latency with multiple connections (#24642)
* correct assume info call

* 0.8.4

* 0.8.4

* 0.8.4

* 0.8.5

* 0.8.5

* 0.8.5

* revert condition
2019-06-23 09:52:53 -06:00
Robin Wohlers-Reichel
57502bc911 Solax update 0.1.0 (#24708)
* Update to solax 0.0.6

* Library version 0.1.0
2019-06-23 11:16:39 +02:00
cgtobi
128e66fa24 Bump version pyatmo to 2.0.1 (#24703) 2019-06-23 07:50:04 +02:00
Fabian Affolter
0132ac3c27 Upgrade Sphinx to 2.1.2 (#24693) 2019-06-23 07:49:40 +02:00
David F. Mulcahey
cfd8d70890 ZHA fix device type mappings (#24699) 2019-06-22 15:05:35 -04:00
Fabian Affolter
44d2871dc9 Upgrade youtube_dl to 2019.06.08 (#24692) 2019-06-22 14:45:39 +02:00
Fabian Affolter
821e3beab0 Upgrade discord.py to 1.2.2 (#24695) 2019-06-22 14:44:24 +02:00
Anders Melchiorsen
a439e087e1 Fix time expression parsing (#24696) 2019-06-22 13:39:33 +02:00
Andre Lengwenus
b8acbf3c3a Corrected number of default LCN segment coupler scan tryouts (#24678)
* Bump to pypck==0.6.2

* Set default segment coupler scan tryouts to 0
2019-06-22 13:27:41 +02:00
Jonathan
d25214beb1 Add aml_thermal label (#24665)
Added label for the CPU Temperature for AmLogic ARM chips.
2019-06-22 12:58:37 +02:00
Penny Wood
22d9bee41a Template: Expand method to expand groups, and closest as filter (#23691)
* Implement expand method

* Allow expand and closest to be used as filters

* Correct patch

* Addresses review comments
2019-06-22 00:32:32 -07:00
Ville Skyttä
a6eef22fbc Upgrade mypy to 0.710 (#24666)
* Upgrade mypy to 0.710

* Address mypy 0.710 errors
2019-06-22 10:19:36 +03:00
Steven Looman
f189367c02 Upgrade to async_upnp_client==0.14.10 and increase search timeout (#24685) 2019-06-22 09:12:27 +02:00
Aaron Bach
40fa4463de Change Ambient solar radiation units to lx (#24690) 2019-06-21 23:12:16 -06:00
Aaron Bach
729df112a7 Add RainMachine device classes where appropriate (#24682) 2019-06-21 17:12:28 -06:00
Thomas Lovén
9b52b9bf66 Allow extra js modules to be included in frontend (#24675)
* Add extra_module_url and extra_module_url_es5 to frontend options

* Address review comments
2019-06-21 13:16:28 -07:00
zewelor
c6d5a5a6cc Improve autodiscovered yeelights model detection (#24671)
* Improve autodiscovered yeelights model detection

* Lint fixes

* Logger warn fix
2019-06-21 15:50:25 -04:00
Pascal Vizeli
7f169e97ca Update azure-pipelines-release.yml for Azure Pipelines 2019-06-21 20:08:19 +02:00
Pascal Vizeli
560161bdbb Update azure-pipelines-release.yml for Azure Pipelines 2019-06-21 20:08:06 +02:00
Paulus Schoutsen
1761a71338 Bumped version to 0.95.0b1 2019-06-21 09:27:58 -07:00
Aaron Bach
3da3612c7b Add device class support for Ambient PWS sensors (#24677) 2019-06-21 10:27:53 -06:00
Pascal Vizeli
198432f222 Prefere binary with wheels (#24669) 2019-06-21 09:27:41 -07:00
Andrew Sayre
a868685ac9 Bump pysmartthings (#24659) 2019-06-21 09:27:41 -07:00
Paulus Schoutsen
d4cab60343 Warn when user tries run custom config flow (#24657) 2019-06-21 09:27:40 -07:00
Kevin Fronczak
da12ceae5b Upgrade blinkpy==0.14.1 for startup bugfix (#24656) 2019-06-21 09:27:39 -07:00
Anders Melchiorsen
79b10612aa Update LIFX brightness during long transitions (#24653) 2019-06-21 09:27:39 -07:00
Alexei Chetroi
d5edbb424a Bump ZHA dependencies. (#24637) 2019-06-21 09:27:38 -07:00
Martin Hjelmare
d527e2c926 Fix device tracker see for entity registry entities (#24633)
* Add a test for see service gaurd

* Guard from seeing devices part of entity registry

* Await registry task early

* Lint

* Correct comment

* Clean up wait for registry

* Fix spelling

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Fix spelling

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
2019-06-21 09:27:37 -07:00
Rodrigo Pérez
b899dd59c5 Vlc telnet (#24290)
* Vlc telnet first commit

First functional version, remains to add more functionality.

* New functions added and bugfixes

* Compliance with dev checklist

* Compliance with dev checklist

* Compliance with pydocstyle

* Removed unused import

* Fixed wrong reference for exception

* Module renamed

* Fixed module rename in other

* Fixed wrong reference for exception


Module renamed


Fixed module rename in other

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Suggestions by @OttoWinter

+Manage error when the VLC dissapears to show status unavailable.

* Removed error log, instead set unavailable state

* Changes suggested by @pvizeli

-Import location
-Use of constants

* Implemented available method

* Improved available method
2019-06-21 09:27:36 -07:00
Paulus Schoutsen
8f928982e0 Updated frontend to 20190620.0 2019-06-21 09:27:23 -07:00
Paulus Schoutsen
8f243ad59d Updated frontend to 20190620.0 2019-06-21 09:27:02 -07:00
Pascal Vizeli
c9453bab19 Prefere binary with wheels (#24669) 2019-06-21 08:47:56 -07:00
Paulus Schoutsen
78b7ed0ebe Clean up Google Config (#24663)
* Clean up Google Config

* Lint

* pylint

* pylint2
2019-06-21 11:17:21 +02:00
Rodrigo Pérez
d468d0f71b Vlc telnet (#24290)
* Vlc telnet first commit

First functional version, remains to add more functionality.

* New functions added and bugfixes

* Compliance with dev checklist

* Compliance with dev checklist

* Compliance with pydocstyle

* Removed unused import

* Fixed wrong reference for exception

* Module renamed

* Fixed module rename in other

* Fixed wrong reference for exception


Module renamed


Fixed module rename in other

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Suggestions by @OttoWinter

+Manage error when the VLC dissapears to show status unavailable.

* Removed error log, instead set unavailable state

* Changes suggested by @pvizeli

-Import location
-Use of constants

* Implemented available method

* Improved available method
2019-06-21 11:13:47 +02:00
Pascal Vizeli
6bc636c2f2 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-06-21 11:07:42 +02:00
mvn23
43a6be6471 Multiple devices support for opentherm_gw (#22932)
* Breaking change: Rewrite opentherm_gw to add support for more than one OpenTherm Gateway.
Breaks config layout and child entity ids and adds a required parameter to all service calls (gateway_id).

* Add schema and parameter description for service opentherm_gw.reset_gateway.

* Add optional name attribute in config to be used for friendly names.
Fix bugs in binary_sensor and climate platforms.

* pylint fixes

* Remove unused variables.

* Update manifest.json, remove REQUIREMENTS from .py file

* Update CODEOWNERS

* Address issues that were brought up (requested changes):
- Move imports to module level
- Change certain functions from async to sync
- Move constants to const.py (new file)
- Call gateway setup from outside of __init__()
- Move validation of monitored_variables to config schema

* Address requested changes:
- Make module imports relative
- Move more functions from async to sync, decorate with @callback where necessary
- Remove monitored_variables option, add all sensors by default
2019-06-21 10:52:25 +02:00
Pascal Vizeli
d9f2a406f6 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-06-21 10:46:35 +02:00
sfjes
0bdbf007b2 Fix downloader_download_failed event not firing for HTTP response errors (#24640) 2019-06-20 13:59:17 -07:00
Ville Skyttä
f1cbb2a0b3 braviatv, nmap_tracker: use getmac for getting MAC addresses (#24628)
* braviatv, nmap_tracker: use getmac for getting MAC addresses

Refs https://github.com/home-assistant/home-assistant/pull/24601

* Move getmac imports to top level
2019-06-20 23:35:02 +03:00
foreign-sub
ecfbfb4527 Fix AttributeError: 'NoneType' object has no attribute 'group' with sytadin component (#24652)
* Fix AttributeError: 'NoneType' object has no attribute 'group'

* Update sensor.py
2019-06-20 13:28:39 -07:00
Andrew Sayre
d8690f426c Bump pysmartthings (#24659) 2019-06-20 13:25:32 -07:00
Anders Melchiorsen
39f2e49451 Update LIFX brightness during long transitions (#24653) 2019-06-20 13:24:45 -07:00
Kevin Fronczak
58f14c5fe2 Upgrade blinkpy==0.14.1 for startup bugfix (#24656) 2019-06-20 13:24:02 -07:00
Paulus Schoutsen
319ac23736 Warn when user tries run custom config flow (#24657) 2019-06-20 13:22:12 -07:00
Alexei Chetroi
86e50530b0 Bump ZHA dependencies. (#24637) 2019-06-19 22:32:31 -04:00
Martin Hjelmare
7881081207 Fix device tracker see for entity registry entities (#24633)
* Add a test for see service gaurd

* Guard from seeing devices part of entity registry

* Await registry task early

* Lint

* Correct comment

* Clean up wait for registry

* Fix spelling

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Fix spelling

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
2019-06-20 03:22:33 +02:00
Paulus Schoutsen
8623294fcd Bumped version to 0.95.0b0 2019-06-19 16:37:53 -07:00
Paulus Schoutsen
76537a7f41 Merge remote-tracking branch 'origin/master' into dev 2019-06-19 16:37:28 -07:00
Paulus Schoutsen
c5d443a710 Update translations 2019-06-19 16:22:13 -07:00
Paulus Schoutsen
96af0cffc8 Updated frontend to 20190619.0 2019-06-19 16:21:54 -07:00
Paulus Schoutsen
114af8e24b Add missing init file 2019-06-19 15:58:39 -07:00
majuss
14752baf27 Added ELV PCA 301 smart emeter switch (#23300)
* added pca

* removed req from py

* try to fix codeowners

* redo req

* ran codeowners

* processed comments

* fix style

* fix style

* fix style

* Set availalbe to False when communication fails.
2019-06-19 15:41:43 -07:00
Paulus Schoutsen
f2962a0d16 Set up Met during onboarding (#24622)
* Set up Met during onboarding

* Lint

* Add pyMetNo to test reqs
2019-06-19 14:41:27 -07:00
Oncleben31
6ea92f86a5 Add weather alert sensor to meteo france component (#23128)
* Quick & Dirty weather alert integration

* Add attributes in weather alert sensor.

* MeteoFranceUpdate returns dept to init the alert watcher

* add rain forecast to weather attribute

* Add checks when no weather alert data are available

* Improve date and state when online source is unreachable

* update to take into account new API of vigilancemeteo 3.0.0

* Clean local patchs and put requirements in manfiest.json

* Use only one proxy for weather alerts to avoid too much HTTP requests

* linting and comments style corrections

* Add error catching and debug logging

* Correction following PR checklist

 * Add code owners
 * Update requirements_all.txt

* Comment style

* Update CODEOWNERS after rebaseline with dev branch

* update requirements_all.txt
2019-06-19 14:39:13 -07:00
Johan Nenzén
55997c74b0 Uses signal dispatcher to invoke state update (#24627) 2019-06-19 17:26:08 -04:00
Paulus Schoutsen
4e066f4681 Fix sending update when not logged in (#24624)
* Fix sending update when not logged in

* Fix test
2019-06-19 13:58:00 -07:00
Javier González Calleja
dbc4f285f1 Tolerance configuration for dlib_face_identify (#24497)
* Adding tolerance configuration support for dlib_face_identify component

* Fix tolerance parameter

* Fix static-check

* Fix flake8 check

* Fix circleci tests

* Changes for improve maintainability

* Change type of confidence option
2019-06-19 13:54:24 -07:00
Tor Arne Vestbø
f5da0e341c tellstick: Add socat to package dependencies (#24531)
Otherwise the tellstick component will fail when used with a
remote host running tellcore-net.

Fixes #24113
2019-06-19 09:23:29 -07:00
Pascal Vizeli
21c96fa76c Add support for opencv wheels (#24620) 2019-06-19 09:23:05 -07:00
David Bonnes
c1d441b0ac Add incomfort sensor and binary_sensor (#23812)
* Initial commit - add sensors to incomfort

* improve temp heuristics

* remove self._hass

* device_state_attributes shoudln't be None

* bump client

* refactor to reduce duplication of attributes

* refactor binary_sensor to simplify

* refactor binary_sensor to simplify 2

* delint

* fix rebase regression

* small refactor

* delint

* remove DEVICE_CLASS for CV pressure

* tidy up exception handling

* delint

* fix exception handling

* use differnt icon for boiler temp
2019-06-19 09:03:18 -07:00
Penny Wood
d63c44f778 Fixed issue #24335 (#24612) 2019-06-19 07:25:15 -07:00
Malte Franken
03bb3d9ddc Queensland bushfire alert feed platform (#24473)
* initial version of qfes bushfire geolocation platform

* removed all occurrences of legally protected names; using new georss library

* regenerated codeowners

* fixed pylint

* added one more valid category

* moved library import to top and ran isort
2019-06-19 07:59:29 -04:00
Daniel Høyer Iversen
9413b5a415 check for None state in broadlink (#24589) 2019-06-19 10:10:37 +02:00
Anders Melchiorsen
08e2959742 Update pysonos to 0.0.16 (#24607) 2019-06-19 10:09:50 +02:00
Paulus Schoutsen
6d9f1b3fd3 Notify Alexa when exposed entities change (#24609) 2019-06-19 10:06:28 +02:00
Aaron Bach
a89c8eeabe Add config entry for Met.no (#24608)
* Add config entry for Met.no

* Fixed tests
2019-06-18 17:44:41 -06:00
Paulus Schoutsen
f382be4c15 Cloud: Make sure on_connect forwards platform only once (#24582)
* Make sure on_connect forwards platform only once

* Make sure right handler
2019-06-18 13:59:40 -07:00
Paulus Schoutsen
ca70b96005 Update translations 2019-06-18 11:54:56 -07:00
Paulus Schoutsen
37602647aa Updated frontend to 20190618.0 2019-06-18 11:54:38 -07:00
Andre Lengwenus
d22c3f13b2 Fix validator for lcn.send_keys service (#24580)
* Fix validator for lcn.send_keys service

* Removed lowercase table names from send_keys and lock_keys validators

* Revert lowercase regex.

* Fixed table name regex.
2019-06-18 09:04:36 -07:00
Otto Winter
024ce0e8eb Add ESPHome event generation and user-defined service array support (#24595)
* Add ESPHome event generation and user-defined service array support

* Comments

* Lint
2019-06-18 17:43:11 +02:00
Otto Winter
ee5540f351 ESPHome load platforms lazily (#24594) 2019-06-18 17:41:45 +02:00
Otto Winter
e669e1e2bf ESPHome config flow only connect when needed (#24593)
* ESPHome config flow only connect when needed

* Lint
2019-06-18 17:41:21 +02:00
David F. Mulcahey
227b8bdf8a Better pairing for Xiaomi devices in ZHA (#24564)
* better xiaomi pairing
* cleanup.
2019-06-18 11:36:28 -04:00
Ben Dews
76549beb96 Bump base Somfy MyLink library version (#24587) 2019-06-18 17:32:33 +02:00
David Bonnes
2e848c3f1f Fix honeywell issue #18932 (#24402)
* change us-based default temps to Fahrenheit

* update CODEOWNERS

* update CODEOWNERS

* tweak docstring

* tweak docstring

* Coerce Fahrenheit Temps to int
2019-06-17 20:32:53 -07:00
Johan Nenzén
266b3bc714 Adds integration for Plaato Airlock (#23727)
* Adds integration for Plaato Airlock

* Updates codeowners and coveragerc

* Fixes lint errors

* Fixers lint check error

* Removed sv translation file

* Adds en translation file

* Sets config flow to true in manifest

* Moves config flow and domain to seperate files

* Fixes lint errors

* Runs hassfest to regenerate config_flows.py

* Adds should poll property and fixes for loop

* Only log a warning when webhook data was broken

* Fixes static test failure

* Moves state update from async_update to state prop

* Unsubscribes the dispatch signal listener

* Update sensor.py
2019-06-17 20:23:59 -07:00
Paulus Schoutsen
f3e4e8dce8 Fix alarm control panel tests (#24586) 2019-06-17 20:23:12 -07:00
escoand
73008885c8 Add source selection to Samsung TV media player (#22612)
* add source selection

* return generic list

* remove useless timeout

* Fix test

* Add test for select_source

* Add negative source test

* Change order

* Arghhh

* Add hass object

* Simplify source list

Co-Authored-By: escoand <escoand@users.noreply.github.com>
2019-06-17 15:00:11 -07:00
Kevin Cooper
1460f7bd80 Add code_arm_required to manual alarm (#22618)
* Add code_arm_required to manual alarm

* Add fix for alarm front end more-info-alarm_control_panel
2019-06-17 14:59:20 -07:00
Kevin Cooper
f722a6c08d Add code_arm_required to manual alarm with MQTT (#22641)
* add code_arm_requited to manual-mqtt alarm

* Add fix for alarm front end more-info-alarm_control_panel

* Fix code mistake
2019-06-17 14:49:10 -07:00
Tommaso Marchionni
cb5426c1fa Added invert_percent configuration for zwave rollershutter (#23101)
* Added invert_percent configuration for zwave rollershutter

* Added invert_percent configuration for zwave rollershutter

* Fix typo in zwave default configuration
2019-06-17 14:44:47 -07:00
kbickar
7564d1fb52 Added toggle service to covers (#23198)
* Added toggle service to cover

* Added toggle tilt service and tilt closed property

* Added is_tilt_closed so tilt can be toggled

* Added toggle services

* Added toggle tilt service

* Removed spaces

* Added tests for tilt services

* Updated tests

* Added range conversion in comparison

* Added tests to cover broken areas

* Fixed open/close tilt values and added toggle function

* Added default toggle behavior using tilt_position of 0, reverted other changes

* blank space

* Added constants and swapped assert comparisons

* Fixed attribute name

* Added mqtt responses in test

* Added constants

* Space

* Fix tilt_optimistic flag being ignored if status topic set

* Added more tests

* Changed async toggle call

* Updated group tilt test

* Updated format of asserts

* Updated states calls

* Updated function variables

* merge fixes

* Added blank line

* Changed calls to async

* More async updates
2019-06-17 14:09:31 -07:00
Paulus Schoutsen
a02b69db38 Cloud: Add Alexa report state (#24536)
* Cloud: Add Alexa report state

* Lint

* Lint

* Only track state changes when we are logged in
2019-06-17 13:50:01 -07:00
Save me
5ab1996d3f Add sensitivity and sensitvity_max attributs for binary sensor (#24438)
* Add sensitivity ans sensitvity_max attributs for binary sensor

* Update binary_sensor.py

* Update binary_sensor.py

* Update binary_sensor.py

* Update binary_sensor.py
2019-06-17 09:33:56 -07:00
David Bonnes
ffce593cc8 Fix geniushub issue #24530 (via a client bump) & handle edge cases (#24546)
* bump client library to workaround #24530

* bump client library to workaround #24530 2/2

* bump client library to workaround #24530

* bump client library to workaround #24530 2/2

* bugfix: ghost devices cause TypeError: 'NoneType' object is not subscriptable

* bugfix: broken HW zones cause AttributeError: 'GeniusZone' object has no attribute 'temperature'

* delint
2019-06-17 09:27:06 -07:00
Johann Kellerman
56155740fe SMA sensor: Add optional path (#24558) 2019-06-17 09:26:35 -07:00
Clifford W. Hansen
0a13c47a8c Added percent to the disk,memory and swap percent labels (#24575) 2019-06-17 09:23:14 -07:00
Jeff Irion
d2022cae28 Bump androidtv to 0.0.16 (#24576)
* Bump androidtv to 0.0.16

* Bump androidtv to 0.0.16
2019-06-17 09:21:21 -07:00
Otto Winter
05bb645263 Fix zeroconf migration messing up ESPHome discovery (#24578) 2019-06-17 09:19:39 -07:00
GoNzCiD
ddeb6b6baa Battery attribute & accuracy filter (#24277)
* Extract const to a const file, Add battery as tracker attribute, add accuracy filter option

* Update homeassistant/components/traccar/device_tracker.py

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/traccar/device_tracker.py

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/traccar/device_tracker.py

Use [] syntax for keys that are in the validated data.

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Fix indentation
2019-06-17 07:44:11 +02:00
zewelor
08eca4a237 Whitelist yeelight predefined effects per device type (#24544)
* Whitelist yeelight predefined effects per device type

* Fix support color
2019-06-16 16:38:15 -04:00
Anders Melchiorsen
1e248551d5 Update pysonos to 0.0.15 (#24565) 2019-06-16 19:41:13 +02:00
David F. Mulcahey
c173a3be44 Misc. ZHA enhancements (#24559)
* add nwk to device info
* input bind only cluster support
* cleanup channel only clusters
* dirty hack to correct xiaomi vibration sensor
* exclude remaining remote binary sensors
* review comments
* fix comment
2019-06-16 13:17:53 -04:00
Daniel Høyer Iversen
b782ed6bbb Update ambiclimate library (#24562) 2019-06-16 15:11:52 +02:00
lundan
a0b1b2e254 Update __init__.py (#24553)
Fix the broken charging status
2019-06-16 09:44:39 +02:00
Aaron Bach
c629f24f07 Fix a bug with Ambient PWS reconnection (#24540) 2019-06-15 12:49:40 -07:00
Matt Black
6b3c740dc3 Handle stacktrace when rtorrent host is unreachable (#24541) 2019-06-15 12:48:55 -07:00
David Bonnes
616301f7ee Fix incomfort issue #24478 & bump client (#24548)
* fix issue #24478 - missing climate entities

* bump client
2019-06-15 12:45:01 -07:00
Robert Svensson
e9b0f54a43 UniFi simplify update (#24304) 2019-06-15 17:38:22 +02:00
Penny Wood
aa8ddeca34 Flux switch (#24542)
* Updated to pytest

* Additional test case
2019-06-15 13:32:51 +08:00
Tomer Figenblat
fe8a330a45 Update requirement version and add switcher_kis services (#23477)
* Update aioswitcher requirement to 2019.4.26.

* Removed unnecessary legacy function call.

* Fixed log message capital first letter.

* Replaced None argument with empty dict.

* Replaced guard.

* Added ServiceCallType.

* Added set_auto_off and update_device_name services to the component.

* Added test cases for service calls.

* Conditioned the component services registry with the platform discovery.

* Update homeassistant/components/switcher_kis/__init__.py

Co-Authored-By: TomerFi <tomer.figenblat@gmail.com>

* Update homeassistant/components/switcher_kis/__init__.py

Co-Authored-By: TomerFi <tomer.figenblat@gmail.com>

* Resolved change requests.

* Added ContextType.

* Addes permission verification for service calls.

* Added test cases for permision verification and more.

* Replaced POLICY_CONTROL with the more suited POLICY_EDIT.

* More appropriate function name.

* Added domain and entity_id validation for calling services.

* Removed service for setting the vendor's device name.
2019-06-14 15:48:21 -07:00
Clifford W. Hansen
f9b3ba2887 Added name to sensors (#24525)
* Added name to sensors

Added name to sensors, should allow for multiple devices.

This should fix #22571 and #21591

* Update sensor.py

Fixed spelling issue, and line too long

* Update sensor.py

Removed _ as it is a friendly name
2019-06-14 15:36:38 -07:00
BackSlasher
50d282ff37 Pyyaml5.1 (#24529)
* Migrated to PyYAML 5.1

* More intelligent fixing of yaml safe_load

Based on https://circleci.com/gh/home-assistant/home-assistant/34831?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
2019-06-14 15:30:47 -07:00
Paulus Schoutsen
970b00b8d6 Updated frontend to 20190614.0 2019-06-14 14:53:20 -07:00
Paulus Schoutsen
92816b57ef Update translations 2019-06-14 14:53:13 -07:00
ktnrg45
9a8b945118 PS4 bump to 0.8.3 (#24527)
* 0.8.3

* 0.8.3

* 0.8.3

* add unsubscribe method
2019-06-14 13:47:50 -07:00
rolfberkenbosch
d8f5e9b878 Update meteoalertapi to 0.1.5 (#24528) 2019-06-14 16:31:07 -04:00
Daniel Høyer Iversen
b0e6f34976 Improve stability of netatmo sensor (#24190)
* Improve stability of netatmo sensor

* Improve stability of netatmo sensor

* Improve stability of netatmo sensor

* netatmo, except timeout

* netatmo, except timeout

* netatmo, except timeout

* netatmo, except timeout

* Always release lock
2019-06-14 21:26:02 +02:00
Robert Svensson
9aeb75f28d deCONZ - Change attribute Watts to W (#24535) 2019-06-14 20:14:45 +02:00
ktnrg45
8951c80225 WIP Ps4 Convert entity to Async / Fix entity name changing (#24101)
* Convert ps4 to async

* Init client handler.

* Add PS4_DATA

* Move data class

* add handler

* add import

* Update __init__.py

* Change most functions to async

* bump 0.8.0

* bump 0.8.0

* bump 0.8.0

* Pylint

* whitespace

* Rewrite to use asyncio sockets.

* Remove unneeded log

* Add alias

* Update __init__.py

* Update config_flow.py

* Add alias

* Add search_all method

* Clean up

* whitespace

* change comment

* 0.8.2

* 0.8.2

* 0.8.2

* Pylint

* pylint

* faster updates

* Avoid scheduling update if state is the same.

* Better handling remove search all
2019-06-13 17:36:17 -07:00
Paulus Schoutsen
6c5124e12a Cloud: allow managing Alexa entities via UI (#24522)
* Clean up Alexa config

* Cloud: Manage Alexa entities via UI

* Add tests for new cloud APIs
2019-06-13 11:58:08 -07:00
Paulus Schoutsen
08591dae0e Migrate Sonos discovery to manifest (#24507) 2019-06-13 11:09:07 -07:00
zewelor
6d3c3ce449 Refactor yeelight code (#22547)
* Separate yeelight light classes

* Removed not used variable

* Allow to create device right away, when model is declared

* Lint fixes

* Use correct brightness, when nightlight mode is on

* Pylint fix

* Add power property

* Fix imports

* Update homeassistant/components/yeelight/light.py

Co-Authored-By: Teemu R. <tpr@iki.fi>

* Small PR fixes

* Simplify device to yeelight class mapping

* Simplify device initialization code

* Fix comment
2019-06-13 12:42:47 -04:00
Paulus Schoutsen
3d03a86b13 Remove conversation from default config (#24515) 2019-06-13 08:44:43 -07:00
Paulus Schoutsen
7e2278f1cc Clean up Alexa smart home code (#24514)
* Clean up Alexa smart home code

* lint

* Lint

* Lint
2019-06-13 08:43:57 -07:00
Guy Khmelnitsky
416ff10ba9 Update DelugeClient to 1.7.1 (#24518)
* Update DelugeClient to 1.7.1 

Due to update of Deluge to 2.0.3

* deluge-client==1.7.1 in requirements_all.txt
2019-06-13 12:28:44 +02:00
Paulus Schoutsen
cc1de3191f Merge remote-tracking branch 'origin/rc' into dev 2019-06-12 22:50:59 -07:00
Andrey Kupreychik
4627d2c1fb Bumping Keenetic NDMS2 client to 0.0.8 (#24469)
Fixing issue with long strings in Telnet response
2019-06-12 19:12:55 -05:00
Paulus Schoutsen
f54ad26630 Migrate HEOS discovery to manifest (#24508)
* Migrate HEOS discovery to manifest

* Fix tests
2019-06-12 16:08:08 -07:00
aidbish
4c328e4959 missing comma preventing other voices (#24487) 2019-06-12 14:21:00 -07:00
cgtobi
1efccf2d90 Bump pyatmo to 2.00 (#24505)
* Bump pyatmo version to 1.13

* Bump to 2.00

* Fix version number
2019-06-12 14:14:00 -07:00
Paulus Schoutsen
6badd83c5d Add Cast discovery to manifest (#24504) 2019-06-12 13:54:53 -07:00
Phil Bruckner
b817609adc Fix owntracks source_type for location messages with default trigger (#24503)
Some location update messages do not contain the 't' (trigger) key. Before the change in 0.94 to
entity based trackers, these would default to source_type of 'gps' (due to default parameter
value in async_see method.) To mirror this behavior in the new entity based tracker, the
source_type property should default to SOURCE_TYPE_GPS under the same conditions.
2019-06-12 11:40:01 -07:00
Franck Nijhof
61f4c73aca Bump adguardhome to 0.2.1 (#24486)
Signed-off-by: Franck Nijhof <frenck@addons.community>
2019-06-12 09:32:01 -07:00
Paulus Schoutsen
24e1a568a2 remove docs from config entries file [skip ci] (#24488) 2019-06-12 09:29:28 -07:00
Paulus Schoutsen
06ca04c1c8 Update hass-nabucasa to 0.14 (#24481)
* Update hass-nabucasa to 0.14

* Update owner of cloud

* Update codeowners
2019-06-12 09:29:02 -07:00
Reinder Reinders
5698173c76 Version bump for toonapilib to include new API call for fetching thermostat states, which was sometimes missing causing errors in the library (#24459) 2019-06-12 10:31:55 -05:00
Anders Melchiorsen
d7fcb5268a Fix aprs imports (#24485) 2019-06-11 15:57:29 -07:00
kbickar
d041c62f55 Position is reversed for horizontal awnings (#23257)
* Position is reversed for awnings

* Changed device class function to use map

* It wanted more linebreak

* Updated defaults

* Shortened line

* space
2019-06-11 15:56:55 -07:00
Ties de Kock
0eb387916f Camera platform for buienradar imagery (#23358)
* Add camera for buienradar radar

* Use asyncio.Conditions instead of asyncio.Lock

* Add test and fix python 3.5 compatibility

* rename interval to delta for consistency with BOM integration

* fix linting error introduced during rebase

* Improved buienradar.camera documentation and tests

  * Incorporated one comment on a redundant/cargo cult function
  * Improved documentation
  * Increase test coverage by fixing one test by making it a coroutine
    (to make it actually run), adding another test case, and changing
    the flow in the implementation.

* style changes after review, additional test case

* Use python 3.5 style mypy type annotations in __init__

* Remove explicit passing of event loop

* Adopt buienradar camera as codeowner

* Update manifest.json

* Update CODEOWNERS through hassfest

Updated CODEOWNERS through hassfest (instead of manually), thanks to
@balloob for the hint.
2019-06-11 15:26:04 -07:00
Jurriaan Pruis
b87c541d3a Support ZLO device types to support newer Zigbee devices in ZHA (#24429)
* Support ZLO device types
Support the device types that are added in https://github.com/zigpy/zigpy/pull/176
so newer Zigbee devices can be supported.

* Remove BINARY_SENSOR mappings
* Add back ON_OFF_LIGHT_SWITCH, DIMMER_SWITCH and COLOR_DIMMABLE_LIGHT
Since they are target devices I've added them as switch and lights,
which matches the Zigbee documentation.

* Upgrade to zigpy-homeassistant v0.5.0
To be able to use the new DeviceTypes
2019-06-11 16:28:37 -04:00
Save me
a6a3555684 Add attributs and fix lightlevel inconsistency for LightLevel sensor (#24439)
* Add attributs and fix state level

* Update sensor.py

* Update sensor.py
2019-06-11 10:41:20 -07:00
Quentame
7559e70027 Add Linky sensors : yesterday + months + years (#23726)
* Add Linky sensors : yesterday + months + years

- SCAN_INTERVAL to 4 hours
- Always close_session after getting the data
- Add username attr
- Fix not updating Linky sensor when Enedis API fails

* Fix @balloob review: remove monitored_conditions
2019-06-11 10:18:41 -07:00
Philip Rosenberg-Watt
8fcfcc40fc Add APRS device tracker component (#22469)
* Add APRS device tracker component

This component keeps open a connection to the APRS-IS infrastructure so
messages generated by filtered callsigns can be immediately acted upon.
Any messages with certain values for the 'format' key are position
reports and are parsed into device tracker entities.

* Log errors and return if startup failure

* Fix unit tests
2019-06-11 10:16:13 -07:00
tetienne
0a7919a279 Somfy open api (#19548)
* CREATE Somfy component

* CREATE cover Somfy platform

* USE somfy id as unique id

* UPDATE all the devices in one call to limit the number of call

* FIX Don't load devices if not yet configured

* IMP Replace configurator by a simple notification

* ADD log in case state does not match

* IMP wording

* REMOVE debug stuf

* ADD support for tilt position

* UPDATE requirements

* FIX Use code instead of authorization response

 - Will allow to setup Somfy without https

* HANDLE stateless devices (Somfy RTS)

* FIX import locally 3rd party library

* UPDATE pymfy to 0.4.3

* ADD missing docstring

* FIX For Somfy 100 means closed and 0 opened

* FIX position can be None

* ENHANCE error management when error 500 occurs at setup

* FIX indent

* ROLLBACK tilt modification

 - See https://community.home-assistant.io/t/somfy-tahoma-official-api/61448/90?u=tetienne

* FIX Look for capability instead of state

* DON'T use exception to test if a feature is available

* UPDATE dependency

* ADD device_info property

* AVOID object creation in each method

* REMOVE unused constants

* ADD missing doc

* IMP Only make one call to add_entities

* USE dict[key] instead of get method

* IMP Don't pass hass object to the entities

* FIX Don't end logging messages with period

* USE config entries instead of a cache file

* IMPLEMENT async_unload_entry

* CONSOLIDATE package

 - see home-assistant/architecture#124

* UPDATE to pymfy 0.5.1

* SIMPLIFY config flow

* ADD French translation

* FIX 80 vs 79 max length

* ABORT flow asap

* FIX A tupple was returned

* MIGRATE to manifest.json

* ADD a placeholder async_setup_platform coroutine

 - It's currently required and expected by the platform helper.

* FIX codeowner

* ADD missing translations file

* USE new external step

* UPGRADE pymfy version

* Close Somfy tab automatically

* ADD manufacturer

  - Somfy only for the moment.

* HANDLE missing code or state in Somfy request

* REMOVE unused strings

* DECLARE somfy component to use config_flow

* APPLY static check remarks

* FIX async method cannot be called from sync context

* FIX only unload what has been loaded during entry setup

* DON't catch them all

* DON'T log full stacktrace

* ABORT conflig flow if configuration missing

* OMIT Somfy files for coverage

* ADD tests about Somfy config flow

* ADD pymfy to the test dependencies
2019-06-11 08:45:34 -07:00
Miroslav Ždrale
046a4fc401 Bump pyubee to 0.7 to support more models (#24477)
* Bump pyubee to 0.7 to support more models

* Update requirements_all.txt
2019-06-11 08:43:58 -07:00
Thomas Lovén
70bbb867f9 Use met.no instead of yr.no in default config (#24470) 2019-06-11 08:34:02 -07:00
Robbie Trencheny
ae5f284d10 Uber API is going away on June 13, 2019, remove component (#24468)
* Uber API is going away on June 13, 2019, remove component

* Update CODEOWNERS

* Remove Uber component
2019-06-11 08:32:21 -07:00
Paulus Schoutsen
820b381a8d Update Hass.io when core config is updated (#24461)
* Update Hass.io when core config is updated

* Lint

* Fix tests

* Lint sigh
2019-06-10 16:05:43 -07:00
Paulus Schoutsen
236c5deeee Sun listener to adapt to core config updates (#24464)
* Adaptable sun listener

* Lint
2019-06-10 16:05:32 -07:00
Erik Montnemery
935240f8c3 Add websock command to query device for triggers (#24044)
* Add websock command to query device for triggers

* Lint

* Refactor

* Add support for domain automations

* Make device automation an automation platform

* lint

* Support device_id in light trigger

* Review comments

* Add tests

* Add tests

* lint
2019-06-10 15:36:11 -07:00
Paulus Schoutsen
168f20bdf4 Add default config to constaint file (#24423) 2019-06-10 14:38:14 -07:00
Andy Kittner
1810e459ee Remember gpslogger entities across restarts (fixes #24432) (#24444)
* Remember gpslogger entities across restarts (fixes #24432)

* oops, missed those changes

* Remove to do and set defaults to `None`
2019-06-10 12:46:38 -07:00
Phil Bruckner
d86837cc4d Life360: Fix config entry handling for accounts imported from configuration (#24455)
Was improperly generating a warning each restart.

Was not properly handling a password change in configuration.

Was not properly removing config entries for accounts removed from configuration.
2019-06-10 12:45:22 -07:00
Pascal Vizeli
af926db211 Publish test results (#24460) 2019-06-10 21:22:23 +02:00
jwater7
20ba80f934 Remove frequest asuswrt log spam (#24448) 2019-06-10 09:16:26 -07:00
Robert Svensson
34e3d2f997 Axis discovery MAC filter (#24442)
* Make sure to abort if the MAC is not from Axis

* Fix tests

* Andrew Sayre suggestion

Co-Authored-By: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>
2019-06-10 09:12:17 -07:00
Julien Brochet
fadfb89b4c Load the SSDP component only when it's needed (#24420)
* fix(hue): Load the SSDP component only when it's needed

* fix(deconz): Don't load the SSDP component when it's not needed

* Update config_flow.py

* Update test_config_flow.py
2019-06-10 09:11:07 -07:00
Penny Wood
84e6813779 Rename via_hub to via_device (#24360)
* Rename via_hub to via_device

* Fixed registry interactions
2019-06-10 09:10:44 -07:00
Daniel Høyer Iversen
4921d35e70 Upgrade ambiclimate library (#24449) 2019-06-10 17:39:35 +02:00
Daniel Høyer Iversen
cebb146e7c Upgrade broadlink library (#24450) 2019-06-10 17:39:12 +02:00
Pascal Vizeli
4e6b133a17 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 17:41:15 +02:00
Pascal Vizeli
0a5966c283 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 15:32:30 +02:00
Pascal Vizeli
3f6a30a974 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 14:47:03 +02:00
Pascal Vizeli
0db27f1cef Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 14:26:42 +02:00
Pascal Vizeli
628264be4e Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 12:41:14 +02:00
Pascal Vizeli
d286723087 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 12:38:01 +02:00
Pascal Vizeli
fb3d66e6e1 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 12:35:08 +02:00
Pascal Vizeli
795300848c Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 12:32:12 +02:00
Pascal Vizeli
b3b2e8ffb7 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 12:28:51 +02:00
Pascal Vizeli
6a4bf1f817 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 12:13:37 +02:00
Pascal Vizeli
7c27bab3c7 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 11:25:24 +02:00
Pascal Vizeli
accfedce87 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 11:20:18 +02:00
Pascal Vizeli
4cb0ff1f63 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 11:14:46 +02:00
Pascal Vizeli
896eaba2d6 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-09 11:11:29 +02:00
Franck Nijhof
d648eb1e4f Minor improvements to automation test suite (#24424)
* Minor improvements to automation test suite

* Removes unused asyncio imports

* Removes some vars that are not needed
2019-06-08 19:10:23 -05:00
Paulus Schoutsen
848a2a95a8 Fix recorder defaults (#24399)
* Fix recorder defaults

* Address comment
2019-06-08 18:18:28 -05:00
Franck Nijhof
9235b52828 Restore automation last_triggered with initial_state override (#24400)
* Restore automation last_triggered with initial_state override

* Made test async/await

* Fixes linter warning

* Update test_init.py
2019-06-08 12:48:36 -07:00
Robert Svensson
3fa84039f8 deCONZ fix retry set state(#24410) 2019-06-08 17:45:10 +02:00
Paulus Schoutsen
929f3c2594 Use loose version (#24394) 2019-06-08 08:19:00 -07:00
Franck Nijhof
95d460c8bd Fixes linter warning in ZHA sensor (#24406) 2019-06-08 07:29:35 -04:00
Pascal Vizeli
67e87f9048 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-08 11:43:33 +02:00
Pascal Vizeli
9924dd7aca Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-08 11:05:27 +02:00
Paulus Schoutsen
3ac8c6d1fe Bump version to 0.95.0.dev0 2019-06-07 23:47:13 -07:00
Paulus Schoutsen
b179dbcdcf Merge remote-tracking branch 'origin/master' into dev 2019-06-07 23:47:02 -07:00
Robert Svensson
48276b041c deCONZ - properly identify configured bridge (#24378) 2019-06-08 08:43:18 +02:00
Penny Wood
4cb1d77783 Fix for sun issues (#24309) 2019-06-07 23:21:41 -07:00
David F. Mulcahey
787bd75587 add device class to sensors (#24373) 2019-06-07 23:19:52 -07:00
Paulus Schoutsen
f77514c6f2 Check cloud trusted proxies (#24395) 2019-06-07 23:08:55 -07:00
Paulus Schoutsen
7887d6d6e4 Fix automation failing to restore state (#24390)
* Fix automation off

* Fix tests
2019-06-07 23:08:22 -07:00
Paulus Schoutsen
0dc0706eb2 Add more HomeKit models for discovery (#24391)
* Add more HomeKit models for discovery

* Discover Tradfri with HomeKit

* Add Wemo device info

* Allow full match for HomeKit model

* Fix tests
2019-06-07 22:59:51 -07:00
Penny Wood
b30f4b8fc0 Improve boolean validator (#24294)
* Improve boolean validator

* Remove extra throw

* Remove None test as discussed

* Fix for tests depending on None == False
2019-06-07 22:18:02 -07:00
Phil Bruckner
233bc1a108 Improve amcrest error handling and bump amcrest package to 1.5.3 (#24262)
* Improve amcrest error handling and bump amcrest package to 1.5.3

amcrest package update fixes command retry, especially with Digest Authentication, and allows sending snapshot command without channel parameter.

Get rid of persistent_notification.

Errors at startup, other than login errors, are no longer fatal.

Display debug messages about how many times an error has occurred in a row.

Remove initial communications test. If camera is off line at startup this just delays the component setup.

Handle urllib3 errors when getting data from commands that were sent with stream=True.

If errors occur during camera update, try repeating until it works or the camera is determined to be off line.

Drop channel parameter in snapshot command which allows camera to use its default channel, which is different in different camera models and firmware versions.

Make entities unavailable if too many errors occur in a row.

Add new configuration variables to control how many errors in a row should be interpreted as camera being offline, and how frequently to "ping" camera to see when it becomes available again.

Add online binary_sensor option to indicate if camera is available (i.e., responding to commands.)

* Update per review comments

Remove max_errors and recheck_interval configuration variables and used fixed values instead.

Move definition of AmcrestChecker class to module level.

Change should_poll in camera.py to return a fixed value of True and move logic to update method.
2019-06-07 21:46:49 -07:00
Phil Bruckner
61dabae6ab Add for option for template triggers (#24330) 2019-06-07 21:45:37 -07:00
William Scanlon
d858e1be05 Updated pubnubsub-handler to 1.0.7 to fix crash on slow startup (#24388) 2019-06-07 23:29:31 -04:00
Andy Castille
4c3f39be02 Provide an option for the DD-WRT device tracker to include non-wireless devices (#24259)
* Use LAN status instead of wireless status for DD-WRT device tracking

* Use the previous DD-WRT device tracker behavior unless specified in the configuration
2019-06-07 19:45:57 -05:00
rolfberkenbosch
b5ada3bf10 Add ATTR_FORECAST_PRECIPITATION option (#24308)
* Add ATTR_FORECAST_PRECIPITATION option

* Remove blank line
2019-06-07 19:31:57 -05:00
Andre Lengwenus
a3794b3241 Fixed wrong setpoint value on startup when climate was previously turned off (#24377) 2019-06-07 19:29:51 -05:00
kvanhoorn
952d72fdd3 Add shuffle support for itunes component (#24319)
* added shuffle support for itunes component

* fixed pylint errors

* more pylint

* final pylint (have my own dev env now)
2019-06-07 19:05:08 -05:00
Pascal Vizeli
5a9db70d24 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-08 00:56:10 +02:00
Pascal Vizeli
17b59cd410 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-08 00:55:03 +02:00
Pascal Vizeli
eb3e53e2d3 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-08 00:54:14 +02:00
Pascal Vizeli
8af0747f95 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-07 22:43:07 +02:00
Pascal Vizeli
ceac04b82d Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-07 22:40:32 +02:00
Pascal Vizeli
e93fbcf701 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-07 22:36:42 +02:00
Pascal Vizeli
337cd40cb6 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-07 22:34:44 +02:00
Pascal Vizeli
3664f61e2d Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-07 22:24:43 +02:00
Pascal Vizeli
1acd34313b Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-07 22:06:27 +02:00
Fabian Affolter
888c5172bf Upgrade Mastodon.py to 1.4.3 (#24374) 2019-06-07 14:22:37 -05:00
Fabian Affolter
3d802afecb Upgrade discord.py to 1.1.1 (#24375) 2019-06-07 14:22:19 -05:00
Robert Svensson
1647ebaf31 Bump dependency (#24376) 2019-06-07 14:22:02 -05:00
Pascal Vizeli
ae1511d8f6 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-07 21:16:39 +02:00
Pascal Vizeli
85f4cecc64 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-07 18:54:28 +02:00
Pascal Vizeli
203c3a5175 Update azure-pipelines-ci.yml for Azure Pipelines 2019-06-07 18:42:47 +02:00
Pascal Vizeli
846d31c4f1 Create azure-pipelines-ci.yml 2019-06-07 18:38:05 +02:00
presslab-us
cb460a85ba Add support for ZHA door locks #2 (#24344)
* Add support for DoorLock cluster
* Add test for zha lock
* Change lock_state report to REPORT_CONFIG_IMMEDIATE
* Update channel command wrapper to return the entire result
This allows for return values other than result[1]

* Fix tests
* Fix lint
* Update DoorLock test to work with updated zigpy schema
* Fix lint
* Fix unlock test
2019-06-07 11:16:33 -04:00
David F. Mulcahey
592d30d495 Remove binary sensors for ZHA remotes and controllers (#24370)
* remove remote binary sensor profiles
* fix contact sensors
2019-06-07 11:13:55 -04:00
David F. Mulcahey
a79224aba8 Fix ZHA battery level when value is reported via signal (#24371)
* fix battery signal
* review comment
2019-06-07 11:02:35 -04:00
Paulus Schoutsen
7c5da67d74 Add service to update core location (#24328)
* Add service to update core location

* Update test_init.py
2019-06-07 09:09:25 -05:00
Daniel Perna
b71baef7c8 Update pyhomematic (#24368) 2019-06-07 12:46:47 +02:00
Petro31
2c341f2a65 Refactor Waze Travel Time & Update Requirements (#22428)
* Refactor Waze Travel Time & Update Requirements

Refactored Waze Travel Time to contain a data object.

Changed error retrieving data to a warning.
Added distance conversion depending on region.
Removed dependency on TRACKABLE_DOMAINS list.
Update to use WazeRouteCalculator 0.10

3rd time's a charm.  Deleted fork, caused last PR to screw up.  So here we are.

* Update requirements_all.txt

* Revert package upgrade.

* Revert package upgrade.
2019-06-06 16:25:14 -07:00
Phil Bruckner
1c1363875c Life360 integration (#24227) 2019-06-06 16:07:15 -07:00
Aaron Bach
156ab7dc2b Bump regenmaschine to 1.5.1 (#24358) 2019-06-06 15:31:17 -07:00
Fabian Affolter
4db0e7888a Upgrade ruamel.yaml to 0.15.97 (#24350)
* Upgrade ruamel.yaml to 0.15.97

* Fix req
2019-06-06 15:30:44 -07:00
Tommy Long
e98054accb Add templating to MQTT Cover tilt_status (#24355) 2019-06-06 15:30:27 -07:00
Andre Lengwenus
7771ecfe58 Bump to pypck==0.6.1 (#24356) 2019-06-06 15:30:14 -07:00
z0p
6cd9667364 Support for Salda Smarty XV/XP Ventilation Unit (#21491)
* Support for Salda Smarty XV/XP Ventilation Unit

* Update binary_sensor.py

* Update fan.py

* Update sensor.py

* Update __init__.py
2019-06-06 15:23:00 -07:00
Jonathan Keljo
bf7e09ce59 Bring the Sisyphus integration to silver quality (#22457)
* Bring the Sisyphus integration to silver quality

Checklist:
- [x] (N/A - push integration) Set an appropriate SCAN_INTERVAL (if a polling integration)
- [x] Raise PlatformNotReady if unable to connect during platform setup
- [x] (N/A - no credentials) Handles expiration of auth credentials. Refresh if possible or print correct error and fail setup. If based on a config entry, should trigger a new config entry flow to re-authorize.
- [x] (N/A - local integration) Handles internet unavailable. Log a warning once when unavailable, log once when reconnected.
- [x] Handles device/service unavailable. Log a warning once when unavailable, log once when reconnected.
- [x] Set available property to False if appropriate
- [x] Entities have unique ID (if available)

* Feedback (fix a couple verbose places)

* Use a task instead of a lock

* Initialize field in constructor

* Revert package upgrade.
2019-06-06 15:16:27 -07:00
Daniel Kucera
32844bb318 ebusd: added check for monitored conditions validity within correct circuit (#22461) 2019-06-06 14:59:57 -07:00
cpopp
1bca313421 Add Streamlabs Water Monitor (#21205)
* Add Streamlabs Water Monitor

* Fail Streamlabswater component setup when given invalid parameters

The Streamlabs Water component is unable to recover if it is given
an invalid API key or location id so this change is to ensure
we validate they are correct during setup and return a failure
if they are not.

* Prime Streamlabswater component sensors so data is available immediately

The sensors for the component were not causing an immediate load of
data from the API when being set up so there was some lag after
startup before values would show up.  This change does an explicit
update when the sensors are setup to ensure data is viewable
immediately after startup.

* Switch Streamlabswater logging to use %s for string formatting

* Update Streamlabswater component with correct dependencies

Dependencies were incorrectly specified using DEPENDS rather
than DEPENDENCIES

* Streamlabswater pull request feedback

Remove detailed class docstrings since they're in the documentation,
reduce code duplication in sensor classes, and remove periods from
the end of log messages.

* Reduce line length in Streamlabswater sensor

* Add docstring on Streamlabswater service callback method

* Get rid of unnecessary initializers in Streamlabswater sensor

* Add manifest file for Streamlabs Water Monitor

* Remove unused REQUIREMENTS
2019-06-06 13:55:08 -07:00
Дубовик Максим
984d41e334 Google Cloud Platform component (TTS) (#23629)
* Added Google Cloud TTS service component feature

* Added Neutral voice gender

* Added line break at the end of files

* Updated CODEOWNERS, reqirements_all.txt and .coveragerc

* Fixed some ci/circleci: static-check errors

* Fixed some ci/circleci: static-check error

* Fixed some ci/circleci: pylint errors

* Fixed some ci/circleci: pylint errors

* * made supported_options const
* fixed direct env variable access

* Fixed import order

* * Component renamed
* Added encoding parameter
* Other fixes

* Changed folder name in .coveragerc

* * Removed whitespaces in blank lines
* Split long line

* Removed whitespaces in blank lines

* ci/circleci: static-check

* Fixed requirements_all.txt

* Added speed, pitch and gain parameters

* Added speed, pitch and gain as supported options

* Split too long line

* * Added profiles parameter
* Changed supported languages and encodings values
* Added parameters validations

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Changed options validation

* Added ToggleEntity save and restore state mechanism

* Revert "Added ToggleEntity save and restore state mechanism"

This reverts commit 0e275014
2019-06-06 12:45:29 -07:00
michaeldavie
fcfbdd2d89 Add Environment Canada weather, sensor, and camera platforms (#21110)
* Added Environment Canada weather platform

* Added Environment Canada weather platform

* Migrate to new folder structure

* Migrate to new folder structure

* Fix updates

* Fix updates again

* Bump env_canada to 0.0.4

* Bump env_canada to 0.0.4

* Bump env_canada to 0.0.4 in requirements_all.txt

* Change daily forecast timestamp and high/low test

* Change daily forecast timestamp and high/low test

* Bump env_canada to 0.0.5

* Break alerts into multiple sensors, bump env_canada to 0.0.6

* Bump env_canada to 0.0.7

* Remove blank line

* Remove 'ec' sensor prefix, bump env_canada to 0.0.8

* Corrections

* Change to manifests.json

* Add docstring to __init.py__

* Update CODEOWNERS

* pylint correction

* pylint correction

* Add alert details, bump env_canada to 0.0.9

* Update requirements_all.txt

* Update .coveragerc

* Bump env_canada to 0.0.10

* Update requirements_all.txt
2019-06-06 11:47:27 -07:00
Sebastian Muszynski
4ec2af785a Fix set_cover_position of the xiaomi_aqara cover for LAN protocol v2 (#24333)
* Fix set_cover_position of the xiaomi_aqara cover for LAN protocol v2 (Closes: #24293)

* Fix lint
2019-06-06 20:09:10 +02:00
Sebastian Muszynski
0eba920075 Add new movement type "actively" of the Xiaomi Vibration Sensor (#24334) 2019-06-06 20:08:29 +02:00
Fabian Affolter
8f4bb8d445 UPgrade youtube_dl to 2019.05.20 (#24347) 2019-06-06 19:46:36 +02:00
David Barrera
3b8f254dfd Don't load last_checkpoint if shipment is pending (#24301) 2019-06-06 11:20:30 -05:00
Markus Jankowski
64d6fa8e86 Remove attribute lowBat (#24323) 2019-06-06 11:11:37 -05:00
Maciej Bieniek
3b4a9a337b Add abbreviation for light template variable names (#24336) 2019-06-06 18:10:23 +02:00
David F. Mulcahey
ae1bcd5fef Use node descriptor from Zigpy for ZHA (#24316)
* use zigpy node descriptor

* cleanup
2019-06-06 08:31:03 -04:00
Markus Jankowski
9fb1f2fa17 Remove deprecated AlarmControlPanel (#24322) 2019-06-06 12:09:02 +02:00
Paulus Schoutsen
d261c6ccc1 Initiate websession inside event loop (#24331) 2019-06-06 12:07:30 +02:00
cgtobi
9ca5bdda7f Add exception handling for Netatmo climate (#24311)
* Add exception handling

* Make pylint happy
2019-06-06 09:30:16 +02:00
Andre Richter
6cc1bf37cc components/cover: Typo in docstring. (#24329) 2019-06-05 19:34:09 -05:00
jjlawren
f5db7707bb Only update media icon when necessary (#24324)
* Only update media icon when necessary

* Lint

* Comment
2019-06-05 19:32:43 -05:00
Victor Cerutti
859ae2fbad Meteofrance fix 24244 (#24315)
* Update meteofrance package version

Fix https://github.com/home-assistant/home-assistant/issues/24244

* Add code owner to manifest

* Update CODEOWNERS
2019-06-05 20:09:11 -04:00
Aaron Bach
96a51d16a7 Bump simplipy to 3.4.2 (#24326)
* Bump simplipy to 3.4.2

* Updated requirements
2019-06-05 15:05:52 -06:00
Pascal Vizeli
f62d473fc4 Update azure-pipelines-release.yml for Azure Pipelines 2019-06-05 22:14:03 +02:00
Pascal Vizeli
607b44f7c0 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-06-05 18:57:10 +02:00
Oliver
6d4545cb3e Push to version 0.7.9 of denonavr (#24260) 2019-06-05 11:23:17 -05:00
Robert Svensson
c311e480fd Don't let zeroconf be smart with addresses (#24321) 2019-06-05 08:13:40 -07:00
David Roberts
4c6ddd435c SolarEdge Local Component (#23996)
* Basic local SolarEdge monitoring for energy / power

* Basic local SolarEdge monitoring for energy / power

* generated CODEOWNERS, requirements, excluded tests

* generated CODEOWNERS, requirements, excluded tests

* lint fixes, etc

* lint fixes, etc

* Fix docstyle for init

Of course thats the file I forgot to run tests on

* Load all sensors by default

They use the same API endpoint.  This changes was made per https://github.com/home-assistant/architecture/pull/244

* remve unneded date/time

* ran hassfest again

* add throttle when updating

* readd solax, mistakenly removed

* Update sensor.py
2019-06-05 16:45:05 +02:00
Johan Bloemberg
d31140f8cd Upgrade to newer version of rflink with improve error handling on incoming data. (#24263)
Related: https://github.com/home-assistant/home-assistant/issues/23942
2019-06-05 12:04:05 +02:00
Felipe Martins Diel
0ed9e185b2 Add support for learning new commands (#23888)
* Add support for learning new commands

This update creates a generic service in the 'remote' component to enable remote control platforms to learn new commands.

* Update __init__.py with the proposed changes

- Add 'supported_features' property and a constant related to the 'learn_command' functionality.
- Redefine 'async_learn_command' function as a coroutine.

* Update __init__.py

* Fix assertion error

Adding the 'supported_features' attribute generated an assertion error on the 'Demo Remote' platform. This update fixes this.

* Fix duplicated 'hass' object

This update fixes a typo that occurred at the last update.
2019-06-05 11:32:59 +02:00
Andre Lengwenus
408ae44bdd Add LCN scene platform (#24242) 2019-06-05 11:12:05 +02:00
Ville Skyttä
bf9c2c74fa Upgrade pytest and -cov (#24258)
* Upgrade pytest to 4.5.0

https://docs.pytest.org/en/latest/changelog.html#pytest-4-5-0-2019-05-11
https://docs.pytest.org/en/latest/changelog.html#pytest-4-4-2-2019-05-08

* Upgrade pytest to 4.6.0

https://docs.pytest.org/en/latest/changelog.html#pytest-4-6-0-2019-05-31

* Upgrade pytest-cov to 2.7.1

https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst#271-2019-05-03
https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst#270-2019-05-03

* Upgrade pytest to 4.6.1

https://docs.pytest.org/en/latest/changelog.html#pytest-4-6-1-2019-06-02
2019-06-05 11:09:23 +02:00
Pascal Vizeli
bc15f11473 Rename azure-pipelines.yml to azure-pipelines-release.yml 2019-06-05 09:36:10 +02:00
Pascal Vizeli
fccbd41203 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-06-05 09:30:08 +02:00
Pascal Vizeli
17b3d3a8e4 Update azure-pipelines-wheels.yml for Azure Pipelines 2019-06-05 09:25:46 +02:00
Pascal Vizeli
279192d317 Rename azure-pipelines-release.yml to azure-pipelines.yml 2019-06-05 09:25:24 +02:00
Pascal Vizeli
701d258076 Update and rename azure-pipelines.yml to azure-pipelines-release.yml 2019-06-05 09:24:14 +02:00
Pascal Vizeli
034bbb4f5f Create azure-pipelines-wheels.yml 2019-06-05 09:11:56 +02:00
rolfberkenbosch
2943ad15a5 Change meteoalertapi to version 0.1.3 (#24307)
* Change meteoalertapi to version 0.1.3

* Add requirements_all.txt file
2019-06-05 08:55:10 +02:00
Robert Svensson
fbfaa41cb0 address is deprecated in favor of addresses (#24302) 2019-06-04 14:14:51 -07:00
Paulus Schoutsen
df1da7554c Fix OwnTracks race condition (#24303)
* Fix OwnTracks race condition

* Lint
2019-06-04 14:06:49 -07:00
gibman
6d280084fb Expose specific device_class for Velux covers (#24279)
* Update cover.py

Blinds, Rollingshutters and Awnings did not set their respective device_class attribute
Previously they would all appear as device_class "window"

* fallback device class is always 'window'

fallback device class is always 'window' in the event we have an unknown cover type

* trailing whitespace removed, trimmed as well

* Update cover.py
2019-06-04 13:17:43 -07:00
Paulus Schoutsen
ac788a7ee7 Upgrade Zeroconf to 0.23 (#24300) 2019-06-04 11:05:11 -07:00
Pascal Vizeli
bf52aa8ccc Create progress file for pip installs (#24297)
* Create progress file for pip installs

* fix dedlock

* unflacky test

* Address comments

* Lint

* Types
2019-06-04 11:04:20 -07:00
Paulus Schoutsen
d7c8adc085 Run SSDP discovery in parallel (#24299) 2019-06-04 11:04:02 -07:00
Paulus Schoutsen
8b4ef3bbdd Guard against bad states in Mobile App/OwnTracks (#24292) 2019-06-04 10:18:26 -07:00
Paulus Schoutsen
14c0ada9ac Update translations 2019-06-04 08:50:48 -07:00
Paulus Schoutsen
618039734a Updated frontend to 20190604.0 2019-06-04 08:50:25 -07:00
Brandon Davidson
0d5e151c60 Update pyvera to 0.3.1 for alert support (#24289) 2019-06-04 14:47:47 +02:00
Paul Bottein
976bf3e979 Add temperature sensor support to google smarthome thermostat device (#24264)
* Add temperature sensor support to google smarthome thermostat device

* fix lint for trait_test

* Reset temperature unit in tests

* Address comment
2019-06-03 12:40:15 -07:00
Paulus Schoutsen
0b70419859 Remove deps folder in config when on Docker (#24284)
* Remove deps folder in config

* Fix tests

* Fix tests with docker check
2019-06-03 12:37:27 -07:00
Paulus Schoutsen
6f903db8c4 Fix cors on the index view (#24283) 2019-06-03 11:43:13 -07:00
Paulus Schoutsen
4c88578371 Add a discovery config flow to Wemo (#24208) 2019-06-03 10:06:53 -07:00
Penny Wood
b1dcfaf6b3 Split devices of nodes with multiple instances (#24032)
* Split devices of nodes with multiple instances

* Note entities to register with device registry

* Use EntityPlatform
2019-06-03 09:40:40 -07:00
Robert Svensson
449a7d3fd5 deCONZ migrate to SSDP discovery (#24252)
* Migrate deCONZ to use new SSDP discovery
Add new discovery info manufacturer URL to be able to separate Hue and deCONZ bridges

* Mark deCONZ as migrated in Discovery component

* Fix tests

* Fix Hue discovery ignore deCONZ bridge

* Less snake more badger

* Mushroom

* Fix indentation

* Config flow ignore manufacturer url that is not philips
2019-06-03 09:26:01 -07:00
Fabian Affolter
7fd2e67d11 Remove icon() (#24280) 2019-06-03 16:31:32 +02:00
Otto Winter
34260ed09f Bump aioesphomeapi to 2.1.0 (#24278)
* Bump aioesphomeapi to 2.1.0

* Update requirements txt
2019-06-03 16:30:29 +02:00
Pascal Vizeli
263c0322ee Update azure-pipelines.yml for Azure Pipelines 2019-06-03 12:31:03 +02:00
Pascal Vizeli
e12cef8d77 Update azure-pipelines.yml for Azure Pipelines 2019-06-03 11:51:14 +02:00
Paulus Schoutsen
6795db9bd6 Mobile app device tracker to restore state (#24266) 2019-06-03 10:30:56 +02:00
Paulus Schoutsen
6a693546a3 Add restore state to Geofency (#24268)
* Add restore state to Geofency

* Lint
2019-06-03 10:29:45 +02:00
Paulus Schoutsen
411e36b0f8 Updated frontend to 20190602.0 2019-06-02 13:59:30 -07:00
Isabella Gross Alström
fbfc674ca5 Add service for adding event to google component (#22473)
* Add service for adding event to google component

* Add service examples for google.add_event

* add refactoring based on reviews

* Fix too long lines

* Order import

* Move to move line

* Remove parenthesis

* Add service for adding event to google component

* Add service examples for google.add_event

* add refactoring based on reviews

* Add check for correct scopes, otherwise re-authenticate

* fix build failure

* fix build failure
2019-06-02 13:58:27 -07:00
Paulus Schoutsen
ca20b0cf17 Add restore state to OwnTracks device tracker (#24256)
* Add restore state to OwnTracks device tracker

* Lint

* Also store entity devices

* Update test_device_tracker.py
2019-06-02 13:57:21 -07:00
Pascal Vizeli
05454b76a6 Update azure-pipelines.yml for Azure Pipelines 2019-06-02 22:32:56 +02:00
Pascal Vizeli
b4c858bcdf Update azure-pipelines.yml for Azure Pipelines 2019-06-02 22:31:44 +02:00
Robert Svensson
4d4fd19f87 Replace pyunifi with aiounifi in UniFi device tracker (#24149)
* Replace pyunifi with aiounifi

* Fix tests

* Add sslcontext

* Fix tests

* Fix import order
2019-06-02 18:24:13 +02:00
Pascal Vizeli
16a846b1e7 Update azure-pipelines.yml for Azure Pipelines 2019-06-02 17:09:04 +02:00
Pascal Vizeli
034b0e07d2 Update azure-pipelines.yml for Azure Pipelines 2019-06-02 14:26:12 +02:00
Emilv2
c486f794f9 Fix typo in integration component (#24250) 2019-06-02 01:07:17 -07:00
Franck Nijhof
9220270948 Adds AdGuard Home integration (#24219)
* Adds AdGuard Home integration

* 👕 Addresses linting warnings

* 🚑 Fixes typehint in async_setup_entry

* 👕 Take advantage of Python's coalescing operators

* 👕 Use adguard instance from outer scope directly in service calls

* 👕 Use more sensible scan_interval default for sensors

* 👕 Adds specific files to .coveragerc

*  Added tests and small changes to improve coverage

* 🔨 Import adguardhome dependencies at the top

* 🚑 Converted service handlers to be async

* 🔥 Removed init step from config flow
2019-06-01 22:13:14 -07:00
Paulus Schoutsen
7be7d3ffac Updated frontend to 20190601.0 2019-06-01 14:27:25 -07:00
Pascal Vizeli
2823ef84db Update azure-pipelines.yml for Azure Pipelines 2019-06-01 22:49:29 +02:00
Maikel Punie
4d07448cf8 Bump python-velbus version for velbus component (#24226)
* Bump python-velbus version

* Bump python velbus version
2019-06-01 13:15:41 -07:00
Austin Mroczek
12d59797a7 Add details to triggered state for total connect alarms (#24106)
* Bump skybellpy to 0.4.0

* Bump skybellpy to 0.4.0 in requirements_all.txt

* Added extra states for STATE_ALARM_TRIGGERED to allow users to know if
it is a burglar or fire or carbon monoxide so automations can take
appropriate actions.  Updated TotalConnect component to handle these new
states.

* Fix const import

* Fix const import

* Fix const imports

* Bump total-connect-client to 0.26.

* Catch details of alarm trigger in state attributes.

Also bumps total_connect_client to 0.27.

* Change state_attributes() to device_state_attributes()
2019-06-01 13:12:58 -07:00
Emilv2
673290d2e1 fix gitlab_ci sad icon (#24241) 2019-06-01 13:08:23 -07:00
kbickar
5a81ddd4e7 Sense update (#24220)
* Changed updates to be done by component and updates dispatched

* syntax updates

* Added code owner

* Removed whitespace

* Updated CODEOWNERS

* Added subscription undoer
2019-06-01 12:15:28 -07:00
Pascal Vizeli
ef820c3126 Update azure-pipelines.yml for Azure Pipelines 2019-06-01 20:07:54 +02:00
Jef D
278b9d0f71 Round Awair sensor values (#24093)
* Round sensor values

* Add code owner

* Update code owners

* Fix tests
2019-06-01 17:03:41 +02:00
Paulus Schoutsen
276ab191b5 Do not use the cache dir for PIP installs (#24233) 2019-06-01 10:04:12 +02:00
Paulus Schoutsen
b90636f640 Update home zone when core config updated (#24237)
* Update home zone when core config updated

* Lint
2019-05-31 23:03:45 -07:00
Paulus Schoutsen
b4374c8c4c Mobile app to use device tracker config entry (#24238)
* Mobile app to use device tracker config entry

* Lint

* Re-use device_info

* Lint
2019-05-31 23:01:45 -07:00
Teemu R
3076866ec6 add a deprecation warning for tplink device_tracker (#24236)
* add a deprecation warning for tplink device_tracker

* reword the warning a bit
2019-05-31 23:00:10 -07:00
Paulus Schoutsen
e6a54013dc GeoFency unique ID and device info (#24232) 2019-05-31 22:59:44 -07:00
Paulus Schoutsen
3edc58a04e Add GPSLogger device_info and unique_id (#24231) 2019-05-31 22:59:35 -07:00
Paulus Schoutsen
70fe4f22db Log HomeKit model (#24229) 2019-05-31 22:59:16 -07:00
Sören Oldag
9f1dc71320 Bump pychromecast (#24234) 2019-05-31 20:49:52 -07:00
Robert Svensson
f43eca248a Don't allow more than one config flow per discovered Axis device (#24230) 2019-05-31 15:51:55 -07:00
Alexei Chetroi
0ba2b4e253 ZHA requirements version bump. (#24228)
* ZHA requirements version bump.
* zha-quirks version bump.
2019-05-31 17:15:27 -04:00
Pascal Vizeli
1e6b91b05a Update azure-pipelines.yml for Azure Pipelines 2019-05-31 23:10:09 +02:00
Phil Bruckner
d966e0cfce Add control of Amcrest indicator light (#23986)
Enable feature by default but allow it to be disabled by "control_light: false" in config.

Get brand from camera instead of assuming Amcrest (since this works with other cameras, too.)

Retrieve RTSP URL in update method instead of in stream_source property and in handle_async_mjpeg_stream method.

Move amcrest imports from methods to global.
2019-05-31 13:41:48 -07:00
Paulus Schoutsen
3c1cdecb88 Add manifest support for homekit discovery (#24225)
* Add manifest support for homekit discovery

* Add a space after model check

* Update comment
2019-05-31 11:58:48 -07:00
Robert Svensson
18286dbf4b Axis - Handle Vapix error messages (#24215) 2019-05-31 20:34:06 +02:00
Paulus Schoutsen
3a0616c680 Use resource for index routing. (#24223) 2019-05-31 11:27:05 -07:00
Paulus Schoutsen
440e4289e4 Instantiate lock inside event loop (#24203) 2019-05-31 11:26:05 -07:00
Pascal Vizeli
8fe1a84db2 Update azure-pipelines.yml for Azure Pipelines 2019-05-31 18:49:46 +02:00
Pascal Vizeli
5fa66ba4a3 Update azure-pipelines.yml for Azure Pipelines 2019-05-31 16:46:50 +02:00
Pascal Vizeli
261f3bcba6 Don't follow redirect on ingress itself (#24218)
* Don't follow redirect on ingress itself

* Fix comment
2019-05-31 14:30:58 +02:00
Otto Winter
5610541515 Fix ESPHome config flow with invalid config entry (#24213) 2019-05-31 11:27:27 +02:00
Pascal Vizeli
dedc2ef918 Update azure-pipelines.yml for Azure Pipelines 2019-05-31 10:53:34 +02:00
Thomas Hervé
a9c85b9944 Bump oauthlib version (#24111)
* Bump oauthlib version

* Bump fitbit instead

* Update requirements
2019-05-31 09:17:50 +02:00
Robert Van Gorkom
bf91a8c1b3 Fixing tplink issues with offline devices during setup (#23668)
* Fixing tplink issues with offline devices during setup.

* Fixing circleci errors.

* Adding code to defer the creation of entities that are not online.

* Addressing code review changes and cleaning up a little.

* Fixing tests and static analysis.

* Adding test to satisfy coverage requirements.

* Resolving merge conflicts.

* Fixing issue where lights don't appear in the integration page.

* Using pyHS100 properties for most sysinfo.
Addressing some PR feedback.

* Addressing some PR feedback.

* Better testing async_add_entities_retry
Testing for static dimmers.
Making greater use of conf constants.

* Fixing all static analysis issues.

* Adding non-blocking call for getting discovering devices.

* Address PR feedback
2019-05-31 01:51:04 -04:00
Paulus Schoutsen
6f299e7245 Improve error handling (#24204) 2019-05-30 16:23:42 -07:00
Paulus Schoutsen
f32d1c0dea Allow discovery flows to be discovered via zeroconf/ssdp (#24199) 2019-05-30 14:08:05 -07:00
Paulus Schoutsen
6fcd56c462 Update hass-nabucasa (#24197) 2019-05-30 09:49:21 -07:00
Otto Winter
1ce2d97d3d Fix ESPHome discovered when already exists (#24187)
* Fix ESPHome discovered when already exists

* Update .coveragerc
2019-05-30 09:48:58 -07:00
Pascal Vizeli
04c5cda7e5 Update azure-pipelines.yml for Azure Pipelines 2019-05-30 18:46:08 +02:00
Franck Nijhof
7692cffdbe ✏️ Corrects incorrect command in hassfest (#24188) 2019-05-30 09:41:30 -07:00
Daniel Høyer Iversen
7c093bd928 Update Tibber library (#24192) 2019-05-30 09:41:11 -07:00
Jc2k
bcee3f9570 homekit_controller no longer logs with transient network errors causing crypto failures as it will auto recover (#24193) 2019-05-30 09:40:38 -07:00
Paulus Schoutsen
d1aa4f42e5 Updated frontend to 20190530.0 2019-05-30 09:32:29 -07:00
Pascal Vizeli
e7d34913c0 Update azure-pipelines.yml for check version (#24194) 2019-05-30 17:35:47 +02:00
Paulus Schoutsen
1a3a38d370 Dynamic panels (#24184)
* Don't require all panel urls to be registered

* Allow removing panels, fire event when panels updated
2019-05-30 13:37:01 +02:00
Paulus Schoutsen
59ce31f44f No longer allow invalid slugs or extra keys (#24176)
* No longer allow slugs

* Lint

* Remove HASchema

* Lint

* Fix tests
2019-05-30 13:33:26 +02:00
Daniel Høyer Iversen
b3d8f8620c danielhiversen as codeowner for yr (#24189) 2019-05-30 13:16:59 +02:00
Daniel Høyer Iversen
3eebb9d51d upgrade broadlink library, Use cryptography instead of pycryptodome (#24186) 2019-05-30 13:14:50 +02:00
Anders Melchiorsen
b6bb6919e6 Update pysonos to 0.0.14 (#24185) 2019-05-30 09:24:38 +02:00
7132 changed files with 431662 additions and 188475 deletions

View File

@@ -1,272 +0,0 @@
# 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

View File

@@ -5,19 +5,33 @@ omit =
homeassistant/__main__.py
homeassistant/helpers/signal.py
homeassistant/helpers/typing.py
homeassistant/monkey_patch.py
homeassistant/scripts/*.py
homeassistant/util/async.py
# omit pieces of code that rely on external devices being present
homeassistant/components/abode/*
homeassistant/components/abode/__init__.py
homeassistant/components/abode/alarm_control_panel.py
homeassistant/components/abode/binary_sensor.py
homeassistant/components/abode/camera.py
homeassistant/components/abode/cover.py
homeassistant/components/abode/light.py
homeassistant/components/abode/lock.py
homeassistant/components/abode/sensor.py
homeassistant/components/abode/switch.py
homeassistant/components/acer_projector/switch.py
homeassistant/components/actiontec/device_tracker.py
homeassistant/components/adguard/__init__.py
homeassistant/components/adguard/const.py
homeassistant/components/adguard/sensor.py
homeassistant/components/adguard/switch.py
homeassistant/components/ads/*
homeassistant/components/aftership/sensor.py
homeassistant/components/airly/__init__.py
homeassistant/components/airly/air_quality.py
homeassistant/components/airly/sensor.py
homeassistant/components/airly/const.py
homeassistant/components/airvisual/__init__.py
homeassistant/components/airvisual/sensor.py
homeassistant/components/aladdin_connect/cover.py
homeassistant/components/alarm_control_panel/manual_mqtt.py
homeassistant/components/alarmdecoder/*
homeassistant/components/alarmdotcom/alarm_control_panel.py
homeassistant/components/alpha_vantage/sensor.py
@@ -27,13 +41,15 @@ omit =
homeassistant/components/amcrest/*
homeassistant/components/ampio/*
homeassistant/components/android_ip_webcam/*
homeassistant/components/androidtv/*
homeassistant/components/anel_pwrctrl/switch.py
homeassistant/components/anthemav/media_player.py
homeassistant/components/apache_kafka/*
homeassistant/components/apcupsd/*
homeassistant/components/apple_tv/*
homeassistant/components/aqualogic/*
homeassistant/components/aquostv/media_player.py
homeassistant/components/arcam_fmj/media_player.py
homeassistant/components/arcam_fmj/__init__.py
homeassistant/components/arduino/*
homeassistant/components/arest/binary_sensor.py
homeassistant/components/arest/sensor.py
@@ -43,12 +59,17 @@ omit =
homeassistant/components/arwn/sensor.py
homeassistant/components/asterisk_cdr/mailbox.py
homeassistant/components/asterisk_mbox/*
homeassistant/components/asuswrt/device_tracker.py
homeassistant/components/august/*
homeassistant/components/aten_pe/*
homeassistant/components/atome/*
homeassistant/components/aurora_abb_powerone/sensor.py
homeassistant/components/automatic/device_tracker.py
homeassistant/components/avea/light.py
homeassistant/components/avion/light.py
homeassistant/components/avri/sensor.py
homeassistant/components/azure_event_hub/*
homeassistant/components/azure_service_bus/*
homeassistant/components/baidu/tts.py
homeassistant/components/beewi_smartclim/sensor.py
homeassistant/components/bbb_gpio/*
homeassistant/components/bbox/device_tracker.py
homeassistant/components/bbox/sensor.py
@@ -60,9 +81,8 @@ omit =
homeassistant/components/blinkt/light.py
homeassistant/components/blockchain/sensor.py
homeassistant/components/bloomsky/*
homeassistant/components/bluesound/media_player.py
homeassistant/components/bluetooth_le_tracker/device_tracker.py
homeassistant/components/bluetooth_tracker/device_tracker.py
homeassistant/components/bluesound/*
homeassistant/components/bluetooth_tracker/*
homeassistant/components/bme280/sensor.py
homeassistant/components/bme680/sensor.py
homeassistant/components/bmw_connected_drive/*
@@ -70,25 +90,29 @@ omit =
homeassistant/components/bom/sensor.py
homeassistant/components/bom/weather.py
homeassistant/components/braviatv/media_player.py
homeassistant/components/broadlink/remote.py
homeassistant/components/broadlink/sensor.py
homeassistant/components/broadlink/switch.py
homeassistant/components/brother/__init__.py
homeassistant/components/brother/sensor.py
homeassistant/components/brother/const.py
homeassistant/components/brottsplatskartan/sensor.py
homeassistant/components/browser/*
homeassistant/components/brunt/cover.py
homeassistant/components/bt_home_hub_5/device_tracker.py
homeassistant/components/bt_smarthub/device_tracker.py
homeassistant/components/buienradar/sensor.py
homeassistant/components/buienradar/util.py
homeassistant/components/buienradar/weather.py
homeassistant/components/caldav/calendar.py
homeassistant/components/canary/alarm_control_panel.py
homeassistant/components/canary/camera.py
homeassistant/components/cast/*
homeassistant/components/cert_expiry/sensor.py
homeassistant/components/channels/media_player.py
homeassistant/components/cert_expiry/helper.py
homeassistant/components/channels/*
homeassistant/components/cisco_ios/device_tracker.py
homeassistant/components/cisco_mobility_express/device_tracker.py
homeassistant/components/cisco_webex_teams/notify.py
homeassistant/components/ciscospark/notify.py
homeassistant/components/citybikes/sensor.py
homeassistant/components/clementine/media_player.py
homeassistant/components/clickatell/notify.py
@@ -102,7 +126,9 @@ omit =
homeassistant/components/comfoconnect/*
homeassistant/components/concord232/alarm_control_panel.py
homeassistant/components/concord232/binary_sensor.py
homeassistant/components/coolmaster/__init__.py
homeassistant/components/coolmaster/climate.py
homeassistant/components/coolmaster/const.py
homeassistant/components/cppm_tracker/device_tracker.py
homeassistant/components/cpuspeed/sensor.py
homeassistant/components/crimereports/sensor.py
@@ -114,6 +140,7 @@ omit =
homeassistant/components/ddwrt/device_tracker.py
homeassistant/components/decora/light.py
homeassistant/components/decora_wifi/light.py
homeassistant/components/delijn/*
homeassistant/components/deluge/sensor.py
homeassistant/components/deluge/switch.py
homeassistant/components/denon/media_player.py
@@ -122,7 +149,6 @@ omit =
homeassistant/components/dht/sensor.py
homeassistant/components/digital_ocean/*
homeassistant/components/digitalloggers/switch.py
homeassistant/components/directv/media_player.py
homeassistant/components/discogs/sensor.py
homeassistant/components/discord/notify.py
homeassistant/components/dlib_face_detect/image_processing.py
@@ -131,28 +157,35 @@ omit =
homeassistant/components/dlna_dmr/media_player.py
homeassistant/components/dnsip/sensor.py
homeassistant/components/dominos/*
homeassistant/components/doods/*
homeassistant/components/doorbird/*
homeassistant/components/dovado/*
homeassistant/components/downloader/*
homeassistant/components/dsmr_reader/*
homeassistant/components/dte_energy_bridge/sensor.py
homeassistant/components/dublin_bus_transport/sensor.py
homeassistant/components/duke_energy/sensor.py
homeassistant/components/dunehd/media_player.py
homeassistant/components/dwd_weather_warnings/sensor.py
homeassistant/components/dweet/*
homeassistant/components/ebox/sensor.py
homeassistant/components/ebusd/*
homeassistant/components/ecoal_boiler/*
homeassistant/components/ecobee/*
homeassistant/components/econet/water_heater.py
homeassistant/components/ecobee/__init__.py
homeassistant/components/ecobee/binary_sensor.py
homeassistant/components/ecobee/climate.py
homeassistant/components/ecobee/notify.py
homeassistant/components/ecobee/sensor.py
homeassistant/components/ecobee/weather.py
homeassistant/components/econet/*
homeassistant/components/ecovacs/*
homeassistant/components/edl21/*
homeassistant/components/eddystone_temperature/sensor.py
homeassistant/components/edimax/switch.py
homeassistant/components/edp_redy/*
homeassistant/components/egardia/*
homeassistant/components/eight_sleep/*
homeassistant/components/eliqonline/sensor.py
homeassistant/components/elkm1/*
homeassistant/components/elv/*
homeassistant/components/emby/media_player.py
homeassistant/components/emoncms/sensor.py
homeassistant/components/emoncms_history/*
@@ -161,9 +194,11 @@ omit =
homeassistant/components/enocean/*
homeassistant/components/enphase_envoy/sensor.py
homeassistant/components/entur_public_transport/*
homeassistant/components/environment_canada/*
homeassistant/components/envirophat/sensor.py
homeassistant/components/envisalink/*
homeassistant/components/ephember/climate.py
homeassistant/components/epson/const.py
homeassistant/components/epson/media_player.py
homeassistant/components/epsonworkforce/sensor.py
homeassistant/components/eq3btsmart/climate.py
@@ -182,24 +217,29 @@ omit =
homeassistant/components/eufy/*
homeassistant/components/everlights/light.py
homeassistant/components/evohome/*
homeassistant/components/ezviz/*
homeassistant/components/familyhub/camera.py
homeassistant/components/fastdotcom/*
homeassistant/components/fedex/sensor.py
homeassistant/components/ffmpeg/camera.py
homeassistant/components/fibaro/*
homeassistant/components/filesize/sensor.py
homeassistant/components/fints/sensor.py
homeassistant/components/fitbit/sensor.py
homeassistant/components/fixer/sensor.py
homeassistant/components/fleetgo/device_tracker.py
homeassistant/components/flexit/climate.py
homeassistant/components/flic/binary_sensor.py
homeassistant/components/flock/notify.py
homeassistant/components/flume/*
homeassistant/components/flunearyou/sensor.py
homeassistant/components/flux_led/light.py
homeassistant/components/folder/sensor.py
homeassistant/components/folder_watcher/*
homeassistant/components/foobot/sensor.py
homeassistant/components/fortios/device_tracker.py
homeassistant/components/fortigate/*
homeassistant/components/foscam/camera.py
homeassistant/components/foscam/const.py
homeassistant/components/foursquare/*
homeassistant/components/free_mobile/notify.py
homeassistant/components/freebox/*
@@ -207,34 +247,40 @@ omit =
homeassistant/components/fritzbox/*
homeassistant/components/fritzbox_callmonitor/sensor.py
homeassistant/components/fritzbox_netmonitor/sensor.py
homeassistant/components/fritzdect/switch.py
homeassistant/components/fronius/sensor.py
homeassistant/components/frontier_silicon/media_player.py
homeassistant/components/futurenow/light.py
homeassistant/components/garadget/cover.py
homeassistant/components/garmin_connect/__init__.py
homeassistant/components/garmin_connect/const.py
homeassistant/components/garmin_connect/sensor.py
homeassistant/components/gc100/*
homeassistant/components/geniushub/*
homeassistant/components/gearbest/sensor.py
homeassistant/components/geizhals/sensor.py
homeassistant/components/gios/__init__.py
homeassistant/components/gios/air_quality.py
homeassistant/components/github/sensor.py
homeassistant/components/gitlab_ci/sensor.py
homeassistant/components/gitter/sensor.py
homeassistant/components/glances/__init__.py
homeassistant/components/glances/sensor.py
homeassistant/components/gntp/notify.py
homeassistant/components/goalfeed/*
homeassistant/components/gogogate2/cover.py
homeassistant/components/google/*
homeassistant/components/google_cloud/tts.py
homeassistant/components/google_maps/device_tracker.py
homeassistant/components/google_travel_time/sensor.py
homeassistant/components/googlehome/*
homeassistant/components/gpmdp/media_player.py
homeassistant/components/gpsd/sensor.py
homeassistant/components/greeneye_monitor/*
homeassistant/components/greeneye_monitor/sensor.py
homeassistant/components/greenwave/light.py
homeassistant/components/group/notify.py
homeassistant/components/growatt_server/sensor.py
homeassistant/components/gstreamer/media_player.py
homeassistant/components/gtfs/sensor.py
homeassistant/components/gtt/sensor.py
homeassistant/components/habitica/*
homeassistant/components/hangouts/*
homeassistant/components/hangouts/__init__.py
@@ -242,13 +288,13 @@ omit =
homeassistant/components/hangouts/hangouts_bot.py
homeassistant/components/hangouts/hangups_utils.py
homeassistant/components/harman_kardon_avr/media_player.py
homeassistant/components/harmony/remote.py
homeassistant/components/harmony/*
homeassistant/components/haveibeenpwned/sensor.py
homeassistant/components/hdmi_cec/*
homeassistant/components/heatmiser/climate.py
homeassistant/components/hikvision/binary_sensor.py
homeassistant/components/hikvisioncam/switch.py
homeassistant/components/hipchat/notify.py
homeassistant/components/hisense_aehw4a1/*
homeassistant/components/hitron_coda/device_tracker.py
homeassistant/components/hive/*
homeassistant/components/hlk_sw16/*
@@ -256,10 +302,8 @@ omit =
homeassistant/components/homematic/climate.py
homeassistant/components/homematic/cover.py
homeassistant/components/homematic/notify.py
homeassistant/components/homematicip_cloud/*
homeassistant/components/homeworks/*
homeassistant/components/honeywell/climate.py
homeassistant/components/hook/switch.py
homeassistant/components/horizon/media_player.py
homeassistant/components/hp_ilo/sensor.py
homeassistant/components/htu21d/sensor.py
@@ -270,7 +314,19 @@ omit =
homeassistant/components/hydrawise/*
homeassistant/components/hyperion/light.py
homeassistant/components/ialarm/alarm_control_panel.py
homeassistant/components/iammeter/sensor.py
homeassistant/components/iaqualink/binary_sensor.py
homeassistant/components/iaqualink/climate.py
homeassistant/components/iaqualink/light.py
homeassistant/components/iaqualink/sensor.py
homeassistant/components/iaqualink/switch.py
homeassistant/components/icloud/__init__.py
homeassistant/components/icloud/account.py
homeassistant/components/icloud/device_tracker.py
homeassistant/components/icloud/sensor.py
homeassistant/components/izone/climate.py
homeassistant/components/izone/discovery.py
homeassistant/components/izone/__init__.py
homeassistant/components/idteck_prox/*
homeassistant/components/ifttt/*
homeassistant/components/iglo/light.py
@@ -280,6 +336,7 @@ omit =
homeassistant/components/influxdb/sensor.py
homeassistant/components/insteon/*
homeassistant/components/incomfort/*
homeassistant/components/intesishome/*
homeassistant/components/ios/*
homeassistant/components/iota/*
homeassistant/components/iperf3/*
@@ -291,8 +348,11 @@ omit =
homeassistant/components/itunes/media_player.py
homeassistant/components/joaoapps_join/*
homeassistant/components/juicenet/*
homeassistant/components/kaiterra/*
homeassistant/components/kankun/switch.py
homeassistant/components/keba/*
homeassistant/components/keenetic_ndms2/device_tracker.py
homeassistant/components/kef/*
homeassistant/components/keyboard/*
homeassistant/components/keyboard_remote/*
homeassistant/components/kira/*
@@ -300,6 +360,8 @@ omit =
homeassistant/components/knx/*
homeassistant/components/knx/climate.py
homeassistant/components/knx/cover.py
homeassistant/components/kodi/__init__.py
homeassistant/components/kodi/const.py
homeassistant/components/kodi/media_player.py
homeassistant/components/kodi/notify.py
homeassistant/components/konnected/*
@@ -312,18 +374,18 @@ omit =
homeassistant/components/lcn/*
homeassistant/components/lg_netcast/media_player.py
homeassistant/components/lg_soundbar/media_player.py
homeassistant/components/life360/*
homeassistant/components/lifx/*
homeassistant/components/lifx_cloud/scene.py
homeassistant/components/lifx_legacy/light.py
homeassistant/components/lightwave/*
homeassistant/components/limitlessled/light.py
homeassistant/components/linksys_ap/device_tracker.py
homeassistant/components/linksys_smart/device_tracker.py
homeassistant/components/linky/__init__.py
homeassistant/components/linky/sensor.py
homeassistant/components/linode/*
homeassistant/components/linux_battery/sensor.py
homeassistant/components/lirc/*
homeassistant/components/liveboxplaytv/media_player.py
homeassistant/components/llamalab_automate/notify.py
homeassistant/components/lockitron/lock.py
homeassistant/components/logi_circle/__init__.py
@@ -348,16 +410,31 @@ omit =
homeassistant/components/mcp23017/*
homeassistant/components/media_extractor/*
homeassistant/components/mediaroom/media_player.py
homeassistant/components/melcloud/__init__.py
homeassistant/components/melcloud/climate.py
homeassistant/components/melcloud/const.py
homeassistant/components/melcloud/sensor.py
homeassistant/components/melcloud/water_heater.py
homeassistant/components/message_bird/notify.py
homeassistant/components/met/weather.py
homeassistant/components/meteo_france/*
homeassistant/components/meteo_france/__init__.py
homeassistant/components/meteo_france/const.py
homeassistant/components/meteo_france/sensor.py
homeassistant/components/meteo_france/weather.py
homeassistant/components/meteoalarm/*
homeassistant/components/metoffice/sensor.py
homeassistant/components/metoffice/weather.py
homeassistant/components/microsoft/tts.py
homeassistant/components/miflora/sensor.py
homeassistant/components/mikrotik/hub.py
homeassistant/components/mikrotik/device_tracker.py
homeassistant/components/mill/climate.py
homeassistant/components/mill/const.py
homeassistant/components/minecraft_server/__init__.py
homeassistant/components/minecraft_server/binary_sensor.py
homeassistant/components/minecraft_server/const.py
homeassistant/components/minecraft_server/sensor.py
homeassistant/components/minio/*
homeassistant/components/mitemp_bt/sensor.py
homeassistant/components/mjpeg/camera.py
homeassistant/components/mobile_app/*
@@ -368,6 +445,7 @@ omit =
homeassistant/components/mpchc/media_player.py
homeassistant/components/mpd/media_player.py
homeassistant/components/mqtt_room/sensor.py
homeassistant/components/msteams/notify.py
homeassistant/components/mvglive/sensor.py
homeassistant/components/mychevy/*
homeassistant/components/mycroft/*
@@ -380,12 +458,19 @@ omit =
homeassistant/components/n26/*
homeassistant/components/nad/media_player.py
homeassistant/components/nanoleaf/light.py
homeassistant/components/neato/*
homeassistant/components/neato/camera.py
homeassistant/components/neato/sensor.py
homeassistant/components/neato/switch.py
homeassistant/components/neato/vacuum.py
homeassistant/components/nederlandse_spoorwegen/sensor.py
homeassistant/components/nello/lock.py
homeassistant/components/nest/*
homeassistant/components/netatmo/*
homeassistant/components/netatmo_public/sensor.py
homeassistant/components/netatmo/__init__.py
homeassistant/components/netatmo/api.py
homeassistant/components/netatmo/camera.py
homeassistant/components/netatmo/climate.py
homeassistant/components/netatmo/const.py
homeassistant/components/netatmo/sensor.py
homeassistant/components/netdata/sensor.py
homeassistant/components/netgear/device_tracker.py
homeassistant/components/netgear_lte/*
@@ -397,6 +482,9 @@ omit =
homeassistant/components/nissan_leaf/*
homeassistant/components/nmap_tracker/device_tracker.py
homeassistant/components/nmbs/sensor.py
homeassistant/components/notion/__init__.py
homeassistant/components/notion/binary_sensor.py
homeassistant/components/notion/sensor.py
homeassistant/components/noaa_tides/sensor.py
homeassistant/components/norway_air/air_quality.py
homeassistant/components/nsw_fuel_station/sensor.py
@@ -404,11 +492,14 @@ omit =
homeassistant/components/nuki/lock.py
homeassistant/components/nut/sensor.py
homeassistant/components/nx584/alarm_control_panel.py
homeassistant/components/nzbget/__init__.py
homeassistant/components/nzbget/sensor.py
homeassistant/components/obihai/*
homeassistant/components/octoprint/*
homeassistant/components/oem/climate.py
homeassistant/components/oasa_telematics/sensor.py
homeassistant/components/ohmconnect/sensor.py
homeassistant/components/ombi/*
homeassistant/components/onewire/sensor.py
homeassistant/components/onkyo/media_player.py
homeassistant/components/onvif/camera.py
@@ -419,21 +510,26 @@ omit =
homeassistant/components/openhome/media_player.py
homeassistant/components/opensensemap/air_quality.py
homeassistant/components/opensky/sensor.py
homeassistant/components/opentherm_gw/*
homeassistant/components/opentherm_gw/__init__.py
homeassistant/components/opentherm_gw/binary_sensor.py
homeassistant/components/opentherm_gw/climate.py
homeassistant/components/opentherm_gw/sensor.py
homeassistant/components/openuv/__init__.py
homeassistant/components/openuv/binary_sensor.py
homeassistant/components/openuv/sensor.py
homeassistant/components/openweathermap/sensor.py
homeassistant/components/openweathermap/weather.py
homeassistant/components/opnsense/*
homeassistant/components/opple/light.py
homeassistant/components/orangepi_gpio/*
homeassistant/components/oru/*
homeassistant/components/orvibo/switch.py
homeassistant/components/osramlightify/light.py
homeassistant/components/otp/sensor.py
homeassistant/components/owlet/*
homeassistant/components/panasonic_bluray/media_player.py
homeassistant/components/panasonic_viera/media_player.py
homeassistant/components/pandora/media_player.py
homeassistant/components/pcal9535a/*
homeassistant/components/pencom/switch.py
homeassistant/components/philips_js/media_player.py
homeassistant/components/pi_hole/sensor.py
@@ -444,19 +540,19 @@ omit =
homeassistant/components/ping/device_tracker.py
homeassistant/components/pioneer/media_player.py
homeassistant/components/pjlink/media_player.py
homeassistant/components/plaato/*
homeassistant/components/plex/media_player.py
homeassistant/components/plex/sensor.py
homeassistant/components/plugwise/*
homeassistant/components/plum_lightpad/*
homeassistant/components/pocketcasts/sensor.py
homeassistant/components/point/*
homeassistant/components/postnl/sensor.py
homeassistant/components/prezzibenzina/sensor.py
homeassistant/components/proliphix/climate.py
homeassistant/components/prometheus/*
homeassistant/components/prowl/notify.py
homeassistant/components/proxmoxve/*
homeassistant/components/proxy/camera.py
homeassistant/components/ps4/__init__.py
homeassistant/components/ps4/media_player.py
homeassistant/components/ptvsd/*
homeassistant/components/pulseaudio_loopback/switch.py
homeassistant/components/pushbullet/notify.py
@@ -470,6 +566,7 @@ omit =
homeassistant/components/qnap/sensor.py
homeassistant/components/qrcode/image_processing.py
homeassistant/components/quantum_gateway/device_tracker.py
homeassistant/components/qvr_pro/*
homeassistant/components/qwikswitch/*
homeassistant/components/rachio/*
homeassistant/components/radarr/sensor.py
@@ -482,6 +579,7 @@ omit =
homeassistant/components/rainmachine/binary_sensor.py
homeassistant/components/rainmachine/sensor.py
homeassistant/components/rainmachine/switch.py
homeassistant/components/rainforest_eagle/sensor.py
homeassistant/components/raspihats/*
homeassistant/components/raspyrfm/*
homeassistant/components/recollect_waste/sensor.py
@@ -498,7 +596,6 @@ omit =
homeassistant/components/rfxtrx/*
homeassistant/components/ring/camera.py
homeassistant/components/ripple/sensor.py
homeassistant/components/ritassist/device_tracker.py
homeassistant/components/rocketchat/notify.py
homeassistant/components/roku/*
homeassistant/components/roomba/vacuum.py
@@ -513,8 +610,9 @@ omit =
homeassistant/components/rtorrent/sensor.py
homeassistant/components/russound_rio/media_player.py
homeassistant/components/russound_rnet/media_player.py
homeassistant/components/ruter/sensor.py
homeassistant/components/sabnzbd/*
homeassistant/components/saj/sensor.py
homeassistant/components/salt/device_tracker.py
homeassistant/components/satel_integra/*
homeassistant/components/scrape/sensor.py
homeassistant/components/scsgate/*
@@ -524,6 +622,7 @@ omit =
homeassistant/components/sensehat/light.py
homeassistant/components/sensehat/sensor.py
homeassistant/components/sensibo/climate.py
homeassistant/components/sentry/__init__.py
homeassistant/components/serial/sensor.py
homeassistant/components/serial_pm/sensor.py
homeassistant/components/sesame/lock.py
@@ -536,39 +635,54 @@ omit =
homeassistant/components/simplepush/notify.py
homeassistant/components/simplisafe/__init__.py
homeassistant/components/simplisafe/alarm_control_panel.py
homeassistant/components/simplisafe/lock.py
homeassistant/components/simulated/sensor.py
homeassistant/components/sisyphus/*
homeassistant/components/sky_hub/device_tracker.py
homeassistant/components/skybeacon/sensor.py
homeassistant/components/skybell/*
homeassistant/components/slack/notify.py
homeassistant/components/sinch/*
homeassistant/components/slide/*
homeassistant/components/sma/sensor.py
homeassistant/components/smappee/*
homeassistant/components/smarty/*
homeassistant/components/smarthab/*
homeassistant/components/sms/*
homeassistant/components/smtp/notify.py
homeassistant/components/snapcast/media_player.py
homeassistant/components/snmp/*
homeassistant/components/sochain/sensor.py
homeassistant/components/socialblade/sensor.py
homeassistant/components/solaredge/__init__.py
homeassistant/components/solaredge/sensor.py
homeassistant/components/solaredge_local/sensor.py
homeassistant/components/solarlog/*
homeassistant/components/solax/sensor.py
homeassistant/components/soma/cover.py
homeassistant/components/soma/__init__.py
homeassistant/components/somfy/*
homeassistant/components/somfy_mylink/*
homeassistant/components/sonarr/sensor.py
homeassistant/components/songpal/media_player.py
homeassistant/components/songpal/*
homeassistant/components/sonos/*
homeassistant/components/sony_projector/switch.py
homeassistant/components/spc/*
homeassistant/components/speedtestdotnet/*
homeassistant/components/spider/*
homeassistant/components/spotcrime/sensor.py
homeassistant/components/spotify/__init__.py
homeassistant/components/spotify/media_player.py
homeassistant/components/squeezebox/media_player.py
homeassistant/components/srp_energy/sensor.py
homeassistant/components/squeezebox/*
homeassistant/components/starline/*
homeassistant/components/starlingbank/sensor.py
homeassistant/components/steam_online/sensor.py
homeassistant/components/stiebel_eltron/*
homeassistant/components/stride/notify.py
homeassistant/components/stookalert/*
homeassistant/components/streamlabswater/*
homeassistant/components/suez_water/*
homeassistant/components/supervisord/sensor.py
homeassistant/components/surepetcare/*.py
homeassistant/components/swiss_hydrological_data/sensor.py
homeassistant/components/swiss_public_transport/sensor.py
homeassistant/components/swisscom/device_tracker.py
@@ -582,11 +696,11 @@ omit =
homeassistant/components/synologydsm/sensor.py
homeassistant/components/syslog/notify.py
homeassistant/components/systemmonitor/sensor.py
homeassistant/components/sytadin/sensor.py
homeassistant/components/tado/*
homeassistant/components/tado/device_tracker.py
homeassistant/components/tahoma/*
homeassistant/components/tank_utility/sensor.py
homeassistant/components/tankerkoenig/*
homeassistant/components/tapsaff/binary_sensor.py
homeassistant/components/tautulli/sensor.py
homeassistant/components/ted5000/sensor.py
@@ -597,7 +711,14 @@ omit =
homeassistant/components/telnet/switch.py
homeassistant/components/temper/sensor.py
homeassistant/components/tensorflow/image_processing.py
homeassistant/components/tesla/*
homeassistant/components/tesla/__init__.py
homeassistant/components/tesla/binary_sensor.py
homeassistant/components/tesla/climate.py
homeassistant/components/tesla/const.py
homeassistant/components/tesla/device_tracker.py
homeassistant/components/tesla/lock.py
homeassistant/components/tesla/sensor.py
homeassistant/components/tesla/switch.py
homeassistant/components/tfiac/climate.py
homeassistant/components/thermoworks_smoke/sensor.py
homeassistant/components/thethingsnetwork/*
@@ -608,49 +729,72 @@ omit =
homeassistant/components/tikteck/light.py
homeassistant/components/tile/device_tracker.py
homeassistant/components/time_date/sensor.py
homeassistant/components/tmb/sensor.py
homeassistant/components/todoist/calendar.py
homeassistant/components/todoist/const.py
homeassistant/components/tof/sensor.py
homeassistant/components/tomato/device_tracker.py
homeassistant/components/toon/*
homeassistant/components/torque/sensor.py
homeassistant/components/totalconnect/alarm_control_panel.py
homeassistant/components/totalconnect/*
homeassistant/components/touchline/climate.py
homeassistant/components/tplink/device_tracker.py
homeassistant/components/tplink/light.py
homeassistant/components/tplink/switch.py
homeassistant/components/tplink_lte/*
homeassistant/components/traccar/device_tracker.py
homeassistant/components/traccar/const.py
homeassistant/components/trackr/device_tracker.py
homeassistant/components/tradfri/*
homeassistant/components/tradfri/light.py
homeassistant/components/tradfri/cover.py
homeassistant/components/tradfri/base_class.py
homeassistant/components/trafikverket_train/sensor.py
homeassistant/components/trafikverket_weatherstation/sensor.py
homeassistant/components/transmission/*
homeassistant/components/transmission/sensor.py
homeassistant/components/transmission/switch.py
homeassistant/components/transmission/const.py
homeassistant/components/transmission/errors.py
homeassistant/components/travisci/sensor.py
homeassistant/components/tuya/*
homeassistant/components/twentemilieu/const.py
homeassistant/components/twentemilieu/sensor.py
homeassistant/components/twilio_call/notify.py
homeassistant/components/twilio_sms/notify.py
homeassistant/components/twitch/sensor.py
homeassistant/components/twitter/notify.py
homeassistant/components/ubee/device_tracker.py
homeassistant/components/uber/sensor.py
homeassistant/components/ubus/device_tracker.py
homeassistant/components/ue_smart_radio/media_player.py
homeassistant/components/unifiled/*
homeassistant/components/upcloud/*
homeassistant/components/upnp/*
homeassistant/components/ups/sensor.py
homeassistant/components/upc_connect/*
homeassistant/components/uptimerobot/binary_sensor.py
homeassistant/components/uscis/sensor.py
homeassistant/components/usps/*
homeassistant/components/vallox/*
homeassistant/components/vasttrafik/sensor.py
homeassistant/components/velbus/*
homeassistant/components/velbus/__init__.py
homeassistant/components/velbus/binary_sensor.py
homeassistant/components/velbus/climate.py
homeassistant/components/velbus/const.py
homeassistant/components/velbus/cover.py
homeassistant/components/velbus/light.py
homeassistant/components/velbus/sensor.py
homeassistant/components/velbus/switch.py
homeassistant/components/velux/*
homeassistant/components/venstar/climate.py
homeassistant/components/vera/*
homeassistant/components/verisure/*
homeassistant/components/versasense/*
homeassistant/components/vesync/__init__.py
homeassistant/components/vesync/common.py
homeassistant/components/vesync/const.py
homeassistant/components/vesync/switch.py
homeassistant/components/viaggiatreno/sensor.py
homeassistant/components/vizio/media_player.py
homeassistant/components/vicare/*
homeassistant/components/vilfo/__init__.py
homeassistant/components/vilfo/sensor.py
homeassistant/components/vilfo/const.py
homeassistant/components/vivotek/camera.py
homeassistant/components/vlc/media_player.py
homeassistant/components/vlc_telnet/media_player.py
homeassistant/components/volkszaehler/sensor.py
homeassistant/components/volumio/media_player.py
homeassistant/components/volvooncall/*
@@ -662,13 +806,14 @@ omit =
homeassistant/components/waze_travel_time/sensor.py
homeassistant/components/webostv/*
homeassistant/components/wemo/*
homeassistant/components/wemo/fan.py
homeassistant/components/whois/sensor.py
homeassistant/components/wink/*
homeassistant/components/wirelesstag/*
homeassistant/components/worldtidesinfo/sensor.py
homeassistant/components/worxlandroid/sensor.py
homeassistant/components/wunderlist/*
homeassistant/components/wwlln/__init__.py
homeassistant/components/wwlln/geo_location.py
homeassistant/components/x10/light.py
homeassistant/components/xbox_live/sensor.py
homeassistant/components/xeoma/camera.py
@@ -680,8 +825,8 @@ omit =
homeassistant/components/xmpp/notify.py
homeassistant/components/xs1/*
homeassistant/components/yale_smart_alarm/alarm_control_panel.py
homeassistant/components/yamaha/media_player.py
homeassistant/components/yamaha_musiccast/media_player.py
homeassistant/components/yandex_transport/*
homeassistant/components/yeelight/*
homeassistant/components/yeelightsunflower/light.py
homeassistant/components/yi/camera.py
@@ -693,13 +838,14 @@ omit =
homeassistant/components/zestimate/sensor.py
homeassistant/components/zha/__init__.py
homeassistant/components/zha/api.py
homeassistant/components/zha/const.py
homeassistant/components/zha/core/channels/*
homeassistant/components/zha/core/const.py
homeassistant/components/zha/core/device.py
homeassistant/components/zha/core/gateway.py
homeassistant/components/zha/core/helpers.py
homeassistant/components/zha/device_entity.py
homeassistant/components/zha/core/patches.py
homeassistant/components/zha/core/registries.py
homeassistant/components/zha/core/typing.py
homeassistant/components/zha/entity.py
homeassistant/components/zha/light.py
homeassistant/components/zha/sensor.py

View File

@@ -0,0 +1,33 @@
{
"name": "Home Assistant Dev",
"context": "..",
"dockerFile": "../Dockerfile.dev",
"postCreateCommand": "mkdir -p config && pip3 install -e .",
"appPort": 8123,
"runArgs": ["-e", "GIT_EDITOR=code --wait"],
"extensions": [
"ms-python.python",
"visualstudioexptteam.vscodeintellicode",
"ms-azure-devops.azure-pipelines",
"redhat.vscode-yaml",
"esbenp.prettier-vscode"
],
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true,
"terminal.integrated.shell.linux": "/bin/bash",
"yaml.customTags": [
"!secret scalar",
"!include_dir_named scalar",
"!include_dir_list scalar",
"!include_dir_merge_list scalar",
"!include_dir_merge_named scalar"
]
}
}

View File

@@ -1,47 +0,0 @@
<!-- 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!
-->
**Home Assistant release with the issue:**
<!--
- Frontend -> Developer tools -> Info
- Or use this command: hass --version
-->
**Last working Home Assistant release (if known):**
**Operating environment (Hass.io/Docker/Windows/etc.):**
<!--
Please provide details about your environment.
-->
**Component/platform:**
<!--
Please add the link to the documentation at https://www.home-assistant.io/components/ of the component/platform in question.
-->
**Description of problem:**
**Problem-relevant `configuration.yaml` entries and (fill out even if it seems unimportant):**
```yaml
```
**Traceback (if applicable):**
```
```
**Additional information:**

53
.github/ISSUE_TEMPLATE/BUG_REPORT.md vendored Normal file
View File

@@ -0,0 +1,53 @@
---
name: Report a bug with Home Assistant
about: Report an issue with Home Assistant
---
<!-- 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
- Do not report issues for integrations if you are using custom components or integrations.
- Provide as many details as possible. Paste logs, configuration samples and code into the backticks.
DO NOT DELETE ANY TEXT from this template! Otherwise, your issue may be closed without comment.
-->
## The problem
<!--
Describe the issue you are experiencing here to communicate to the
maintainers. Tell us what you were trying to do and what happened instead.
-->
## Environment
<!--
Provide details about the versions you are using, which helps us to reproduce
and find the issue quicker. Version information is found in the
Home Assistant frontend: Developer tools -> Info.
-->
- Home Assistant release with the issue:
- Last working Home Assistant release (if known):
- Operating environment (Hass.io/Docker/Windows/etc.):
- Integration causing this issue:
- Link to integration documentation on our website:
## Problem-relevant `configuration.yaml`
<!--
An example configuration that caused the problem for you. Fill this out even
if it seems unimportant to you. Please be sure to remove personal information
like passwords, private URLs and other credentials.
-->
```yaml
```
## Traceback/Error logs
<!--
If you come across any trace or error logs, please provide them.
-->
```txt
```
## Additional information

View File

@@ -1,52 +0,0 @@
---
name: Bug report
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!
-->
**Home Assistant release with the issue:**
<!--
- Frontend -> Developer tools -> Info
- Or use this command: hass --version
-->
**Last working Home Assistant release (if known):**
**Operating environment (Hass.io/Docker/Windows/etc.):**
<!--
Please provide details about your environment.
-->
**Component/platform:**
<!--
Please add the link to the documentation at https://www.home-assistant.io/components/ of the component/platform in question.
-->
**Description of problem:**
**Problem-relevant `configuration.yaml` entries and (fill out even if it seems unimportant):**
```yaml
```
**Traceback (if applicable):**
```
```
**Additional information:**

17
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
blank_issues_enabled: false
contact_links:
- name: Report a bug with the UI, Frontend or Lovelace
url: https://github.com/home-assistant/frontend/issues
about: This is the issue tracker for our backend. Please report issues with the UI in the frontend repository.
- name: Report incorrect or missing information on our website
url: https://github.com/home-assistant/home-assistant.io/issues
about: Our documentation has its own issue tracker. Please report issues with the website there.
- name: I have a question or need support
url: https://www.home-assistant.io/help
about: We use GitHub for tracking bugs, check our website for resources on getting help.
- name: Feature Request
url: https://community.home-assistant.io/c/feature-requests
about: Please use our Community Forum for making feature requests.
- name: I'm unsure where to go
url: https://www.home-assistant.io/join-chat
about: If you are unsure where to go, then joining our chat is recommended; Just ask!

View File

@@ -1,35 +1,109 @@
## Breaking Change:
<!-- What is breaking and why we have to break it. Remove this section only if it was NOT a breaking change. -->
## Description:
<!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Breaking change
<!--
If your PR contains a breaking change for existing users, it is important
to tell them what breaks, how to make it work again and why we did this.
This piece of text is published with the release notes, so it helps if you
write it towards our users, not us.
Note: Remove this section if this PR is NOT a breaking change.
-->
**Related issue (if applicable):** fixes #<home-assistant issue number goes here>
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
**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):
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Example entry for `configuration.yaml`:
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR. Furthermore, for new integrations, it gives an impression of how
the configuration would look like.
Note: Remove this section if this PR does not have an example entry.
-->
```yaml
# Example configuration.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.
- [ ] I have followed the [development checklist][dev-checklist]
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request:
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [ ] The code change is tested and works locally.
- [ ] Local tests pass. **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]
- [ ] The code has been formatted using Black (`black --fast homeassistant tests`)
- [ ] Tests have been added to verify that the new code works.
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)
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] [_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.
- [ ] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] Untested files have been added to `.coveragerc`.
The integration reached or maintains the following [Integration Quality Scale][quality-scale]:
<!--
The Integration Quality Scale scores an integration on the code quality
and user experience. Each level of the quality scale consists of a list
of requirements. We highly recommend getting your integration scored!
-->
- [ ] No score or internal
- [ ] 🥈 Silver
- [ ] 🥇 Gold
- [ ] 🏆 Platinum
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[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
[quality-scale]: https://developers.home-assistant.io/docs/en/next/integration_quality_scale_index.html
[docs-repository]: https://github.com/home-assistant/home-assistant.io

27
.github/lock.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
# Configuration for Lock Threads - https://github.com/dessant/lock-threads
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 1
# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: 2019-07-01
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: []
# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false
# Comment to post before locking. Set to `false` to disable
lockComment: false
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: false
# Limit to only `issues` or `pulls`
only: pulls
# Optionally, specify configuration settings just for `issues` or `pulls`
issues:
daysUntilLock: 30

65
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,65 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 90
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 7
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- under investigation
- Help wanted
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: true
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: true
# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false
# Label to use when marking as stale
staleLabel: stale
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
There hasn't been any activity on this issue recently. Due to the high number
of incoming GitHub notifications, we have to clean some of the old issues,
as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check
if that solves the issue. Let us know if that works for you by adding a
comment 👍
This issue now has been marked as stale and will be closed if no further
activity occurs. Thank you for your contributions.
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.
# Comment to post when closing a stale Issue or Pull Request.
# closeComment: >
# Your comment here.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30
# Limit to only `issues` or `pulls`
# only: issues
# Handle pull requests a little bit faster and with an adjusted comment.
pulls:
daysUntilStale: 30
markComment: >
There hasn't been any activity on this pull request recently. This pull
request has been automatically marked as stale because of that and will
be closed if no further activity occurs within 7 days.
Thank you for your contributions.

20
.gitignore vendored
View File

@@ -4,6 +4,10 @@ config2/*
tests/testing_config/deps
tests/testing_config/home-assistant.log
# hass-release
data/
.token
# Hide sublime text stuff
*.sublime-project
*.sublime-workspace
@@ -46,6 +50,7 @@ develop-eggs
.installed.cfg
lib
lib64
pip-wheel-metadata
# Logs
*.log
@@ -54,9 +59,12 @@ pip-log.txt
# Unit test / coverage reports
.coverage
.tox
coverage.xml
nosetests.xml
htmlcov/
test-reports/
test-results.xml
test-output.xml
# Translations
*.mo
@@ -94,7 +102,10 @@ virtualization/vagrant/.vagrant
virtualization/vagrant/config
# Visual Studio Code
.vscode
.vscode/*
!.vscode/cSpell.json
!.vscode/extensions.json
!.vscode/tasks.json
# Built docs
docs/build
@@ -107,9 +118,16 @@ desktop.ini
# mypy
/.mypy_cache/*
/.dmypy.json
# Secrets
.lokalise_token
# monkeytype
monkeytype.sqlite3
# This is left behind by Azure Restore Cache
tmp_cache
# python-language-server / Rope
.ropeproject

View File

@@ -1,2 +0,0 @@
python:
enabled: true

61
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,61 @@
repos:
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
args:
- --safe
- --quiet
files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$
- repo: https://github.com/codespell-project/codespell
rev: v1.16.0
hooks:
- id: codespell
args:
- --ignore-words-list=hass,alot,datas,dof,dur,farenheit,hist,iff,ines,ist,lightsensor,mut,nd,pres,referer,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing
- --skip="./.*,*.json"
- --quiet-level=2
exclude_types: [json]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings==1.5.0
- pydocstyle==5.0.2
files: ^(homeassistant|script|tests)/.+\.py$
- repo: https://github.com/PyCQA/bandit
rev: 1.6.2
hooks:
- id: bandit
args:
- --quiet
- --format=custom
- --configfile=tests/bandit.yaml
files: ^(homeassistant|script|tests)/.+\.py$
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
- id: isort
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: check-json
- id: no-commit-to-branch
args:
- --branch=dev
- --branch=master
- --branch=rc
- repo: local
hooks:
# Run mypy through our wrapper script in order to get the possible
# pyenv and/or virtualenv activated; it may not have been e.g. if
# committing from a GUI tool that was not launched from an activated
# shell.
- id: mypy
name: mypy
entry: script/run-in-env.sh mypy
language: script
types: [python]
require_serial: true
files: ^homeassistant/.+\.py$

View File

@@ -4,7 +4,7 @@ build:
image: latest
python:
version: 3.6
version: 3.7
setup_py_install: true
requirements_file: requirements_docs.txt

View File

@@ -1,9 +1,7 @@
sudo: false
dist: xenial
dist: bionic
addons:
apt:
sources:
- sourceline: "ppa:jonathonf/ffmpeg-4"
packages:
- libudev-dev
- libavformat-dev
@@ -16,18 +14,19 @@ addons:
matrix:
fast_finish: true
include:
- python: "3.5.3"
- python: "3.7.0"
env: TOXENV=lint
- python: "3.5.3"
env: TOXENV=pylint
- python: "3.5.3"
- python: "3.7.0"
env: TOXENV=pylint PYLINT_ARGS=--jobs=0 TRAVIS_WAIT=30
- python: "3.7.0"
env: TOXENV=typing
- python: "3.5.3"
env: TOXENV=py35
- python: "3.7"
- python: "3.7.0"
env: TOXENV=py37
cache: pip
cache:
pip: true
directories:
- $HOME/.cache/pre-commit
install: pip install -U tox
language: python
script: travis_wait 40 tox --develop
script: ${TRAVIS_WAIT:+travis_wait $TRAVIS_WAIT} tox --develop

105
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,105 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Preview",
"type": "shell",
"command": "hass -c ./config",
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Pytest",
"type": "shell",
"command": "pytest --timeout=10 tests",
"dependsOn": ["Install all Test Requirements"],
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Flake8",
"type": "shell",
"command": "pre-commit run flake8 --all-files",
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Pylint",
"type": "shell",
"command": "pylint homeassistant",
"dependsOn": ["Install all Requirements"],
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Generate Requirements",
"type": "shell",
"command": "./script/gen_requirements_all.py",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Install all Requirements",
"type": "shell",
"command": "pip3 install -r requirements_all.txt -c homeassistant/package_constraints.txt",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Install all Test Requirements",
"type": "shell",
"command": "pip3 install -r requirements_test_all.txt -c homeassistant/package_constraints.txt",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
}
]
}

View File

@@ -1,4 +1,4 @@
# This file is generated by script/manifest/codeowners.py
# This file is generated by script/hassfest/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
@@ -9,48 +9,68 @@ homeassistant/*.py @home-assistant/core
homeassistant/helpers/* @home-assistant/core
homeassistant/util/* @home-assistant/core
# Virtualization
Dockerfile @home-assistant/docker
virtualization/Docker/* @home-assistant/docker
# Other code
homeassistant/scripts/check_config.py @kellerza
# Integrations
homeassistant/components/abode/* @shred86
homeassistant/components/adguard/* @frenck
homeassistant/components/airly/* @bieniu
homeassistant/components/airvisual/* @bachya
homeassistant/components/alarm_control_panel/* @colinodell
homeassistant/components/alexa/* @home-assistant/cloud @ochlocracy
homeassistant/components/almond/* @gcampax @balloob
homeassistant/components/alpha_vantage/* @fabaff
homeassistant/components/amazon_polly/* @robbiet480
homeassistant/components/ambiclimate/* @danielhiversen
homeassistant/components/ambient_station/* @bachya
homeassistant/components/amcrest/* @pnbruckner
homeassistant/components/androidtv/* @JeffLIrion
homeassistant/components/apache_kafka/* @bachya
homeassistant/components/api/* @home-assistant/core
homeassistant/components/apprise/* @caronc
homeassistant/components/aprs/* @PhilRW
homeassistant/components/arcam_fmj/* @elupus
homeassistant/components/arduino/* @fabaff
homeassistant/components/arest/* @fabaff
homeassistant/components/asuswrt/* @kennedyshead
homeassistant/components/aten_pe/* @mtdcr
homeassistant/components/atome/* @baqs
homeassistant/components/august/* @bdraco
homeassistant/components/aurora_abb_powerone/* @davet2001
homeassistant/components/auth/* @home-assistant/core
homeassistant/components/automatic/* @armills
homeassistant/components/automation/* @home-assistant/core
homeassistant/components/avea/* @pattyland
homeassistant/components/avri/* @timvancann
homeassistant/components/awair/* @danielsjf
homeassistant/components/aws/* @awarecan @robbiet480
homeassistant/components/axis/* @kane610
homeassistant/components/azure_event_hub/* @eavanvalkenburg
homeassistant/components/azure_service_bus/* @hfurubotten
homeassistant/components/beewi_smartclim/* @alemuro
homeassistant/components/bitcoin/* @fabaff
homeassistant/components/bizkaibus/* @UgaitzEtxebarria
homeassistant/components/blink/* @fronzbot
homeassistant/components/bmw_connected_drive/* @ChristianKuehnel
homeassistant/components/bmw_connected_drive/* @gerard33
homeassistant/components/bom/* @maddenp
homeassistant/components/braviatv/* @robbiet480
homeassistant/components/broadlink/* @danielhiversen
homeassistant/components/broadlink/* @danielhiversen @felipediel
homeassistant/components/brother/* @bieniu
homeassistant/components/brunt/* @eavanvalkenburg
homeassistant/components/bt_smarthub/* @jxwolstenholme
homeassistant/components/buienradar/* @mjj4791 @ties
homeassistant/components/cert_expiry/* @Cereal2nd @jjlawren
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/cloud
homeassistant/components/cloudflare/* @ludeeus
homeassistant/components/comfoconnect/* @michaelarnauts
homeassistant/components/config/* @home-assistant/core
homeassistant/components/configurator/* @home-assistant/core
homeassistant/components/conversation/* @home-assistant/core
homeassistant/components/coolmaster/* @OnFreund
homeassistant/components/coronavirus/* @home_assistant/core
homeassistant/components/counter/* @fabaff
homeassistant/components/cover/* @home-assistant/core
homeassistant/components/cpuspeed/* @fabaff
@@ -58,61 +78,97 @@ homeassistant/components/cups/* @fabaff
homeassistant/components/daikin/* @fredrike @rofrantz
homeassistant/components/darksky/* @fabaff
homeassistant/components/deconz/* @kane610
homeassistant/components/delijn/* @bollewolle
homeassistant/components/demo/* @home-assistant/core
homeassistant/components/derivative/* @afaucogney
homeassistant/components/device_automation/* @home-assistant/core
homeassistant/components/digital_ocean/* @fabaff
homeassistant/components/directv/* @ctalkington
homeassistant/components/discogs/* @thibmaek
homeassistant/components/doorbird/* @oblogic7
homeassistant/components/dsmr_reader/* @depl0y
homeassistant/components/dweet/* @fabaff
homeassistant/components/dynalite/* @ziv1234
homeassistant/components/dyson/* @etheralm
homeassistant/components/ecobee/* @marthoc
homeassistant/components/ecovacs/* @OverloadUT
homeassistant/components/edp_redy/* @abmantis
homeassistant/components/edl21/* @mtdcr
homeassistant/components/egardia/* @jeroenterheerdt
homeassistant/components/eight_sleep/* @mezz64
homeassistant/components/elgato/* @frenck
homeassistant/components/elv/* @majuss
homeassistant/components/emby/* @mezz64
homeassistant/components/emoncms/* @borpin
homeassistant/components/enigma2/* @fbradyirl
homeassistant/components/enocean/* @bdurrer
homeassistant/components/entur_public_transport/* @hfurubotten
homeassistant/components/environment_canada/* @michaeldavie
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/ezviz/* @baqs
homeassistant/components/fastdotcom/* @rohankapoorcom
homeassistant/components/file/* @fabaff
homeassistant/components/filter/* @dgomes
homeassistant/components/fitbit/* @robbiet480
homeassistant/components/fixer/* @fabaff
homeassistant/components/flock/* @fabaff
homeassistant/components/flume/* @ChrisMandich
homeassistant/components/flunearyou/* @bachya
homeassistant/components/fortigate/* @kifeo
homeassistant/components/fortios/* @kimfrellsen
homeassistant/components/foscam/* @skgsergio
homeassistant/components/foursquare/* @robbiet480
homeassistant/components/freebox/* @snoof85
homeassistant/components/fronius/* @nielstron
homeassistant/components/frontend/* @home-assistant/frontend
homeassistant/components/garmin_connect/* @cyberjunky
homeassistant/components/gdacs/* @exxamalte
homeassistant/components/gearbest/* @HerrHofrat
homeassistant/components/geniushub/* @zxdavb
homeassistant/components/geo_rss_events/* @exxamalte
homeassistant/components/geonetnz_quakes/* @exxamalte
homeassistant/components/geonetnz_volcano/* @exxamalte
homeassistant/components/gios/* @bieniu
homeassistant/components/gitter/* @fabaff
homeassistant/components/glances/* @fabaff
homeassistant/components/glances/* @fabaff @engrbm87
homeassistant/components/gntp/* @robbiet480
homeassistant/components/google_assistant/* @home-assistant/cloud
homeassistant/components/google_cloud/* @lufton
homeassistant/components/google_translate/* @awarecan
homeassistant/components/google_travel_time/* @robbiet480
homeassistant/components/googlehome/* @ludeeus
homeassistant/components/gpsd/* @fabaff
homeassistant/components/greeneye_monitor/* @jkeljo
homeassistant/components/griddy/* @bdraco
homeassistant/components/group/* @home-assistant/core
homeassistant/components/growatt_server/* @indykoning
homeassistant/components/gtfs/* @robbiet480
homeassistant/components/harmony/* @ehendrix23
homeassistant/components/hassio/* @home-assistant/hass-io
homeassistant/components/heatmiser/* @andylockran
homeassistant/components/heos/* @andrewsayre
homeassistant/components/here_travel_time/* @eifinger
homeassistant/components/hikvision/* @mezz64
homeassistant/components/hikvisioncam/* @fbradyirl
homeassistant/components/hisense_aehw4a1/* @bannhead
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/homematicip_cloud/* @SukramJ
homeassistant/components/honeywell/* @zxdavb
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/iammeter/* @lewei50
homeassistant/components/iaqualink/* @flz
homeassistant/components/icloud/* @Quentame
homeassistant/components/ign_sismologia/* @exxamalte
homeassistant/components/incomfort/* @zxdavb
homeassistant/components/influxdb/* @fabaff
@@ -122,105 +178,174 @@ 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/intent/* @home-assistant/core
homeassistant/components/intesishome/* @jnimmo
homeassistant/components/ios/* @robbiet480
homeassistant/components/ipma/* @dgomes
homeassistant/components/iperf3/* @rohankapoorcom
homeassistant/components/ipma/* @dgomes @abmantis
homeassistant/components/iqvia/* @bachya
homeassistant/components/irish_rail_transport/* @ttroy50
homeassistant/components/izone/* @Swamp-Ig
homeassistant/components/jewish_calendar/* @tsvi
homeassistant/components/juicenet/* @jesserockz
homeassistant/components/kaiterra/* @Michsior14
homeassistant/components/keba/* @dannerph
homeassistant/components/keenetic_ndms2/* @foxel
homeassistant/components/kef/* @basnijholt
homeassistant/components/keyboard_remote/* @bendavid
homeassistant/components/knx/* @Julius2342
homeassistant/components/kodi/* @armills
homeassistant/components/konnected/* @heythisisnate
homeassistant/components/konnected/* @heythisisnate @kit-klein
homeassistant/components/lametric/* @robbiet480
homeassistant/components/launch_library/* @ludeeus
homeassistant/components/lcn/* @alengwenus
homeassistant/components/lifx/* @amelchio
homeassistant/components/lifx_cloud/* @amelchio
homeassistant/components/lifx_legacy/* @amelchio
homeassistant/components/life360/* @pnbruckner
homeassistant/components/linky/* @Quentame
homeassistant/components/linux_battery/* @fabaff
homeassistant/components/liveboxplaytv/* @pschmitt
homeassistant/components/local_ip/* @issacg
homeassistant/components/logger/* @home-assistant/core
homeassistant/components/logi_circle/* @evanjd
homeassistant/components/lovelace/* @home-assistant/frontend
homeassistant/components/luci/* @fbradyirl
homeassistant/components/luci/* @fbradyirl @mzdrale
homeassistant/components/luftdaten/* @fabaff
homeassistant/components/lupusec/* @majuss
homeassistant/components/lutron/* @JonGilmore
homeassistant/components/mastodon/* @fabaff
homeassistant/components/matrix/* @tinloaf
homeassistant/components/mcp23017/* @jardiamj
homeassistant/components/mediaroom/* @dgomes
homeassistant/components/melcloud/* @vilppuvuorinen
homeassistant/components/melissa/* @kennedyshead
homeassistant/components/met/* @danielhiversen
homeassistant/components/meteo_france/* @victorcerutti @oncleben31 @Quentame
homeassistant/components/meteoalarm/* @rolfberkenbosch
homeassistant/components/miflora/* @danielhiversen @ChristianKuehnel
homeassistant/components/mikrotik/* @engrbm87
homeassistant/components/mill/* @danielhiversen
homeassistant/components/min_max/* @fabaff
homeassistant/components/minecraft_server/* @elmurato
homeassistant/components/minio/* @tkislan
homeassistant/components/mobile_app/* @robbiet480
homeassistant/components/modbus/* @adamchengtkc
homeassistant/components/monoprice/* @etsinko
homeassistant/components/moon/* @fabaff
homeassistant/components/mpd/* @fabaff
homeassistant/components/mqtt/* @home-assistant/core
homeassistant/components/msteams/* @peroyvind
homeassistant/components/mysensors/* @MartinHjelmare
homeassistant/components/mystrom/* @fabaff
homeassistant/components/neato/* @dshokouhi @Santobert
homeassistant/components/nederlandse_spoorwegen/* @YarmoM
homeassistant/components/nello/* @pschmitt
homeassistant/components/ness_alarm/* @nickw444
homeassistant/components/nest/* @awarecan
homeassistant/components/netatmo/* @cgtobi
homeassistant/components/netdata/* @fabaff
homeassistant/components/nextbus/* @vividboarder
homeassistant/components/nilu/* @hfurubotten
homeassistant/components/nissan_leaf/* @filcole
homeassistant/components/nmbs/* @thibmaek
homeassistant/components/no_ip/* @fabaff
homeassistant/components/notify/* @home-assistant/core
homeassistant/components/notion/* @bachya
homeassistant/components/nsw_fuel_station/* @nickw444
homeassistant/components/nuki/* @pschmitt
homeassistant/components/nsw_rural_fire_service_feed/* @exxamalte
homeassistant/components/nuki/* @pvizeli
homeassistant/components/nws/* @MatthewFlamm
homeassistant/components/nzbget/* @chriscla
homeassistant/components/obihai/* @dshokouhi
homeassistant/components/ohmconnect/* @robbiet480
homeassistant/components/ombi/* @larssont
homeassistant/components/onboarding/* @home-assistant/core
homeassistant/components/onewire/* @garbled1
homeassistant/components/opentherm_gw/* @mvn23
homeassistant/components/openuv/* @bachya
homeassistant/components/openweathermap/* @fabaff
homeassistant/components/opnsense/* @mtreinish
homeassistant/components/orangepi_gpio/* @pascallj
homeassistant/components/owlet/* @oblogic7
homeassistant/components/oru/* @bvlaicu
homeassistant/components/panel_custom/* @home-assistant/frontend
homeassistant/components/panel_iframe/* @home-assistant/frontend
homeassistant/components/pcal9535a/* @Shulyaka
homeassistant/components/persistent_notification/* @home-assistant/core
homeassistant/components/philips_js/* @elupus
homeassistant/components/pi_hole/* @fabaff
homeassistant/components/pi_hole/* @fabaff @johnluetke
homeassistant/components/pilight/* @trekky12
homeassistant/components/plaato/* @JohNan
homeassistant/components/plant/* @ChristianKuehnel
homeassistant/components/plex/* @jjlawren
homeassistant/components/plugwise/* @laetificat @CoMPaTech @bouwew
homeassistant/components/point/* @fredrike
homeassistant/components/proxmoxve/* @k4ds3
homeassistant/components/ps4/* @ktnrg45
homeassistant/components/ptvsd/* @swamp-ig
homeassistant/components/push/* @dgomes
homeassistant/components/pvoutput/* @fabaff
homeassistant/components/qld_bushfire/* @exxamalte
homeassistant/components/qnap/* @colinodell
homeassistant/components/quantum_gateway/* @cisasteelersfan
homeassistant/components/qvr_pro/* @oblogic7
homeassistant/components/qwikswitch/* @kellerza
homeassistant/components/rainbird/* @konikvranik
homeassistant/components/raincloud/* @vanstinator
homeassistant/components/rainforest_eagle/* @gtdiehl @jcalbert
homeassistant/components/rainmachine/* @bachya
homeassistant/components/random/* @fabaff
homeassistant/components/repetier/* @MTrab
homeassistant/components/rfxtrx/* @danielhiversen
homeassistant/components/ring/* @balloob
homeassistant/components/rmvtransport/* @cgtobi
homeassistant/components/roku/* @ctalkington
homeassistant/components/roomba/* @pschmitt
homeassistant/components/ruter/* @ludeeus
homeassistant/components/safe_mode/* @home-assistant/core
homeassistant/components/saj/* @fredericvl
homeassistant/components/salt/* @bjornorri
homeassistant/components/samsungtv/* @escoand
homeassistant/components/scene/* @home-assistant/core
homeassistant/components/scrape/* @fabaff
homeassistant/components/script/* @home-assistant/core
homeassistant/components/search/* @home-assistant/core
homeassistant/components/sense/* @kbickar
homeassistant/components/sensibo/* @andrey-git
homeassistant/components/sentry/* @dcramer
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/sighthound/* @robmarkcole
homeassistant/components/signal_messenger/* @bbernhard
homeassistant/components/simplisafe/* @bachya
homeassistant/components/sinch/* @bendikrb
homeassistant/components/sisyphus/* @jkeljo
homeassistant/components/slide/* @ualex73
homeassistant/components/sma/* @kellerza
homeassistant/components/smarthab/* @outadoc
homeassistant/components/smartthings/* @andrewsayre
homeassistant/components/smarty/* @z0mbieprocess
homeassistant/components/sms/* @ocalvo
homeassistant/components/smtp/* @fabaff
homeassistant/components/solaredge_local/* @drobtravels @scheric
homeassistant/components/solarlog/* @Ernst79
homeassistant/components/solax/* @squishykid
homeassistant/components/sonos/* @amelchio
homeassistant/components/soma/* @ratsept
homeassistant/components/somfy/* @tetienne
homeassistant/components/songpal/* @rytilahti
homeassistant/components/spaceapi/* @fabaff
homeassistant/components/speedtestdotnet/* @rohankapoorcom
homeassistant/components/spider/* @peternijssen
homeassistant/components/spotify/* @frenck
homeassistant/components/sql/* @dgomes
homeassistant/components/starline/* @anonym-tsk
homeassistant/components/statistics/* @fabaff
homeassistant/components/stiebel_eltron/* @fucm
homeassistant/components/stookalert/* @fwestenberg
homeassistant/components/stream/* @hunterjm
homeassistant/components/stt/* @pvizeli
homeassistant/components/suez_water/* @ooii
homeassistant/components/sun/* @Swamp-Ig
homeassistant/components/supla/* @mwegrzynek
homeassistant/components/surepetcare/* @benleb
homeassistant/components/swiss_hydrological_data/* @fabaff
homeassistant/components/swiss_public_transport/* @fabaff
homeassistant/components/switchbot/* @danielhiversen
@@ -229,52 +354,76 @@ homeassistant/components/switchmate/* @danielhiversen
homeassistant/components/syncthru/* @nielstron
homeassistant/components/synology_srm/* @aerialls
homeassistant/components/syslog/* @fabaff
homeassistant/components/sytadin/* @gautric
homeassistant/components/tado/* @michaelarnauts
homeassistant/components/tahoma/* @philklei
homeassistant/components/tankerkoenig/* @guillempages
homeassistant/components/tautulli/* @ludeeus
homeassistant/components/tellduslive/* @fredrike
homeassistant/components/template/* @PhracturedBlue
homeassistant/components/tesla/* @zabuldon
homeassistant/components/template/* @PhracturedBlue @tetienne
homeassistant/components/tesla/* @zabuldon @alandtse
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/tmb/* @alemuro
homeassistant/components/todoist/* @boralyl
homeassistant/components/toon/* @frenck
homeassistant/components/totalconnect/* @austinmroczek
homeassistant/components/tplink/* @rytilahti
homeassistant/components/traccar/* @ludeeus
homeassistant/components/tradfri/* @ggravlingen
homeassistant/components/tts/* @robbiet480
homeassistant/components/trafikverket_train/* @endor-force
homeassistant/components/transmission/* @engrbm87 @JPHutchins
homeassistant/components/tts/* @pvizeli
homeassistant/components/twentemilieu/* @frenck
homeassistant/components/twilio_call/* @robbiet480
homeassistant/components/twilio_sms/* @robbiet480
homeassistant/components/uber/* @robbiet480
homeassistant/components/ubee/* @mzdrale
homeassistant/components/unifi/* @kane610
homeassistant/components/unifiled/* @florisvdk
homeassistant/components/upc_connect/* @pvizeli
homeassistant/components/upcloud/* @scop
homeassistant/components/updater/* @home-assistant/core
homeassistant/components/upnp/* @robbiet480
homeassistant/components/upnp/* @StevenLooman
homeassistant/components/uptimerobot/* @ludeeus
homeassistant/components/usgs_earthquakes_feed/* @exxamalte
homeassistant/components/utility_meter/* @dgomes
homeassistant/components/velbus/* @Cereal2nd @brefra
homeassistant/components/velux/* @Julius2342
homeassistant/components/versasense/* @flamm3blemuff1n
homeassistant/components/version/* @fabaff
homeassistant/components/vesync/* @markperdue @webdjoe
homeassistant/components/vicare/* @oischinger
homeassistant/components/vilfo/* @ManneW
homeassistant/components/vivotek/* @HarlemSquirrel
homeassistant/components/vizio/* @raman325
homeassistant/components/vlc_telnet/* @rodripf
homeassistant/components/waqi/* @andrey-git
homeassistant/components/watson_tts/* @rutkai
homeassistant/components/weather/* @fabaff
homeassistant/components/weblink/* @home-assistant/core
homeassistant/components/webostv/* @bendavid
homeassistant/components/websocket_api/* @home-assistant/core
homeassistant/components/wemo/* @sqldiablo
homeassistant/components/withings/* @vangorra
homeassistant/components/wled/* @frenck
homeassistant/components/workday/* @fabaff
homeassistant/components/worldclock/* @fabaff
homeassistant/components/wwlln/* @bachya
homeassistant/components/xbox_live/* @MartinHjelmare
homeassistant/components/xfinity/* @cisasteelersfan
homeassistant/components/xiaomi_aqara/* @danielhiversen @syssi
homeassistant/components/xiaomi_miio/* @rytilahti @syssi
homeassistant/components/xiaomi_tv/* @simse
homeassistant/components/xmpp/* @fabaff @flowolf
homeassistant/components/yamaha_musiccast/* @jalmeroth
homeassistant/components/yandex_transport/* @rishatik92
homeassistant/components/yeelight/* @rytilahti @zewelor
homeassistant/components/yeelightsunflower/* @lindsaymarkward
homeassistant/components/yessssms/* @flowolf
homeassistant/components/yi/* @bachya
homeassistant/components/yr/* @danielhiversen
homeassistant/components/zeroconf/* @robbiet480 @Kane610
homeassistant/components/zha/* @dmulcahey @adminiuga
homeassistant/components/zone/* @home-assistant/core
@@ -282,5 +431,4 @@ 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

@@ -4,7 +4,7 @@ Everybody is invited and welcome to contribute to Home Assistant. There is a lot
The process is straight-forward.
- Read [How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews) by Kubernetes (but skip step 0)
- Read [How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews) by Kubernetes (but skip step 0 and 1)
- Fork the Home Assistant [git repository](https://github.com/home-assistant/home-assistant).
- Write the code for your device, notification service, sensor, or IoT thing.
- Ensure tests work.
@@ -12,3 +12,7 @@ The process is straight-forward.
Still interested? Then you should take a peek at the [developer documentation](https://developers.home-assistant.io/) to get more details.
## Feature suggestions
If you want to suggest a new feature for Home Assistant (e.g., new integrations), please open a thread in our [Community Forum: Feature Requests](https://community.home-assistant.io/c/feature-requests).
We use [GitHub for tracking issues](https://github.com/home-assistant/home-assistant/issues), not for tracking feature requests.

View File

@@ -1,35 +0,0 @@
# Notice:
# 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.7
LABEL maintainer="Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>"
# Uncomment any of the following lines to disable the installation.
#ENV INSTALL_TELLSTICK no
#ENV INSTALL_OPENALPR no
#ENV INSTALL_FFMPEG no
#ENV INSTALL_LIBCEC no
#ENV INSTALL_SSOCR no
#ENV INSTALL_DLIB no
#ENV INSTALL_IPERF3 no
VOLUME /config
WORKDIR /usr/src/app
# Copy build scripts
COPY virtualization/Docker/ virtualization/Docker/
RUN virtualization/Docker/setup_docker_prereqs
# Install hass component dependencies
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==0.12.2 cchardet cython tensorflow
# Copy source
COPY . .
CMD [ "python", "-m", "homeassistant", "--config", "/config" ]

32
Dockerfile.dev Normal file
View File

@@ -0,0 +1,32 @@
FROM python:3.7
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libudev-dev \
libavformat-dev \
libavcodec-dev \
libavdevice-dev \
libavutil-dev \
libswscale-dev \
libswresample-dev \
libavfilter-dev \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src
# Setup hass-release
RUN git clone --depth 1 https://github.com/home-assistant/hass-release \
&& cd hass-release \
&& pip3 install -e .
WORKDIR /workspaces
# Install Python dependencies from requirements
COPY requirements_test.txt requirements_test_pre_commit.txt homeassistant/package_constraints.txt ./
RUN pip3 install -r requirements_test.txt -c package_constraints.txt \
&& rm -f requirements_test.txt package_constraints.txt requirements_test_pre_commit.txt
# Set the default shell to bash instead of sh
ENV SHELL /bin/bash

View File

@@ -1,14 +1,7 @@
Home Assistant |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.
To get started:
.. code:: bash
python3 -m pip install homeassistant
hass --open-ui
Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.
Check out `home-assistant.io <https://home-assistant.io>`__ for `a
demo <https://home-assistant.io/demo/>`__, `installation instructions <https://home-assistant.io/getting-started/>`__,
@@ -32,4 +25,4 @@ of a component, check the `Home Assistant help section <https://home-assistant.i
.. |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
:target: https://home-assistant.io/components/
:target: https://home-assistant.io/integrations/

201
azure-pipelines-ci.yml Normal file
View File

@@ -0,0 +1,201 @@
# https://dev.azure.com/home-assistant
trigger:
batch: true
branches:
include:
- rc
- dev
- master
pr:
- rc
- dev
- master
resources:
containers:
- container: 37
image: homeassistant/ci-azure:3.7
repositories:
- repository: azure
type: github
name: 'home-assistant/ci-azure'
endpoint: 'home-assistant'
variables:
- name: PythonMain
value: '37'
- group: codecov
stages:
- stage: 'Overview'
jobs:
- job: 'Lint'
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'requirements_test.txt | homeassistant/package_constraints.txt'
build: |
python -m venv venv
. venv/bin/activate
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
pre-commit install-hooks
- script: |
. venv/bin/activate
pre-commit run codespell --all-files
displayName: 'Run codespell'
- script: |
. venv/bin/activate
pre-commit run flake8 --all-files
displayName: 'Run flake8'
- script: |
. venv/bin/activate
pre-commit run bandit --all-files
displayName: 'Run bandit'
- script: |
. venv/bin/activate
pre-commit run isort --all-files --show-diff-on-failure
displayName: 'Run isort'
- script: |
. venv/bin/activate
pre-commit run check-json --all-files
displayName: 'Run check-json'
- job: 'Validate'
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'homeassistant/package_constraints.txt'
build: |
python -m venv venv
. venv/bin/activate
pip install -e .
- script: |
. venv/bin/activate
python -m script.hassfest validate
displayName: 'Validate manifests'
- script: |
. venv/bin/activate
./script/gen_requirements_all.py validate
displayName: 'requirements_all validate'
- job: 'CheckFormat'
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'requirements_test.txt | homeassistant/package_constraints.txt'
build: |
python -m venv venv
. venv/bin/activate
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
pre-commit install-hooks
- script: |
. venv/bin/activate
pre-commit run black --all-files --show-diff-on-failure
displayName: 'Check Black formatting'
- stage: 'Tests'
dependsOn:
- 'Overview'
jobs:
- job: 'PyTest'
pool:
vmImage: 'ubuntu-latest'
strategy:
maxParallel: 3
matrix:
Python37:
python.container: '37'
container: $[ variables['python.container'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'requirements_test_all.txt | homeassistant/package_constraints.txt'
build: |
set -e
python -m venv venv
. venv/bin/activate
pip install -U pip setuptools pytest-azurepipelines pytest-xdist -c homeassistant/package_constraints.txt
pip install -r requirements_test_all.txt -c homeassistant/package_constraints.txt
# This is a TEMP. Eventually we should make sure our 4 dependencies drop typing.
# Find offending deps with `pipdeptree -r -p typing`
pip uninstall -y typing
- script: |
. venv/bin/activate
pip install -e .
displayName: 'Install Home Assistant'
- script: |
set -e
. venv/bin/activate
pytest --timeout=9 --durations=10 -n auto --dist=loadfile -qq -o console_output_style=count -p no:sugar tests
script/check_dirty
displayName: 'Run pytest for python $(python.container)'
condition: and(succeeded(), ne(variables['python.container'], variables['PythonMain']))
- script: |
set -e
. venv/bin/activate
pytest --timeout=9 --durations=10 -n auto --dist=loadfile --cov homeassistant --cov-report html -qq -o console_output_style=count -p no:sugar tests
#codecov --token $(codecovToken)
script/check_dirty
displayName: 'Run pytest for python $(python.container) / coverage'
condition: and(succeeded(), eq(variables['python.container'], variables['PythonMain']))
- stage: 'FullCheck'
dependsOn:
- 'Overview'
jobs:
- job: 'Pylint'
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'requirements_all.txt | requirements_test.txt | homeassistant/package_constraints.txt'
build: |
set -e
python -m venv venv
. venv/bin/activate
pip install -U pip setuptools wheel
pip install -r requirements_all.txt -c homeassistant/package_constraints.txt
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
- script: |
. venv/bin/activate
pip install -e .
displayName: 'Install Home Assistant'
- script: |
. venv/bin/activate
pylint homeassistant
displayName: 'Run pylint'
- job: 'Mypy'
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'requirements_test.txt | setup.py | homeassistant/package_constraints.txt'
build: |
python -m venv venv
. venv/bin/activate
pip install -e . -r requirements_test.txt -c homeassistant/package_constraints.txt
pre-commit install-hooks
- script: |
. venv/bin/activate
pre-commit run mypy --all-files
displayName: 'Run mypy'

View File

@@ -1,168 +1,277 @@
# https://dev.azure.com/home-assistant
trigger:
batch: true
tags:
include:
- '*'
- '*'
pr: none
schedules:
- cron: "0 1 * * *"
displayName: "nightly builds"
branches:
include:
- dev
always: true
variables:
- name: versionBuilder
value: '3.2'
value: '6.9'
- group: docker
- group: github
- group: twine
resources:
repositories:
- repository: azure
type: github
name: 'home-assistant/ci-azure'
endpoint: 'home-assistant'
stages:
jobs:
- stage: 'Validate'
jobs:
- template: templates/azp-job-version.yaml@azure
parameters:
ignoreDev: true
- job: 'Permission'
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
sudo apt-get install -y --no-install-recommends \
jq curl
release="$(Build.SourceBranchName)"
created_by="$(curl -s https://api.github.com/repos/home-assistant/core/releases/tags/${release} | jq --raw-output '.author.login')"
- job: 'VersionValidate'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
inputs:
versionSpec: '3.7'
- script: |
setup_version="$(python setup.py -V)"
branch_version="$(Build.SourceBranchName)"
if [[ "${created_by}" =~ ^(balloob|pvizeli|fabaff|robbiet480|bramkragten|frenck)$ ]]; then
exit 0
fi
if [ "${setup_version}" != "${branch_version}" ]; then
echo "Version of tag ${branch_version} don't match with ${setup_version}!"
echo "${created_by} is not allowed to create an release!"
exit 1
fi
displayName: 'Check version of branch/tag'
- script: |
sudo apt-get install -y --no-install-recommends \
jq curl
displayName: 'Check rights'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
release="$(Build.SourceBranchName)"
created_by="$(curl -s https://api.github.com/repos/home-assistant/home-assistant/releases/tags/${release} | jq --raw-output '.author.login')"
- stage: 'Build'
jobs:
- job: 'ReleasePython'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
inputs:
versionSpec: '3.7'
- script: pip install twine wheel
displayName: 'Install tools'
- script: python setup.py sdist bdist_wheel
displayName: 'Build package'
- script: |
export TWINE_USERNAME="$(twineUser)"
export TWINE_PASSWORD="$(twinePassword)"
if [[ "${created_by}" =~ ^(balloob|pvizeli|fabaff|robbiet480)$ ]]; then
exit 0
fi
twine upload dist/* --skip-existing
displayName: 'Upload pypi'
- job: 'ReleaseDocker'
timeoutInMinutes: 240
pool:
vmImage: 'ubuntu-latest'
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,raspberrypi4,odroid-xu,tinker'
aarch64:
buildArch: 'aarch64'
buildMachine: 'qemuarm-64,raspberrypi3-64,raspberrypi4-64,odroid-c2,odroid-n2'
steps:
- template: templates/azp-step-ha-version.yaml@azure
- script: |
docker login -u $(dockerUser) -p $(dockerPassword)
displayName: 'Docker hub login'
- script: docker pull homeassistant/amd64-builder:$(versionBuilder)
displayName: 'Install Builder'
- script: |
set -e
echo "${created_by} is not allowed to create an release!"
exit 1
displayName: 'Check rights'
docker run --rm --privileged \
-v ~/.docker:/root/.docker:rw \
-v /run/docker.sock:/run/docker.sock:rw \
-v $(pwd):/homeassistant:ro \
homeassistant/amd64-builder:$(versionBuilder) \
--homeassistant $(homeassistantRelease) "--$(buildArch)" \
-r https://github.com/home-assistant/hassio-homeassistant \
-t generic --docker-hub homeassistant
docker run --rm --privileged \
-v ~/.docker:/root/.docker \
-v /run/docker.sock:/run/docker.sock:rw \
homeassistant/amd64-builder:$(versionBuilder) \
--homeassistant-machine "$(homeassistantRelease)=$(buildMachine)" \
-r https://github.com/home-assistant/hassio-homeassistant \
-t machine --docker-hub homeassistant
displayName: 'Build Release'
- job: 'ReleasePython'
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('VersionValidate'))
dependsOn:
- 'VersionValidate'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
inputs:
versionSpec: '3.7'
- script: pip install twine wheel
displayName: 'Install tools'
- script: python setup.py sdist bdist_wheel
displayName: 'Build package'
- script: |
export TWINE_USERNAME="$(twineUser)"
export TWINE_PASSWORD="$(twinePassword)"
twine upload dist/* --skip-existing
displayName: 'Upload pypi'
- stage: 'Publish'
jobs:
- job: 'ReleaseHassio'
pool:
vmImage: 'ubuntu-latest'
steps:
- template: templates/azp-step-ha-version.yaml@azure
- script: |
sudo apt-get install -y --no-install-recommends \
git jq curl
git config --global user.name "Pascal Vizeli"
git config --global user.email "pvizeli@syshack.ch"
git config --global credential.helper store
- job: 'ReleaseDocker'
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('VersionValidate'))
dependsOn:
- 'VersionValidate'
timeoutInMinutes: 240
pool:
vmImage: 'ubuntu-latest'
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
echo "https://$(githubToken):x-oauth-basic@github.com" > $HOME/.git-credentials
displayName: 'Install requirements'
- 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
version="$(homeassistantRelease)"
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'
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)"
- job: 'ReleaseHassio'
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('ReleaseDocker'))
dependsOn:
- 'ReleaseDocker'
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
sudo apt-get install -y --no-install-recommends \
git jq curl
if [[ "$version" =~ d ]]; then
sed -i "s|$dev_version|$version|g" dev.json
elif [[ "$version" =~ b ]]; then
sed -i "s|$beta_version|$version|g" beta.json
else
sed -i "s|$beta_version|$version|g" beta.json
sed -i "s|$stable_version|$version|g" stable.json
fi
git config --global user.name "Pascal Vizeli"
git config --global user.email "pvizeli@syshack.ch"
git config --global credential.helper store
git commit -am "Bump Home Assistant $version"
git push
displayName: "Update version files"
- job: 'ReleaseDocker'
pool:
vmImage: 'ubuntu-latest'
steps:
- template: templates/azp-step-ha-version.yaml@azure
- script: |
docker login -u $(dockerUser) -p $(dockerPassword)
displayName: 'Docker login'
- script: |
set -e
export DOCKER_CLI_EXPERIMENTAL=enabled
echo "https://$(githubToken):x-oauth-basic@github.com" > $HOME/.git-credentials
displayName: 'Install requirements'
- script: |
set -e
function create_manifest() {
local tag_l=$1
local tag_r=$2
version="$(Build.SourceBranchName)"
docker manifest create homeassistant/home-assistant:${tag_l} \
homeassistant/amd64-homeassistant:${tag_r} \
homeassistant/i386-homeassistant:${tag_r} \
homeassistant/armhf-homeassistant:${tag_r} \
homeassistant/armv7-homeassistant:${tag_r} \
homeassistant/aarch64-homeassistant:${tag_r}
git clone https://github.com/home-assistant/hassio-version
cd hassio-version
docker manifest annotate homeassistant/home-assistant:${tag_l} \
homeassistant/amd64-homeassistant:${tag_r} \
--os linux --arch amd64
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)"
docker manifest annotate homeassistant/home-assistant:${tag_l} \
homeassistant/i386-homeassistant:${tag_r} \
--os linux --arch 386
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
docker manifest annotate homeassistant/home-assistant:${tag_l} \
homeassistant/armhf-homeassistant:${tag_r} \
--os linux --arch arm --variant=v6
git commit -am "Bump Home Assistant $version"
git push
displayName: 'Update version files'
docker manifest annotate homeassistant/home-assistant:${tag_l} \
homeassistant/armv7-homeassistant:${tag_r} \
--os linux --arch arm --variant=v7
docker manifest annotate homeassistant/home-assistant:${tag_l} \
homeassistant/aarch64-homeassistant:${tag_r} \
--os linux --arch arm64 --variant=v8
docker manifest push --purge homeassistant/home-assistant:${tag_l}
}
docker pull homeassistant/amd64-homeassistant:$(homeassistantRelease)
docker pull homeassistant/i386-homeassistant:$(homeassistantRelease)
docker pull homeassistant/armhf-homeassistant:$(homeassistantRelease)
docker pull homeassistant/armv7-homeassistant:$(homeassistantRelease)
docker pull homeassistant/aarch64-homeassistant:$(homeassistantRelease)
# Create version tag
create_manifest "$(homeassistantRelease)" "$(homeassistantRelease)"
# Create general tags
if [[ "$(homeassistantRelease)" =~ d ]]; then
create_manifest "dev" "$(homeassistantRelease)"
elif [[ "$(homeassistantRelease)" =~ b ]]; then
create_manifest "beta" "$(homeassistantRelease)"
create_manifest "rc" "$(homeassistantRelease)"
else
create_manifest "stable" "$(homeassistantRelease)"
create_manifest "latest" "$(homeassistantRelease)"
create_manifest "beta" "$(homeassistantRelease)"
create_manifest "rc" "$(homeassistantRelease)"
fi
displayName: 'Create Meta-Image'
- stage: 'Addidional'
jobs:
- job: 'Updater'
pool:
vmImage: 'ubuntu-latest'
variables:
- group: gcloud
steps:
- template: templates/azp-step-ha-version.yaml@azure
- script: |
set -e
export CLOUDSDK_CORE_DISABLE_PROMPTS=1
curl -o google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz
tar -C . -xvf google-cloud-sdk.tar.gz
rm -f google-cloud-sdk.tar.gz
./google-cloud-sdk/install.sh
displayName: 'Setup gCloud'
condition: eq(variables['homeassistantReleaseStable'], 'true')
- script: |
set -e
export CLOUDSDK_CORE_DISABLE_PROMPTS=1
echo "$(gcloudAnalytic)" > gcloud_auth.json
./google-cloud-sdk/bin/gcloud auth activate-service-account --key-file gcloud_auth.json
rm -f gcloud_auth.json
displayName: 'Auth gCloud'
condition: eq(variables['homeassistantReleaseStable'], 'true')
- script: |
set -e
export CLOUDSDK_CORE_DISABLE_PROMPTS=1
./google-cloud-sdk/bin/gcloud functions deploy Analytics-Receiver \
--project home-assistant-analytics \
--update-env-vars VERSION=$(homeassistantRelease) \
--source gs://analytics-src/function-source.zip
displayName: 'Push details to updater'
condition: eq(variables['homeassistantReleaseStable'], 'true')

View File

@@ -0,0 +1,66 @@
# https://dev.azure.com/home-assistant
trigger:
batch: true
branches:
include:
- dev
pr: none
schedules:
- cron: "30 0 * * *"
displayName: "translation update"
branches:
include:
- dev
always: true
variables:
- group: translation
resources:
repositories:
- repository: azure
type: github
name: 'home-assistant/ci-azure'
endpoint: 'home-assistant'
jobs:
- job: 'Upload'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
inputs:
versionSpec: '3.7'
- script: |
export LOKALISE_TOKEN="$(lokaliseToken)"
export AZURE_BRANCH="$(Build.SourceBranchName)"
./script/translations_upload
displayName: 'Upload Translation'
- job: 'Download'
dependsOn:
- 'Upload'
condition: or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual'))
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
inputs:
versionSpec: '3.7'
- template: templates/azp-step-git-init.yaml@azure
- script: |
export LOKALISE_TOKEN="$(lokaliseToken)"
export AZURE_BRANCH="$(Build.SourceBranchName)"
./script/translations_download
displayName: 'Download Translation'
- script: |
git checkout dev
git add homeassistant
git commit -am "[ci skip] Translation update"
git push
displayName: 'Update translation'

View File

@@ -0,0 +1,77 @@
# https://dev.azure.com/home-assistant
trigger:
batch: true
branches:
include:
- dev
paths:
include:
- requirements_all.txt
pr: none
schedules:
- cron: '0 */4 * * *'
displayName: 'daily builds'
branches:
include:
- dev
always: true
variables:
- name: versionWheels
value: '1.4-3.7-alpine3.10'
resources:
repositories:
- repository: azure
type: github
name: 'home-assistant/ci-azure'
endpoint: 'home-assistant'
jobs:
- template: templates/azp-job-wheels.yaml@azure
parameters:
builderVersion: '$(versionWheels)'
builderApk: '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;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev'
builderPip: 'Cython;numpy'
wheelsRequirement: 'requirements_wheels.txt'
wheelsRequirementDiff: 'requirements_diff.txt'
preBuild:
- script: |
cp requirements_all.txt requirements_wheels.txt
if [[ "$(Build.Reason)" =~ (Schedule|Manual) ]]; then
touch requirements_diff.txt
else
curl -s -o requirements_diff.txt https://raw.githubusercontent.com/home-assistant/core/master/requirements_all.txt
fi
requirement_files="requirements_wheels.txt requirements_diff.txt"
for requirement_file in ${requirement_files}; do
sed -i "s|# pybluez|pybluez|g" ${requirement_file}
sed -i "s|# bluepy|bluepy|g" ${requirement_file}
sed -i "s|# beacontools|beacontools|g" ${requirement_file}
sed -i "s|# RPi.GPIO|RPi.GPIO|g" ${requirement_file}
sed -i "s|# raspihats|raspihats|g" ${requirement_file}
sed -i "s|# rpi-rf|rpi-rf|g" ${requirement_file}
sed -i "s|# blinkt|blinkt|g" ${requirement_file}
sed -i "s|# fritzconnection|fritzconnection|g" ${requirement_file}
sed -i "s|# pyuserinput|pyuserinput|g" ${requirement_file}
sed -i "s|# evdev|evdev|g" ${requirement_file}
sed -i "s|# smbus-cffi|smbus-cffi|g" ${requirement_file}
sed -i "s|# i2csense|i2csense|g" ${requirement_file}
sed -i "s|# python-eq3bt|python-eq3bt|g" ${requirement_file}
sed -i "s|# pycups|pycups|g" ${requirement_file}
sed -i "s|# homekit|homekit|g" ${requirement_file}
sed -i "s|# decora_wifi|decora_wifi|g" ${requirement_file}
sed -i "s|# decora|decora|g" ${requirement_file}
sed -i "s|# avion|avion|g" ${requirement_file}
sed -i "s|# PySwitchbot|PySwitchbot|g" ${requirement_file}
sed -i "s|# pySwitchmate|pySwitchmate|g" ${requirement_file}
sed -i "s|# face_recognition|face_recognition|g" ${requirement_file}
sed -i "s|# py_noaa|py_noaa|g" ${requirement_file}
sed -i "s|# bme680|bme680|g" ${requirement_file}
sed -i "s|# python-gammu|python-gammu|g" ${requirement_file}
if [[ "$(buildArch)" =~ arm ]]; then
sed -i "s|# VL53L1X|VL53L1X|g" ${requirement_file}
fi
done
displayName: 'Prepare requirements files for Hass.io'

View File

@@ -13,4 +13,7 @@ coverage:
url: "secret:TgWDUM4Jw0w7wMJxuxNF/yhSOHglIo1fGwInJnRLEVPy2P2aLimkoK1mtKCowH5TFw+baUXVXT3eAqefbdvIuM8BjRR4aRji95C6CYyD0QHy4N8i7nn1SQkWDPpS8IthYTg07rUDF7s5guurkKv2RrgoCdnnqjAMSzHoExMOF7xUmblMdhBTWJgBpWEhASJy85w/xxjlsE1xoTkzeJu9Q67pTXtRcn+5kb5/vIzPSYg="
comment:
require_changes: yes
branches: master
layout: reach
branches:
- master
- !dev

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 108 KiB

View File

@@ -8,7 +8,6 @@ Loosely based on https://github.com/astropy/astropy/pull/347
import os
import warnings
__licence__ = 'BSD (3 clause)'

View File

@@ -56,7 +56,7 @@ homeassistant.helpers.data_entry_flow module
homeassistant.helpers.deprecation module
----------------------------------------
.. automodule:: homeassistant.helpers.depracation
.. automodule:: homeassistant.helpers.deprecation
:members:
:undoc-members:
:show-inheritance:

View File

@@ -17,11 +17,11 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import sys
import os
import inspect
import os
import sys
from homeassistant.const import __version__, __short_version__
from homeassistant.const import __short_version__, __version__
PROJECT_NAME = 'Home Assistant'
PROJECT_PACKAGE_NAME = 'homeassistant'

View File

@@ -1,83 +1,69 @@
"""Start Home Assistant."""
from __future__ import print_function
import argparse
import asyncio
import os
import platform
import subprocess
import sys
import threading
from typing import ( # noqa pylint: disable=unused-import
List, Dict, Any, TYPE_CHECKING
)
from typing import List
from homeassistant import monkey_patch
from homeassistant.const import (
__version__,
EVENT_HOMEASSISTANT_START,
REQUIRED_PYTHON_VER,
RESTART_EXIT_CODE,
)
if TYPE_CHECKING:
from homeassistant import core
from homeassistant.const import REQUIRED_PYTHON_VER, RESTART_EXIT_CODE, __version__
def set_loop() -> None:
"""Attempt to use uvloop."""
import asyncio
"""Attempt to use different loop."""
from asyncio.events import BaseDefaultEventLoopPolicy
policy = None
if sys.platform == 'win32':
if hasattr(asyncio, 'WindowsProactorEventLoopPolicy'):
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:
"""Validate that the right Python version is running."""
if sys.version_info[:3] < REQUIRED_PYTHON_VER:
print("Home Assistant requires at least Python {}.{}.{}".format(
*REQUIRED_PYTHON_VER))
print(
"Home Assistant requires at least Python {}.{}.{}".format(
*REQUIRED_PYTHON_VER
)
)
sys.exit(1)
def ensure_config_path(config_dir: str) -> None:
"""Validate the configuration directory."""
import homeassistant.config as config_util
lib_dir = os.path.join(config_dir, 'deps')
lib_dir = os.path.join(config_dir, "deps")
# Test if configuration directory exists
if not os.path.isdir(config_dir):
if config_dir != config_util.get_default_config_dir():
print(('Fatal Error: Specified configuration directory does '
'not exist {} ').format(config_dir))
print(
f"Fatal Error: Specified configuration directory {config_dir} "
"does not exist"
)
sys.exit(1)
try:
os.mkdir(config_dir)
except OSError:
print(('Fatal Error: Unable to create default configuration '
'directory {} ').format(config_dir))
print(
"Fatal Error: Unable to create default configuration "
f"directory {config_dir}"
)
sys.exit(1)
# Test if library directory exists
@@ -85,93 +71,79 @@ def ensure_config_path(config_dir: str) -> None:
try:
os.mkdir(lib_dir)
except OSError:
print(('Fatal Error: Unable to create library '
'directory {} ').format(lib_dir))
print(f"Fatal Error: Unable to create library directory {lib_dir}")
sys.exit(1)
async def ensure_config_file(hass: 'core.HomeAssistant', config_dir: str) \
-> str:
"""Ensure configuration file exists."""
import homeassistant.config as config_util
config_path = await config_util.async_ensure_config_exists(
hass, config_dir)
if config_path is None:
print('Error getting configuration path')
sys.exit(1)
return config_path
def get_arguments() -> argparse.Namespace:
"""Get parsed passed in arguments."""
import homeassistant.config as config_util
parser = argparse.ArgumentParser(
description="Home Assistant: Observe, Control, Automate.")
parser.add_argument('--version', action='version', version=__version__)
description="Home Assistant: Observe, Control, Automate."
)
parser.add_argument("--version", action="version", version=__version__)
parser.add_argument(
'-c', '--config',
metavar='path_to_config_dir',
"-c",
"--config",
metavar="path_to_config_dir",
default=config_util.get_default_config_dir(),
help="Directory that contains the Home Assistant configuration")
help="Directory that contains the Home Assistant configuration",
)
parser.add_argument(
'--demo-mode',
action='store_true',
help='Start Home Assistant in demo mode')
"--safe-mode", action="store_true", help="Start Home Assistant in safe mode"
)
parser.add_argument(
'--debug',
action='store_true',
help='Start Home Assistant in debug mode')
"--debug", action="store_true", help="Start Home Assistant in debug mode"
)
parser.add_argument(
'--open-ui',
action='store_true',
help='Open the webinterface in a browser')
"--open-ui", action="store_true", help="Open the webinterface in a browser"
)
parser.add_argument(
'--skip-pip',
action='store_true',
help='Skips pip install of required packages on startup')
"--skip-pip",
action="store_true",
help="Skips pip install of required packages on startup",
)
parser.add_argument(
'-v', '--verbose',
action='store_true',
help="Enable verbose logging to file.")
"-v", "--verbose", action="store_true", help="Enable verbose logging to file."
)
parser.add_argument(
'--pid-file',
metavar='path_to_pid_file',
"--pid-file",
metavar="path_to_pid_file",
default=None,
help='Path to PID file useful for running as daemon')
help="Path to PID file useful for running as daemon",
)
parser.add_argument(
'--log-rotate-days',
"--log-rotate-days",
type=int,
default=None,
help='Enables daily log rotation and keeps up to the specified days')
help="Enables daily log rotation and keeps up to the specified days",
)
parser.add_argument(
'--log-file',
"--log-file",
type=str,
default=None,
help='Log file to write to. If not set, CONFIG/home-assistant.log '
'is used')
help="Log file to write to. If not set, CONFIG/home-assistant.log is used",
)
parser.add_argument(
'--log-no-color',
action='store_true',
help="Disable color logs")
"--log-no-color", action="store_true", help="Disable color logs"
)
parser.add_argument(
'--runner',
action='store_true',
help='On restart exit with code {}'.format(RESTART_EXIT_CODE))
"--runner",
action="store_true",
help=f"On restart exit with code {RESTART_EXIT_CODE}",
)
parser.add_argument(
'--script',
nargs=argparse.REMAINDER,
help='Run one of the embedded scripts')
"--script", nargs=argparse.REMAINDER, help="Run one of the embedded scripts"
)
if os.name == "posix":
parser.add_argument(
'--daemon',
action='store_true',
help='Run Home Assistant as daemon')
"--daemon", action="store_true", help="Run Home Assistant as daemon"
)
arguments = parser.parse_args()
if os.name != "posix" or arguments.debug or arguments.runner:
setattr(arguments, 'daemon', False)
setattr(arguments, "daemon", False)
return arguments
@@ -192,8 +164,8 @@ def daemonize() -> None:
sys.exit(0)
# redirect standard file descriptors to devnull
infd = open(os.devnull, 'r')
outfd = open(os.devnull, 'a+')
infd = open(os.devnull, "r")
outfd = open(os.devnull, "a+")
sys.stdout.flush()
sys.stderr.flush()
os.dup2(infd.fileno(), sys.stdin.fileno())
@@ -205,9 +177,9 @@ def check_pid(pid_file: str) -> None:
"""Check that Home Assistant is not already running."""
# Check pid file
try:
with open(pid_file, 'r') as file:
with open(pid_file, "r") as file:
pid = int(file.readline())
except IOError:
except OSError:
# PID File does not exist
return
@@ -220,7 +192,7 @@ def check_pid(pid_file: str) -> None:
except OSError:
# PID does not exist
return
print('Fatal Error: HomeAssistant is already running.')
print("Fatal Error: Home Assistant is already running.")
sys.exit(1)
@@ -228,10 +200,10 @@ def write_pid(pid_file: str) -> None:
"""Create a PID File."""
pid = os.getpid()
try:
with open(pid_file, 'w') as file:
with open(pid_file, "w") as file:
file.write(str(pid))
except IOError:
print('Fatal Error: Unable to write pid file {}'.format(pid_file))
except OSError:
print(f"Fatal Error: Unable to write pid file {pid_file}")
sys.exit(1)
@@ -249,61 +221,41 @@ def closefds_osx(min_fd: int, max_fd: int) -> None:
val = fcntl(_fd, F_GETFD)
if not val & FD_CLOEXEC:
fcntl(_fd, F_SETFD, val | FD_CLOEXEC)
except IOError:
except OSError:
pass
def cmdline() -> List[str]:
"""Collect path and arguments to re-execute the current hass instance."""
if os.path.basename(sys.argv[0]) == '__main__.py':
if os.path.basename(sys.argv[0]) == "__main__.py":
modulepath = os.path.dirname(sys.argv[0])
os.environ['PYTHONPATH'] = os.path.dirname(modulepath)
return [sys.executable] + [arg for arg in sys.argv if
arg != '--daemon']
os.environ["PYTHONPATH"] = os.path.dirname(modulepath)
return [sys.executable] + [arg for arg in sys.argv if arg != "--daemon"]
return [arg for arg in sys.argv if arg != '--daemon']
return [arg for arg in sys.argv if arg != "--daemon"]
async def setup_and_run_hass(config_dir: str,
args: argparse.Namespace) -> int:
"""Set up HASS and run."""
# pylint: disable=redefined-outer-name
from homeassistant import bootstrap, core
async def setup_and_run_hass(config_dir: str, args: argparse.Namespace) -> int:
"""Set up Home Assistant and run."""
from homeassistant import bootstrap
hass = core.HomeAssistant()
hass = await bootstrap.async_setup_hass(
config_dir=config_dir,
verbose=args.verbose,
log_rotate_days=args.log_rotate_days,
log_file=args.log_file,
log_no_color=args.log_no_color,
skip_pip=args.skip_pip,
safe_mode=args.safe_mode,
)
if args.demo_mode:
config = {
'frontend': {},
'demo': {}
} # type: Dict[str, Any]
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 = await ensure_config_file(hass, config_dir)
print('Config directory:', config_dir)
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
if args.open_ui and hass.config.api is not None:
import webbrowser
def open_browser(_: Any) -> None:
"""Open the web interface in a browser."""
if hass.config.api is not None:
import webbrowser
webbrowser.open(hass.config.api.base_url)
run_callback_threadsafe(
hass.loop,
hass.bus.async_listen_once,
EVENT_HOMEASSISTANT_START, open_browser
)
hass.add_job(webbrowser.open, hass.config.api.base_url)
return await hass.async_run()
@@ -312,17 +264,17 @@ def try_to_restart() -> None:
"""Attempt to clean up state and start a new Home Assistant instance."""
# Things should be mostly shut down already at this point, now just try
# to clean up things that may have been left behind.
sys.stderr.write('Home Assistant attempting to restart.\n')
sys.stderr.write("Home Assistant attempting to restart.\n")
# Count remaining threads, ideally there should only be one non-daemonized
# thread left (which is us). Nothing we really do with it, but it might be
# useful when debugging shutdown/restart issues.
try:
nthreads = sum(thread.is_alive() and not thread.daemon
for thread in threading.enumerate())
nthreads = sum(
thread.is_alive() and not thread.daemon for thread in threading.enumerate()
)
if nthreads > 1:
sys.stderr.write(
"Found {} non-daemonic threads.\n".format(nthreads))
sys.stderr.write(f"Found {nthreads} non-daemonic threads.\n")
# Somehow we sometimes seem to trigger an assertion in the python threading
# module. It seems we find threads that have no associated OS level thread
@@ -336,7 +288,7 @@ def try_to_restart() -> None:
except ValueError:
max_fd = 256
if platform.system() == 'Darwin':
if platform.system() == "Darwin":
closefds_osx(3, max_fd)
else:
os.closerange(3, max_fd)
@@ -354,17 +306,11 @@ def main() -> int:
"""Start Home Assistant."""
validate_python()
monkey_patch_needed = sys.version_info[:3] < (3, 6, 3)
if monkey_patch_needed and os.environ.get('HASS_NO_MONKEY') != '1':
if sys.version_info[:2] >= (3, 6):
monkey_patch.disable_c_asyncio()
monkey_patch.patch_weakref_tasks()
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']
if os.name == "nt" and "--runner" not in sys.argv:
nt_args = cmdline() + ["--runner"]
while True:
try:
subprocess.check_call(nt_args)
@@ -379,9 +325,10 @@ def main() -> int:
if args.script is not None:
from homeassistant import scripts
return scripts.run(args.script)
config_dir = os.path.join(os.getcwd(), args.config)
config_dir = os.path.abspath(os.path.join(os.getcwd(), args.config))
ensure_config_path(config_dir)
# Daemon functions
@@ -392,12 +339,11 @@ def main() -> int:
if args.pid_file:
write_pid(args.pid_file)
from homeassistant.util.async_ import asyncio_run
exit_code = asyncio_run(setup_and_run_hass(config_dir, args))
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 # type: ignore
return exit_code
if __name__ == "__main__":

View File

@@ -1,24 +1,24 @@
"""Provide an authentication layer for Home Assistant."""
import asyncio
import logging
from collections import OrderedDict
from datetime import timedelta
import logging
from typing import Any, Dict, List, Optional, Tuple, cast
import jwt
from homeassistant import data_entry_flow
from homeassistant.auth.const import ACCESS_TOKEN_EXPIRATION
from homeassistant.core import callback, HomeAssistant
from homeassistant.core import HomeAssistant, callback
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
from .mfa_modules import MultiFactorAuthModule, auth_mfa_module_from_config
from .providers import AuthProvider, LoginFlow, auth_provider_from_config
EVENT_USER_ADDED = 'user_added'
EVENT_USER_REMOVED = 'user_removed'
EVENT_USER_ADDED = "user_added"
EVENT_USER_REMOVED = "user_removed"
_LOGGER = logging.getLogger(__name__)
_MfaModuleDict = Dict[str, MultiFactorAuthModule]
@@ -27,9 +27,10 @@ _ProviderDict = Dict[_ProviderKey, AuthProvider]
async def auth_manager_from_config(
hass: HomeAssistant,
provider_configs: List[Dict[str, Any]],
module_configs: List[Dict[str, Any]]) -> 'AuthManager':
hass: HomeAssistant,
provider_configs: List[Dict[str, Any]],
module_configs: List[Dict[str, Any]],
) -> "AuthManager":
"""Initialize an auth manager from config.
CORE_CONFIG_SCHEMA will make sure do duplicated auth providers or
@@ -38,24 +39,27 @@ async def auth_manager_from_config(
store = auth_store.AuthStore(hass)
if provider_configs:
providers = await asyncio.gather(
*[auth_provider_from_config(hass, store, config)
for config in provider_configs])
*(
auth_provider_from_config(hass, store, config)
for config in provider_configs
)
)
else:
providers = ()
providers = []
# So returned auth providers are in same order as config
provider_hash = OrderedDict() # type: _ProviderDict
provider_hash: _ProviderDict = OrderedDict()
for provider in providers:
key = (provider.type, provider.id)
provider_hash[key] = provider
if module_configs:
modules = await asyncio.gather(
*[auth_mfa_module_from_config(hass, config)
for config in module_configs])
*(auth_mfa_module_from_config(hass, config) for config in module_configs)
)
else:
modules = ()
modules = []
# So returned auth modules are in same order as config
module_hash = OrderedDict() # type: _MfaModuleDict
module_hash: _MfaModuleDict = OrderedDict()
for module in modules:
module_hash[module.id] = module
@@ -63,32 +67,85 @@ async def auth_manager_from_config(
return manager
class AuthManagerFlowManager(data_entry_flow.FlowManager):
"""Manage authentication flows."""
def __init__(self, hass: HomeAssistant, auth_manager: "AuthManager"):
"""Init auth manager flows."""
super().__init__(hass)
self.auth_manager = auth_manager
async def async_create_flow(
self,
handler_key: Any,
*,
context: Optional[Dict[str, Any]] = None,
data: Optional[Dict[str, Any]] = None,
) -> data_entry_flow.FlowHandler:
"""Create a login flow."""
auth_provider = self.auth_manager.get_auth_provider(*handler_key)
if not auth_provider:
raise KeyError(f"Unknown auth provider {handler_key}")
return await auth_provider.async_login_flow(context)
async def async_finish_flow(
self, flow: data_entry_flow.FlowHandler, result: Dict[str, Any]
) -> Dict[str, Any]:
"""Return a user as result of login flow."""
flow = cast(LoginFlow, flow)
if result["type"] != data_entry_flow.RESULT_TYPE_CREATE_ENTRY:
return result
# we got final result
if isinstance(result["data"], models.User):
result["result"] = result["data"]
return result
auth_provider = self.auth_manager.get_auth_provider(*result["handler"])
if not auth_provider:
raise KeyError(f"Unknown auth provider {result['handler']}")
credentials = await auth_provider.async_get_or_create_credentials(
result["data"]
)
if flow.context.get("credential_only"):
result["result"] = credentials
return result
# multi-factor module cannot enabled for new credential
# which has not linked to a user yet
if auth_provider.support_mfa and not credentials.is_new:
user = await self.auth_manager.async_get_user_by_credentials(credentials)
if user is not None:
modules = await self.auth_manager.async_get_enabled_mfa(user)
if modules:
flow.user = user
flow.available_mfa_modules = modules
return await flow.async_step_select_mfa_module()
result["result"] = await self.auth_manager.async_get_or_create_user(credentials)
return result
class AuthManager:
"""Manage the authentication for Home Assistant."""
def __init__(self, hass: HomeAssistant, store: auth_store.AuthStore,
providers: _ProviderDict, mfa_modules: _MfaModuleDict) \
-> None:
def __init__(
self,
hass: HomeAssistant,
store: auth_store.AuthStore,
providers: _ProviderDict,
mfa_modules: _MfaModuleDict,
) -> None:
"""Initialize the auth manager."""
self.hass = hass
self._store = store
self._providers = providers
self._mfa_modules = mfa_modules
self.login_flow = data_entry_flow.FlowManager(
hass, self._async_create_login_flow,
self._async_finish_login_flow)
@property
def support_legacy(self) -> bool:
"""
Return if legacy_api_password auth providers are registered.
Should be removed when we removed legacy_api_password auth providers.
"""
for provider_type, _ in self._providers:
if provider_type == 'legacy_api_password':
return True
return False
self.login_flow = AuthManagerFlowManager(hass, self)
@property
def auth_providers(self) -> List[AuthProvider]:
@@ -100,20 +157,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]:
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]:
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]
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]:
def get_auth_mfa_module(self, module_id: str) -> Optional[MultiFactorAuthModule]:
"""Return a multi-factor auth module, None if not found."""
return self._mfa_modules.get(module_id)
@@ -135,7 +193,8 @@ class AuthManager:
return await self._store.async_get_group(group_id)
async def async_get_user_by_credentials(
self, credentials: models.Credentials) -> Optional[models.User]:
self, credentials: models.Credentials
) -> Optional[models.User]:
"""Get a user by credential, return None if not found."""
for user in await self.async_get_users():
for creds in user.credentials:
@@ -145,57 +204,50 @@ class AuthManager:
return None
async def async_create_system_user(
self, name: str,
group_ids: Optional[List[str]] = None) -> models.User:
self, name: str, group_ids: Optional[List[str]] = None
) -> models.User:
"""Create a system user."""
user = await self._store.async_create_user(
name=name,
system_generated=True,
is_active=True,
group_ids=group_ids or [],
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
})
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]
kwargs: Dict[str, Any] = {
"name": name,
"is_active": True,
"group_ids": [GROUP_ID_ADMIN],
}
if await self._user_should_be_owner():
kwargs['is_owner'] = True
kwargs["is_owner"] = True
user = await self._store.async_create_user(**kwargs)
self.hass.bus.async_fire(EVENT_USER_ADDED, {
'user_id': user.id
})
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:
async def async_get_or_create_user(
self, credentials: models.Credentials
) -> models.User:
"""Get or create a user."""
if not credentials.is_new:
user = await self.async_get_user_by_credentials(credentials)
if user is None:
raise ValueError('Unable to find the user.')
raise ValueError("Unable to find the user.")
return user
auth_provider = self._async_get_auth_provider(credentials)
if auth_provider is None:
raise RuntimeError('Credential with unknown provider encountered')
raise RuntimeError("Credential with unknown provider encountered")
info = await auth_provider.async_user_meta_for_credentials(
credentials)
info = await auth_provider.async_user_meta_for_credentials(credentials)
user = await self._store.async_create_user(
credentials=credentials,
@@ -204,14 +256,13 @@ class AuthManager:
group_ids=[GROUP_ID_ADMIN],
)
self.hass.bus.async_fire(EVENT_USER_ADDED, {
'user_id': user.id
})
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:
async def async_link_user(
self, user: models.User, credentials: models.Credentials
) -> None:
"""Link credentials to an existing user."""
await self._store.async_link_user(user, credentials)
@@ -227,19 +278,20 @@ class AuthManager:
await self._store.async_remove_user(user)
self.hass.bus.async_fire(EVENT_USER_REMOVED, {
'user_id': user.id
})
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:
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]
kwargs: Dict[str, Any] = {}
if name is not None:
kwargs['name'] = name
kwargs["name"] = name
if group_ids is not None:
kwargs['group_ids'] = group_ids
kwargs["group_ids"] = group_ids
await self._store.async_update_user(user, **kwargs)
async def async_activate_user(self, user: models.User) -> None:
@@ -249,73 +301,77 @@ class AuthManager:
async def async_deactivate_user(self, user: models.User) -> None:
"""Deactivate a user."""
if user.is_owner:
raise ValueError('Unable to deactive the owner')
raise ValueError("Unable to deactivate the owner")
await self._store.async_deactivate_user(user)
async def async_remove_credentials(
self, credentials: models.Credentials) -> None:
async def async_remove_credentials(self, credentials: models.Credentials) -> None:
"""Remove credentials."""
provider = self._async_get_auth_provider(credentials)
if (provider is not None and
hasattr(provider, 'async_will_remove_credentials')):
if provider is not None and hasattr(provider, "async_will_remove_credentials"):
# https://github.com/python/mypy/issues/1424
await provider.async_will_remove_credentials( # type: ignore
credentials)
credentials
)
await self._store.async_remove_credentials(credentials)
async def async_enable_user_mfa(self, user: models.User,
mfa_module_id: str, data: Any) -> None:
async def async_enable_user_mfa(
self, user: models.User, mfa_module_id: str, data: Any
) -> None:
"""Enable a multi-factor auth module for user."""
if user.system_generated:
raise ValueError('System generated users cannot enable '
'multi-factor auth module.')
raise ValueError(
"System generated users cannot enable multi-factor auth module."
)
module = self.get_auth_mfa_module(mfa_module_id)
if module is None:
raise ValueError('Unable find multi-factor auth module: {}'
.format(mfa_module_id))
raise ValueError(f"Unable find multi-factor auth module: {mfa_module_id}")
await module.async_setup_user(user.id, data)
async def async_disable_user_mfa(self, user: models.User,
mfa_module_id: str) -> None:
async def async_disable_user_mfa(
self, user: models.User, mfa_module_id: str
) -> None:
"""Disable a multi-factor auth module for user."""
if user.system_generated:
raise ValueError('System generated users cannot disable '
'multi-factor auth module.')
raise ValueError(
"System generated users cannot disable multi-factor auth module."
)
module = self.get_auth_mfa_module(mfa_module_id)
if module is None:
raise ValueError('Unable find multi-factor auth module: {}'
.format(mfa_module_id))
raise ValueError(f"Unable find multi-factor auth module: {mfa_module_id}")
await module.async_depose_user(user.id)
async def async_get_enabled_mfa(self, user: models.User) -> Dict[str, str]:
"""List enabled mfa modules for user."""
modules = OrderedDict() # type: Dict[str, str]
modules: Dict[str, str] = OrderedDict()
for module_id, module in self._mfa_modules.items():
if await module.async_is_user_setup(user.id):
modules[module_id] = module.name
return modules
async def async_create_refresh_token(
self, user: models.User, client_id: Optional[str] = None,
client_name: Optional[str] = None,
client_icon: Optional[str] = None,
token_type: Optional[str] = None,
access_token_expiration: timedelta = ACCESS_TOKEN_EXPIRATION) \
-> models.RefreshToken:
self,
user: models.User,
client_id: Optional[str] = None,
client_name: Optional[str] = None,
client_icon: Optional[str] = None,
token_type: Optional[str] = None,
access_token_expiration: timedelta = ACCESS_TOKEN_EXPIRATION,
) -> models.RefreshToken:
"""Create a new refresh token for a user."""
if not user.is_active:
raise ValueError('User is not active')
raise ValueError("User is not active")
if user.system_generated and client_id is not None:
raise ValueError(
'System generated users cannot have refresh tokens connected '
'to a client.')
"System generated users cannot have refresh tokens connected "
"to a client."
)
if token_type is None:
if user.system_generated:
@@ -325,61 +381,76 @@ class AuthManager:
if user.system_generated != (token_type == models.TOKEN_TYPE_SYSTEM):
raise ValueError(
'System generated users can only have system type '
'refresh tokens')
"System generated users can only have system type refresh tokens"
)
if token_type == models.TOKEN_TYPE_NORMAL and client_id is None:
raise ValueError('Client is required to generate a refresh token.')
raise ValueError("Client is required to generate a refresh token.")
if (token_type == models.TOKEN_TYPE_LONG_LIVED_ACCESS_TOKEN and
client_name is None):
raise ValueError('Client_name is required for long-lived access '
'token')
if (
token_type == models.TOKEN_TYPE_LONG_LIVED_ACCESS_TOKEN
and client_name is None
):
raise ValueError("Client_name is required for long-lived access token")
if token_type == models.TOKEN_TYPE_LONG_LIVED_ACCESS_TOKEN:
for token in user.refresh_tokens.values():
if (token.client_name == client_name and token.token_type ==
models.TOKEN_TYPE_LONG_LIVED_ACCESS_TOKEN):
if (
token.client_name == client_name
and token.token_type == models.TOKEN_TYPE_LONG_LIVED_ACCESS_TOKEN
):
# Each client_name can only have one
# long_lived_access_token type of refresh token
raise ValueError('{} already exists'.format(client_name))
raise ValueError(f"{client_name} already exists")
return await self._store.async_create_refresh_token(
user, client_id, client_name, client_icon,
token_type, access_token_expiration)
user,
client_id,
client_name,
client_icon,
token_type,
access_token_expiration,
)
async def async_get_refresh_token(
self, token_id: str) -> Optional[models.RefreshToken]:
self, token_id: str
) -> Optional[models.RefreshToken]:
"""Get refresh token by id."""
return await self._store.async_get_refresh_token(token_id)
async def async_get_refresh_token_by_token(
self, token: str) -> Optional[models.RefreshToken]:
self, token: str
) -> Optional[models.RefreshToken]:
"""Get refresh token by token."""
return await self._store.async_get_refresh_token_by_token(token)
async def async_remove_refresh_token(self,
refresh_token: models.RefreshToken) \
-> None:
async def async_remove_refresh_token(
self, refresh_token: models.RefreshToken
) -> None:
"""Delete a refresh token."""
await self._store.async_remove_refresh_token(refresh_token)
@callback
def async_create_access_token(self,
refresh_token: models.RefreshToken,
remote_ip: Optional[str] = None) -> str:
def async_create_access_token(
self, refresh_token: models.RefreshToken, remote_ip: Optional[str] = None
) -> str:
"""Create a new access token."""
self._store.async_log_refresh_token_usage(refresh_token, remote_ip)
now = dt_util.utcnow()
return jwt.encode({
'iss': refresh_token.id,
'iat': now,
'exp': now + refresh_token.access_token_expiration,
}, refresh_token.jwt_key, algorithm='HS256').decode()
return jwt.encode(
{
"iss": refresh_token.id,
"iat": now,
"exp": now + refresh_token.access_token_expiration,
},
refresh_token.jwt_key,
algorithm="HS256",
).decode()
async def async_validate_access_token(
self, token: str) -> Optional[models.RefreshToken]:
self, token: str
) -> Optional[models.RefreshToken]:
"""Return refresh token if an access token is valid."""
try:
unverif_claims = jwt.decode(token, verify=False)
@@ -387,23 +458,18 @@ class AuthManager:
return None
refresh_token = await self.async_get_refresh_token(
cast(str, unverif_claims.get('iss')))
cast(str, unverif_claims.get("iss"))
)
if refresh_token is None:
jwt_key = ''
issuer = ''
jwt_key = ""
issuer = ""
else:
jwt_key = refresh_token.jwt_key
issuer = refresh_token.id
try:
jwt.decode(
token,
jwt_key,
leeway=10,
issuer=issuer,
algorithms=['HS256']
)
jwt.decode(token, jwt_key, leeway=10, issuer=issuer, algorithms=["HS256"])
except jwt.InvalidTokenError:
return None
@@ -412,55 +478,15 @@ class AuthManager:
return refresh_token
async def _async_create_login_flow(
self, handler: _ProviderKey, *, context: Optional[Dict],
data: Optional[Any]) -> data_entry_flow.FlowHandler:
"""Create a login flow."""
auth_provider = self._providers[handler]
return await auth_provider.async_login_flow(context)
async def _async_finish_login_flow(
self, flow: LoginFlow, result: Dict[str, Any]) \
-> Dict[str, Any]:
"""Return a user as result of login flow."""
if result['type'] != data_entry_flow.RESULT_TYPE_CREATE_ENTRY:
return result
# we got final result
if isinstance(result['data'], models.User):
result['result'] = result['data']
return result
auth_provider = self._providers[result['handler']]
credentials = await auth_provider.async_get_or_create_credentials(
result['data'])
if flow.context is not None and flow.context.get('credential_only'):
result['result'] = credentials
return result
# multi-factor module cannot enabled for new credential
# which has not linked to a user yet
if auth_provider.support_mfa and not credentials.is_new:
user = await self.async_get_user_by_credentials(credentials)
if user is not None:
modules = await self.async_get_enabled_mfa(user)
if modules:
flow.user = user
flow.available_mfa_modules = modules
return await flow.async_step_select_mfa_module()
result['result'] = await self.async_get_or_create_user(credentials)
return result
@callback
def _async_get_auth_provider(
self, credentials: models.Credentials) -> Optional[AuthProvider]:
self, credentials: models.Credentials
) -> Optional[AuthProvider]:
"""Get auth provider from a set of credentials."""
auth_provider_key = (credentials.auth_provider_type,
credentials.auth_provider_id)
auth_provider_key = (
credentials.auth_provider_type,
credentials.auth_provider_id,
)
return self._providers.get(auth_provider_key)
async def _user_should_be_owner(self) -> bool:

View File

@@ -4,22 +4,22 @@ from collections import OrderedDict
from datetime import timedelta
import hmac
from logging import getLogger
from typing import Any, Dict, List, Optional # noqa: F401
from typing import Any, Dict, List, Optional
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 .const import GROUP_ID_ADMIN, GROUP_ID_READ_ONLY, GROUP_ID_USER
from .permissions import PermissionLookup, system_policies
from .permissions.types import PolicyType # noqa: F401
from .permissions.types import PolicyType
STORAGE_VERSION = 1
STORAGE_KEY = 'auth'
GROUP_NAME_ADMIN = 'Administrators'
STORAGE_KEY = "auth"
GROUP_NAME_ADMIN = "Administrators"
GROUP_NAME_USER = "Users"
GROUP_NAME_READ_ONLY = 'Read Only'
GROUP_NAME_READ_ONLY = "Read Only"
class AuthStore:
@@ -34,11 +34,12 @@ class AuthStore:
def __init__(self, hass: HomeAssistant) -> None:
"""Initialize the auth store."""
self.hass = hass
self._users = None # type: Optional[Dict[str, models.User]]
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._users: Optional[Dict[str, models.User]] = None
self._groups: Optional[Dict[str, models.Group]] = None
self._perm_lookup: Optional[PermissionLookup] = None
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]:
@@ -74,11 +75,14 @@ class AuthStore:
return self._users.get(user_id)
async def async_create_user(
self, name: Optional[str], is_owner: Optional[bool] = None,
is_active: Optional[bool] = None,
system_generated: Optional[bool] = None,
credentials: Optional[models.Credentials] = None,
group_ids: Optional[List[str]] = None) -> models.User:
self,
name: Optional[str],
is_owner: Optional[bool] = None,
is_active: Optional[bool] = None,
system_generated: Optional[bool] = None,
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()
@@ -87,28 +91,28 @@ class AuthStore:
assert self._groups is not None
groups = []
for group_id in (group_ids or []):
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))
raise ValueError(f"Invalid group specified {group_id}")
groups.append(group)
kwargs = {
'name': name,
kwargs: Dict[str, Any] = {
"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]
"groups": groups,
"perm_lookup": self._perm_lookup,
}
if is_owner is not None:
kwargs['is_owner'] = is_owner
kwargs["is_owner"] = is_owner
if is_active is not None:
kwargs['is_active'] = is_active
kwargs["is_active"] = is_active
if system_generated is not None:
kwargs['system_generated'] = system_generated
kwargs["system_generated"] = system_generated
new_user = models.User(**kwargs)
@@ -122,8 +126,9 @@ class AuthStore:
await self.async_link_user(new_user, credentials)
return new_user
async def async_link_user(self, user: models.User,
credentials: models.Credentials) -> None:
async def async_link_user(
self, user: models.User, credentials: models.Credentials
) -> None:
"""Add credentials to an existing user."""
user.credentials.append(credentials)
self._async_schedule_save()
@@ -139,9 +144,12 @@ class AuthStore:
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:
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
@@ -156,10 +164,7 @@ class AuthStore:
user.groups = groups
user.invalidate_permission_cache()
for attr_name, value in (
('name', name),
('is_active', is_active),
):
for attr_name, value in (("name", name), ("is_active", is_active)):
if value is not None:
setattr(user, attr_name, value)
@@ -175,8 +180,7 @@ class AuthStore:
user.is_active = False
self._async_schedule_save()
async def async_remove_credentials(
self, credentials: models.Credentials) -> None:
async def async_remove_credentials(self, credentials: models.Credentials) -> None:
"""Remove credentials."""
if self._users is None:
await self._async_load()
@@ -197,23 +201,25 @@ class AuthStore:
self._async_schedule_save()
async def async_create_refresh_token(
self, user: models.User, client_id: Optional[str] = None,
client_name: Optional[str] = None,
client_icon: Optional[str] = None,
token_type: str = models.TOKEN_TYPE_NORMAL,
access_token_expiration: timedelta = ACCESS_TOKEN_EXPIRATION) \
-> models.RefreshToken:
self,
user: models.User,
client_id: Optional[str] = None,
client_name: Optional[str] = None,
client_icon: Optional[str] = None,
token_type: str = models.TOKEN_TYPE_NORMAL,
access_token_expiration: timedelta = ACCESS_TOKEN_EXPIRATION,
) -> models.RefreshToken:
"""Create a new token for a user."""
kwargs = {
'user': user,
'client_id': client_id,
'token_type': token_type,
'access_token_expiration': access_token_expiration
} # type: Dict[str, Any]
kwargs: Dict[str, Any] = {
"user": user,
"client_id": client_id,
"token_type": token_type,
"access_token_expiration": access_token_expiration,
}
if client_name:
kwargs['client_name'] = client_name
kwargs["client_name"] = client_name
if client_icon:
kwargs['client_icon'] = client_icon
kwargs["client_icon"] = client_icon
refresh_token = models.RefreshToken(**kwargs)
user.refresh_tokens[refresh_token.id] = refresh_token
@@ -222,7 +228,8 @@ class AuthStore:
return refresh_token
async def async_remove_refresh_token(
self, refresh_token: models.RefreshToken) -> None:
self, refresh_token: models.RefreshToken
) -> None:
"""Remove a refresh token."""
if self._users is None:
await self._async_load()
@@ -234,7 +241,8 @@ class AuthStore:
break
async def async_get_refresh_token(
self, token_id: str) -> Optional[models.RefreshToken]:
self, token_id: str
) -> Optional[models.RefreshToken]:
"""Get refresh token by id."""
if self._users is None:
await self._async_load()
@@ -248,7 +256,8 @@ class AuthStore:
return None
async def async_get_refresh_token_by_token(
self, token: str) -> Optional[models.RefreshToken]:
self, token: str
) -> Optional[models.RefreshToken]:
"""Get refresh token by token."""
if self._users is None:
await self._async_load()
@@ -265,8 +274,8 @@ class AuthStore:
@callback
def async_log_refresh_token_usage(
self, refresh_token: models.RefreshToken,
remote_ip: Optional[str] = None) -> None:
self, refresh_token: models.RefreshToken, remote_ip: Optional[str] = None
) -> None:
"""Update refresh token last used information."""
refresh_token.last_used_at = dt_util.utcnow()
refresh_token.last_used_ip = remote_ip
@@ -292,16 +301,14 @@ class AuthStore:
if self._users is not None:
return
self._perm_lookup = perm_lookup = PermissionLookup(
ent_reg, dev_reg
)
self._perm_lookup = perm_lookup = PermissionLookup(ent_reg, dev_reg)
if data is None:
self._set_defaults()
return
users = OrderedDict() # type: Dict[str, models.User]
groups = OrderedDict() # type: Dict[str, models.Group]
users: Dict[str, models.User] = OrderedDict()
groups: Dict[str, models.Group] = OrderedDict()
# 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
@@ -317,24 +324,24 @@ class AuthStore:
# 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]
for group_dict in data.get("groups", []):
policy: Optional[PolicyType] = None
if group_dict['id'] == GROUP_ID_ADMIN:
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:
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:
elif group_dict["id"] == GROUP_ID_READ_ONLY:
has_read_only_group = True
name = GROUP_NAME_READ_ONLY
@@ -342,18 +349,18 @@ class AuthStore:
system_generated = True
else:
name = group_dict['name']
policy = group_dict.get('policy')
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']
group_without_policy = group_dict["id"]
continue
groups[group_dict['id']] = models.Group(
id=group_dict['id'],
groups[group_dict["id"]] = models.Group(
id=group_dict["id"],
name=name,
policy=policy,
system_generated=system_generated,
@@ -361,8 +368,7 @@ class AuthStore:
# 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)
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
@@ -385,82 +391,86 @@ class AuthStore:
user_group = _system_user_group()
groups[user_group.id] = user_group
for user_dict in data['users']:
for user_dict in data["users"]:
# Collect the users group.
user_groups = []
for group_id in user_dict.get('group_ids', []):
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):
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'],
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'],
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(
id=cred_dict['id'],
is_new=False,
auth_provider_type=cred_dict['auth_provider_type'],
auth_provider_id=cred_dict['auth_provider_id'],
data=cred_dict['data'],
))
for cred_dict in data["credentials"]:
users[cred_dict["user_id"]].credentials.append(
models.Credentials(
id=cred_dict["id"],
is_new=False,
auth_provider_type=cred_dict["auth_provider_type"],
auth_provider_id=cred_dict["auth_provider_id"],
data=cred_dict["data"],
)
)
for rt_dict in data['refresh_tokens']:
for rt_dict in data["refresh_tokens"]:
# Filter out the old keys that don't have jwt_key (pre-0.76)
if 'jwt_key' not in rt_dict:
if "jwt_key" not in rt_dict:
continue
created_at = dt_util.parse_datetime(rt_dict['created_at'])
created_at = dt_util.parse_datetime(rt_dict["created_at"])
if created_at is None:
getLogger(__name__).error(
'Ignoring refresh token %(id)s with invalid created_at '
'%(created_at)s for user_id %(user_id)s', rt_dict)
"Ignoring refresh token %(id)s with invalid created_at "
"%(created_at)s for user_id %(user_id)s",
rt_dict,
)
continue
token_type = rt_dict.get('token_type')
token_type = rt_dict.get("token_type")
if token_type is None:
if rt_dict['client_id'] is None:
if rt_dict["client_id"] is None:
token_type = models.TOKEN_TYPE_SYSTEM
else:
token_type = models.TOKEN_TYPE_NORMAL
# old refresh_token don't have last_used_at (pre-0.78)
last_used_at_str = rt_dict.get('last_used_at')
last_used_at_str = rt_dict.get("last_used_at")
if last_used_at_str:
last_used_at = dt_util.parse_datetime(last_used_at_str)
else:
last_used_at = None
token = models.RefreshToken(
id=rt_dict['id'],
user=users[rt_dict['user_id']],
client_id=rt_dict['client_id'],
id=rt_dict["id"],
user=users[rt_dict["user_id"]],
client_id=rt_dict["client_id"],
# use dict.get to keep backward compatibility
client_name=rt_dict.get('client_name'),
client_icon=rt_dict.get('client_icon'),
client_name=rt_dict.get("client_name"),
client_icon=rt_dict.get("client_icon"),
token_type=token_type,
created_at=created_at,
access_token_expiration=timedelta(
seconds=rt_dict['access_token_expiration']),
token=rt_dict['token'],
jwt_key=rt_dict['jwt_key'],
seconds=rt_dict["access_token_expiration"]
),
token=rt_dict["token"],
jwt_key=rt_dict["jwt_key"],
last_used_at=last_used_at,
last_used_ip=rt_dict.get('last_used_ip'),
last_used_ip=rt_dict.get("last_used_ip"),
)
users[rt_dict['user_id']].refresh_tokens[token.id] = token
users[rt_dict["user_id"]].refresh_tokens[token.id] = token
self._groups = groups
self._users = users
@@ -481,36 +491,36 @@ class AuthStore:
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,
'system_generated': user.system_generated,
"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,
"system_generated": user.system_generated,
}
for user in self._users.values()
]
groups = []
for group in self._groups.values():
g_dict = {
'id': group.id,
g_dict: Dict[str, Any] = {
"id": group.id,
# Name not read for sys groups. Kept here for backwards compat
'name': group.name
} # type: Dict[str, Any]
"name": group.name,
}
if not group.system_generated:
g_dict['policy'] = group.policy
g_dict["policy"] = group.policy
groups.append(g_dict)
credentials = [
{
'id': credential.id,
'user_id': user.id,
'auth_provider_type': credential.auth_provider_type,
'auth_provider_id': credential.auth_provider_id,
'data': credential.data,
"id": credential.id,
"user_id": user.id,
"auth_provider_type": credential.auth_provider_type,
"auth_provider_id": credential.auth_provider_id,
"data": credential.data,
}
for user in self._users.values()
for credential in user.credentials
@@ -518,38 +528,37 @@ class AuthStore:
refresh_tokens = [
{
'id': refresh_token.id,
'user_id': user.id,
'client_id': refresh_token.client_id,
'client_name': refresh_token.client_name,
'client_icon': refresh_token.client_icon,
'token_type': refresh_token.token_type,
'created_at': refresh_token.created_at.isoformat(),
'access_token_expiration':
refresh_token.access_token_expiration.total_seconds(),
'token': refresh_token.token,
'jwt_key': refresh_token.jwt_key,
'last_used_at':
refresh_token.last_used_at.isoformat()
if refresh_token.last_used_at else None,
'last_used_ip': refresh_token.last_used_ip,
"id": refresh_token.id,
"user_id": user.id,
"client_id": refresh_token.client_id,
"client_name": refresh_token.client_name,
"client_icon": refresh_token.client_icon,
"token_type": refresh_token.token_type,
"created_at": refresh_token.created_at.isoformat(),
"access_token_expiration": refresh_token.access_token_expiration.total_seconds(),
"token": refresh_token.token,
"jwt_key": refresh_token.jwt_key,
"last_used_at": refresh_token.last_used_at.isoformat()
if refresh_token.last_used_at
else None,
"last_used_ip": refresh_token.last_used_ip,
}
for user in self._users.values()
for refresh_token in user.refresh_tokens.values()
]
return {
'users': users,
'groups': groups,
'credentials': credentials,
'refresh_tokens': refresh_tokens,
"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]
self._users = OrderedDict()
groups = OrderedDict() # type: Dict[str, models.Group]
groups: Dict[str, models.Group] = OrderedDict()
admin_group = _system_admin_group()
groups[admin_group.id] = admin_group
user_group = _system_user_group()

View File

@@ -4,6 +4,6 @@ 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'
GROUP_ID_ADMIN = "system-admin"
GROUP_ID_USER = "system-users"
GROUP_ID_READ_ONLY = "system-read-only"

View File

@@ -1,4 +1,4 @@
"""Plugable auth modules for Home Assistant."""
"""Pluggable auth modules for Home Assistant."""
import importlib
import logging
import types
@@ -7,7 +7,7 @@ from typing import Any, Dict, Optional
import voluptuous as vol
from voluptuous.humanize import humanize_error
from homeassistant import requirements, data_entry_flow
from homeassistant import data_entry_flow, requirements
from homeassistant.const import CONF_ID, CONF_NAME, CONF_TYPE
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
@@ -15,14 +15,17 @@ from homeassistant.util.decorator import Registry
MULTI_FACTOR_AUTH_MODULES = Registry()
MULTI_FACTOR_AUTH_MODULE_SCHEMA = vol.Schema({
vol.Required(CONF_TYPE): str,
vol.Optional(CONF_NAME): str,
# Specify ID if you have two mfa auth module for same type.
vol.Optional(CONF_ID): str,
}, extra=vol.ALLOW_EXTRA)
MULTI_FACTOR_AUTH_MODULE_SCHEMA = vol.Schema(
{
vol.Required(CONF_TYPE): str,
vol.Optional(CONF_NAME): str,
# Specify ID if you have two mfa auth module for same type.
vol.Optional(CONF_ID): str,
},
extra=vol.ALLOW_EXTRA,
)
DATA_REQS = 'mfa_auth_module_reqs_processed'
DATA_REQS = "mfa_auth_module_reqs_processed"
_LOGGER = logging.getLogger(__name__)
@@ -30,7 +33,7 @@ _LOGGER = logging.getLogger(__name__)
class MultiFactorAuthModule:
"""Multi-factor Auth Module of validation function."""
DEFAULT_TITLE = 'Unnamed auth module'
DEFAULT_TITLE = "Unnamed auth module"
MAX_RETRY_TIME = 3
def __init__(self, hass: HomeAssistant, config: Dict[str, Any]) -> None:
@@ -39,7 +42,7 @@ class MultiFactorAuthModule:
self.config = config
@property
def id(self) -> str: # pylint: disable=invalid-name
def id(self) -> str:
"""Return id of the auth module.
Default is same as type
@@ -63,7 +66,7 @@ class MultiFactorAuthModule:
"""Return a voluptuous schema to define mfa auth module's input."""
raise NotImplementedError
async def async_setup_flow(self, user_id: str) -> 'SetupFlow':
async def async_setup_flow(self, user_id: str) -> "SetupFlow":
"""Return a data entry flow handler for setup module.
Mfa module should extend SetupFlow
@@ -82,8 +85,7 @@ class MultiFactorAuthModule:
"""Return whether user is setup."""
raise NotImplementedError
async def async_validate(
self, user_id: str, user_input: Dict[str, Any]) -> bool:
async def async_validate(self, user_id: str, user_input: Dict[str, Any]) -> bool:
"""Return True if validation passed."""
raise NotImplementedError
@@ -91,42 +93,38 @@ class MultiFactorAuthModule:
class SetupFlow(data_entry_flow.FlowHandler):
"""Handler for the setup flow."""
def __init__(self, auth_module: MultiFactorAuthModule,
setup_schema: vol.Schema,
user_id: str) -> None:
def __init__(
self, auth_module: MultiFactorAuthModule, setup_schema: vol.Schema, user_id: str
) -> None:
"""Initialize the setup flow."""
self._auth_module = auth_module
self._setup_schema = setup_schema
self._user_id = user_id
async def async_step_init(
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Handle the first step of setup flow.
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]
errors: Dict[str, str] = {}
if user_input:
result = await self._auth_module.async_setup_user(
self._user_id, user_input)
result = await self._auth_module.async_setup_user(self._user_id, user_input)
return self.async_create_entry(
title=self._auth_module.name,
data={'result': result}
title=self._auth_module.name, data={"result": result}
)
return self.async_show_form(
step_id='init',
data_schema=self._setup_schema,
errors=errors
step_id="init", data_schema=self._setup_schema, errors=errors
)
async def auth_mfa_module_from_config(
hass: HomeAssistant, config: Dict[str, Any]) \
-> MultiFactorAuthModule:
hass: HomeAssistant, config: Dict[str, Any]
) -> MultiFactorAuthModule:
"""Initialize an auth module from a config."""
module_name = config[CONF_TYPE]
module = await _load_mfa_module(hass, module_name)
@@ -134,26 +132,27 @@ async def auth_mfa_module_from_config(
try:
config = module.CONFIG_SCHEMA(config) # type: ignore
except vol.Invalid as err:
_LOGGER.error('Invalid configuration for multi-factor module %s: %s',
module_name, humanize_error(config, err))
_LOGGER.error(
"Invalid configuration for multi-factor module %s: %s",
module_name,
humanize_error(config, err),
)
raise
return MULTI_FACTOR_AUTH_MODULES[module_name](hass, config) # type: ignore
async def _load_mfa_module(hass: HomeAssistant, module_name: str) \
-> types.ModuleType:
async def _load_mfa_module(hass: HomeAssistant, module_name: str) -> types.ModuleType:
"""Load an mfa auth module."""
module_path = 'homeassistant.auth.mfa_modules.{}'.format(module_name)
module_path = f"homeassistant.auth.mfa_modules.{module_name}"
try:
module = importlib.import_module(module_path)
except ImportError as err:
_LOGGER.error('Unable to load mfa module %s: %s', module_name, err)
raise HomeAssistantError('Unable to load mfa module {}: {}'.format(
module_name, err))
_LOGGER.error("Unable to load mfa module %s: %s", module_name, err)
raise HomeAssistantError(f"Unable to load mfa module {module_name}: {err}")
if hass.config.skip_pip or not hasattr(module, 'REQUIREMENTS'):
if hass.config.skip_pip or not hasattr(module, "REQUIREMENTS"):
return module
processed = hass.data.get(DATA_REQS)
@@ -163,13 +162,9 @@ async def _load_mfa_module(hass: HomeAssistant, module_name: str) \
processed = hass.data[DATA_REQS] = set()
# https://github.com/python/mypy/issues/1424
req_success = await requirements.async_process_requirements(
hass, module_path, module.REQUIREMENTS) # type: ignore
if not req_success:
raise HomeAssistantError(
'Unable to process requirements of mfa module {}'.format(
module_name))
await requirements.async_process_requirements(
hass, module_path, module.REQUIREMENTS # type: ignore
)
processed.add(module_name)
return module

View File

@@ -6,39 +6,45 @@ import voluptuous as vol
from homeassistant.core import HomeAssistant
from . import MultiFactorAuthModule, MULTI_FACTOR_AUTH_MODULES, \
MULTI_FACTOR_AUTH_MODULE_SCHEMA, SetupFlow
from . import (
MULTI_FACTOR_AUTH_MODULE_SCHEMA,
MULTI_FACTOR_AUTH_MODULES,
MultiFactorAuthModule,
SetupFlow,
)
CONFIG_SCHEMA = MULTI_FACTOR_AUTH_MODULE_SCHEMA.extend({
vol.Required('data'): [vol.Schema({
vol.Required('user_id'): str,
vol.Required('pin'): str,
})]
}, extra=vol.PREVENT_EXTRA)
CONFIG_SCHEMA = MULTI_FACTOR_AUTH_MODULE_SCHEMA.extend(
{
vol.Required("data"): [
vol.Schema({vol.Required("user_id"): str, vol.Required("pin"): str})
]
},
extra=vol.PREVENT_EXTRA,
)
_LOGGER = logging.getLogger(__name__)
@MULTI_FACTOR_AUTH_MODULES.register('insecure_example')
@MULTI_FACTOR_AUTH_MODULES.register("insecure_example")
class InsecureExampleModule(MultiFactorAuthModule):
"""Example auth module validate pin."""
DEFAULT_TITLE = 'Insecure Personal Identify Number'
DEFAULT_TITLE = "Insecure Personal Identify Number"
def __init__(self, hass: HomeAssistant, config: Dict[str, Any]) -> None:
"""Initialize the user data store."""
super().__init__(hass, config)
self._data = config['data']
self._data = config["data"]
@property
def input_schema(self) -> vol.Schema:
"""Validate login flow input data."""
return vol.Schema({'pin': str})
return vol.Schema({"pin": str})
@property
def setup_schema(self) -> vol.Schema:
"""Validate async_setup_user input data."""
return vol.Schema({'pin': str})
return vol.Schema({"pin": str})
async def async_setup_flow(self, user_id: str) -> SetupFlow:
"""Return a data entry flow handler for setup module.
@@ -50,21 +56,21 @@ class InsecureExampleModule(MultiFactorAuthModule):
async def async_setup_user(self, user_id: str, setup_data: Any) -> Any:
"""Set up user to use mfa module."""
# data shall has been validate in caller
pin = setup_data['pin']
pin = setup_data["pin"]
for data in self._data:
if data['user_id'] == user_id:
if data["user_id"] == user_id:
# already setup, override
data['pin'] = pin
data["pin"] = pin
return
self._data.append({'user_id': user_id, 'pin': pin})
self._data.append({"user_id": user_id, "pin": pin})
async def async_depose_user(self, user_id: str) -> None:
"""Remove user from mfa module."""
found = None
for data in self._data:
if data['user_id'] == user_id:
if data["user_id"] == user_id:
found = data
break
if found:
@@ -73,17 +79,16 @@ class InsecureExampleModule(MultiFactorAuthModule):
async def async_is_user_setup(self, user_id: str) -> bool:
"""Return whether user is setup."""
for data in self._data:
if data['user_id'] == user_id:
if data["user_id"] == user_id:
return True
return False
async def async_validate(
self, user_id: str, user_input: Dict[str, Any]) -> bool:
async def async_validate(self, user_id: str, user_input: Dict[str, Any]) -> bool:
"""Return True if validation passed."""
for data in self._data:
if data['user_id'] == user_id:
if data["user_id"] == user_id:
# user_input has been validate in caller
if data['pin'] == user_input['pin']:
if data["pin"] == user_input["pin"]:
return True
return False

View File

@@ -3,9 +3,9 @@
Sending HOTP through notify service
"""
import asyncio
import logging
from collections import OrderedDict
from typing import Any, Dict, Optional, List
import logging
from typing import Any, Dict, List, Optional
import attr
import voluptuous as vol
@@ -15,26 +15,32 @@ 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
from . import (
MULTI_FACTOR_AUTH_MODULE_SCHEMA,
MULTI_FACTOR_AUTH_MODULES,
MultiFactorAuthModule,
SetupFlow,
)
REQUIREMENTS = ['pyotp==2.2.7']
REQUIREMENTS = ["pyotp==2.3.0"]
CONF_MESSAGE = 'message'
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)
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'
STORAGE_KEY = "auth_module.notify"
STORAGE_USERS = "users"
STORAGE_USER_ID = "user_id"
INPUT_FIELD_CODE = 'code'
INPUT_FIELD_CODE = "code"
_LOGGER = logging.getLogger(__name__)
@@ -42,24 +48,28 @@ _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')))
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))
@@ -67,7 +77,7 @@ def _verify_otp(secret: str, otp: str, count: int) -> bool:
class NotifySetting:
"""Store notify setting for one user."""
secret = attr.ib(type=str, factory=_generate_secret) # not persistent
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)
@@ -76,18 +86,19 @@ class NotifySetting:
_UsersDict = Dict[str, NotifySetting]
@MULTI_FACTOR_AUTH_MODULES.register('notify')
@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'
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_settings: Optional[_UsersDict] = None
self._user_store = hass.helpers.storage.Store(
STORAGE_VERSION, STORAGE_KEY, private=True)
STORAGE_VERSION, STORAGE_KEY, private=True
)
self._include = config.get(CONF_INCLUDE, [])
self._exclude = config.get(CONF_EXCLUDE, [])
self._message_template = config[CONF_MESSAGE]
@@ -119,22 +130,27 @@ class NotifyAuthModule(MultiFactorAuthModule):
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()
}})
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', {}):
for service in self.hass.services.async_services().get("notify", {}):
if service not in self._exclude:
unordered_services.add(service)
@@ -149,8 +165,8 @@ class NotifyAuthModule(MultiFactorAuthModule):
Mfa module should extend SetupFlow
"""
return NotifySetupFlow(
self, self.input_schema, user_id,
self.aync_get_available_notify_services())
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."""
@@ -159,8 +175,8 @@ class NotifyAuthModule(MultiFactorAuthModule):
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'),
notify_service=setup_data.get("notify_service"),
target=setup_data.get("target"),
)
await self._async_save()
@@ -182,8 +198,7 @@ class NotifyAuthModule(MultiFactorAuthModule):
return user_id in self._user_settings
async def async_validate(
self, user_id: str, user_input: Dict[str, Any]) -> bool:
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()
@@ -195,9 +210,11 @@ class NotifyAuthModule(MultiFactorAuthModule):
# 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)
_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."""
@@ -207,7 +224,7 @@ class NotifyAuthModule(MultiFactorAuthModule):
notify_setting = self._user_settings.get(user_id, None)
if notify_setting is None:
raise ValueError('Cannot find user_id')
raise ValueError("Cannot find user_id")
def generate_secret_and_one_time_password() -> str:
"""Generate and send one time password."""
@@ -215,11 +232,11 @@ class NotifyAuthModule(MultiFactorAuthModule):
# 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)
return _generate_otp(notify_setting.secret, notify_setting.counter)
code = await self.hass.async_add_executor_job(
generate_secret_and_one_time_password)
generate_secret_and_one_time_password
)
await self.async_notify_user(user_id, code)
@@ -231,105 +248,109 @@ class NotifyAuthModule(MultiFactorAuthModule):
notify_setting = self._user_settings.get(user_id, None)
if notify_setting is None:
_LOGGER.error('Cannot find user %s', user_id)
_LOGGER.error("Cannot find user %s", user_id)
return
await self.async_notify( # type: ignore
code, notify_setting.notify_service, notify_setting.target)
await self.async_notify(
code,
notify_setting.notify_service, # type: ignore
notify_setting.target,
)
async def async_notify(self, code: str, notify_service: str,
target: Optional[str] = None) -> None:
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)}
data = {"message": self._message_template.format(code)}
if target:
data['target'] = [target]
data["target"] = [target]
await self.hass.services.async_call('notify', notify_service, data)
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:
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._auth_module: NotifyAuthModule = auth_module
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]
self._secret: Optional[str] = None
self._count: Optional[int] = None
self._notify_service: Optional[str] = None
self._target: Optional[str] = None
async def async_step_init(
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Let user select available notify services."""
errors = {} # type: Dict[str, str]
errors: 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._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')
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)
schema: Dict[str, Any] = OrderedDict()
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
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]
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Verify user can receive one-time password."""
errors: 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)
_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={}
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'
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)
_generate_otp, self._secret, self._count
)
assert self._notify_service
try:
await self._auth_module.async_notify(
code, self._notify_service, self._target)
code, self._notify_service, self._target
)
except ServiceNotFound:
return self.async_abort(reason='notify_service_not_exist')
return self.async_abort(reason="notify_service_not_exist")
return self.async_show_form(
step_id='setup',
step_id="setup",
data_schema=self._setup_schema,
description_placeholders={'notify_service': self._notify_service},
description_placeholders={"notify_service": self._notify_service},
errors=errors,
)

View File

@@ -1,31 +1,34 @@
"""Time-based One Time Password auth module."""
import asyncio
import logging
from io import BytesIO
from typing import Any, Dict, Optional, Tuple # noqa: F401
import logging
from typing import Any, Dict, Optional, Tuple
import voluptuous as vol
from homeassistant.auth.models import User
from homeassistant.core import HomeAssistant
from . import MultiFactorAuthModule, MULTI_FACTOR_AUTH_MODULES, \
MULTI_FACTOR_AUTH_MODULE_SCHEMA, SetupFlow
from . import (
MULTI_FACTOR_AUTH_MODULE_SCHEMA,
MULTI_FACTOR_AUTH_MODULES,
MultiFactorAuthModule,
SetupFlow,
)
REQUIREMENTS = ['pyotp==2.2.7', 'PyQRCode==1.2.1']
REQUIREMENTS = ["pyotp==2.3.0", "PyQRCode==1.2.1"]
CONFIG_SCHEMA = MULTI_FACTOR_AUTH_MODULE_SCHEMA.extend({
}, extra=vol.PREVENT_EXTRA)
CONFIG_SCHEMA = MULTI_FACTOR_AUTH_MODULE_SCHEMA.extend({}, extra=vol.PREVENT_EXTRA)
STORAGE_VERSION = 1
STORAGE_KEY = 'auth_module.totp'
STORAGE_USERS = 'users'
STORAGE_USER_ID = 'user_id'
STORAGE_OTA_SECRET = 'ota_secret'
STORAGE_KEY = "auth_module.totp"
STORAGE_USERS = "users"
STORAGE_USER_ID = "user_id"
STORAGE_OTA_SECRET = "ota_secret"
INPUT_FIELD_CODE = 'code'
INPUT_FIELD_CODE = "code"
DUMMY_SECRET = 'FPPTH34D4E3MI2HG'
DUMMY_SECRET = "FPPTH34D4E3MI2HG"
_LOGGER = logging.getLogger(__name__)
@@ -38,10 +41,15 @@ def _generate_qr_code(data: str) -> str:
with BytesIO() as buffer:
qr_code.svg(file=buffer, scale=4)
return '{}'.format(
buffer.getvalue().decode("ascii").replace('\n', '')
.replace('<?xml version="1.0" encoding="UTF-8"?>'
'<svg xmlns="http://www.w3.org/2000/svg"', '<svg')
return "{}".format(
buffer.getvalue()
.decode("ascii")
.replace("\n", "")
.replace(
'<?xml version="1.0" encoding="UTF-8"?>'
'<svg xmlns="http://www.w3.org/2000/svg"',
"<svg",
)
)
@@ -51,24 +59,26 @@ def _generate_secret_and_qr_code(username: str) -> Tuple[str, str, str]:
ota_secret = pyotp.random_base32()
url = pyotp.totp.TOTP(ota_secret).provisioning_uri(
username, issuer_name="Home Assistant")
username, issuer_name="Home Assistant"
)
image = _generate_qr_code(url)
return ota_secret, url, image
@MULTI_FACTOR_AUTH_MODULES.register('totp')
@MULTI_FACTOR_AUTH_MODULES.register("totp")
class TotpAuthModule(MultiFactorAuthModule):
"""Auth module validate time-based one time password."""
DEFAULT_TITLE = '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._users: Optional[Dict[str, str]] = None
self._user_store = hass.helpers.storage.Store(
STORAGE_VERSION, STORAGE_KEY, private=True)
STORAGE_VERSION, STORAGE_KEY, private=True
)
self._init_lock = asyncio.Lock()
@property
@@ -93,14 +103,13 @@ class TotpAuthModule(MultiFactorAuthModule):
"""Save data."""
await self._user_store.async_save({STORAGE_USERS: self._users})
def _add_ota_secret(self, user_id: str,
secret: Optional[str] = None) -> str:
def _add_ota_secret(self, user_id: str, secret: Optional[str] = None) -> str:
"""Create a ota_secret for user."""
import pyotp
ota_secret = secret or pyotp.random_base32() # type: str
ota_secret: str = secret or pyotp.random_base32()
self._users[user_id] = ota_secret # type: ignore
self._users[user_id] = ota_secret # type: ignore
return ota_secret
async def async_setup_flow(self, user_id: str) -> SetupFlow:
@@ -108,7 +117,7 @@ class TotpAuthModule(MultiFactorAuthModule):
Mfa module should extend SetupFlow
"""
user = await self.hass.auth.async_get_user(user_id) # type: ignore
user = await self.hass.auth.async_get_user(user_id) # type: ignore
return TotpSetupFlow(self, self.input_schema, user)
async def async_setup_user(self, user_id: str, setup_data: Any) -> str:
@@ -117,7 +126,8 @@ class TotpAuthModule(MultiFactorAuthModule):
await self._async_load()
result = await self.hass.async_add_executor_job(
self._add_ota_secret, user_id, setup_data.get('secret'))
self._add_ota_secret, user_id, setup_data.get("secret")
)
await self._async_save()
return result
@@ -127,7 +137,7 @@ class TotpAuthModule(MultiFactorAuthModule):
if self._users is None:
await self._async_load()
if self._users.pop(user_id, None): # type: ignore
if self._users.pop(user_id, None): # type: ignore
await self._async_save()
async def async_is_user_setup(self, user_id: str) -> bool:
@@ -135,10 +145,9 @@ class TotpAuthModule(MultiFactorAuthModule):
if self._users is None:
await self._async_load()
return user_id in self._users # type: ignore
return user_id in self._users # type: ignore
async def async_validate(
self, user_id: str, user_input: Dict[str, Any]) -> bool:
async def async_validate(self, user_id: str, user_input: Dict[str, Any]) -> bool:
"""Return True if validation passed."""
if self._users is None:
await self._async_load()
@@ -146,7 +155,8 @@ class TotpAuthModule(MultiFactorAuthModule):
# user_input has been validate in caller
# set INPUT_FIELD_CODE as vol.Required is not user friendly
return await self.hass.async_add_executor_job(
self._validate_2fa, user_id, user_input.get(INPUT_FIELD_CODE, ''))
self._validate_2fa, user_id, user_input.get(INPUT_FIELD_CODE, "")
)
def _validate_2fa(self, user_id: str, code: str) -> bool:
"""Validate two factor authentication code."""
@@ -165,21 +175,21 @@ class TotpAuthModule(MultiFactorAuthModule):
class TotpSetupFlow(SetupFlow):
"""Handler for the setup flow."""
def __init__(self, auth_module: TotpAuthModule,
setup_schema: vol.Schema,
user: User) -> None:
def __init__(
self, auth_module: TotpAuthModule, setup_schema: vol.Schema, user: User
) -> None:
"""Initialize the setup flow."""
super().__init__(auth_module, setup_schema, user.id)
# to fix typing complaint
self._auth_module = auth_module # type: TotpAuthModule
self._auth_module: TotpAuthModule = auth_module
self._user = user
self._ota_secret = None # type: Optional[str]
self._ota_secret: Optional[str] = None
self._url = None # type Optional[str]
self._image = None # type Optional[str]
async def async_step_init(
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Handle the first step of setup flow.
Return self.async_show_form(step_id='init') if user_input is None.
@@ -187,34 +197,40 @@ class TotpSetupFlow(SetupFlow):
"""
import pyotp
errors = {} # type: Dict[str, str]
errors: Dict[str, str] = {}
if user_input:
verified = await self.hass.async_add_executor_job( # type: ignore
pyotp.TOTP(self._ota_secret).verify, user_input['code'])
pyotp.TOTP(self._ota_secret).verify, user_input["code"]
)
if verified:
result = await self._auth_module.async_setup_user(
self._user_id, {'secret': self._ota_secret})
self._user_id, {"secret": self._ota_secret}
)
return self.async_create_entry(
title=self._auth_module.name,
data={'result': result}
title=self._auth_module.name, data={"result": result}
)
errors['base'] = 'invalid_code'
errors["base"] = "invalid_code"
else:
hass = self._auth_module.hass
self._ota_secret, self._url, self._image = \
await hass.async_add_executor_job( # type: ignore
_generate_secret_and_qr_code, str(self._user.name))
(
self._ota_secret,
self._url,
self._image,
) = await hass.async_add_executor_job(
_generate_secret_and_qr_code, # type: ignore
str(self._user.name),
)
return self.async_show_form(
step_id='init',
step_id="init",
data_schema=self._setup_schema,
description_placeholders={
'code': self._ota_secret,
'url': self._url,
'qr_code': self._image
"code": self._ota_secret,
"url": self._url,
"qr_code": self._image,
},
errors=errors
errors=errors,
)

View File

@@ -1,6 +1,7 @@
"""Auth models."""
from datetime import datetime, timedelta
from typing import Dict, List, NamedTuple, Optional # noqa: F401
import secrets
from typing import Dict, List, NamedTuple, Optional
import uuid
import attr
@@ -9,18 +10,17 @@ 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'
TOKEN_TYPE_SYSTEM = 'system'
TOKEN_TYPE_LONG_LIVED_ACCESS_TOKEN = 'long_lived_access_token'
TOKEN_TYPE_NORMAL = "normal"
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]
name = attr.ib(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)
@@ -30,31 +30,28 @@ class Group:
class User:
"""A user."""
name = attr.ib(type=str) # type: Optional[str]
perm_lookup = attr.ib(
type=perm_mdl.PermissionLookup, cmp=False,
) # type: perm_mdl.PermissionLookup
name = attr.ib(type=Optional[str])
perm_lookup = attr.ib(type=perm_mdl.PermissionLookup, eq=False, order=False)
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]
groups = attr.ib(type=List[Group], factory=list, eq=False, order=False)
# List of credentials of a user.
credentials = attr.ib(
type=list, factory=list, cmp=False
) # type: List[Credentials]
credentials = attr.ib(type=List["Credentials"], factory=list, eq=False, order=False)
# Tokens associated with a user.
refresh_tokens = attr.ib(
type=dict, factory=dict, cmp=False
) # type: Dict[str, RefreshToken]
type=Dict[str, "RefreshToken"], factory=dict, eq=False, order=False
)
_permissions = attr.ib(
type=Optional[perm_mdl.PolicyPermissions],
init=False,
cmp=False,
eq=False,
order=False,
default=None,
)
@@ -68,9 +65,9 @@ class User:
return self._permissions
self._permissions = perm_mdl.PolicyPermissions(
perm_mdl.merge_policies([
group.policy for group in self.groups]),
self.perm_lookup)
perm_mdl.merge_policies([group.policy for group in self.groups]),
self.perm_lookup,
)
return self._permissions
@@ -80,8 +77,7 @@ class User:
if self.is_owner:
return True
return self.is_active and any(
gr.id == GROUP_ID_ADMIN for gr in self.groups)
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."""
@@ -97,14 +93,17 @@ class RefreshToken:
access_token_expiration = attr.ib(type=timedelta)
client_name = attr.ib(type=Optional[str], default=None)
client_icon = attr.ib(type=Optional[str], default=None)
token_type = attr.ib(type=str, default=TOKEN_TYPE_NORMAL,
validator=attr.validators.in_((
TOKEN_TYPE_NORMAL, TOKEN_TYPE_SYSTEM,
TOKEN_TYPE_LONG_LIVED_ACCESS_TOKEN)))
token_type = attr.ib(
type=str,
default=TOKEN_TYPE_NORMAL,
validator=attr.validators.in_(
(TOKEN_TYPE_NORMAL, TOKEN_TYPE_SYSTEM, TOKEN_TYPE_LONG_LIVED_ACCESS_TOKEN)
),
)
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))
token = attr.ib(type=str, factory=lambda: secrets.token_hex(64))
jwt_key = attr.ib(type=str, factory=lambda: secrets.token_hex(64))
last_used_at = attr.ib(type=Optional[datetime], default=None)
last_used_ip = attr.ib(type=Optional[str], default=None)
@@ -124,5 +123,4 @@ class Credentials:
is_new = attr.ib(type=bool, default=True)
UserMeta = NamedTuple("UserMeta",
[('name', Optional[str]), ('is_active', bool)])
UserMeta = NamedTuple("UserMeta", [("name", Optional[str]), ("is_active", bool)])

View File

@@ -1,22 +1,17 @@
"""Permissions for Home Assistant."""
import logging
from typing import ( # noqa: F401
cast, Any, Callable, Dict, List, Mapping, Set, Tuple, Union,
TYPE_CHECKING)
from typing import Any, Callable, Optional
import voluptuous as vol
from .const import CAT_ENTITIES
from .entities import ENTITY_POLICY_SCHEMA, compile_entities
from .merge import merge_policies # noqa: F401
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
})
POLICY_SCHEMA = vol.Schema({vol.Optional(CAT_ENTITIES): ENTITY_POLICY_SCHEMA})
_LOGGER = logging.getLogger(__name__)
@@ -24,7 +19,7 @@ _LOGGER = logging.getLogger(__name__)
class AbstractPermissions:
"""Default permissions class."""
_cached_entity_func = None
_cached_entity_func: Optional[Callable[[str, str], bool]] = None
def _entity_func(self) -> Callable[[str, str], bool]:
"""Return a function that can test entity access."""
@@ -47,8 +42,7 @@ class AbstractPermissions:
class PolicyPermissions(AbstractPermissions):
"""Handle permissions."""
def __init__(self, policy: PolicyType,
perm_lookup: PermissionLookup) -> None:
def __init__(self, policy: PolicyType, perm_lookup: PermissionLookup) -> None:
"""Initialize the permission class."""
self._policy = policy
self._perm_lookup = perm_lookup
@@ -59,21 +53,16 @@ class PolicyPermissions(AbstractPermissions):
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)
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)
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

View File

@@ -1,8 +1,8 @@
"""Permission constants."""
CAT_ENTITIES = 'entities'
CAT_CONFIG_ENTRIES = 'config_entries'
SUBCAT_ALL = 'all'
CAT_ENTITIES = "entities"
CAT_CONFIG_ENTRIES = "config_entries"
SUBCAT_ALL = "all"
POLICY_READ = 'read'
POLICY_CONTROL = 'control'
POLICY_EDIT = 'edit'
POLICY_READ = "read"
POLICY_CONTROL = "control"
POLICY_EDIT = "edit"

View File

@@ -1,57 +1,63 @@
"""Entity permissions."""
from collections import OrderedDict
from typing import Callable, Optional # noqa: F401
from typing import Callable, Optional
import voluptuous as vol
from .const import SUBCAT_ALL, POLICY_READ, POLICY_CONTROL, POLICY_EDIT
from .const import POLICY_CONTROL, POLICY_EDIT, POLICY_READ, SUBCAT_ALL
from .models import PermissionLookup
from .types import CategoryType, SubCategoryDict, ValueType
# pylint: disable=unused-import
from .util import SubCatLookupType, lookup_all, compile_policy # noqa
from .util import SubCatLookupType, compile_policy, lookup_all
SINGLE_ENTITY_SCHEMA = vol.Any(True, vol.Schema({
vol.Optional(POLICY_READ): True,
vol.Optional(POLICY_CONTROL): True,
vol.Optional(POLICY_EDIT): True,
}))
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_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_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,
}))
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]:
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]:
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
)
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
@@ -59,9 +65,9 @@ def _lookup_area(perm_lookup: PermissionLookup, area_dict: SubCategoryDict,
return area_dict.get(device_entry.area_id)
def _lookup_device(perm_lookup: PermissionLookup,
devices_dict: SubCategoryDict,
entity_id: str) -> Optional[ValueType]:
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)
@@ -71,17 +77,18 @@ def _lookup_device(perm_lookup: PermissionLookup,
return devices_dict.get(entity_entry.device_id)
def _lookup_entity_id(perm_lookup: PermissionLookup,
entities_dict: SubCategoryDict,
entity_id: str) -> Optional[ValueType]:
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]:
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: SubCatLookupType = OrderedDict()
subcategories[ENTITY_ENTITY_IDS] = _lookup_entity_id
subcategories[ENTITY_DEVICE_IDS] = _lookup_device
subcategories[ENTITY_AREAS] = _lookup_area

View File

@@ -1,21 +1,21 @@
"""Merging of policies."""
from typing import ( # noqa: F401
cast, Dict, List, Set)
from typing import Dict, List, Set, cast
from .types import PolicyType, CategoryType
from .types import CategoryType, PolicyType
def merge_policies(policies: List[PolicyType]) -> PolicyType:
"""Merge policies."""
new_policy = {} # type: Dict[str, CategoryType]
seen = set() # type: Set[str]
new_policy: Dict[str, CategoryType] = {}
seen: Set[str] = set()
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])
new_policy[category] = _merge_policies(
[policy.get(category) for policy in policies]
)
cast(PolicyType, new_policy)
return new_policy
@@ -33,8 +33,8 @@ def _merge_policies(sources: List[CategoryType]) -> CategoryType:
# 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]
policy: CategoryType = None
seen: Set[str] = set()
for source in sources:
if source is None:
continue

View File

@@ -5,17 +5,13 @@ 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,
)
from homeassistant.helpers import entity_registry as ent_reg # noqa: F401
from homeassistant.helpers import device_registry as dev_reg # noqa: F401
@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')
entity_registry = attr.ib(type="ent_reg.EntityRegistry")
device_registry = attr.ib(type="dev_reg.DeviceRegistry")

View File

@@ -1,18 +1,8 @@
"""System policies."""
from .const import CAT_ENTITIES, SUBCAT_ALL, POLICY_READ
from .const import CAT_ENTITIES, POLICY_READ, SUBCAT_ALL
ADMIN_POLICY = {
CAT_ENTITIES: True,
}
ADMIN_POLICY = {CAT_ENTITIES: True}
USER_POLICY = {
CAT_ENTITIES: True,
}
USER_POLICY = {CAT_ENTITIES: True}
READ_ONLY_POLICY = {
CAT_ENTITIES: {
SUBCAT_ALL: {
POLICY_READ: True
}
}
}
READ_ONLY_POLICY = {CAT_ENTITIES: {SUBCAT_ALL: {POLICY_READ: True}}}

View File

@@ -7,17 +7,13 @@ ValueType = Union[
# Example: entities.all = { read: true, control: true }
Mapping[str, bool],
bool,
None
None,
]
# Example: entities.domains = { light: … }
SubCategoryDict = Mapping[str, ValueType]
SubCategoryType = Union[
SubCategoryDict,
bool,
None
]
SubCategoryType = Union[SubCategoryDict, bool, None]
CategoryType = Union[
# Example: entities.domains
@@ -25,7 +21,7 @@ CategoryType = Union[
# Example: entities.all
Mapping[str, ValueType],
bool,
None
None,
]
# Example: { entities: … }

View File

@@ -1,34 +1,34 @@
"""Helpers to deal with permissions."""
from functools import wraps
from typing import Callable, Dict, List, Optional, Union, cast # noqa: F401
from typing import Callable, Dict, List, Optional, cast
from .const import SUBCAT_ALL
from .models import PermissionLookup
from .types import CategoryType, SubCategoryDict, ValueType
LookupFunc = Callable[[PermissionLookup, SubCategoryDict, str],
Optional[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:
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
policy: CategoryType, subcategories: SubCatLookupType, perm_lookup: PermissionLookup
) -> Callable[[str, str], bool]:
"""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
@@ -36,6 +36,7 @@ def compile_policy(
return apply_policy_deny_all
if policy is True:
def apply_policy_allow_all(entity_id: str, key: str) -> bool:
"""Approve all."""
return True
@@ -44,7 +45,7 @@ def compile_policy(
assert isinstance(policy, dict)
funcs = [] # type: List[Callable[[str, str], Union[None, bool]]]
funcs: List[Callable[[str, str], Optional[bool]]] = []
for key, lookup_func in subcategories.items():
lookup_value = policy.get(key)
@@ -54,8 +55,7 @@ def compile_policy(
return lambda object_id, key: True
if lookup_value is not None:
funcs.append(_gen_dict_test_func(
perm_lookup, lookup_func, lookup_value))
funcs.append(_gen_dict_test_func(perm_lookup, lookup_func, lookup_value))
if len(funcs) == 1:
func = funcs[0]
@@ -79,15 +79,13 @@ def compile_policy(
def _gen_dict_test_func(
perm_lookup: PermissionLookup,
lookup_func: LookupFunc,
lookup_dict: SubCategoryDict
) -> Callable[[str, str], Optional[bool]]: # noqa
perm_lookup: PermissionLookup, lookup_func: LookupFunc, lookup_dict: SubCategoryDict
) -> Callable[[str, str], Optional[bool]]:
"""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
schema: ValueType = lookup_func(perm_lookup, lookup_dict, object_id)
if schema is None or isinstance(schema, bool):
return schema

View File

@@ -8,43 +8,47 @@ import voluptuous as vol
from voluptuous.humanize import humanize_error
from homeassistant import data_entry_flow, requirements
from homeassistant.core import callback, HomeAssistant
from homeassistant.const import CONF_ID, CONF_NAME, CONF_TYPE
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
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 ..models import Credentials, User, UserMeta
_LOGGER = logging.getLogger(__name__)
DATA_REQS = 'auth_prov_reqs_processed'
DATA_REQS = "auth_prov_reqs_processed"
AUTH_PROVIDERS = Registry()
AUTH_PROVIDER_SCHEMA = vol.Schema({
vol.Required(CONF_TYPE): str,
vol.Optional(CONF_NAME): str,
# Specify ID if you have two auth providers for same type.
vol.Optional(CONF_ID): str,
}, extra=vol.ALLOW_EXTRA)
AUTH_PROVIDER_SCHEMA = vol.Schema(
{
vol.Required(CONF_TYPE): str,
vol.Optional(CONF_NAME): str,
# Specify ID if you have two auth providers for same type.
vol.Optional(CONF_ID): str,
},
extra=vol.ALLOW_EXTRA,
)
class AuthProvider:
"""Provider of user authentication."""
DEFAULT_TITLE = 'Unnamed auth provider'
DEFAULT_TITLE = "Unnamed auth provider"
def __init__(self, hass: HomeAssistant, store: AuthStore,
config: Dict[str, Any]) -> None:
def __init__(
self, hass: HomeAssistant, store: AuthStore, config: Dict[str, Any]
) -> None:
"""Initialize an auth provider."""
self.hass = hass
self.store = store
self.config = config
@property
def id(self) -> Optional[str]: # pylint: disable=invalid-name
def id(self) -> Optional[str]:
"""Return id of the auth provider.
Optional, can be None.
@@ -73,22 +77,22 @@ class AuthProvider:
credentials
for user in users
for credentials in user.credentials
if (credentials.auth_provider_type == self.type and
credentials.auth_provider_id == self.id)
if (
credentials.auth_provider_type == self.type
and credentials.auth_provider_id == self.id
)
]
@callback
def async_create_credentials(self, data: Dict[str, str]) -> Credentials:
"""Create credentials."""
return Credentials(
auth_provider_type=self.type,
auth_provider_id=self.id,
data=data,
auth_provider_type=self.type, auth_provider_id=self.id, data=data
)
# Implement by extending class
async def async_login_flow(self, context: Optional[Dict]) -> 'LoginFlow':
async def async_login_flow(self, context: Optional[Dict]) -> "LoginFlow":
"""Return the data flow for logging in with auth provider.
Auth provider should extend LoginFlow and return an instance.
@@ -96,22 +100,28 @@ class AuthProvider:
raise NotImplementedError
async def async_get_or_create_credentials(
self, flow_result: Dict[str, str]) -> Credentials:
self, flow_result: Dict[str, str]
) -> Credentials:
"""Get credentials based on the flow result."""
raise NotImplementedError
async def async_user_meta_for_credentials(
self, credentials: Credentials) -> UserMeta:
self, credentials: Credentials
) -> UserMeta:
"""Return extra user metadata for credentials.
Will be used to populate info when creating a new user.
"""
raise NotImplementedError
async def async_initialize(self) -> None:
"""Initialize the auth provider."""
pass
async def auth_provider_from_config(
hass: HomeAssistant, store: AuthStore,
config: Dict[str, Any]) -> AuthProvider:
hass: HomeAssistant, store: AuthStore, config: Dict[str, Any]
) -> AuthProvider:
"""Initialize an auth provider from a config."""
provider_name = config[CONF_TYPE]
module = await load_auth_provider_module(hass, provider_name)
@@ -119,25 +129,27 @@ async def auth_provider_from_config(
try:
config = module.CONFIG_SCHEMA(config) # type: ignore
except vol.Invalid as err:
_LOGGER.error('Invalid configuration for auth provider %s: %s',
provider_name, humanize_error(config, err))
_LOGGER.error(
"Invalid configuration for auth provider %s: %s",
provider_name,
humanize_error(config, err),
)
raise
return AUTH_PROVIDERS[provider_name](hass, store, config) # type: ignore
async def load_auth_provider_module(
hass: HomeAssistant, provider: str) -> types.ModuleType:
hass: HomeAssistant, provider: str
) -> types.ModuleType:
"""Load an auth provider."""
try:
module = importlib.import_module(
'homeassistant.auth.providers.{}'.format(provider))
module = importlib.import_module(f"homeassistant.auth.providers.{provider}")
except ImportError as err:
_LOGGER.error('Unable to load auth provider %s: %s', provider, err)
raise HomeAssistantError('Unable to load auth provider {}: {}'.format(
provider, err))
_LOGGER.error("Unable to load auth provider %s: %s", provider, err)
raise HomeAssistantError(f"Unable to load auth provider {provider}: {err}")
if hass.config.skip_pip or not hasattr(module, 'REQUIREMENTS'):
if hass.config.skip_pip or not hasattr(module, "REQUIREMENTS"):
return module
processed = hass.data.get(DATA_REQS)
@@ -149,13 +161,9 @@ async def load_auth_provider_module(
# https://github.com/python/mypy/issues/1424
reqs = module.REQUIREMENTS # type: ignore
req_success = await requirements.async_process_requirements(
hass, 'auth provider {}'.format(provider), reqs)
if not req_success:
raise HomeAssistantError(
'Unable to process requirements of auth provider {}'.format(
provider))
await requirements.async_process_requirements(
hass, f"auth provider {provider}", reqs
)
processed.add(provider)
return module
@@ -167,16 +175,16 @@ class LoginFlow(data_entry_flow.FlowHandler):
def __init__(self, auth_provider: AuthProvider) -> None:
"""Initialize the login flow."""
self._auth_provider = auth_provider
self._auth_module_id = None # type: Optional[str]
self._auth_module_id: Optional[str] = None
self._auth_manager = auth_provider.hass.auth # type: ignore
self.available_mfa_modules = {} # type: Dict[str, str]
self.available_mfa_modules: Dict[str, str] = {}
self.created_at = dt_util.utcnow()
self.invalid_mfa_times = 0
self.user = None # type: Optional[User]
self.user: Optional[User] = None
async def async_step_init(
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Handle the first step of login flow.
Return self.async_show_form(step_id='init') if user_input is None.
@@ -185,80 +193,75 @@ class LoginFlow(data_entry_flow.FlowHandler):
raise NotImplementedError
async def async_step_select_mfa_module(
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Handle the step of select mfa module."""
errors = {}
if user_input is not None:
auth_module = user_input.get('multi_factor_auth_module')
auth_module = user_input.get("multi_factor_auth_module")
if auth_module in self.available_mfa_modules:
self._auth_module_id = auth_module
return await self.async_step_mfa()
errors['base'] = 'invalid_auth_module'
errors["base"] = "invalid_auth_module"
if len(self.available_mfa_modules) == 1:
self._auth_module_id = list(self.available_mfa_modules.keys())[0]
return await self.async_step_mfa()
return self.async_show_form(
step_id='select_mfa_module',
data_schema=vol.Schema({
'multi_factor_auth_module': vol.In(self.available_mfa_modules)
}),
step_id="select_mfa_module",
data_schema=vol.Schema(
{"multi_factor_auth_module": vol.In(self.available_mfa_modules)}
),
errors=errors,
)
async def async_step_mfa(
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
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(
self._auth_module_id)
auth_module = self._auth_manager.get_auth_mfa_module(self._auth_module_id)
if auth_module is None:
# Given an invalid input to async_step_select_mfa_module
# 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'):
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')
_LOGGER.exception("Error initializing MFA step")
return self.async_abort(reason="unknown_error")
if user_input is not None:
expires = self.created_at + MFA_SESSION_EXPIRATION
if dt_util.utcnow() > expires:
return self.async_abort(
reason='login_expired'
)
return self.async_abort(reason="login_expired")
result = await auth_module.async_validate(
self.user.id, user_input)
result = await auth_module.async_validate(self.user.id, user_input)
if not result:
errors['base'] = 'invalid_code'
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'
)
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, Optional[str]]
description_placeholders: Dict[str, Optional[str]] = {
"mfa_module_name": auth_module.name,
"mfa_module_id": auth_module.id,
}
return self.async_show_form(
step_id='mfa',
step_id="mfa",
data_schema=auth_module.input_schema,
description_placeholders=description_placeholders,
errors=errors,
@@ -266,7 +269,4 @@ class LoginFlow(data_entry_flow.FlowHandler):
async def async_finish(self, flow_result: Any) -> Dict:
"""Handle the pass of login flow."""
return self.async_create_entry(
title=self._auth_provider.name,
data=flow_result
)
return self.async_create_entry(title=self._auth_provider.name, data=flow_result)

View File

@@ -1,33 +1,32 @@
"""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
from typing import Any, Dict, Optional, cast
import voluptuous as vol
from homeassistant.exceptions import HomeAssistantError
from . import AuthProvider, AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, LoginFlow
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, 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)
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__)
@@ -52,7 +51,7 @@ class CommandLineAuthProvider(AuthProvider):
attributes provided by external programs.
"""
super().__init__(*args, **kwargs)
self._user_meta = {} # type: Dict[str, Dict[str, Any]]
self._user_meta: Dict[str, Dict[str, Any]] = {}
async def async_login_flow(self, context: Optional[dict]) -> LoginFlow:
"""Return a flow to login."""
@@ -60,33 +59,31 @@ class CommandLineAuthProvider(AuthProvider):
async def async_validate_login(self, username: str, password: str) -> None:
"""Validate a username and password."""
env = {
"username": username,
"password": 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],
self.config[CONF_COMMAND],
*self.config[CONF_ARGS],
env=env,
stdout=asyncio.subprocess.PIPE
if self.config[CONF_META] else None,
stdout=asyncio.subprocess.PIPE if self.config[CONF_META] else None,
)
stdout, _ = (await process.communicate())
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)
_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)
_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]
meta: Dict[str, str] = {}
for _line in stdout.splitlines():
try:
line = _line.decode().lstrip()
@@ -103,7 +100,7 @@ class CommandLineAuthProvider(AuthProvider):
self._user_meta[username] = meta
async def async_get_or_create_credentials(
self, flow_result: Dict[str, str]
self, flow_result: Dict[str, str]
) -> Credentials:
"""Get credentials based on the flow result."""
username = flow_result["username"]
@@ -112,29 +109,24 @@ class CommandLineAuthProvider(AuthProvider):
return credential
# Create new credentials.
return self.async_create_credentials({
"username": username,
})
return self.async_create_credentials({"username": username})
async def async_user_meta_for_credentials(
self, credentials: 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,
)
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
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Handle the step of the form."""
errors = {}
@@ -142,10 +134,9 @@ class CommandLineLoginFlow(LoginFlow):
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"]
)
await cast(
CommandLineAuthProvider, self._auth_provider
).async_validate_login(user_input["username"], user_input["password"])
except InvalidAuthError:
errors["base"] = "invalid_auth"
@@ -153,12 +144,10 @@ class CommandLineLoginFlow(LoginFlow):
user_input.pop("password")
return await self.async_finish(user_input)
schema = collections.OrderedDict() # type: Dict[str, type]
schema: Dict[str, type] = collections.OrderedDict()
schema["username"] = str
schema["password"] = str
return self.async_show_form(
step_id="init",
data_schema=vol.Schema(schema),
errors=errors,
step_id="init", data_schema=vol.Schema(schema), errors=errors
)

View File

@@ -3,30 +3,26 @@ import asyncio
import base64
from collections import OrderedDict
import logging
from typing import Any, Dict, List, Optional, Set, cast # noqa: F401
from typing import Any, Dict, List, Optional, Set, cast
import bcrypt
import voluptuous as vol
from homeassistant.const import CONF_ID
from homeassistant.core import callback, HomeAssistant
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from . import AuthProvider, AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, LoginFlow
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from ..models import Credentials, UserMeta
STORAGE_VERSION = 1
STORAGE_KEY = 'auth_provider.homeassistant'
STORAGE_KEY = "auth_provider.homeassistant"
def _disallow_id(conf: Dict[str, Any]) -> Dict[str, Any]:
"""Disallow ID in config."""
if CONF_ID in conf:
raise vol.Invalid(
'ID is not allowed for the homeassistant auth provider.')
raise vol.Invalid("ID is not allowed for the homeassistant auth provider.")
return conf
@@ -51,9 +47,10 @@ 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,
private=True)
self._data = None # type: Optional[Dict[str, Any]]
self._store = hass.helpers.storage.Store(
STORAGE_VERSION, STORAGE_KEY, private=True
)
self._data: Optional[Dict[str, Any]] = None
# 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.
@@ -72,14 +69,12 @@ class Data:
data = await self._store.async_load()
if data is None:
data = {
'users': []
}
data = {"users": []}
seen = set() # type: Set[str]
seen: Set[str] = set()
for user in data['users']:
username = user['username']
for user in data["users"]:
username = user["username"]
# check if we have duplicates
folded = username.casefold()
@@ -90,7 +85,9 @@ class Data:
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)
"equivalent. Please change the username: '%s'.",
username,
)
break
@@ -103,7 +100,9 @@ class Data:
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)
"space. Please change the username: '%s'.",
username,
)
break
@@ -112,7 +111,7 @@ class Data:
@property
def users(self) -> List[Dict[str, str]]:
"""Return users."""
return self._data['users'] # type: ignore
return self._data["users"] # type: ignore
def validate_login(self, username: str, password: str) -> None:
"""Validate a username and password.
@@ -120,32 +119,30 @@ class Data:
Raises InvalidAuth if auth invalid.
"""
username = self.normalize_username(username)
dummy = b'$2b$12$CiuFGszHx9eNHxPuQcwBWez4CwDTOcLTX5CbOpV6gef2nYuXkY7BO'
dummy = b"$2b$12$CiuFGszHx9eNHxPuQcwBWez4CwDTOcLTX5CbOpV6gef2nYuXkY7BO"
found = None
# Compare all users to avoid timing attacks.
for user in self.users:
if self.normalize_username(user['username']) == username:
if self.normalize_username(user["username"]) == username:
found = user
if found is None:
# check a hash to make timing the same as if user was found
bcrypt.checkpw(b'foo',
dummy)
bcrypt.checkpw(b"foo", dummy)
raise InvalidAuth
user_hash = base64.b64decode(found['password'])
user_hash = base64.b64decode(found["password"])
# bcrypt.checkpw is timing-safe
if not bcrypt.checkpw(password.encode(),
user_hash):
if not bcrypt.checkpw(password.encode(), user_hash):
raise InvalidAuth
# pylint: disable=no-self-use
def hash_password(self, password: str, for_storage: bool = False) -> bytes:
"""Encode a password."""
hashed = bcrypt.hashpw(password.encode(), bcrypt.gensalt(rounds=12)) \
# type: bytes
hashed: bytes = bcrypt.hashpw(password.encode(), bcrypt.gensalt(rounds=12))
if for_storage:
hashed = base64.b64encode(hashed)
return hashed
@@ -154,14 +151,17 @@ class Data:
"""Add a new authenticated user/pass."""
username = self.normalize_username(username)
if any(self.normalize_username(user['username']) == username
for user in self.users):
if any(
self.normalize_username(user["username"]) == username for user in self.users
):
raise InvalidUser
self.users.append({
'username': username,
'password': self.hash_password(password, True).decode(),
})
self.users.append(
{
"username": username,
"password": self.hash_password(password, True).decode(),
}
)
@callback
def async_remove_auth(self, username: str) -> None:
@@ -170,7 +170,7 @@ class Data:
index = None
for i, user in enumerate(self.users):
if self.normalize_username(user['username']) == username:
if self.normalize_username(user["username"]) == username:
index = i
break
@@ -187,9 +187,8 @@ class Data:
username = self.normalize_username(username)
for user in self.users:
if self.normalize_username(user['username']) == username:
user['password'] = self.hash_password(
new_password, True).decode()
if self.normalize_username(user["username"]) == username:
user["password"] = self.hash_password(new_password, True).decode()
break
else:
raise InvalidUser
@@ -199,16 +198,16 @@ class Data:
await self._store.async_save(self._data)
@AUTH_PROVIDERS.register('homeassistant')
@AUTH_PROVIDERS.register("homeassistant")
class HassAuthProvider(AuthProvider):
"""Auth provider based on a local storage of users in HASS config dir."""
"""Auth provider based on a local storage of users in Home Assistant config dir."""
DEFAULT_TITLE = 'Home Assistant Local'
DEFAULT_TITLE = "Home Assistant Local"
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.data: Optional[Data] = None
self._init_lock = asyncio.Lock()
async def async_initialize(self) -> None:
@@ -221,8 +220,7 @@ class HassAuthProvider(AuthProvider):
await data.async_load()
self.data = data
async def async_login_flow(
self, context: Optional[Dict]) -> LoginFlow:
async def async_login_flow(self, context: Optional[Dict]) -> LoginFlow:
"""Return a flow to login."""
return HassLoginFlow(self)
@@ -233,41 +231,41 @@ class HassAuthProvider(AuthProvider):
assert self.data is not None
await self.hass.async_add_executor_job(
self.data.validate_login, username, password)
self.data.validate_login, username, password
)
async def async_get_or_create_credentials(
self, flow_result: Dict[str, str]) -> Credentials:
self, flow_result: Dict[str, str]
) -> Credentials:
"""Get credentials based on the flow result."""
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'])
username = norm_username(flow_result["username"])
for credential in await self.async_credentials():
if norm_username(credential.data['username']) == username:
if norm_username(credential.data["username"]) == username:
return credential
# Create new credentials.
return self.async_create_credentials({
'username': username
})
return self.async_create_credentials({"username": username})
async def async_user_meta_for_credentials(
self, credentials: Credentials) -> UserMeta:
self, credentials: Credentials
) -> UserMeta:
"""Get extra info for this credential."""
return UserMeta(name=credentials.data['username'], is_active=True)
return UserMeta(name=credentials.data["username"], is_active=True)
async def async_will_remove_credentials(
self, credentials: Credentials) -> None:
async def async_will_remove_credentials(self, credentials: Credentials) -> None:
"""When credentials get removed, also remove the auth."""
if self.data is None:
await self.async_initialize()
assert self.data is not None
try:
self.data.async_remove_auth(credentials.data['username'])
self.data.async_remove_auth(credentials.data["username"])
await self.data.async_save()
except InvalidUser:
# Can happen if somehow we didn't clean up a credential
@@ -278,29 +276,27 @@ class HassLoginFlow(LoginFlow):
"""Handler for the login flow."""
async def async_step_init(
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Handle the step of the form."""
errors = {}
if user_input is not None:
try:
await cast(HassAuthProvider, self._auth_provider)\
.async_validate_login(user_input['username'],
user_input['password'])
await cast(HassAuthProvider, self._auth_provider).async_validate_login(
user_input["username"], user_input["password"]
)
except InvalidAuth:
errors['base'] = 'invalid_auth'
errors["base"] = "invalid_auth"
if not errors:
user_input.pop('password')
user_input.pop("password")
return await self.async_finish(user_input)
schema = OrderedDict() # type: Dict[str, type]
schema['username'] = str
schema['password'] = str
schema: Dict[str, type] = OrderedDict()
schema["username"] = str
schema["password"] = str
return self.async_show_form(
step_id='init',
data_schema=vol.Schema(schema),
errors=errors,
step_id="init", data_schema=vol.Schema(schema), errors=errors
)

View File

@@ -5,30 +5,31 @@ from typing import Any, Dict, Optional, cast
import voluptuous as vol
from homeassistant.exceptions import HomeAssistantError
from homeassistant.core import callback
from homeassistant.exceptions import HomeAssistantError
from . import AuthProvider, AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, LoginFlow
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from ..models import Credentials, UserMeta
USER_SCHEMA = vol.Schema({
vol.Required('username'): str,
vol.Required('password'): str,
vol.Optional('name'): str,
})
USER_SCHEMA = vol.Schema(
{
vol.Required("username"): str,
vol.Required("password"): str,
vol.Optional("name"): str,
}
)
CONFIG_SCHEMA = AUTH_PROVIDER_SCHEMA.extend({
vol.Required('users'): [USER_SCHEMA]
}, extra=vol.PREVENT_EXTRA)
CONFIG_SCHEMA = AUTH_PROVIDER_SCHEMA.extend(
{vol.Required("users"): [USER_SCHEMA]}, extra=vol.PREVENT_EXTRA
)
class InvalidAuthError(HomeAssistantError):
"""Raised when submitting invalid authentication."""
@AUTH_PROVIDERS.register('insecure_example')
@AUTH_PROVIDERS.register("insecure_example")
class ExampleAuthProvider(AuthProvider):
"""Example auth provider based on hardcoded usernames and passwords."""
@@ -42,47 +43,48 @@ class ExampleAuthProvider(AuthProvider):
user = None
# Compare all users to avoid timing attacks.
for usr in self.config['users']:
if hmac.compare_digest(username.encode('utf-8'),
usr['username'].encode('utf-8')):
for usr in self.config["users"]:
if hmac.compare_digest(
username.encode("utf-8"), usr["username"].encode("utf-8")
):
user = usr
if user is None:
# Do one more compare to make timing the same as if user was found.
hmac.compare_digest(password.encode('utf-8'),
password.encode('utf-8'))
hmac.compare_digest(password.encode("utf-8"), password.encode("utf-8"))
raise InvalidAuthError
if not hmac.compare_digest(user['password'].encode('utf-8'),
password.encode('utf-8')):
if not hmac.compare_digest(
user["password"].encode("utf-8"), password.encode("utf-8")
):
raise InvalidAuthError
async def async_get_or_create_credentials(
self, flow_result: Dict[str, str]) -> Credentials:
self, flow_result: Dict[str, str]
) -> Credentials:
"""Get credentials based on the flow result."""
username = flow_result['username']
username = flow_result["username"]
for credential in await self.async_credentials():
if credential.data['username'] == username:
if credential.data["username"] == username:
return credential
# Create new credentials.
return self.async_create_credentials({
'username': username
})
return self.async_create_credentials({"username": username})
async def async_user_meta_for_credentials(
self, credentials: Credentials) -> UserMeta:
self, credentials: Credentials
) -> UserMeta:
"""Return extra user metadata for credentials.
Will be used to populate info when creating a new user.
"""
username = credentials.data['username']
username = credentials.data["username"]
name = None
for user in self.config['users']:
if user['username'] == username:
name = user.get('name')
for user in self.config["users"]:
if user["username"] == username:
name = user.get("name")
break
return UserMeta(name=name, is_active=True)
@@ -92,29 +94,27 @@ class ExampleLoginFlow(LoginFlow):
"""Handler for the login flow."""
async def async_step_init(
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Handle the step of the form."""
errors = {}
if user_input is not None:
try:
cast(ExampleAuthProvider, self._auth_provider)\
.async_validate_login(user_input['username'],
user_input['password'])
cast(ExampleAuthProvider, self._auth_provider).async_validate_login(
user_input["username"], user_input["password"]
)
except InvalidAuthError:
errors['base'] = 'invalid_auth'
errors["base"] = "invalid_auth"
if not errors:
user_input.pop('password')
user_input.pop("password")
return await self.async_finish(user_input)
schema = OrderedDict() # type: Dict[str, type]
schema['username'] = str
schema['password'] = str
schema: Dict[str, type] = OrderedDict()
schema["username"] = str
schema["password"] = str
return self.async_show_form(
step_id='init',
data_schema=vol.Schema(schema),
errors=errors,
step_id="init", data_schema=vol.Schema(schema), errors=errors
)

View File

@@ -12,31 +12,30 @@ 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 . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from .. import AuthManager
from ..models import Credentials, UserMeta, User
from ..models import Credentials, User, UserMeta
AUTH_PROVIDER_TYPE = 'legacy_api_password'
CONF_API_PASSWORD = 'api_password'
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)
CONFIG_SCHEMA = AUTH_PROVIDER_SCHEMA.extend(
{vol.Required(CONF_API_PASSWORD): cv.string}, extra=vol.PREVENT_EXTRA
)
LEGACY_USER_NAME = 'Legacy API password user'
LEGACY_USER_NAME = "Legacy API password user"
class InvalidAuthError(HomeAssistantError):
"""Raised when submitting invalid authentication."""
async def async_validate_password(hass: HomeAssistant, password: str)\
-> Optional[User]:
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')
raise ValueError("Legacy API password provider not found")
try:
provider = cast(LegacyApiPasswordAuthProvider, providers[0])
@@ -52,7 +51,7 @@ async def async_validate_password(hass: HomeAssistant, password: str)\
class LegacyApiPasswordAuthProvider(AuthProvider):
"""An auth provider support legacy api_password."""
DEFAULT_TITLE = 'Legacy API Password'
DEFAULT_TITLE = "Legacy API Password"
@property
def api_password(self) -> str:
@@ -68,12 +67,14 @@ class LegacyApiPasswordAuthProvider(AuthProvider):
"""Validate password."""
api_password = str(self.config[CONF_API_PASSWORD])
if not hmac.compare_digest(api_password.encode('utf-8'),
password.encode('utf-8')):
if not hmac.compare_digest(
api_password.encode("utf-8"), password.encode("utf-8")
):
raise InvalidAuthError
async def async_get_or_create_credentials(
self, flow_result: Dict[str, str]) -> Credentials:
self, flow_result: Dict[str, str]
) -> Credentials:
"""Return credentials for this login."""
credentials = await self.async_credentials()
if credentials:
@@ -82,7 +83,8 @@ class LegacyApiPasswordAuthProvider(AuthProvider):
return self.async_create_credentials({})
async def async_user_meta_for_credentials(
self, credentials: Credentials) -> UserMeta:
self, credentials: Credentials
) -> UserMeta:
"""
Return info for the user.
@@ -95,23 +97,22 @@ class LegacyLoginFlow(LoginFlow):
"""Handler for the login flow."""
async def async_step_init(
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Handle the step of the form."""
errors = {}
if user_input is not None:
try:
cast(LegacyApiPasswordAuthProvider, self._auth_provider)\
.async_validate_login(user_input['password'])
cast(
LegacyApiPasswordAuthProvider, self._auth_provider
).async_validate_login(user_input["password"])
except InvalidAuthError:
errors['base'] = 'invalid_auth'
errors["base"] = "invalid_auth"
if not errors:
return await self.async_finish({})
return self.async_show_form(
step_id='init',
data_schema=vol.Schema({'password': str}),
errors=errors,
step_id="init", data_schema=vol.Schema({"password": str}), errors=errors
)

View File

@@ -3,42 +3,47 @@
It shows list of users if access from trusted network.
Abort login flow if not access from trusted network.
"""
from ipaddress import ip_network, IPv4Address, IPv6Address, IPv4Network,\
IPv6Network
from ipaddress import IPv4Address, IPv4Network, IPv6Address, IPv6Network, ip_network
from typing import Any, Dict, List, Optional, Union, cast
import voluptuous as vol
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
import homeassistant.helpers.config_validation as cv
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, 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'
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)
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,
)
class InvalidAuthError(HomeAssistantError):
@@ -49,14 +54,14 @@ class InvalidUserError(HomeAssistantError):
"""Raised when try to login as invalid user."""
@AUTH_PROVIDERS.register('trusted_networks')
@AUTH_PROVIDERS.register("trusted_networks")
class TrustedNetworksAuthProvider(AuthProvider):
"""Trusted Networks auth provider.
Allow passwordless access from trusted network.
"""
DEFAULT_TITLE = 'Trusted Networks'
DEFAULT_TITLE = "Trusted Networks"
@property
def trusted_networks(self) -> List[IPNetwork]:
@@ -76,49 +81,58 @@ 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'))
ip_addr = cast(IPAddress, context.get("ip_address"))
users = await self.store.async_get_users()
available_users = [user 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]
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]))
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,
ip_addr,
{
user.id: user.name for user in available_users
},
{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:
self, flow_result: Dict[str, str]
) -> Credentials:
"""Get credentials based on the flow result."""
user_id = flow_result['user']
user_id = flow_result["user"]
users = await self.store.async_get_users()
for user in users:
if (not user.system_generated and
user.is_active and
user.id == user_id):
if not user.system_generated and user.is_active and user.id == user_id:
for credential in await self.async_credentials():
if credential.data['user_id'] == user_id:
if credential.data["user_id"] == user_id:
return credential
cred = self.async_create_credentials({'user_id': user_id})
cred = self.async_create_credentials({"user_id": user_id})
await self.store.async_link_user(user, cred)
return cred
@@ -126,7 +140,8 @@ class TrustedNetworksAuthProvider(AuthProvider):
raise InvalidUserError
async def async_user_meta_for_credentials(
self, credentials: Credentials) -> UserMeta:
self, credentials: Credentials
) -> UserMeta:
"""Return extra user metadata for credentials.
Trusted network auth provider should never create new user.
@@ -141,20 +156,24 @@ class TrustedNetworksAuthProvider(AuthProvider):
Raise InvalidAuthError if trusted_networks is not configured.
"""
if not self.trusted_networks:
raise InvalidAuthError('trusted_networks is not configured')
raise InvalidAuthError("trusted_networks is not configured")
if not any(ip_addr in trusted_network for trusted_network
in self.trusted_networks):
raise InvalidAuthError('Not in trusted_networks')
if not any(
ip_addr in trusted_network for trusted_network in self.trusted_networks
):
raise InvalidAuthError("Not in trusted_networks")
class TrustedNetworksLoginFlow(LoginFlow):
"""Handler for the login flow."""
def __init__(self, auth_provider: TrustedNetworksAuthProvider,
ip_addr: IPAddress,
available_users: Dict[str, Optional[str]],
allow_bypass_login: bool) -> None:
def __init__(
self,
auth_provider: TrustedNetworksAuthProvider,
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
@@ -162,27 +181,26 @@ class TrustedNetworksLoginFlow(LoginFlow):
self._allow_bypass_login = allow_bypass_login
async def async_step_init(
self, user_input: Optional[Dict[str, str]] = None) \
-> Dict[str, Any]:
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Handle the step of the form."""
try:
cast(TrustedNetworksAuthProvider, self._auth_provider)\
.async_validate_access(self._ip_address)
cast(
TrustedNetworksAuthProvider, self._auth_provider
).async_validate_access(self._ip_address)
except InvalidAuthError:
return self.async_abort(
reason='not_whitelisted'
)
return self.async_abort(reason="not_whitelisted")
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 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)}),
step_id="init",
data_schema=vol.Schema({"user": vol.In(self._available_users)}),
)

View File

@@ -1,13 +0,0 @@
"""Auth utils."""
import binascii
import os
def generate_secret(entropy: int = 32) -> str:
"""Generate a secret.
Backport of secrets.token_hex from Python 3.6
Event loop friendly.
"""
return binascii.hexlify(os.urandom(entropy)).decode('ascii')

View File

@@ -1,238 +1,251 @@
"""Provide methods to bootstrap a Home Assistant instance."""
import asyncio
import contextlib
import logging
import logging.handlers
import os
import sys
from time import time
from collections import OrderedDict
from typing import Any, Optional, Dict, Set
from time import monotonic
from typing import Any, Dict, Optional, Set
from async_timeout import timeout
import voluptuous as vol
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 import config as conf_util, config_entries, core, loader
from homeassistant.components import http
from homeassistant.const import (
EVENT_HOMEASSISTANT_CLOSE,
EVENT_HOMEASSISTANT_STOP,
REQUIRED_NEXT_PYTHON_DATE,
REQUIRED_NEXT_PYTHON_VER,
)
from homeassistant.exceptions import HomeAssistantError
from homeassistant.setup import DATA_SETUP, 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 import config_validation as cv
_LOGGER = logging.getLogger(__name__)
ERROR_LOG_FILENAME = 'home-assistant.log'
ERROR_LOG_FILENAME = "home-assistant.log"
# hass.data key for logging information.
DATA_LOGGING = 'logging'
DATA_LOGGING = "logging"
DEBUGGER_INTEGRATIONS = {'ptvsd', }
CORE_INTEGRATIONS = ('homeassistant', 'persistent_notification')
LOGGING_INTEGRATIONS = {'logger', 'system_log'}
DEBUGGER_INTEGRATIONS = {"ptvsd"}
CORE_INTEGRATIONS = ("homeassistant", "persistent_notification")
LOGGING_INTEGRATIONS = {"logger", "system_log", "sentry"}
STAGE_1_INTEGRATIONS = {
# To record data
'recorder',
"recorder",
# To make sure we forward data to other instances
'mqtt_eventstream',
"mqtt_eventstream",
# To provide account link implementations
"cloud",
}
async def async_from_config_dict(config: Dict[str, Any],
hass: core.HomeAssistant,
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.
async def async_setup_hass(
*,
config_dir: str,
verbose: bool,
log_rotate_days: int,
log_file: str,
log_no_color: bool,
skip_pip: bool,
safe_mode: bool,
) -> Optional[core.HomeAssistant]:
"""Set up Home Assistant."""
hass = core.HomeAssistant()
hass.config.config_dir = config_dir
Dynamically loads required components and its dependencies.
This method is a coroutine.
"""
start = time()
if enable_log:
async_enable_logging(hass, verbose, log_rotate_days, log_file,
log_no_color)
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")
_LOGGER.warning(
"Skipping pip installation of required modules. This may cause issues"
)
core_config = config.get(core.DOMAIN, {})
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, api_password, trusted_networks)
except vol.Invalid as config_err:
conf_util.async_log_exception(
config_err, 'homeassistant', core_config, hass)
return None
except HomeAssistantError:
_LOGGER.error("Home Assistant core failed to initialize. "
"Further initialization aborted")
if not await conf_util.async_ensure_config_exists(hass):
_LOGGER.error("Error getting configuration path")
return None
# Make a copy because we are mutating it.
config = OrderedDict(config)
_LOGGER.info("Config directory: %s", config_dir)
# Merge packages
await conf_util.merge_packages_config(
hass, config, core_config.get(conf_util.CONF_PACKAGES, {}))
config_dict = None
basic_setup_success = False
hass.config_entries = config_entries.ConfigEntries(hass, config)
await hass.config_entries.async_initialize()
if not safe_mode:
await hass.async_add_executor_job(conf_util.process_ha_config_upgrade, hass)
await _async_set_up_integrations(hass, config)
stop = time()
_LOGGER.info("Home Assistant initialized in %.2fs", stop-start)
if sys.version_info[:3] < (3, 6, 0):
hass.components.persistent_notification.async_create(
"Python 3.5 support is deprecated and will "
"be removed in the first release after August 1. Please "
"upgrade Python.", "Python version", "python_version"
)
# 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."
try:
config_dict = await conf_util.async_hass_config_yaml(hass)
except HomeAssistantError as err:
_LOGGER.error(
"Failed to parse configuration.yaml: %s. Activating safe mode", err,
)
msg.append('\n'.join('- {} -> {}'.format(*item)
for item
in cv.INVALID_ENTITY_IDS_FOUND.items()))
else:
if not is_virtual_env():
await async_mount_local_lib_path(config_dir)
if cv.INVALID_SLUGS_FOUND:
msg.append(
"Your configuration contains invalid slugs. "
"Please find and update the following. "
"This will become a breaking change."
basic_setup_success = (
await async_from_config_dict(config_dict, hass) is not None
)
msg.append('\n'.join('- {} -> {}'.format(*item)
for item in cv.INVALID_SLUGS_FOUND.items()))
finally:
clear_secret_cache()
hass.components.persistent_notification.async_create(
'\n\n'.join(msg), "Config Warning", "config_warning"
)
if config_dict is None:
safe_mode = True
# 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))
elif not basic_setup_success:
_LOGGER.warning("Unable to set up core integrations. Activating safe mode")
safe_mode = True
hass.components.persistent_notification.async_create(
'\n\n'.join(msg), "Config Warning", "config_warning"
elif (
"frontend" in hass.data.get(DATA_SETUP, {})
and "frontend" not in hass.config.components
):
_LOGGER.warning("Detected that frontend did not load. Activating safe mode")
# Ask integrations to shut down. It's messy but we can't
# do a clean stop without knowing what is broken
hass.async_track_tasks()
hass.bus.async_fire(EVENT_HOMEASSISTANT_STOP, {})
with contextlib.suppress(asyncio.TimeoutError):
async with timeout(10):
await hass.async_block_till_done()
safe_mode = True
hass = core.HomeAssistant()
hass.config.config_dir = config_dir
if safe_mode:
_LOGGER.info("Starting in safe mode")
hass.config.safe_mode = True
http_conf = (await http.async_get_last_config(hass)) or {}
await async_from_config_dict(
{"safe_mode": {}, "http": http_conf}, hass,
)
return hass
async def async_from_config_file(config_path: str,
hass: core.HomeAssistant,
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.
async def async_from_config_dict(
config: Dict[str, Any], hass: core.HomeAssistant
) -> Optional[core.HomeAssistant]:
"""Try to configure Home Assistant from a configuration dictionary.
Will add functionality to 'hass' parameter.
Dynamically loads required components and its dependencies.
This method is a coroutine.
"""
# Set config dir to directory holding config file
config_dir = os.path.abspath(os.path.dirname(config_path))
hass.config.config_dir = config_dir
start = monotonic()
if not is_virtual_env():
await async_mount_local_lib_path(config_dir)
hass.config_entries = config_entries.ConfigEntries(hass, config)
await hass.config_entries.async_initialize()
async_enable_logging(hass, verbose, log_rotate_days, log_file,
log_no_color)
# Set up core.
_LOGGER.debug("Setting up %s", CORE_INTEGRATIONS)
await hass.async_add_executor_job(
conf_util.process_ha_config_upgrade, hass)
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. ")
return None
_LOGGER.debug("Home Assistant core initialized")
core_config = config.get(core.DOMAIN, {})
try:
config_dict = await hass.async_add_executor_job(
conf_util.load_yaml_config_file, config_path)
except HomeAssistantError as err:
_LOGGER.error("Error loading %s: %s", config_path, err)
await conf_util.async_process_ha_core_config(hass, core_config)
except vol.Invalid as config_err:
conf_util.async_log_exception(config_err, "homeassistant", core_config, hass)
return None
except HomeAssistantError:
_LOGGER.error(
"Home Assistant core failed to initialize. "
"Further initialization aborted"
)
return None
finally:
clear_secret_cache()
return await async_from_config_dict(
config_dict, hass, enable_log=False, skip_pip=skip_pip)
await _async_set_up_integrations(hass, config)
stop = monotonic()
_LOGGER.info("Home Assistant initialized in %.2fs", stop - start)
if REQUIRED_NEXT_PYTHON_DATE and sys.version_info[:3] < REQUIRED_NEXT_PYTHON_VER:
msg = (
"Support for the running Python version "
f"{'.'.join(str(x) for x in sys.version_info[:3])} is deprecated and will "
f"be removed in the first release after {REQUIRED_NEXT_PYTHON_DATE}. "
"Please upgrade Python to "
f"{'.'.join(str(x) for x in REQUIRED_NEXT_PYTHON_VER)} or "
"higher."
)
_LOGGER.warning(msg)
hass.components.persistent_notification.async_create(
msg, "Python version", "python_version"
)
return hass
@core.callback
def async_enable_logging(hass: core.HomeAssistant,
verbose: bool = False,
log_rotate_days: Optional[int] = None,
log_file: Optional[str] = None,
log_no_color: bool = False) -> None:
def async_enable_logging(
hass: core.HomeAssistant,
verbose: bool = False,
log_rotate_days: Optional[int] = None,
log_file: Optional[str] = None,
log_no_color: bool = False,
) -> None:
"""Set up the logging.
This method must be run in the event loop.
"""
fmt = ("%(asctime)s %(levelname)s (%(threadName)s) "
"[%(name)s] %(message)s")
datefmt = '%Y-%m-%d %H:%M:%S'
fmt = "%(asctime)s %(levelname)s (%(threadName)s) [%(name)s] %(message)s"
datefmt = "%Y-%m-%d %H:%M:%S"
if not log_no_color:
try:
from colorlog import ColoredFormatter
# basicConfig must be called after importing colorlog in order to
# ensure that the handlers it sets up wraps the correct streams.
logging.basicConfig(level=logging.INFO)
colorfmt = "%(log_color)s{}%(reset)s".format(fmt)
logging.getLogger().handlers[0].setFormatter(ColoredFormatter(
colorfmt,
datefmt=datefmt,
reset=True,
log_colors={
'DEBUG': 'cyan',
'INFO': 'green',
'WARNING': 'yellow',
'ERROR': 'red',
'CRITICAL': 'red',
}
))
colorfmt = f"%(log_color)s{fmt}%(reset)s"
logging.getLogger().handlers[0].setFormatter(
ColoredFormatter(
colorfmt,
datefmt=datefmt,
reset=True,
log_colors={
"DEBUG": "cyan",
"INFO": "green",
"WARNING": "yellow",
"ERROR": "red",
"CRITICAL": "red",
},
)
)
except ImportError:
pass
# If the above initialization failed for any reason, setup the default
# formatting. If the above succeeds, this wil result in a no-op.
# formatting. If the above succeeds, this will result in a no-op.
logging.basicConfig(format=fmt, datefmt=datefmt, level=logging.INFO)
# Suppress overly verbose logs from libraries that aren't helpful
logging.getLogger('requests').setLevel(logging.WARNING)
logging.getLogger('urllib3').setLevel(logging.WARNING)
logging.getLogger('aiohttp.access').setLevel(logging.WARNING)
logging.getLogger("requests").setLevel(logging.WARNING)
logging.getLogger("urllib3").setLevel(logging.WARNING)
logging.getLogger("aiohttp.access").setLevel(logging.WARNING)
# Log errors to a file if we have write access to file or config dir
if log_file is None:
@@ -245,16 +258,16 @@ def async_enable_logging(hass: core.HomeAssistant,
# Check if we can write to the error log if it exists or that
# we can create files in the containing directory if not.
if (err_path_exists and os.access(err_log_path, os.W_OK)) or \
(not err_path_exists and os.access(err_dir, os.W_OK)):
if (err_path_exists and os.access(err_log_path, os.W_OK)) or (
not err_path_exists and os.access(err_dir, os.W_OK)
):
if log_rotate_days:
err_handler = logging.handlers.TimedRotatingFileHandler(
err_log_path, when='midnight',
backupCount=log_rotate_days) # type: logging.FileHandler
err_handler: logging.FileHandler = logging.handlers.TimedRotatingFileHandler(
err_log_path, when="midnight", backupCount=log_rotate_days
)
else:
err_handler = logging.FileHandler(
err_log_path, mode='w', delay=True)
err_handler = logging.FileHandler(err_log_path, mode="w", delay=True)
err_handler.setLevel(logging.INFO if verbose else logging.WARNING)
err_handler.setFormatter(logging.Formatter(fmt, datefmt=datefmt))
@@ -263,21 +276,19 @@ def async_enable_logging(hass: core.HomeAssistant,
async def async_stop_async_handler(_: Any) -> None:
"""Cleanup async handler."""
logging.getLogger('').removeHandler(async_handler) # type: ignore
logging.getLogger("").removeHandler(async_handler) # type: ignore
await async_handler.async_close(blocking=True)
hass.bus.async_listen_once(
EVENT_HOMEASSISTANT_CLOSE, async_stop_async_handler)
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_CLOSE, async_stop_async_handler)
logger = logging.getLogger('')
logger = logging.getLogger("")
logger.addHandler(async_handler) # type: ignore
logger.setLevel(logging.INFO)
# Save the log file location for access by other components.
hass.data[DATA_LOGGING] = err_log_path
else:
_LOGGER.error(
"Unable to set up error log %s (access denied)", err_log_path)
_LOGGER.error("Unable to set up error log %s (access denied)", err_log_path)
async def async_mount_local_lib_path(config_dir: str) -> str:
@@ -285,7 +296,7 @@ async def async_mount_local_lib_path(config_dir: str) -> str:
This function is a coroutine.
"""
deps_dir = os.path.join(config_dir, 'deps')
deps_dir = os.path.join(config_dir, "deps")
lib_dir = await async_get_user_site(deps_dir)
if lib_dir not in sys.path:
sys.path.insert(0, lib_dir)
@@ -296,21 +307,22 @@ async def async_mount_local_lib_path(config_dir: str) -> str:
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)
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
if not hass.config.safe_mode:
domains.update(hass.config_entries.async_domains())
# Make sure the Hass.io component is loaded
if 'HASSIO' in os.environ:
domains.add('hassio')
if "HASSIO" in os.environ:
domains.add("hassio")
return domains
async def _async_set_up_integrations(
hass: core.HomeAssistant, config: Dict[str, Any]) -> None:
hass: core.HomeAssistant, config: Dict[str, Any]
) -> None:
"""Set up all the integrations."""
domains = _get_domains(hass, config)
@@ -318,30 +330,17 @@ async def _async_set_up_integrations(
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])
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")
resolved_domains_task = asyncio.gather(
*(loader.async_component_dependencies(hass, domain) for domain in domains),
return_exceptions=True,
)
# Finish resolving domains
for dep_domains in await resolved_domains_task:
@@ -358,36 +357,32 @@ async def _async_set_up_integrations(
if logging_domains:
_LOGGER.info("Setting up %s", logging_domains)
await asyncio.gather(*[
async_setup_component(hass, domain, config)
for domain in 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())
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
])
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]]
after_dependencies: 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):
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
)
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:
@@ -397,8 +392,7 @@ async def _async_set_up_integrations(
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):
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:
@@ -406,10 +400,9 @@ async def _async_set_up_integrations(
_LOGGER.debug("Setting up %s", domains_to_load)
await asyncio.gather(*[
async_setup_component(hass, domain, config)
for domain in 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
@@ -419,10 +412,9 @@ async def _async_set_up_integrations(
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
])
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

@@ -11,6 +11,8 @@ import logging
from homeassistant.core import split_entity_id
# mypy: allow-untyped-defs
_LOGGER = logging.getLogger(__name__)
@@ -31,12 +33,11 @@ def is_on(hass, entity_id=None):
component = getattr(hass.components, domain)
except ImportError:
_LOGGER.error('Failed to call %s.is_on: component not found',
domain)
_LOGGER.error("Failed to call %s.is_on: component not found", domain)
continue
if not hasattr(component, 'is_on'):
_LOGGER.warning("Component %s has no is_on method.", domain)
if not hasattr(component, "is_on"):
_LOGGER.warning("Integration %s has no is_on method.", domain)
continue
if component.is_on(ent_id):

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0430 \u0435 \u0441\u0430\u043c\u043e \u0435\u0434\u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043d\u0430 Abode."
},
"error": {
"connection_error": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u0441 Abode.",
"identifier_exists": "\u041f\u0440\u043e\u0444\u0438\u043b\u044a\u0442 \u0435 \u0432\u0435\u0447\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0430\u043d.",
"invalid_credentials": "\u041d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u0438 \u0434\u0430\u043d\u043d\u0438."
},
"step": {
"user": {
"data": {
"password": "\u041f\u0430\u0440\u043e\u043b\u0430",
"username": "E-mail \u0430\u0434\u0440\u0435\u0441"
},
"title": "\u041f\u043e\u043f\u044a\u043b\u043d\u0435\u0442\u0435 \u0412\u0430\u0448\u0430\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0437\u0430 \u0432\u0445\u043e\u0434 \u0432 Abode"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Nom\u00e9s es permet una \u00fanica configuraci\u00f3 d'Abode."
},
"error": {
"connection_error": "No es pot connectar amb Abode.",
"identifier_exists": "Compte ja registrat.",
"invalid_credentials": "Credencials inv\u00e0lides."
},
"step": {
"user": {
"data": {
"password": "Contrasenya",
"username": "Correu electr\u00f2nic"
},
"title": "Introducci\u00f3 de la informaci\u00f3 d'inici de sessi\u00f3 a Abode."
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Je povolena pouze jedna konfigurace Abode."
},
"error": {
"connection_error": "Nelze se p\u0159ipojit k Abode.",
"identifier_exists": "\u00da\u010det je ji\u017e zaregistrov\u00e1n.",
"invalid_credentials": "Neplatn\u00e9 p\u0159ihla\u0161ovac\u00ed \u00fadaje."
},
"step": {
"user": {
"data": {
"password": "Heslo",
"username": "E-mailov\u00e1 adresa"
},
"title": "Vypl\u0148te p\u0159ihla\u0161ovac\u00ed \u00fadaje Abode"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Det er kun n\u00f8dvendigt med en ops\u00e6tning af Abode."
},
"error": {
"connection_error": "Kunne ikke oprette forbindelse til Abode.",
"identifier_exists": "Konto er allerede registreret.",
"invalid_credentials": "Ugyldige legitimationsoplysninger."
},
"step": {
"user": {
"data": {
"password": "Adgangskode",
"username": "Email-adresse"
},
"title": "Udfyld dine Abode-loginoplysninger"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Es ist nur eine einzige Konfiguration von Abode erlaubt."
},
"error": {
"connection_error": "Es kann keine Verbindung zu Abode hergestellt werden.",
"identifier_exists": "Das Konto ist bereits registriert.",
"invalid_credentials": "Ung\u00fcltige Anmeldeinformationen"
},
"step": {
"user": {
"data": {
"password": "Passwort",
"username": "E-Mail-Adresse"
},
"title": "Gib deine Abode-Anmeldeinformationen ein"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Only a single configuration of Abode is allowed."
},
"error": {
"connection_error": "Unable to connect to Abode.",
"identifier_exists": "Account already registered.",
"invalid_credentials": "Invalid credentials."
},
"step": {
"user": {
"data": {
"password": "Password",
"username": "Email Address"
},
"title": "Fill in your Abode login information"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Solo se permite una \u00fanica configuraci\u00f3n de Abode."
},
"error": {
"connection_error": "No se puede conectar a Abode.",
"identifier_exists": "Cuenta ya registrada.",
"invalid_credentials": "Credenciales inv\u00e1lidas."
},
"step": {
"user": {
"data": {
"password": "Contrase\u00f1a",
"username": "Direcci\u00f3n de correo electr\u00f3nico"
},
"title": "Complete su informaci\u00f3n de inicio de sesi\u00f3n de Abode"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Solo se permite una \u00fanica configuraci\u00f3n de Abode."
},
"error": {
"connection_error": "No se puede conectar a Abode.",
"identifier_exists": "Cuenta ya registrada.",
"invalid_credentials": "Credenciales inv\u00e1lidas."
},
"step": {
"user": {
"data": {
"password": "Contrase\u00f1a",
"username": "Direcci\u00f3n de correo electr\u00f3nico"
},
"title": "Rellene la informaci\u00f3n de acceso Abode"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Une seule configuration d'Abode est autoris\u00e9e."
},
"error": {
"connection_error": "Impossible de se connecter \u00e0 Abode.",
"identifier_exists": "Compte d\u00e9j\u00e0 enregistr\u00e9.",
"invalid_credentials": "Informations d'identification invalides."
},
"step": {
"user": {
"data": {
"password": "Mot de passe",
"username": "Adresse e-mail"
},
"title": "Remplissez vos informations de connexion Abode"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Csak egyetlen Abode konfigur\u00e1ci\u00f3 enged\u00e9lyezett."
},
"error": {
"connection_error": "Nem lehet csatlakozni az Abode-hez.",
"identifier_exists": "Fi\u00f3k m\u00e1r regisztr\u00e1lva van",
"invalid_credentials": "\u00c9rv\u00e9nytelen hiteles\u00edt\u0151 adatok"
},
"step": {
"user": {
"data": {
"password": "Jelsz\u00f3",
"username": "Email c\u00edm"
},
"title": "T\u00f6ltse ki az Abode bejelentkez\u00e9si adatait"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "\u00c8 consentita una sola configurazione di Abode."
},
"error": {
"connection_error": "Impossibile connettersi ad Abode.",
"identifier_exists": "Account gi\u00e0 registrato",
"invalid_credentials": "Credenziali non valide"
},
"step": {
"user": {
"data": {
"password": "Password",
"username": "Indirizzo email"
},
"title": "Inserisci le tue informazioni di accesso Abode"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "\ud558\ub098\uc758 Abode \ub9cc \uad6c\uc131 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4."
},
"error": {
"connection_error": "Abode \uc5d0 \uc5f0\uacb0\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.",
"identifier_exists": "\uacc4\uc815\uc774 \uc774\ubbf8 \ub4f1\ub85d\ub418\uc5c8\uc2b5\ub2c8\ub2e4",
"invalid_credentials": "\uc0ac\uc6a9\uc790 \uc774\ub984 \ud639\uc740 \ube44\ubc00\ubc88\ud638\uac00 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4"
},
"step": {
"user": {
"data": {
"password": "\ube44\ubc00\ubc88\ud638",
"username": "\uc774\uba54\uc77c \uc8fc\uc18c"
},
"title": "Abode \uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \uc785\ub825\ud574\uc8fc\uc138\uc694"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "N\u00ebmmen eng eenzeg Konfiguratioun vun ZHA ass erlaabt."
},
"error": {
"connection_error": "Kann sech net mat Abode verbannen.",
"identifier_exists": "Konto ass scho registr\u00e9iert",
"invalid_credentials": "Ong\u00eblteg Login Informatioune"
},
"step": {
"user": {
"data": {
"password": "Passwuert",
"username": "E-Mail Adress"
},
"title": "F\u00ebllt \u00e4r Abode Login Informatiounen aus."
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,12 @@
{
"config": {
"step": {
"user": {
"data": {
"password": "Parole",
"username": "E-pasta adrese"
}
}
}
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Slechts een enkele configuratie van Abode is toegestaan."
},
"error": {
"connection_error": "Kan geen verbinding maken met Abode.",
"identifier_exists": "Account is al geregistreerd.",
"invalid_credentials": "Ongeldige inloggegevens."
},
"step": {
"user": {
"data": {
"password": "Wachtwoord",
"username": "E-mailadres"
},
"title": "Vul uw Abode-inloggegevens in"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,5 @@
{
"config": {
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Bare en enkelt konfigurasjon av Abode er tillatt."
},
"error": {
"connection_error": "Kan ikke koble til Abode.",
"identifier_exists": "Kontoen er allerede registrert.",
"invalid_credentials": "Ugyldig brukerinformasjon"
},
"step": {
"user": {
"data": {
"password": "Passord",
"username": "E-postadresse"
},
"title": "Fyll ut innloggingsinformasjonen for Abode"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Dozwolona jest tylko jedna konfiguracja Abode."
},
"error": {
"connection_error": "Nie mo\u017cna po\u0142\u0105czy\u0107 si\u0119 z Abode.",
"identifier_exists": "Konto jest ju\u017c zarejestrowane.",
"invalid_credentials": "Nieprawid\u0142owe dane uwierzytelniaj\u0105ce"
},
"step": {
"user": {
"data": {
"password": "Has\u0142o",
"username": "Adres e-mail"
},
"title": "Wprowad\u017a informacje logowania Abode"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"single_instance_allowed": "Somente uma \u00fanica configura\u00e7\u00e3o de Abode \u00e9 permitida."
},
"error": {
"connection_error": "N\u00e3o foi poss\u00edvel conectar ao Abode.",
"identifier_exists": "Conta j\u00e1 cadastrada.",
"invalid_credentials": "Credenciais inv\u00e1lidas."
},
"step": {
"user": {
"data": {
"password": "Senha",
"username": "Endere\u00e7o de e-mail"
}
}
},
"title": ""
}
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"error": {
"identifier_exists": "Conta j\u00e1 registada"
},
"step": {
"user": {
"data": {
"password": "Palavra-passe",
"username": "Endere\u00e7o de e-mail"
}
}
},
"title": ""
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430."
},
"error": {
"connection_error": "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a Abode.",
"identifier_exists": "\u0423\u0447\u0451\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0443\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430.",
"invalid_credentials": "\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435."
},
"step": {
"user": {
"data": {
"password": "\u041f\u0430\u0440\u043e\u043b\u044c",
"username": "\u0410\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b"
},
"title": "Abode"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Dovoljena je samo ena konfiguracija Abode."
},
"error": {
"connection_error": "Ni mogo\u010de vzpostaviti povezave z Abode.",
"identifier_exists": "Ra\u010dun je \u017ee registriran.",
"invalid_credentials": "Neveljavne poverilnice."
},
"step": {
"user": {
"data": {
"password": "Geslo",
"username": "E-po\u0161tni naslov"
},
"title": "Izpolnite svoje podatke za prijavo v Abode"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "Endast en enda konfiguration av Abode \u00e4r till\u00e5ten."
},
"error": {
"connection_error": "Det gick inte att ansluta till Abode.",
"identifier_exists": "Kontot \u00e4r redan registrerat.",
"invalid_credentials": "Ogiltiga autentiseringsuppgifter."
},
"step": {
"user": {
"data": {
"password": "L\u00f6senord",
"username": "E-postadress"
},
"title": "Fyll i din inloggningsinformation f\u00f6r Abode"
}
},
"title": "Abode"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"abort": {
"single_instance_allowed": "\u50c5\u5141\u8a31\u8a2d\u5b9a\u4e00\u7d44 Abode\u3002"
},
"error": {
"connection_error": "\u7121\u6cd5\u9023\u7dda\u81f3 Abode\u3002",
"identifier_exists": "\u5e33\u865f\u5df2\u8a3b\u518a\u3002",
"invalid_credentials": "\u6191\u8b49\u7121\u6548\u3002"
},
"step": {
"user": {
"data": {
"password": "\u5bc6\u78bc",
"username": "\u96fb\u5b50\u90f5\u4ef6\u5730\u5740"
},
"title": "\u586b\u5beb Abode \u767b\u5165\u8cc7\u8a0a"
}
},
"title": "Abode"
}
}

View File

@@ -1,156 +1,164 @@
"""Support for Abode Home Security system."""
import logging
"""Support for the Abode Security System."""
from asyncio import gather
from copy import deepcopy
from functools import partial
from requests.exceptions import HTTPError, ConnectTimeout
from abodepy import Abode
from abodepy.exceptions import AbodeException
import abodepy.helpers.timeline as TIMELINE
from requests.exceptions import ConnectTimeout, HTTPError
import voluptuous as vol
from homeassistant.config_entries import SOURCE_IMPORT
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)
ATTR_ATTRIBUTION,
ATTR_DATE,
ATTR_ENTITY_ID,
ATTR_TIME,
CONF_PASSWORD,
CONF_USERNAME,
EVENT_HOMEASSISTANT_STOP,
)
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers import discovery
from homeassistant.helpers.dispatcher import dispatcher_send
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
from .const import ATTRIBUTION, DEFAULT_CACHEDB, DOMAIN, LOGGER
ATTRIBUTION = "Data provided by goabode.com"
CONF_POLLING = "polling"
CONF_POLLING = 'polling'
SERVICE_SETTINGS = "change_setting"
SERVICE_CAPTURE_IMAGE = "capture_image"
SERVICE_TRIGGER_AUTOMATION = "trigger_automation"
DOMAIN = 'abode'
DEFAULT_CACHEDB = './abodepy_cache.pickle'
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_APP_TYPE = "app_type"
ATTR_EVENT_BY = "event_by"
ATTR_VALUE = "value"
NOTIFICATION_ID = 'abode_notification'
NOTIFICATION_TITLE = 'Abode Security Setup'
CONFIG_SCHEMA = vol.Schema(
{
DOMAIN: vol.Schema(
{
vol.Required(CONF_USERNAME): cv.string,
vol.Required(CONF_PASSWORD): cv.string,
vol.Optional(CONF_POLLING, default=False): cv.boolean,
}
)
},
extra=vol.ALLOW_EXTRA,
)
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'
CHANGE_SETTING_SCHEMA = vol.Schema(
{vol.Required(ATTR_SETTING): cv.string, vol.Required(ATTR_VALUE): cv.string}
)
SERVICE_SETTINGS = 'change_setting'
SERVICE_CAPTURE_IMAGE = 'capture_image'
SERVICE_TRIGGER = 'trigger_quick_action'
CAPTURE_IMAGE_SCHEMA = vol.Schema({ATTR_ENTITY_ID: cv.entity_ids})
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,
})
AUTOMATION_SCHEMA = vol.Schema({ATTR_ENTITY_ID: cv.entity_ids})
ABODE_PLATFORMS = [
'alarm_control_panel', 'binary_sensor', 'lock', 'switch', 'cover',
'camera', 'light', 'sensor'
"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):
def __init__(self, abode, polling):
"""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.abode = abode
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))
self.entity_ids = set()
self.logout_listener = None
def setup(hass, config):
"""Set up Abode component."""
from abodepy.exceptions import AbodeException
async def async_setup(hass, config):
"""Set up Abode integration."""
if DOMAIN not in config:
return True
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)
hass.async_create_task(
hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_IMPORT}, data=deepcopy(conf)
)
)
return True
async def async_setup_entry(hass, config_entry):
"""Set up Abode integration from a config entry."""
username = config_entry.data.get(CONF_USERNAME)
password = config_entry.data.get(CONF_PASSWORD)
polling = config_entry.data.get(CONF_POLLING)
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))
abode = await hass.async_add_executor_job(
Abode, username, password, True, True, True, cache
)
hass.data[DOMAIN] = AbodeSystem(abode, polling)
hass.components.persistent_notification.create(
'Error: {}<br />'
'You will need to restart hass after fixing.'
''.format(ex),
title=NOTIFICATION_TITLE,
notification_id=NOTIFICATION_ID)
except (AbodeException, ConnectTimeout, HTTPError) as ex:
LOGGER.error("Unable to connect to Abode: %s", str(ex))
return False
setup_hass_services(hass)
setup_hass_events(hass)
setup_abode_events(hass)
for platform in ABODE_PLATFORMS:
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(config_entry, platform)
)
await setup_hass_events(hass)
await hass.async_add_executor_job(setup_hass_services, hass)
await hass.async_add_executor_job(setup_abode_events, hass)
return True
async def async_unload_entry(hass, config_entry):
"""Unload a config entry."""
hass.services.async_remove(DOMAIN, SERVICE_SETTINGS)
hass.services.async_remove(DOMAIN, SERVICE_CAPTURE_IMAGE)
hass.services.async_remove(DOMAIN, SERVICE_TRIGGER_AUTOMATION)
tasks = []
for platform in ABODE_PLATFORMS:
discovery.load_platform(hass, platform, DOMAIN, {}, config)
tasks.append(
hass.config_entries.async_forward_entry_unload(config_entry, platform)
)
await gather(*tasks)
await hass.async_add_executor_job(hass.data[DOMAIN].abode.events.stop)
await hass.async_add_executor_job(hass.data[DOMAIN].abode.logout)
hass.data[DOMAIN].logout_listener()
hass.data.pop(DOMAIN)
return True
def setup_hass_services(hass):
"""Home assistant services."""
from abodepy.exceptions import AbodeException
"""Home Assistant services."""
def change_setting(call):
"""Change an Abode system setting."""
@@ -160,46 +168,51 @@ def setup_hass_services(hass):
try:
hass.data[DOMAIN].abode.set_setting(setting, value)
except AbodeException as ex:
_LOGGER.warning(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]
target_entities = [
entity_id
for entity_id in hass.data[DOMAIN].entity_ids
if entity_id in entity_ids
]
for device in target_devices:
device.capture()
for entity_id in target_entities:
signal = f"abode_camera_capture_{entity_id}"
dispatcher_send(hass, signal)
def trigger_quick_action(call):
"""Trigger a quick action."""
def trigger_automation(call):
"""Trigger an Abode automation."""
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]
target_entities = [
entity_id
for entity_id in hass.data[DOMAIN].entity_ids
if entity_id in entity_ids
]
for device in target_devices:
device.trigger()
for entity_id in target_entities:
signal = f"abode_trigger_automation_{entity_id}"
dispatcher_send(hass, signal)
hass.services.register(
DOMAIN, SERVICE_SETTINGS, change_setting,
schema=CHANGE_SETTING_SCHEMA)
DOMAIN, SERVICE_SETTINGS, change_setting, schema=CHANGE_SETTING_SCHEMA
)
hass.services.register(
DOMAIN, SERVICE_CAPTURE_IMAGE, capture_image,
schema=CAPTURE_IMAGE_SCHEMA)
DOMAIN, SERVICE_CAPTURE_IMAGE, capture_image, schema=CAPTURE_IMAGE_SCHEMA
)
hass.services.register(
DOMAIN, SERVICE_TRIGGER, trigger_quick_action,
schema=TRIGGER_SCHEMA)
DOMAIN, SERVICE_TRIGGER_AUTOMATION, trigger_automation, schema=AUTOMATION_SCHEMA
)
def setup_hass_events(hass):
async 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."""
@@ -207,58 +220,79 @@ def setup_hass_events(hass):
hass.data[DOMAIN].abode.events.stop()
hass.data[DOMAIN].abode.logout()
_LOGGER.info("Logged out of Abode")
LOGGER.info("Logged out of Abode")
if not hass.data[DOMAIN].polling:
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, startup)
await hass.async_add_executor_job(hass.data[DOMAIN].abode.events.start)
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, logout)
hass.data[DOMAIN].logout_listener = hass.bus.async_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, ''),
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_APP_TYPE: event_json.get(ATTR_APP_TYPE, ""),
ATTR_EVENT_BY: event_json.get(ATTR_EVENT_BY, ""),
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]
events = [
TIMELINE.ALARM_GROUP,
TIMELINE.ALARM_END_GROUP,
TIMELINE.PANEL_FAULT_GROUP,
TIMELINE.PANEL_RESTORE_GROUP,
TIMELINE.AUTOMATION_GROUP,
TIMELINE.DISARM_GROUP,
TIMELINE.ARM_GROUP,
TIMELINE.TEST_GROUP,
TIMELINE.CAPTURE_GROUP,
TIMELINE.DEVICE_GROUP,
TIMELINE.AUTOMATION_EDIT_GROUP,
]
for event in events:
hass.data[DOMAIN].abode.events.add_event_callback(
event,
partial(event_callback, event))
event, partial(event_callback, event)
)
class AbodeDevice(Entity):
"""Representation of an Abode device."""
def __init__(self, data, device):
"""Initialize a sensor for Abode device."""
"""Initialize Abode device."""
self._data = data
self._device = device
async def async_added_to_hass(self):
"""Subscribe Abode events."""
"""Subscribe to device events."""
self.hass.async_add_job(
self._data.abode.events.add_device_callback,
self._device.device_id, self._update_callback
self._device.device_id,
self._update_callback,
)
self.hass.data[DOMAIN].entity_ids.add(self.entity_id)
async def async_will_remove_from_hass(self):
"""Unsubscribe from device events."""
self.hass.async_add_job(
self._data.abode.events.remove_all_device_callbacks, self._device.device_id
)
@property
@@ -267,12 +301,12 @@ class AbodeDevice(Entity):
return self._data.polling
def update(self):
"""Update automation state."""
"""Update device and automation states."""
self._device.refresh()
@property
def name(self):
"""Return the name of the sensor."""
"""Return the name of the device."""
return self._device.name
@property
@@ -280,10 +314,25 @@ class AbodeDevice(Entity):
"""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
"device_id": self._device.device_id,
"battery_low": self._device.battery_low,
"no_response": self._device.no_response,
"device_type": self._device.type,
}
@property
def unique_id(self):
"""Return a unique ID to use for this device."""
return self._device.device_uuid
@property
def device_info(self):
"""Return device registry information for this entity."""
return {
"identifiers": {(DOMAIN, self._device.device_id)},
"manufacturer": "Abode",
"name": self._device.name,
"device_type": self._device.type,
}
def _update_callback(self, device):
@@ -301,12 +350,14 @@ class AbodeAutomation(Entity):
self._event = event
async def async_added_to_hass(self):
"""Subscribe Abode events."""
"""Subscribe to a group of Abode timeline events."""
if self._event:
self.hass.async_add_job(
self._data.abode.events.add_event_callback,
self._event, self._update_callback
self._event,
self._update_callback,
)
self.hass.data[DOMAIN].entity_ids.add(self.entity_id)
@property
def should_poll(self):
@@ -319,7 +370,7 @@ class AbodeAutomation(Entity):
@property
def name(self):
"""Return the name of the sensor."""
"""Return the name of the automation."""
return self._automation.name
@property
@@ -327,12 +378,15 @@ class AbodeAutomation(Entity):
"""Return the state attributes."""
return {
ATTR_ATTRIBUTION: ATTRIBUTION,
'automation_id': self._automation.automation_id,
'type': self._automation.type,
'sub_type': self._automation.sub_type
"type": "CUE automation",
}
@property
def unique_id(self):
"""Return a unique ID to use for this automation."""
return self._automation.automation_id
def _update_callback(self, device):
"""Update the device state."""
"""Update the automation state."""
self._automation.refresh()
self.schedule_update_ha_state()

View File

@@ -1,37 +1,33 @@
"""Support for Abode Security System alarm control panels."""
import logging
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_HOME,
)
from homeassistant.const import (
ATTR_ATTRIBUTION, STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME,
STATE_ALARM_DISARMED)
ATTR_ATTRIBUTION,
STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME,
STATE_ALARM_DISARMED,
)
from . import ATTRIBUTION, DOMAIN as ABODE_DOMAIN, AbodeDevice
from . import AbodeDevice
from .const import ATTRIBUTION, DOMAIN
_LOGGER = logging.getLogger(__name__)
ICON = 'mdi:security'
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)
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode alarm control panel device."""
data = hass.data[DOMAIN]
async_add_entities(
[AbodeAlarm(data, await hass.async_add_executor_job(data.abode.get_alarm))]
)
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."""
@@ -50,6 +46,16 @@ class AbodeAlarm(AbodeDevice, alarm.AlarmControlPanel):
state = None
return state
@property
def code_arm_required(self):
"""Whether the code is required for arm actions."""
return False
@property
def supported_features(self) -> int:
"""Return the list of supported features."""
return SUPPORT_ALARM_ARM_HOME | SUPPORT_ALARM_ARM_AWAY
def alarm_disarm(self, code=None):
"""Send disarm command."""
self._device.set_standby()
@@ -62,17 +68,12 @@ class AbodeAlarm(AbodeDevice, alarm.AlarmControlPanel):
"""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,
"device_id": self._device.device_id,
"battery_backup": self._device.battery,
"cellular_backup": self._device.is_cellular,
}

View File

@@ -1,42 +1,30 @@
"""Support for Abode Security System binary sensors."""
import logging
import abodepy.helpers.constants as CONST
from homeassistant.components.binary_sensor import BinarySensorDevice
from . import DOMAIN as ABODE_DOMAIN, AbodeAutomation, AbodeDevice
_LOGGER = logging.getLogger(__name__)
from . import AbodeDevice
from .const import DOMAIN
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
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode binary sensor devices."""
data = hass.data[DOMAIN]
data = hass.data[ABODE_DOMAIN]
device_types = [
CONST.TYPE_CONNECTIVITY,
CONST.TYPE_MOISTURE,
CONST.TYPE_MOTION,
CONST.TYPE_OCCUPANCY,
CONST.TYPE_OPENING,
]
device_types = [CONST.TYPE_CONNECTIVITY, CONST.TYPE_MOISTURE,
CONST.TYPE_MOTION, CONST.TYPE_OCCUPANCY,
CONST.TYPE_OPENING]
entities = []
devices = []
for device in data.abode.get_devices(generic_type=device_types):
if data.is_excluded(device):
continue
entities.append(AbodeBinarySensor(data, device))
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)
async_add_entities(entities)
class AbodeBinarySensor(AbodeDevice, BinarySensorDevice):
@@ -51,16 +39,3 @@ class AbodeBinarySensor(AbodeDevice, BinarySensorDevice):
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

@@ -1,36 +1,30 @@
"""Support for Abode Security System cameras."""
from datetime import timedelta
import logging
import abodepy.helpers.constants as CONST
import abodepy.helpers.timeline as TIMELINE
import requests
from homeassistant.components.camera import Camera
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.util import Throttle
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
from . import AbodeDevice
from .const import DOMAIN, LOGGER
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=90)
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode camera devices."""
import abodepy.helpers.constants as CONST
import abodepy.helpers.timeline as TIMELINE
data = hass.data[DOMAIN]
data = hass.data[ABODE_DOMAIN]
entities = []
devices = []
for device in data.abode.get_devices(generic_type=CONST.TYPE_CAMERA):
if data.is_excluded(device):
continue
entities.append(AbodeCamera(data, device, TIMELINE.CAPTURE_IMAGE))
devices.append(AbodeCamera(data, device, TIMELINE.CAPTURE_IMAGE))
data.devices.extend(devices)
add_entities(devices)
async_add_entities(entities)
class AbodeCamera(AbodeDevice, Camera):
@@ -49,9 +43,13 @@ class AbodeCamera(AbodeDevice, Camera):
self.hass.async_add_job(
self._data.abode.events.add_timeline_callback,
self._event, self._capture_callback
self._event,
self._capture_callback,
)
signal = f"abode_camera_capture_{self.entity_id}"
async_dispatcher_connect(self.hass, signal, self.capture)
def capture(self):
"""Request a new image capture."""
return self._device.capture()
@@ -66,12 +64,11 @@ class AbodeCamera(AbodeDevice, Camera):
"""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 = 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)
LOGGER.warning("Failed to get camera image: %s", err)
self._response = None
else:
self._response = None

View File

@@ -0,0 +1,77 @@
"""Config flow for the Abode Security System component."""
from abodepy import Abode
from abodepy.exceptions import AbodeException
from requests.exceptions import ConnectTimeout, HTTPError
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.core import callback
from .const import DEFAULT_CACHEDB, DOMAIN, LOGGER # pylint: disable=unused-import
CONF_POLLING = "polling"
class AbodeFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Config flow for Abode."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
def __init__(self):
"""Initialize."""
self.data_schema = {
vol.Required(CONF_USERNAME): str,
vol.Required(CONF_PASSWORD): str,
}
async def async_step_user(self, user_input=None):
"""Handle a flow initialized by the user."""
if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed")
if not user_input:
return self._show_form()
username = user_input[CONF_USERNAME]
password = user_input[CONF_PASSWORD]
polling = user_input.get(CONF_POLLING, False)
cache = self.hass.config.path(DEFAULT_CACHEDB)
try:
await self.hass.async_add_executor_job(
Abode, username, password, True, True, True, cache
)
except (AbodeException, ConnectTimeout, HTTPError) as ex:
LOGGER.error("Unable to connect to Abode: %s", str(ex))
if ex.errcode == 400:
return self._show_form({"base": "invalid_credentials"})
return self._show_form({"base": "connection_error"})
return self.async_create_entry(
title=user_input[CONF_USERNAME],
data={
CONF_USERNAME: username,
CONF_PASSWORD: password,
CONF_POLLING: polling,
},
)
@callback
def _show_form(self, errors=None):
"""Show the form to the user."""
return self.async_show_form(
step_id="user",
data_schema=vol.Schema(self.data_schema),
errors=errors if errors else {},
)
async def async_step_import(self, import_config):
"""Import a config entry from configuration.yaml."""
if self._async_current_entries():
LOGGER.warning("Only one configuration of abode is allowed.")
return self.async_abort(reason="single_instance_allowed")
return await self.async_step_user(import_config)

View File

@@ -0,0 +1,9 @@
"""Constants for the Abode Security System component."""
import logging
LOGGER = logging.getLogger(__package__)
DOMAIN = "abode"
ATTRIBUTION = "Data provided by goabode.com"
DEFAULT_CACHEDB = "abodepy_cache.pickle"

View File

@@ -1,29 +1,22 @@
"""Support for Abode Security System covers."""
import logging
import abodepy.helpers.constants as CONST
from homeassistant.components.cover import CoverDevice
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
_LOGGER = logging.getLogger(__name__)
from . import AbodeDevice
from .const import DOMAIN
def setup_platform(hass, config, add_entities, discovery_info=None):
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode cover devices."""
import abodepy.helpers.constants as CONST
data = hass.data[DOMAIN]
data = hass.data[ABODE_DOMAIN]
entities = []
devices = []
for device in data.abode.get_devices(generic_type=CONST.TYPE_COVER):
if data.is_excluded(device):
continue
entities.append(AbodeCover(data, device))
devices.append(AbodeCover(data, device))
data.devices.extend(devices)
add_entities(devices)
async_add_entities(entities)
class AbodeCover(AbodeDevice, CoverDevice):

View File

@@ -1,38 +1,36 @@
"""Support for Abode Security System lights."""
import logging
from math import ceil
import abodepy.helpers.constants as CONST
from homeassistant.components.light import (
ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, SUPPORT_BRIGHTNESS,
SUPPORT_COLOR, SUPPORT_COLOR_TEMP, Light)
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)
color_temperature_kelvin_to_mired,
color_temperature_mired_to_kelvin,
)
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
_LOGGER = logging.getLogger(__name__)
from . import AbodeDevice
from .const import DOMAIN
def setup_platform(hass, config, add_entities, discovery_info=None):
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode light devices."""
import abodepy.helpers.constants as CONST
data = hass.data[DOMAIN]
data = hass.data[ABODE_DOMAIN]
entities = []
device_types = [CONST.TYPE_LIGHT, CONST.TYPE_SWITCH]
for device in data.abode.get_devices(generic_type=CONST.TYPE_LIGHT):
entities.append(AbodeLight(data, device))
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)
async_add_entities(entities)
class AbodeLight(AbodeDevice, Light):
@@ -42,18 +40,21 @@ class AbodeLight(AbodeDevice, Light):
"""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])))
int(color_temperature_mired_to_kelvin(kwargs[ATTR_COLOR_TEMP]))
)
return
if ATTR_HS_COLOR in kwargs and self._device.is_color_capable:
self._device.set_color(kwargs[ATTR_HS_COLOR])
return
if ATTR_BRIGHTNESS in kwargs and self._device.is_dimmable:
# Convert HASS brightness (0-255) to Abode brightness (0-99)
# Convert Home Assistant 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()
return
self._device.switch_on()
def turn_off(self, **kwargs):
"""Turn off the light."""
@@ -72,7 +73,7 @@ class AbodeLight(AbodeDevice, Light):
# Abode returns 100 during device initialization and device refresh
if brightness == 100:
return 255
# Convert Abode brightness (0-99) to HASS brightness (0-255)
# Convert Abode brightness (0-99) to Home Assistant brightness (0-255)
return ceil(brightness * 255 / 99.0)
@property

View File

@@ -1,29 +1,22 @@
"""Support for Abode Security System locks."""
import logging
"""Support for the Abode Security System locks."""
import abodepy.helpers.constants as CONST
from homeassistant.components.lock import LockDevice
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
_LOGGER = logging.getLogger(__name__)
from . import AbodeDevice
from .const import DOMAIN
def setup_platform(hass, config, add_entities, discovery_info=None):
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode lock devices."""
import abodepy.helpers.constants as CONST
data = hass.data[DOMAIN]
data = hass.data[ABODE_DOMAIN]
entities = []
devices = []
for device in data.abode.get_devices(generic_type=CONST.TYPE_LOCK):
if data.is_excluded(device):
continue
entities.append(AbodeLock(data, device))
devices.append(AbodeLock(data, device))
data.devices.extend(devices)
add_entities(devices)
async_add_entities(entities)
class AbodeLock(AbodeDevice, LockDevice):

View File

@@ -1,10 +1,9 @@
{
"domain": "abode",
"name": "Abode",
"documentation": "https://www.home-assistant.io/components/abode",
"requirements": [
"abodepy==0.15.0"
],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/abode",
"requirements": ["abodepy==0.18.1"],
"dependencies": [],
"codeowners": []
"codeowners": ["@shred86"]
}

View File

@@ -1,38 +1,36 @@
"""Support for Abode Security System sensors."""
import logging
import abodepy.helpers.constants as CONST
from homeassistant.const import (
DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_ILLUMINANCE, DEVICE_CLASS_TEMPERATURE)
DEVICE_CLASS_HUMIDITY,
DEVICE_CLASS_ILLUMINANCE,
DEVICE_CLASS_TEMPERATURE,
)
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
_LOGGER = logging.getLogger(__name__)
from . import AbodeDevice
from .const import DOMAIN
# Sensor types: Name, icon
SENSOR_TYPES = {
'temp': ['Temperature', DEVICE_CLASS_TEMPERATURE],
'humidity': ['Humidity', DEVICE_CLASS_HUMIDITY],
'lux': ['Lux', DEVICE_CLASS_ILLUMINANCE],
CONST.TEMP_STATUS_KEY: ["Temperature", DEVICE_CLASS_TEMPERATURE],
CONST.HUMI_STATUS_KEY: ["Humidity", DEVICE_CLASS_HUMIDITY],
CONST.LUX_STATUS_KEY: ["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
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode sensor devices."""
data = hass.data[DOMAIN]
data = hass.data[ABODE_DOMAIN]
entities = []
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))
if sensor_type not in device.get_value(CONST.STATUSES_KEY):
continue
entities.append(AbodeSensor(data, device, sensor_type))
data.devices.extend(devices)
add_entities(devices)
async_add_entities(entities)
class AbodeSensor(AbodeDevice):
@@ -42,8 +40,7 @@ class AbodeSensor(AbodeDevice):
"""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._name = f"{self._device.name} {SENSOR_TYPES[self._sensor_type][0]}"
self._device_class = SENSOR_TYPES[self._sensor_type][1]
@property
@@ -56,22 +53,27 @@ class AbodeSensor(AbodeDevice):
"""Return the device class."""
return self._device_class
@property
def unique_id(self):
"""Return a unique ID to use for this device."""
return f"{self._device.device_uuid}-{self._sensor_type}"
@property
def state(self):
"""Return the state of the sensor."""
if self._sensor_type == 'temp':
if self._sensor_type == CONST.TEMP_STATUS_KEY:
return self._device.temp
if self._sensor_type == 'humidity':
if self._sensor_type == CONST.HUMI_STATUS_KEY:
return self._device.humidity
if self._sensor_type == 'lux':
if self._sensor_type == CONST.LUX_STATUS_KEY:
return self._device.lux
@property
def unit_of_measurement(self):
"""Return the units of measurement."""
if self._sensor_type == 'temp':
if self._sensor_type == CONST.TEMP_STATUS_KEY:
return self._device.temp_unit
if self._sensor_type == 'humidity':
if self._sensor_type == CONST.HUMI_STATUS_KEY:
return self._device.humidity_unit
if self._sensor_type == 'lux':
if self._sensor_type == CONST.LUX_STATUS_KEY:
return self._device.lux_unit

View File

@@ -7,7 +7,7 @@ change_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.
trigger_automation:
description: Trigger an Abode automation.
fields:
entity_id: {description: Entity id of the quick action to trigger., example: binary_sensor.home_quick_action}
entity_id: {description: Entity id of the automation to trigger., example: switch.my_automation}

View File

@@ -0,0 +1,22 @@
{
"config": {
"title": "Abode",
"step": {
"user": {
"title": "Fill in your Abode login information",
"data": {
"username": "Email Address",
"password": "Password"
}
}
},
"error": {
"identifier_exists": "Account already registered.",
"invalid_credentials": "Invalid credentials.",
"connection_error": "Unable to connect to Abode."
},
"abort": {
"single_instance_allowed": "Only a single configuration of Abode is allowed."
}
}
}

View File

@@ -1,41 +1,34 @@
"""Support for Abode Security System switches."""
import logging
import abodepy.helpers.constants as CONST
import abodepy.helpers.timeline as TIMELINE
from homeassistant.components.switch import SwitchDevice
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from . import DOMAIN as ABODE_DOMAIN, AbodeAutomation, AbodeDevice
from . import AbodeAutomation, AbodeDevice
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
DEVICE_TYPES = [CONST.TYPE_SWITCH, CONST.TYPE_VALVE]
ICON = "mdi:robot"
def setup_platform(hass, config, add_entities, discovery_info=None):
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode switch devices."""
import abodepy.helpers.constants as CONST
import abodepy.helpers.timeline as TIMELINE
data = hass.data[DOMAIN]
data = hass.data[ABODE_DOMAIN]
entities = []
devices = []
for device_type in DEVICE_TYPES:
for device in data.abode.get_devices(generic_type=device_type):
entities.append(AbodeSwitch(data, device))
# 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
for automation in data.abode.get_automations():
entities.append(
AbodeAutomationSwitch(data, automation, TIMELINE.AUTOMATION_EDIT_GROUP)
)
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)
async_add_entities(entities)
class AbodeSwitch(AbodeDevice, SwitchDevice):
@@ -58,15 +51,33 @@ class AbodeSwitch(AbodeDevice, SwitchDevice):
class AbodeAutomationSwitch(AbodeAutomation, SwitchDevice):
"""A switch implementation for Abode automations."""
async def async_added_to_hass(self):
"""Subscribe Abode events."""
await super().async_added_to_hass()
signal = f"abode_trigger_automation_{self.entity_id}"
async_dispatcher_connect(self.hass, signal, self.trigger)
def turn_on(self, **kwargs):
"""Turn on the device."""
self._automation.set_active(True)
"""Enable the automation."""
if self._automation.enable(True):
self.schedule_update_ha_state()
def turn_off(self, **kwargs):
"""Turn off the device."""
self._automation.set_active(False)
"""Disable the automation."""
if self._automation.enable(False):
self.schedule_update_ha_state()
def trigger(self):
"""Trigger the automation."""
self._automation.trigger()
@property
def is_on(self):
"""Return True if the binary sensor is on."""
return self._automation.is_active
"""Return True if the automation is enabled."""
return self._automation.is_enabled
@property
def icon(self):
"""Return the robot icon to match Home Assistant automations."""
return ICON

View File

@@ -1,10 +1,8 @@
{
"domain": "acer_projector",
"name": "Acer projector",
"documentation": "https://www.home-assistant.io/components/acer_projector",
"requirements": [
"pyserial==3.1.1"
],
"name": "Acer Projector",
"documentation": "https://www.home-assistant.io/integrations/acer_projector",
"requirements": ["pyserial==3.1.1"],
"dependencies": [],
"codeowners": []
}

View File

@@ -2,52 +2,61 @@
import logging
import re
import serial
import voluptuous as vol
from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA)
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.const import (
STATE_ON, STATE_OFF, STATE_UNKNOWN, CONF_NAME, CONF_FILENAME)
CONF_FILENAME,
CONF_NAME,
STATE_OFF,
STATE_ON,
STATE_UNKNOWN,
)
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
CONF_TIMEOUT = 'timeout'
CONF_WRITE_TIMEOUT = 'write_timeout'
CONF_TIMEOUT = "timeout"
CONF_WRITE_TIMEOUT = "write_timeout"
DEFAULT_NAME = 'Acer Projector'
DEFAULT_NAME = "Acer Projector"
DEFAULT_TIMEOUT = 1
DEFAULT_WRITE_TIMEOUT = 1
ECO_MODE = 'ECO Mode'
ECO_MODE = "ECO Mode"
ICON = 'mdi:projector'
ICON = "mdi:projector"
INPUT_SOURCE = 'Input Source'
INPUT_SOURCE = "Input Source"
LAMP = 'Lamp'
LAMP_HOURS = 'Lamp Hours'
LAMP = "Lamp"
LAMP_HOURS = "Lamp Hours"
MODEL = 'Model'
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',
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,
})
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):
@@ -65,10 +74,10 @@ class AcerSwitch(SwitchDevice):
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)
port=serial_port, timeout=timeout, write_timeout=write_timeout, **kwargs
)
self._serial_port = serial_port
self._name = name
self._state = False
@@ -81,7 +90,7 @@ class AcerSwitch(SwitchDevice):
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.
@@ -89,14 +98,14 @@ class AcerSwitch(SwitchDevice):
try:
if not self.ser.is_open:
self.ser.open()
msg = msg.encode('utf-8')
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')
ret = self.ser.read_until(size=20).decode("utf-8")
except serial.SerialException:
_LOGGER.error('Problem communicating with %s', self._serial_port)
_LOGGER.error("Problem communicating with %s", self._serial_port)
self.ser.close()
return ret
@@ -104,7 +113,7 @@ class AcerSwitch(SwitchDevice):
"""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)
match = re.search(r"\r(.+)\r", awns)
if match:
return match.group(1)
return STATE_UNKNOWN
@@ -133,10 +142,10 @@ class AcerSwitch(SwitchDevice):
"""Get the latest state from the projector."""
msg = CMD_DICT[LAMP]
awns = self._write_read_format(msg)
if awns == 'Lamp 1':
if awns == "Lamp 1":
self._state = True
self._available = True
elif awns == 'Lamp 0':
elif awns == "Lamp 0":
self._state = False
self._available = True
else:

View File

@@ -1,29 +1,36 @@
"""Support for Actiontec MI424WR (Verizon FIOS) routers."""
from collections import namedtuple
import logging
import re
import telnetlib
from collections import namedtuple
import voluptuous as vol
from homeassistant.components.device_tracker import (
DOMAIN,
PLATFORM_SCHEMA,
DeviceScanner,
)
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME
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')
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
})
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):
@@ -32,7 +39,7 @@ def get_scanner(hass, config):
return scanner if scanner.success_init else None
Device = namedtuple('Device', ['mac', 'ip', 'last_update'])
Device = namedtuple("Device", ["mac", "ip", "last_update"])
class ActiontecDeviceScanner(DeviceScanner):
@@ -75,9 +82,11 @@ class ActiontecDeviceScanner(DeviceScanner):
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]
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
@@ -85,17 +94,16 @@ class ActiontecDeviceScanner(DeviceScanner):
"""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(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'))
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
@@ -105,11 +113,11 @@ class ActiontecDeviceScanner(DeviceScanner):
devices = {}
for lease in leases_result:
match = _LEASES_REGEX.search(lease.decode('utf-8'))
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'))
}
devices[match.group("ip")] = {
"ip": match.group("ip"),
"mac": match.group("mac").upper(),
"timevalid": int(match.group("timevalid")),
}
return devices

View File

@@ -1,7 +1,7 @@
{
"domain": "actiontec",
"name": "Actiontec",
"documentation": "https://www.home-assistant.io/components/actiontec",
"documentation": "https://www.home-assistant.io/integrations/actiontec",
"requirements": [],
"dependencies": [],
"codeowners": []

View File

@@ -0,0 +1,32 @@
{
"config": {
"abort": {
"adguard_home_addon_outdated": "\u0422\u0430\u0437\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0438\u0437\u0438\u0441\u043a\u0432\u0430 AdGuard Home {minimal_version} \u0438\u043b\u0438 \u043f\u043e-\u043d\u043e\u0432\u0430 {minimal_version}, \u0438\u043c\u0430\u0442\u0435 {current_version}. \u041c\u043e\u043b\u044f, \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0430\u0439\u0442\u0435 \u0432\u0430\u0448\u0430\u0442\u0430 \u0434\u043e\u0431\u0430\u0432\u043a\u0430 \u0437\u0430 Hass.io AdGuard Home.",
"adguard_home_outdated": "\u0422\u0430\u0437\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0438\u0437\u0438\u0441\u043a\u0432\u0430 AdGuard Home {minimal_version} \u0438\u043b\u0438 \u043f\u043e-\u043d\u043e\u0432\u0430 {minimal_version}, \u0438\u043c\u0430\u0442\u0435 {current_version}.",
"existing_instance_updated": "\u0410\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0441\u044a\u0449\u0435\u0441\u0442\u0432\u0443\u0432\u0430\u0449\u0430\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f.",
"single_instance_allowed": "\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0430 \u0435 \u0441\u0430\u043c\u043e \u0435\u0434\u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043d\u0430 AdGuard Home."
},
"error": {
"connection_error": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435."
},
"step": {
"hassio_confirm": {
"description": "\u0418\u0441\u043a\u0430\u0442\u0435 \u043b\u0438 \u0434\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0430\u0442\u0435 Home Assistant \u0434\u0430 \u0441\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430 \u0441 AdGuard Home, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0435\u043d \u043e\u0442 Hass.io \u0434\u043e\u0431\u0430\u0432\u043a\u0430\u0442\u0430: {addon} ?",
"title": "AdGuard Home \u0447\u0440\u0435\u0437 Hass.io \u0434\u043e\u0431\u0430\u0432\u043a\u0430"
},
"user": {
"data": {
"host": "\u0410\u0434\u0440\u0435\u0441",
"password": "\u041f\u0430\u0440\u043e\u043b\u0430",
"port": "\u041f\u043e\u0440\u0442",
"ssl": "AdGuard Home \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430 SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442",
"username": "\u041f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0441\u043a\u043e \u0438\u043c\u0435",
"verify_ssl": "AdGuard Home \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430 \u043d\u0430\u0434\u0435\u0436\u0434\u0435\u043d \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442"
},
"description": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0412\u0430\u0448\u0438\u044f AdGuard Home, \u0437\u0430 \u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b.",
"title": "\u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0412\u0430\u0448\u0438\u044f AdGuard Home."
}
},
"title": "AdGuard Home"
}
}

View File

@@ -0,0 +1,32 @@
{
"config": {
"abort": {
"adguard_home_addon_outdated": "Aquesta integraci\u00f3 necessita la versi\u00f3 d'AdGuard Home {minimal_version} o una superior, tens la {current_version}. Actualitza el complement de Hass.io d'AdGuard Home.",
"adguard_home_outdated": "Aquesta integraci\u00f3 necessita la versi\u00f3 d'AdGuard Home {minimal_version} o una superior, tens la {current_version}.",
"existing_instance_updated": "S'ha actualitzat la configuraci\u00f3 existent.",
"single_instance_allowed": "Nom\u00e9s es permet una \u00fanica configuraci\u00f3 d'AdGuard Home."
},
"error": {
"connection_error": "No s'ha pogut connectar."
},
"step": {
"hassio_confirm": {
"description": "Vols configurar Home Assistant perqu\u00e8 es connecti amb l'AdGuard Home proporcionat pel complement de Hass.io: {addon}?",
"title": "AdGuard Home (complement de Hass.io)"
},
"user": {
"data": {
"host": "Amfitri\u00f3",
"password": "Contrasenya",
"port": "Port",
"ssl": "AdGuard Home utilitza un certificat SSL",
"username": "Nom d'usuari",
"verify_ssl": "AdGuard Home utilitza un certificat adequat"
},
"description": "Configuraci\u00f3 de la inst\u00e0ncia d'AdGuard Home, permet el control i la monitoritzaci\u00f3.",
"title": "Enlla\u00e7ar AdGuard Home."
}
},
"title": "AdGuard Home"
}
}

Some files were not shown because too many files have changed in this diff Show More