Compare commits

...

1286 Commits

Author SHA1 Message Date
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
Paulus Schoutsen
c10e046323 Merge pull request #28399 from home-assistant/rc
0.101.1
2019-10-31 14:16:57 -07: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
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
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
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
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
michaeldavie
82ed84ba43 Bump env_canada to 0.0.27 (#28239) 2019-10-26 22:27:21 +02: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
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
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
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
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
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
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
d652bb23de Updated frontend to 20190828.0 2019-08-28 13:43:45 -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
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
193881c4d1 Update azure-pipelines-release.yml for Azure Pipelines 2019-08-26 21:08:21 +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
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
David F. Mulcahey
bde572c91a bump quirks version (#26198) 2019-08-25 22:34:43 -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
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
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
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
f793c71f52 Update azure-pipelines-release.yml for Azure Pipelines 2019-08-22 17:34:54 +02:00
Pascal Vizeli
b3ae6a20ba Update azure-pipelines-release.yml for Azure Pipelines 2019-08-22 09:28:46 +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
3622 changed files with 94041 additions and 22050 deletions

View File

@@ -10,7 +10,15 @@ omit =
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
@@ -19,6 +27,10 @@ omit =
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/sensor.py
homeassistant/components/aladdin_connect/cover.py
homeassistant/components/alarm_control_panel/manual_mqtt.py
@@ -31,7 +43,6 @@ 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/*
@@ -51,6 +62,7 @@ omit =
homeassistant/components/asterisk_cdr/mailbox.py
homeassistant/components/asterisk_mbox/*
homeassistant/components/asuswrt/device_tracker.py
homeassistant/components/atome/*
homeassistant/components/august/*
homeassistant/components/aurora_abb_powerone/sensor.py
homeassistant/components/automatic/device_tracker.py
@@ -58,6 +70,7 @@ omit =
homeassistant/components/avion/light.py
homeassistant/components/azure_event_hub/*
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
@@ -87,12 +100,14 @@ omit =
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/cert_expiry/helper.py
homeassistant/components/channels/media_player.py
homeassistant/components/cisco_ios/device_tracker.py
homeassistant/components/cisco_mobility_express/device_tracker.py
@@ -111,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
@@ -141,6 +158,7 @@ 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/*
@@ -153,7 +171,12 @@ omit =
homeassistant/components/ebox/sensor.py
homeassistant/components/ebusd/*
homeassistant/components/ecoal_boiler/*
homeassistant/components/ecobee/*
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/water_heater.py
homeassistant/components/ecovacs/*
homeassistant/components/eddystone_temperature/sensor.py
@@ -162,7 +185,7 @@ omit =
homeassistant/components/eight_sleep/*
homeassistant/components/eliqonline/sensor.py
homeassistant/components/elkm1/*
homeassistant/components/elv/switch.py
homeassistant/components/elv/*
homeassistant/components/emby/media_player.py
homeassistant/components/emoncms/sensor.py
homeassistant/components/emoncms_history/*
@@ -195,7 +218,6 @@ omit =
homeassistant/components/evohome/*
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
@@ -214,6 +236,7 @@ omit =
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/*
@@ -233,6 +256,7 @@ omit =
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/*
@@ -247,6 +271,7 @@ omit =
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
@@ -263,7 +288,6 @@ omit =
homeassistant/components/heatmiser/climate.py
homeassistant/components/hikvision/binary_sensor.py
homeassistant/components/hikvisioncam/switch.py
homeassistant/components/hipchat/notify.py
homeassistant/components/hitron_coda/device_tracker.py
homeassistant/components/hive/*
homeassistant/components/hlk_sw16/*
@@ -271,7 +295,6 @@ 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
@@ -285,7 +308,15 @@ omit =
homeassistant/components/hydrawise/*
homeassistant/components/hyperion/light.py
homeassistant/components/ialarm/alarm_control_panel.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/device_tracker.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
@@ -306,6 +337,7 @@ 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
@@ -336,8 +368,8 @@ omit =
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
@@ -388,6 +420,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/*
@@ -400,7 +433,10 @@ 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/*
@@ -426,11 +462,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
@@ -441,7 +480,10 @@ 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
@@ -449,6 +491,7 @@ omit =
homeassistant/components/openweathermap/weather.py
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
@@ -467,8 +510,11 @@ omit =
homeassistant/components/pioneer/media_player.py
homeassistant/components/pjlink/media_player.py
homeassistant/components/plaato/*
homeassistant/components/plex/__init__.py
homeassistant/components/plex/media_player.py
homeassistant/components/plex/sensor.py
homeassistant/components/plex/server.py
homeassistant/components/plex/websockets.py
homeassistant/components/plugwise/*
homeassistant/components/plum_lightpad/*
homeassistant/components/pocketcasts/sensor.py
@@ -536,6 +582,7 @@ omit =
homeassistant/components/russound_rio/media_player.py
homeassistant/components/russound_rnet/media_player.py
homeassistant/components/sabnzbd/*
homeassistant/components/saj/sensor.py
homeassistant/components/satel_integra/*
homeassistant/components/scrape/sensor.py
homeassistant/components/scsgate/*
@@ -563,6 +610,8 @@ omit =
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/*
@@ -572,9 +621,13 @@ omit =
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
@@ -587,12 +640,10 @@ omit =
homeassistant/components/spotcrime/sensor.py
homeassistant/components/spotify/media_player.py
homeassistant/components/squeezebox/media_player.py
homeassistant/components/srp_energy/sensor.py
homeassistant/components/starlingbank/sensor.py
homeassistant/components/steam_online/sensor.py
homeassistant/components/stiebel_eltron/*
homeassistant/components/streamlabswater/*
homeassistant/components/stride/notify.py
homeassistant/components/suez_water/*
homeassistant/components/supervisord/sensor.py
homeassistant/components/swiss_hydrological_data/sensor.py
@@ -608,7 +659,6 @@ 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/*
@@ -650,9 +700,14 @@ omit =
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
@@ -667,10 +722,9 @@ omit =
homeassistant/components/ue_smart_radio/media_player.py
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/__init__.py
@@ -689,6 +743,8 @@ omit =
homeassistant/components/vesync/const.py
homeassistant/components/vesync/switch.py
homeassistant/components/viaggiatreno/sensor.py
homeassistant/components/vicare/*
homeassistant/components/vivotek/camera.py
homeassistant/components/vizio/media_player.py
homeassistant/components/vlc/media_player.py
homeassistant/components/vlc_telnet/media_player.py
@@ -725,6 +781,7 @@ omit =
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
@@ -742,6 +799,7 @@ omit =
homeassistant/components/zha/core/device.py
homeassistant/components/zha/core/gateway.py
homeassistant/components/zha/core/helpers.py
homeassistant/components/zha/core/patches.py
homeassistant/components/zha/core/registries.py
homeassistant/components/zha/device_entity.py
homeassistant/components/zha/entity.py

View File

@@ -1,35 +1,34 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "Home Assistant Dev",
"context": "..",
"dockerFile": "../Dockerfile.dev",
"postCreateCommand": "pip3 install -e .",
"appPort": 8123,
"runArgs": [
"-e",
"GIT_EDITOR=\"code --wait\""
],
"extensions": [
"ms-python.python",
"ms-azure-devops.azure-pipelines",
"redhat.vscode-yaml"
],
"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"
]
}
}
"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

@@ -23,9 +23,9 @@
Please provide details about your environment.
-->
**Component/platform:**
**Integration:**
<!--
Please add the link to the documentation at https://www.home-assistant.io/components/ of the component/platform in question.
Please add the link to the documentation at https://www.home-assistant.io/integrations/ of the integration in question.
-->

View File

@@ -29,9 +29,9 @@ about: Create a report to help us improve
Please provide details about your environment.
-->
**Component/platform:**
**Integration:**
<!--
Please add the link to the documentation at https://www.home-assistant.io/components/ of the component/platform in question.
Please add the link to the documentation at https://www.home-assistant.io/integrations/ of the integration in question.
-->

1
.github/stale.yml vendored
View File

@@ -13,6 +13,7 @@ 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

4
.gitignore vendored
View File

@@ -64,6 +64,7 @@ nosetests.xml
htmlcov/
test-reports/
test-results.xml
test-output.xml
# Translations
*.mo
@@ -127,3 +128,6 @@ monkeytype.sqlite3
# This is left behind by Azure Restore Cache
tmp_cache
# python-language-server / Rope
.ropeproject

View File

@@ -6,6 +6,7 @@ repos:
args:
- --safe
- --quiet
files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.8
hooks:
@@ -13,3 +14,18 @@ repos:
additional_dependencies:
- flake8-docstrings==1.3.1
- pydocstyle==4.0.0
files: ^(homeassistant|script|tests)/.+\.py$
# Using a local "system" mypy instead of the mypy hook, because its
# results 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.
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
language: system
types: [python]
require_serial: true
files: ^homeassistant/.+\.py$

View File

@@ -16,22 +16,21 @@ addons:
matrix:
fast_finish: true
include:
- python: "3.6.0"
- python: "3.6.1"
env: TOXENV=lint
dist: trusty
- python: "3.6.0"
env: TOXENV=pylint
dist: trusty
- python: "3.6.0"
- python: "3.6.1"
env: TOXENV=pylint PYLINT_ARGS=--jobs=0
- python: "3.6.1"
env: TOXENV=typing
dist: trusty
- python: "3.6.0"
- python: "3.6.1"
env: TOXENV=py36
dist: trusty
- python: "3.7"
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 50 tox --develop

193
.vscode/tasks.json vendored
View File

@@ -1,92 +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",
"group": {
"kind": "test",
"isDefault": true,
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Flake8",
"type": "shell",
"command": "flake8 homeassistant tests",
"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": []
}
]
"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": "flake8 homeassistant tests",
"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
@@ -13,9 +13,12 @@ homeassistant/util/* @home-assistant/core
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/alpha_vantage/* @fabaff
homeassistant/components/amazon_polly/* @robbiet480
homeassistant/components/ambiclimate/* @danielhiversen
@@ -23,11 +26,13 @@ homeassistant/components/ambient_station/* @bachya
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/atome/* @baqs
homeassistant/components/aurora_abb_powerone/* @davet2001
homeassistant/components/auth/* @home-assistant/core
homeassistant/components/automatic/* @armills
@@ -37,6 +42,7 @@ homeassistant/components/awair/* @danielsjf
homeassistant/components/aws/* @awarecan @robbiet480
homeassistant/components/axis/* @kane610
homeassistant/components/azure_event_hub/* @eavanvalkenburg
homeassistant/components/beewi_smartclim/* @alemuro
homeassistant/components/bitcoin/* @fabaff
homeassistant/components/bizkaibus/* @UgaitzEtxebarria
homeassistant/components/blink/* @fronzbot
@@ -46,6 +52,7 @@ homeassistant/components/broadlink/* @danielhiversen
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
@@ -70,6 +77,7 @@ homeassistant/components/digital_ocean/* @fabaff
homeassistant/components/discogs/* @thibmaek
homeassistant/components/doorbird/* @oblogic7
homeassistant/components/dweet/* @fabaff
homeassistant/components/ecobee/* @marthoc
homeassistant/components/ecovacs/* @OverloadUT
homeassistant/components/egardia/* @jeroenterheerdt
homeassistant/components/eight_sleep/* @mezz64
@@ -92,25 +100,30 @@ homeassistant/components/flock/* @fabaff
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/gearbest/* @HerrHofrat
homeassistant/components/geniushub/* @zxdavb
homeassistant/components/geo_rss_events/* @exxamalte
homeassistant/components/geonetnz_quakes/* @exxamalte
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/gpsd/* @fabaff
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/heos/* @andrewsayre
homeassistant/components/here_travel_time/* @eifinger
homeassistant/components/hikvision/* @mezz64
homeassistant/components/hikvisioncam/* @fbradyirl
homeassistant/components/history/* @home-assistant/core
@@ -119,12 +132,14 @@ homeassistant/components/hive/* @Rendili @KJonline
homeassistant/components/homeassistant/* @home-assistant/core
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/iaqualink/* @flz
homeassistant/components/ign_sismologia/* @exxamalte
homeassistant/components/incomfort/* @zxdavb
homeassistant/components/influxdb/* @fabaff
@@ -138,8 +153,11 @@ homeassistant/components/ios/* @robbiet480
homeassistant/components/ipma/* @dgomes
homeassistant/components/iqvia/* @bachya
homeassistant/components/irish_rail_transport/* @ttroy50
homeassistant/components/izone/* @Swamp-Ig
homeassistant/components/jewish_calendar/* @tsvi
homeassistant/components/kaiterra/* @Michsior14
homeassistant/components/keba/* @dannerph
homeassistant/components/keenetic_ndms2/* @foxel
homeassistant/components/knx/* @Julius2342
homeassistant/components/kodi/* @armills
homeassistant/components/konnected/* @heythisisnate
@@ -147,16 +165,13 @@ homeassistant/components/lametric/* @robbiet480
homeassistant/components/launch_library/* @ludeeus
homeassistant/components/lcn/* @alengwenus
homeassistant/components/life360/* @pnbruckner
homeassistant/components/lifx/* @amelchio
homeassistant/components/lifx_cloud/* @amelchio
homeassistant/components/lifx_legacy/* @amelchio
homeassistant/components/linky/* @tiste @Quentame
homeassistant/components/linky/* @Quentame
homeassistant/components/linux_battery/* @fabaff
homeassistant/components/liveboxplaytv/* @pschmitt
homeassistant/components/logger/* @home-assistant/core
homeassistant/components/logi_circle/* @evanjd
homeassistant/components/lovelace/* @home-assistant/frontend
homeassistant/components/luci/* @fbradyirl
homeassistant/components/luci/* @fbradyirl @mzdrale
homeassistant/components/luftdaten/* @fabaff
homeassistant/components/mastodon/* @fabaff
homeassistant/components/matrix/* @tinloaf
@@ -175,12 +190,14 @@ 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/nello/* @pschmitt
homeassistant/components/ness_alarm/* @nickw444
homeassistant/components/nest/* @awarecan
homeassistant/components/netdata/* @fabaff
homeassistant/components/netgear_lte/* @amelchio
homeassistant/components/nextbus/* @vividboarder
homeassistant/components/nissan_leaf/* @filcole
homeassistant/components/nmbs/* @thibmaek
@@ -188,21 +205,28 @@ 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/opentherm_gw/* @mvn23
homeassistant/components/openuv/* @bachya
homeassistant/components/openweathermap/* @fabaff
homeassistant/components/orangepi_gpio/* @pascallj
homeassistant/components/oru/* @bvlaicu
homeassistant/components/owlet/* @oblogic7
homeassistant/components/panel_custom/* @home-assistant/frontend
homeassistant/components/panel_iframe/* @home-assistant/frontend
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/plaato/* @JohNan
homeassistant/components/plant/* @ChristianKuehnel
homeassistant/components/plex/* @jjlawren
homeassistant/components/plugwise/* @laetificat @CoMPaTech
homeassistant/components/point/* @fredrike
homeassistant/components/ps4/* @ktnrg45
@@ -213,6 +237,7 @@ homeassistant/components/qld_bushfire/* @exxamalte
homeassistant/components/qnap/* @colinodell
homeassistant/components/quantum_gateway/* @cisasteelersfan
homeassistant/components/qwikswitch/* @kellerza
homeassistant/components/rainbird/* @konikvranik
homeassistant/components/raincloud/* @vanstinator
homeassistant/components/rainforest_eagle/* @gtdiehl
homeassistant/components/rainmachine/* @bachya
@@ -221,6 +246,7 @@ homeassistant/components/repetier/* @MTrab
homeassistant/components/rfxtrx/* @danielhiversen
homeassistant/components/rmvtransport/* @cgtobi
homeassistant/components/roomba/* @pschmitt
homeassistant/components/saj/* @fredericvl
homeassistant/components/scene/* @home-assistant/core
homeassistant/components/scrape/* @fabaff
homeassistant/components/script/* @home-assistant/core
@@ -232,16 +258,19 @@ homeassistant/components/shell_command/* @home-assistant/core
homeassistant/components/shiftr/* @fabaff
homeassistant/components/shodan/* @fabaff
homeassistant/components/simplisafe/* @bachya
homeassistant/components/sinch/* @bendikrb
homeassistant/components/slide/* @ualex73
homeassistant/components/sma/* @kellerza
homeassistant/components/smarthab/* @outadoc
homeassistant/components/smartthings/* @andrewsayre
homeassistant/components/smarty/* @z0mbieprocess
homeassistant/components/smtp/* @fabaff
homeassistant/components/solaredge_local/* @drobtravels
homeassistant/components/solaredge_local/* @drobtravels @scheric
homeassistant/components/solarlog/* @Ernst79
homeassistant/components/solax/* @squishykid
homeassistant/components/soma/* @ratsept
homeassistant/components/somfy/* @tetienne
homeassistant/components/songpal/* @rytilahti
homeassistant/components/sonos/* @amelchio
homeassistant/components/spaceapi/* @fabaff
homeassistant/components/spider/* @peternijssen
homeassistant/components/sql/* @dgomes
@@ -259,7 +288,6 @@ homeassistant/components/switchmate/* @danielhiversen
homeassistant/components/syncthru/* @nielstron
homeassistant/components/synology_srm/* @aerialls
homeassistant/components/syslog/* @fabaff
homeassistant/components/sytadin/* @gautric
homeassistant/components/tahoma/* @philklei
homeassistant/components/tautulli/* @ludeeus
homeassistant/components/tellduslive/* @fredrike
@@ -271,25 +299,31 @@ homeassistant/components/threshold/* @fabaff
homeassistant/components/tibber/* @danielhiversen
homeassistant/components/tile/* @bachya
homeassistant/components/time_date/* @fabaff
homeassistant/components/todoist/* @boralyl
homeassistant/components/toon/* @frenck
homeassistant/components/tplink/* @rytilahti
homeassistant/components/traccar/* @ludeeus
homeassistant/components/tradfri/* @ggravlingen
homeassistant/components/trafikverket_train/* @endor-force
homeassistant/components/transmission/* @engrbm87
homeassistant/components/tts/* @robbiet480
homeassistant/components/twentemilieu/* @frenck
homeassistant/components/twilio_call/* @robbiet480
homeassistant/components/twilio_sms/* @robbiet480
homeassistant/components/unifi/* @kane610
homeassistant/components/upc_connect/* @pvizeli
homeassistant/components/upcloud/* @scop
homeassistant/components/updater/* @home-assistant/core
homeassistant/components/upnp/* @robbiet480
homeassistant/components/uptimerobot/* @ludeeus
homeassistant/components/usgs_earthquakes_feed/* @exxamalte
homeassistant/components/utility_meter/* @dgomes
homeassistant/components/velbus/* @cereal2nd
homeassistant/components/velux/* @Julius2342
homeassistant/components/version/* @fabaff
homeassistant/components/vesync/* @markperdue @webdjoe
homeassistant/components/vicare/* @oischinger
homeassistant/components/vivotek/* @HarlemSquirrel
homeassistant/components/vizio/* @raman325
homeassistant/components/vlc_telnet/* @rodripf
homeassistant/components/waqi/* @andrey-git
@@ -298,14 +332,17 @@ homeassistant/components/weather/* @fabaff
homeassistant/components/weblink/* @home-assistant/core
homeassistant/components/websocket_api/* @home-assistant/core
homeassistant/components/wemo/* @sqldiablo
homeassistant/components/withings/* @vangorra
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

View File

@@ -23,9 +23,10 @@ RUN git clone --depth 1 https://github.com/home-assistant/hass-release \
WORKDIR /workspaces
# Install Python dependencies from requirements.txt if it exists
COPY requirements_test_all.txt homeassistant/package_constraints.txt /workspaces/
RUN pip3 install -r requirements_test_all.txt -c package_constraints.txt
# Install Python dependencies from requirements
COPY requirements_test.txt homeassistant/package_constraints.txt ./
RUN pip3 install -r requirements_test.txt -c package_constraints.txt \
&& rm -f requirements_test.txt package_constraints.txt
# Set the default shell to bash instead of sh
ENV SHELL /bin/bash

View File

@@ -32,4 +32,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/

View File

@@ -37,27 +37,32 @@ stages:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- script: |
python -m venv venv
- 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
displayName: 'Setup Env'
. venv/bin/activate
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
pre-commit install-hooks
- script: |
. venv/bin/activate
flake8 homeassistant tests script
pre-commit run flake8 --all-files
displayName: 'Run flake8'
- job: 'Validate'
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- script: |
python -m venv venv
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'homeassistant/package_constraints.txt'
build: |
python -m venv venv
. venv/bin/activate
pip install -e .
displayName: 'Setup Env'
. venv/bin/activate
pip install -e .
- script: |
. venv/bin/activate
python -m script.hassfest validate
@@ -71,15 +76,18 @@ stages:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- script: |
python -m venv venv
- 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
displayName: 'Setup Env'
. venv/bin/activate
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
pre-commit install-hooks
- script: |
. venv/bin/activate
./script/check_format
pre-commit run black --all-files
displayName: 'Check Black formatting'
- stage: 'Tests'
@@ -100,20 +108,26 @@ stages:
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'requirements_test_all.txt, .cache, homeassistant/package_constraints.txt'
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 -c homeassistant/package_constraints.txt
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
pytest --timeout=9 --durations=10 --junitxml=test-results.xml -qq -o console_output_style=count -p no:sugar tests
pip install -e .
displayName: 'Install Home Assistant'
- script: |
set -e
. venv/bin/activate
pytest --timeout=9 --durations=10 -n 2 --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']))
@@ -121,22 +135,11 @@ stages:
set -e
. venv/bin/activate
pytest --timeout=9 --durations=10 --junitxml=test-results.xml --cov --cov-report=xml -qq -o console_output_style=count -p no:sugar tests
pytest --timeout=9 --durations=10 -n 2 --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']))
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: 'test-results.xml'
testRunTitle: 'Publish test results for Python $(python.container)'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: cobertura
summaryFileLocation: coverage.xml
displayName: 'publish coverage artifact'
condition: and(succeeded(), eq(variables['python.container'], variables['PythonMain']))
- stage: 'FullCheck'
dependsOn:
@@ -149,7 +152,7 @@ stages:
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: 'requirements_all.txt, requirements_test.txt, .cache, homeassistant/package_constraints.txt'
keyfile: 'requirements_all.txt | requirements_test.txt | homeassistant/package_constraints.txt'
build: |
set -e
python -m venv venv
@@ -158,6 +161,10 @@ stages:
pip install -U pip setuptools
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
@@ -167,17 +174,16 @@ stages:
vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps:
- script: |
python -m venv venv
- 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 .
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
displayName: 'Setup Env'
. venv/bin/activate
pip install -e . -r requirements_test.txt -c homeassistant/package_constraints.txt
pre-commit install-hooks
- script: |
TYPING_FILES=$(cat mypyrc)
echo -e "Run mypy on: \n$TYPING_FILES"
. venv/bin/activate
mypy $TYPING_FILES
pre-commit run mypy --all-files
displayName: 'Run mypy'

View File

@@ -43,7 +43,7 @@ stages:
release="$(Build.SourceBranchName)"
created_by="$(curl -s https://api.github.com/repos/home-assistant/home-assistant/releases/tags/${release} | jq --raw-output '.author.login')"
if [[ "${created_by}" =~ ^(balloob|pvizeli|fabaff|robbiet480)$ ]]; then
if [[ "${created_by}" =~ ^(balloob|pvizeli|fabaff|robbiet480|bramkragten)$ ]]; then
exit 0
fi
@@ -233,3 +233,45 @@ stages:
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

@@ -10,7 +10,7 @@ trigger:
- requirements_all.txt
pr: none
schedules:
- cron: '0 */8 * * *'
- cron: '0 */4 * * *'
displayName: 'daily builds'
branches:
include:
@@ -18,7 +18,7 @@ schedules:
always: true
variables:
- name: versionWheels
value: '1.1-3.7-alpine3.10'
value: '1.4-3.7-alpine3.10'
resources:
repositories:
- repository: azure
@@ -30,7 +30,8 @@ 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;linux-headers;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev'
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'
builderPip: 'Cython;numpy'
wheelsRequirement: 'requirements_wheels.txt'
wheelsRequirementDiff: 'requirements_diff.txt'
preBuild:
@@ -44,7 +45,6 @@ jobs:
requirement_files="requirements_wheels.txt requirements_diff.txt"
for requirement_file in ${requirement_files}; do
sed -i "s|# pytradfri|pytradfri|g" ${requirement_file}
sed -i "s|# pybluez|pybluez|g" ${requirement_file}
sed -i "s|# bluepy|bluepy|g" ${requirement_file}
sed -i "s|# beacontools|beacontools|g" ${requirement_file}
@@ -62,8 +62,15 @@ jobs:
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}
if [[ "$(buildArch)" =~ arm ]]; then
sed -i "s|# VL53L1X|VL53L1X|g" ${requirement_file}
fi
done
displayName: 'Prepare requirements files for Hass.io'

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

@@ -1,13 +1,11 @@
"""Start Home Assistant."""
from __future__ import print_function
import argparse
import os
import platform
import subprocess
import sys
import threading
from typing import List, Dict, Any, TYPE_CHECKING # noqa pylint: disable=unused-import
from typing import List, Dict, Any, TYPE_CHECKING
from homeassistant import monkey_patch
from homeassistant.const import __version__, REQUIRED_PYTHON_VER, RESTART_EXIT_CODE
@@ -168,7 +166,7 @@ def get_arguments() -> argparse.Namespace:
parser.add_argument(
"--runner",
action="store_true",
help="On restart exit with code {}".format(RESTART_EXIT_CODE),
help=f"On restart exit with code {RESTART_EXIT_CODE}",
)
parser.add_argument(
"--script", nargs=argparse.REMAINDER, help="Run one of the embedded scripts"
@@ -216,7 +214,7 @@ def check_pid(pid_file: str) -> None:
try:
with open(pid_file, "r") as file:
pid = int(file.readline())
except IOError:
except OSError:
# PID File does not exist
return
@@ -239,8 +237,8 @@ def write_pid(pid_file: str) -> None:
try:
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)
@@ -258,7 +256,7 @@ 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
@@ -280,7 +278,7 @@ async def setup_and_run_hass(config_dir: str, args: argparse.Namespace) -> int:
hass = core.HomeAssistant()
if args.demo_mode:
config = {"frontend": {}, "demo": {}} # type: Dict[str, Any]
config: Dict[str, Any] = {"frontend": {}, "demo": {}}
bootstrap.async_from_config_dict(
config,
hass,
@@ -326,7 +324,7 @@ def try_to_restart() -> None:
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

View File

@@ -45,9 +45,9 @@ async def auth_manager_from_config(
)
)
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
@@ -57,9 +57,9 @@ async def auth_manager_from_config(
*(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
@@ -86,18 +86,6 @@ class AuthManager:
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
@property
def auth_providers(self) -> List[AuthProvider]:
"""Return a list of available auth providers."""
@@ -168,11 +156,11 @@ class AuthManager:
async def async_create_user(self, name: str) -> models.User:
"""Create a user."""
kwargs = {
kwargs: Dict[str, Any] = {
"name": name,
"is_active": True,
"group_ids": [GROUP_ID_ADMIN],
} # type: Dict[str, Any]
}
if await self._user_should_be_owner():
kwargs["is_owner"] = True
@@ -238,7 +226,7 @@ class AuthManager:
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
if group_ids is not None:
@@ -278,9 +266,7 @@ class AuthManager:
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)
@@ -295,15 +281,13 @@ class AuthManager:
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
@@ -356,7 +340,7 @@ class AuthManager:
):
# 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,

View File

@@ -4,7 +4,7 @@ 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
@@ -13,7 +13,7 @@ from homeassistant.util import dt as dt_util
from . import models
from .const import GROUP_ID_ADMIN, GROUP_ID_USER, GROUP_ID_READ_ONLY
from .permissions import PermissionLookup, system_policies
from .permissions.types import PolicyType # noqa: F401
from .permissions.types import PolicyType
STORAGE_VERSION = 1
STORAGE_KEY = "auth"
@@ -34,9 +34,9 @@ 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._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
)
@@ -94,16 +94,16 @@ class AuthStore:
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 = {
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]
}
if is_owner is not None:
kwargs["is_owner"] = is_owner
@@ -210,12 +210,12 @@ class AuthStore:
access_token_expiration: timedelta = ACCESS_TOKEN_EXPIRATION,
) -> models.RefreshToken:
"""Create a new token for a user."""
kwargs = {
kwargs: Dict[str, Any] = {
"user": user,
"client_id": client_id,
"token_type": token_type,
"access_token_expiration": access_token_expiration,
} # type: Dict[str, Any]
}
if client_name:
kwargs["client_name"] = client_name
if client_icon:
@@ -307,8 +307,8 @@ class AuthStore:
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
@@ -325,7 +325,7 @@ class AuthStore:
# was added.
for group_dict in data.get("groups", []):
policy = None # type: Optional[PolicyType]
policy: Optional[PolicyType] = None
if group_dict["id"] == GROUP_ID_ADMIN:
has_admin_group = True
@@ -503,11 +503,11 @@ class AuthStore:
groups = []
for group in self._groups.values():
g_dict = {
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]
}
if not group.system_generated:
g_dict["policy"] = group.policy
@@ -558,7 +558,7 @@ class AuthStore:
"""Set default values for auth store."""
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

@@ -109,7 +109,7 @@ class SetupFlow(data_entry_flow.FlowHandler):
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)
@@ -144,15 +144,13 @@ async def auth_mfa_module_from_config(
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)
)
raise HomeAssistantError(f"Unable to load mfa module {module_name}: {err}")
if hass.config.skip_pip or not hasattr(module, "REQUIREMENTS"):
return module

View File

@@ -22,7 +22,7 @@ from . import (
SetupFlow,
)
REQUIREMENTS = ["pyotp==2.2.7"]
REQUIREMENTS = ["pyotp==2.3.0"]
CONF_MESSAGE = "message"
@@ -95,7 +95,7 @@ class NotifyAuthModule(MultiFactorAuthModule):
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
)
@@ -251,8 +251,10 @@ class NotifyAuthModule(MultiFactorAuthModule):
_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(
@@ -279,18 +281,18 @@ class NotifySetupFlow(SetupFlow):
"""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]:
"""Let user select available notify services."""
errors = {} # type: Dict[str, str]
errors: Dict[str, str] = {}
hass = self._auth_module.hass
if user_input:
@@ -304,7 +306,7 @@ class NotifySetupFlow(SetupFlow):
if not self._available_notify_services:
return self.async_abort(reason="no_available_service")
schema = OrderedDict() # type: Dict[str, Any]
schema: Dict[str, Any] = OrderedDict()
schema["notify_service"] = vol.In(self._available_notify_services)
schema["target"] = vol.Optional(str)
@@ -316,7 +318,7 @@ class NotifySetupFlow(SetupFlow):
self, user_input: Optional[Dict[str, str]] = None
) -> Dict[str, Any]:
"""Verify user can recevie one-time password."""
errors = {} # type: Dict[str, str]
errors: Dict[str, str] = {}
hass = self._auth_module.hass
if user_input:

View File

@@ -2,7 +2,7 @@
import asyncio
import logging
from io import BytesIO
from typing import Any, Dict, Optional, Tuple # noqa: F401
from typing import Any, Dict, Optional, Tuple
import voluptuous as vol
@@ -16,7 +16,7 @@ from . import (
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)
@@ -75,7 +75,7 @@ class TotpAuthModule(MultiFactorAuthModule):
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
)
@@ -107,7 +107,7 @@ class TotpAuthModule(MultiFactorAuthModule):
"""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
return ota_secret
@@ -181,9 +181,9 @@ class TotpSetupFlow(SetupFlow):
"""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]
@@ -197,7 +197,7 @@ 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
@@ -215,8 +215,9 @@ class TotpSetupFlow(SetupFlow):
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(

View File

@@ -1,6 +1,6 @@
"""Auth models."""
from datetime import datetime, timedelta
from typing import Dict, List, NamedTuple, Optional # noqa: F401
from typing import Dict, List, NamedTuple, Optional
import uuid
import attr
@@ -20,7 +20,7 @@ TOKEN_TYPE_LONG_LIVED_ACCESS_TOKEN = "long_lived_access_token"
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,24 +30,20 @@ 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, cmp=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, cmp=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, cmp=False)
# Tokens associated with a user.
refresh_tokens = attr.ib(
type=dict, factory=dict, cmp=False
) # type: Dict[str, RefreshToken]
refresh_tokens = attr.ib(type=Dict[str, "RefreshToken"], factory=dict, cmp=False)
_permissions = attr.ib(
type=Optional[perm_mdl.PolicyPermissions], init=False, cmp=False, default=None

View File

@@ -1,6 +1,6 @@
"""Entity permissions."""
from collections import OrderedDict
from typing import Callable, Optional # noqa: F401
from typing import Callable, Optional
import voluptuous as vol
@@ -8,8 +8,7 @@ from .const import SUBCAT_ALL, POLICY_READ, POLICY_CONTROL, POLICY_EDIT
from .models import PermissionLookup
from .types import CategoryType, SubCategoryDict, ValueType
# pylint: disable=unused-import
from .util import SubCatLookupType, lookup_all, compile_policy # noqa
from .util import SubCatLookupType, lookup_all, compile_policy
SINGLE_ENTITY_SCHEMA = vol.Any(
True,
@@ -90,7 +89,7 @@ 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,13 +1,13 @@
"""Merging of policies."""
from typing import cast, Dict, List, Set # noqa: F401
from typing import cast, Dict, List, Set
from .types import PolicyType, CategoryType
def merge_policies(policies: List[PolicyType]) -> PolicyType:
"""Merge policies."""
new_policy = {} # type: Dict[str, CategoryType]
seen = set() # type: Set[str]
new_policy: Dict[str, CategoryType] = {}
seen: Set[str] = set()
for policy in policies:
for category in policy:
if category in seen:
@@ -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

@@ -1,7 +1,7 @@
"""Helpers to deal with permissions."""
from functools import wraps
from typing import Callable, Dict, List, Optional, cast # noqa: F401
from typing import Callable, Dict, List, Optional, cast
from .const import SUBCAT_ALL
from .models import PermissionLookup
@@ -45,7 +45,7 @@ def compile_policy(
assert isinstance(policy, dict)
funcs = [] # type: List[Callable[[str, str], Optional[bool]]]
funcs: List[Callable[[str, str], Optional[bool]]] = []
for key, lookup_func in subcategories.items():
lookup_value = policy.get(key)
@@ -85,7 +85,7 @@ def _gen_dict_test_func(
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

@@ -16,7 +16,7 @@ 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"
@@ -144,14 +144,10 @@ async def load_auth_provider_module(
) -> 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)
)
raise HomeAssistantError(f"Unable to load auth provider {provider}: {err}")
if hass.config.skip_pip or not hasattr(module, "REQUIREMENTS"):
return module
@@ -166,7 +162,7 @@ async def load_auth_provider_module(
# https://github.com/python/mypy/issues/1424
reqs = module.REQUIREMENTS # type: ignore
await requirements.async_process_requirements(
hass, "auth provider {}".format(provider), reqs
hass, f"auth provider {provider}", reqs
)
processed.add(provider)
@@ -179,12 +175,12 @@ 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
@@ -259,10 +255,10 @@ class LoginFlow(data_entry_flow.FlowHandler):
if not errors:
return await self.async_finish(self.user)
description_placeholders = {
description_placeholders: Dict[str, Optional[str]] = {
"mfa_module_name": auth_module.name,
"mfa_module_id": auth_module.id,
} # type: Dict[str, Optional[str]]
}
return self.async_show_form(
step_id="mfa",

View File

@@ -53,7 +53,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."""
@@ -85,7 +85,7 @@ class CommandLineAuthProvider(AuthProvider):
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()
@@ -146,7 +146,7 @@ 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

View File

@@ -4,7 +4,7 @@ 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
@@ -53,7 +53,7 @@ class Data:
self._store = hass.helpers.storage.Store(
STORAGE_VERSION, STORAGE_KEY, private=True
)
self._data = None # type: Optional[Dict[str, Any]]
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.
@@ -74,7 +74,7 @@ class Data:
if data is None:
data = {"users": []}
seen = set() # type: Set[str]
seen: Set[str] = set()
for user in data["users"]:
username = user["username"]
@@ -210,7 +210,7 @@ class HassAuthProvider(AuthProvider):
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:
@@ -296,7 +296,7 @@ class HassLoginFlow(LoginFlow):
user_input.pop("password")
return await self.async_finish(user_input)
schema = OrderedDict() # type: Dict[str, type]
schema: Dict[str, type] = OrderedDict()
schema["username"] = str
schema["password"] = str

View File

@@ -112,7 +112,7 @@ class ExampleLoginFlow(LoginFlow):
user_input.pop("password")
return await self.async_finish(user_input)
schema = OrderedDict() # type: Dict[str, type]
schema: Dict[str, type] = OrderedDict()
schema["username"] = str
schema["password"] = str

View File

@@ -64,13 +64,9 @@ async def async_from_config_dict(
)
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
)
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
@@ -97,6 +93,17 @@ async def async_from_config_dict(
stop = time()
_LOGGER.info("Home Assistant initialized in %.2fs", stop - start)
if sys.version_info[:3] < (3, 7, 0):
msg = (
"Python 3.6 support is deprecated and will "
"be removed in the first release after December 15, 2019. Please "
"upgrade Python to 3.7.0 or higher."
)
_LOGGER.warning(msg)
hass.components.persistent_notification.async_create(
msg, "Python version", "python_version"
)
return hass
@@ -163,7 +170,7 @@ def async_enable_logging(
# ensure that the handlers it sets up wraps the correct streams.
logging.basicConfig(level=logging.INFO)
colorfmt = "%(log_color)s{}%(reset)s".format(fmt)
colorfmt = f"%(log_color)s{fmt}%(reset)s"
logging.getLogger().handlers[0].setFormatter(
ColoredFormatter(
colorfmt,
@@ -206,9 +213,9 @@ def async_enable_logging(
):
if log_rotate_days:
err_handler = logging.handlers.TimedRotatingFileHandler(
err_handler: logging.FileHandler = logging.handlers.TimedRotatingFileHandler(
err_log_path, when="midnight", backupCount=log_rotate_days
) # type: logging.FileHandler
)
else:
err_handler = logging.FileHandler(err_log_path, mode="w", delay=True)
@@ -253,7 +260,7 @@ def _get_domains(hass: core.HomeAssistant, config: Dict[str, Any]) -> Set[str]:
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
domains.update(hass.config_entries.async_domains())
# Make sure the Hass.io component is loaded
if "HASSIO" in os.environ:
@@ -335,7 +342,7 @@ async def _async_set_up_integrations(
)
# 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),

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": "Introdueix la teva informaci\u00f3 d'inici de sessi\u00f3 a 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": "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": "\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,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 zosta\u0142o 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,12 @@
{
"config": {
"step": {
"user": {
"data": {
"username": "Endere\u00e7o de e-mail"
}
}
},
"title": ""
}
}

View File

@@ -0,0 +1,15 @@
{
"config": {
"error": {
"identifier_exists": "Conta j\u00e1 registada"
},
"step": {
"user": {
"data": {
"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\u0435\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\u0435\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": "\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,45 +1,34 @@
"""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
import logging
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,
ATTR_TIME,
CONF_PASSWORD,
CONF_EXCLUDE,
CONF_NAME,
CONF_LIGHTS,
CONF_USERNAME,
EVENT_HOMEASSISTANT_STOP,
EVENT_HOMEASSISTANT_START,
)
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers import discovery
from homeassistant.helpers.entity import Entity
from .const import ATTRIBUTION, DOMAIN, DEFAULT_CACHEDB
_LOGGER = logging.getLogger(__name__)
ATTRIBUTION = "Data provided by goabode.com"
CONF_POLLING = "polling"
DOMAIN = "abode"
DEFAULT_CACHEDB = "./abodepy_cache.pickle"
NOTIFICATION_ID = "abode_notification"
NOTIFICATION_TITLE = "Abode Security Setup"
EVENT_ABODE_ALARM = "abode_alarm"
EVENT_ABODE_ALARM_END = "abode_alarm_end"
EVENT_ABODE_AUTOMATION = "abode_automation"
EVENT_ABODE_FAULT = "abode_panel_fault"
EVENT_ABODE_RESTORE = "abode_panel_restore"
SERVICE_SETTINGS = "change_setting"
SERVICE_CAPTURE_IMAGE = "capture_image"
SERVICE_TRIGGER = "trigger_quick_action"
@@ -53,6 +42,8 @@ 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"
ABODE_DEVICE_ID_LIST_SCHEMA = vol.Schema([str])
@@ -63,10 +54,7 @@ CONFIG_SCHEMA = 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,
}
)
},
@@ -96,83 +84,86 @@ ABODE_PLATFORMS = [
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.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
abode = await hass.async_add_executor_job(
Abode, username, password, True, True, True, cache
)
hass.data[DOMAIN] = AbodeSystem(abode, polling)
except (AbodeException, ConnectTimeout, HTTPError) as ex:
_LOGGER.error("Unable to connect to Abode: %s", str(ex))
hass.components.persistent_notification.create(
"Error: {}<br />"
"You will need to restart hass after fixing."
"".format(ex),
title=NOTIFICATION_TITLE,
notification_id=NOTIFICATION_ID,
)
return False
setup_hass_services(hass)
setup_hass_events(hass)
setup_abode_events(hass)
for platform in ABODE_PLATFORMS:
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)
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
def change_setting(call):
"""Change an Abode system setting."""
@@ -223,13 +214,9 @@ def setup_hass_services(hass):
)
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."""
if not hass.data[DOMAIN].polling:
@@ -239,14 +226,15 @@ def setup_hass_events(hass):
_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."""
@@ -259,6 +247,8 @@ def setup_abode_events(hass):
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, ""),
}
@@ -271,6 +261,12 @@ def setup_abode_events(hass):
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:
@@ -283,30 +279,36 @@ 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,
)
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
def should_poll(self):
"""Return the polling state."""
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
@@ -320,6 +322,21 @@ class AbodeDevice(Entity):
"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):
"""Update the device state."""
self.schedule_update_ha_state()
@@ -354,7 +371,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
@@ -368,6 +385,6 @@ class AbodeAutomation(Entity):
}
def _update_callback(self, device):
"""Update the device state."""
"""Update the automation state."""
self._automation.refresh()
self.schedule_update_ha_state()

View File

@@ -9,32 +9,31 @@ from homeassistant.const import (
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"
def setup_platform(hass, config, add_entities, discovery_info=None):
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up an alarm control panel for an Abode device."""
data = hass.data[ABODE_DOMAIN]
data = hass.data[DOMAIN]
alarm_devices = [AbodeAlarm(data, data.abode.get_alarm(), data.name)]
data.devices.extend(alarm_devices)
add_entities(alarm_devices)
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."""
@@ -65,11 +64,6 @@ 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."""

View File

@@ -1,19 +1,25 @@
"""Support for Abode Security System binary sensors."""
import logging
import abodepy.helpers.constants as CONST
import abodepy.helpers.timeline as TIMELINE
from homeassistant.components.binary_sensor import BinarySensorDevice
from . import DOMAIN as ABODE_DOMAIN, AbodeAutomation, AbodeDevice
from . import AbodeAutomation, AbodeDevice
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up a sensor for an Abode device."""
import abodepy.helpers.constants as CONST
import abodepy.helpers.timeline as TIMELINE
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
data = hass.data[ABODE_DOMAIN]
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up a sensor for an Abode device."""
data = hass.data[DOMAIN]
device_types = [
CONST.TYPE_CONNECTIVITY,
@@ -24,25 +30,18 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
]
devices = []
for device in data.abode.get_devices(generic_type=device_types):
if data.is_excluded(device):
continue
for device in data.abode.get_devices(generic_type=device_types):
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(devices)
class AbodeBinarySensor(AbodeDevice, BinarySensorDevice):

View File

@@ -2,35 +2,36 @@
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.util import Throttle
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
from . import AbodeDevice
from .const import DOMAIN
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=90)
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up Abode camera devices."""
import abodepy.helpers.constants as CONST
import abodepy.helpers.timeline as TIMELINE
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
data = hass.data[ABODE_DOMAIN]
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up a camera for an Abode device."""
data = hass.data[DOMAIN]
devices = []
for device in data.abode.get_devices(generic_type=CONST.TYPE_CAMERA):
if data.is_excluded(device):
continue
devices.append(AbodeCamera(data, device, TIMELINE.CAPTURE_IMAGE))
data.devices.extend(devices)
add_entities(devices)
async_add_entities(devices)
class AbodeCamera(AbodeDevice, Camera):

View File

@@ -0,0 +1,82 @@
"""Config flow for the Abode Security System component."""
import logging
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 DOMAIN, DEFAULT_CACHEDB # pylint: disable=W0611
CONF_POLLING = "polling"
_LOGGER = logging.getLogger(__name__)
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,5 @@
"""Constants for the Abode Security System component."""
DOMAIN = "abode"
ATTRIBUTION = "Data provided by goabode.com"
DEFAULT_CACHEDB = "abodepy_cache.pickle"

View File

@@ -1,29 +1,31 @@
"""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
from . import AbodeDevice
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up Abode cover devices."""
import abodepy.helpers.constants as CONST
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
data = hass.data[ABODE_DOMAIN]
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode cover devices."""
data = hass.data[DOMAIN]
devices = []
for device in data.abode.get_devices(generic_type=CONST.TYPE_COVER):
if data.is_excluded(device):
continue
devices.append(AbodeCover(data, device))
data.devices.extend(devices)
add_entities(devices)
async_add_entities(devices)
class AbodeCover(AbodeDevice, CoverDevice):

View File

@@ -2,6 +2,8 @@
import logging
from math import ceil
import abodepy.helpers.constants as CONST
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
@@ -16,31 +18,27 @@ from homeassistant.util.color import (
color_temperature_mired_to_kelvin,
)
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
from . import AbodeDevice
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
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[ABODE_DOMAIN]
device_types = [CONST.TYPE_LIGHT, CONST.TYPE_SWITCH]
data = hass.data[DOMAIN]
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
for device in data.abode.get_devices(generic_type=CONST.TYPE_LIGHT):
devices.append(AbodeLight(data, device))
data.devices.extend(devices)
add_entities(devices)
async_add_entities(devices)
class AbodeLight(AbodeDevice, Light):

View File

@@ -1,29 +1,31 @@
"""Support for Abode Security System locks."""
"""Support for the Abode Security System locks."""
import logging
import abodepy.helpers.constants as CONST
from homeassistant.components.lock import LockDevice
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
from . import AbodeDevice
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up Abode lock devices."""
import abodepy.helpers.constants as CONST
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
data = hass.data[ABODE_DOMAIN]
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode lock devices."""
data = hass.data[DOMAIN]
devices = []
for device in data.abode.get_devices(generic_type=CONST.TYPE_LOCK):
if data.is_excluded(device):
continue
devices.append(AbodeLock(data, device))
data.devices.extend(devices)
add_entities(devices)
async_add_entities(devices)
class AbodeLock(AbodeDevice, LockDevice):

View File

@@ -1,10 +1,13 @@
{
"domain": "abode",
"name": "Abode",
"documentation": "https://www.home-assistant.io/components/abode",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/abode",
"requirements": [
"abodepy==0.15.0"
"abodepy==0.16.6"
],
"dependencies": [],
"codeowners": []
}
"codeowners": [
"@shred86"
]
}

View File

@@ -1,13 +1,16 @@
"""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,
)
from . import DOMAIN as ABODE_DOMAIN, AbodeDevice
from . import AbodeDevice
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
@@ -19,23 +22,22 @@ SENSOR_TYPES = {
}
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_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
data = hass.data[ABODE_DOMAIN]
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up a sensor for an Abode device."""
data = hass.data[DOMAIN]
devices = []
for device in data.abode.get_devices(generic_type=CONST.TYPE_SENSOR):
if data.is_excluded(device):
continue
for sensor_type in SENSOR_TYPES:
devices.append(AbodeSensor(data, device, sensor_type))
data.devices.extend(devices)
add_entities(devices)
async_add_entities(devices)
class AbodeSensor(AbodeDevice):

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,37 @@
"""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 . import DOMAIN as ABODE_DOMAIN, AbodeAutomation, AbodeDevice
from . import AbodeAutomation, AbodeDevice
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up Abode switch devices."""
import abodepy.helpers.constants as CONST
import abodepy.helpers.timeline as TIMELINE
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
data = hass.data[ABODE_DOMAIN]
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode switch devices."""
data = hass.data[DOMAIN]
devices = []
# Get all regular switches that are not excluded or marked as lights
for device in data.abode.get_devices(generic_type=CONST.TYPE_SWITCH):
if data.is_excluded(device) or data.is_light(device):
continue
devices.append(AbodeSwitch(data, device))
# Get all Abode automations that can be enabled/disabled
for automation in data.abode.get_automations(generic_type=CONST.TYPE_AUTOMATION):
if data.is_automation_excluded(automation):
continue
devices.append(
AbodeAutomationSwitch(data, automation, TIMELINE.AUTOMATION_EDIT_GROUP)
)
data.devices.extend(devices)
add_entities(devices)
async_add_entities(devices)
class AbodeSwitch(AbodeDevice, SwitchDevice):

View File

@@ -1,7 +1,7 @@
{
"domain": "acer_projector",
"name": "Acer projector",
"documentation": "https://www.home-assistant.io/components/acer_projector",
"documentation": "https://www.home-assistant.io/integrations/acer_projector",
"requirements": [
"pyserial==3.1.1"
],

View File

@@ -1,6 +1,7 @@
"""Use serial protocol of Acer projector to obtain state of the projector."""
import logging
import re
import serial
import voluptuous as vol
@@ -73,7 +74,6 @@ 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
@@ -90,7 +90,6 @@ 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

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

@@ -1,6 +1,8 @@
{
"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."
},

View File

@@ -9,7 +9,7 @@
},
"step": {
"hassio_confirm": {
"description": "Vil du konfigurere Home Assistant til at oprette forbindelse til Adguard Home, der leveres af Hass.io add-on: {addon}?",
"description": "Vil du konfigurere Home Assistant til at oprette forbindelse til AdGuard Home, der leveres af Hass.io add-on: {addon}?",
"title": "AdGuard Home via Hass.io add-on"
},
"user": {

View File

@@ -1,6 +1,8 @@
{
"config": {
"abort": {
"adguard_home_addon_outdated": "This integration requires AdGuard Home {minimal_version} or higher, you have {current_version}. Please update your Hass.io AdGuard Home add-on.",
"adguard_home_outdated": "This integration requires AdGuard Home {minimal_version} or higher, you have {current_version}.",
"existing_instance_updated": "Updated existing configuration.",
"single_instance_allowed": "Only a single configuration of AdGuard Home is allowed."
},

View File

@@ -1,7 +1,32 @@
{
"config": {
"abort": {
"existing_instance_updated": "Se ha actualizado la configuraci\u00f3n existente."
}
"adguard_home_addon_outdated": "Esta integraci\u00f3n requiere AdGuard Home {minimal_version} o superior, usted tiene {current_version}. Por favor, actualice su complemento Hass.io AdGuard Home.",
"adguard_home_outdated": "Esta integraci\u00f3n requiere AdGuard Home {minimal_version} o superior, usted tiene {current_version}.",
"existing_instance_updated": "Se ha actualizado la configuraci\u00f3n existente.",
"single_instance_allowed": "S\u00f3lo se permite una \u00fanica configuraci\u00f3n de AdGuard Home."
},
"error": {
"connection_error": "No se conect\u00f3."
},
"step": {
"hassio_confirm": {
"description": "\u00bfDesea configurar Home Assistant para conectarse al AdGuard Home proporcionado por el complemento Hass.io: {addon} ?",
"title": "AdGuard Home a trav\u00e9s del complemento Hass.io"
},
"user": {
"data": {
"host": "Host",
"password": "Contrase\u00f1a",
"port": "Puerto",
"ssl": "AdGuard Home utiliza un certificado SSL",
"username": "Nombre de usuario",
"verify_ssl": "AdGuard Home utiliza un certificado apropiado"
},
"description": "Configure su instancia de AdGuard Home para permitir la supervisi\u00f3n y el control.",
"title": "Enlace su AdGuard Home."
}
},
"title": "AdGuard Home"
}
}

View File

@@ -1,6 +1,8 @@
{
"config": {
"abort": {
"adguard_home_addon_outdated": "Cette int\u00e9gration n\u00e9cessite AdGuard Home {minimal_version} ou une version ult\u00e9rieure, vous disposez de {current_version}. Veuillez mettre \u00e0 jour votre compl\u00e9ment Hass.io AdGuard Home.",
"adguard_home_outdated": "Cette int\u00e9gration n\u00e9cessite AdGuard Home {minimal_version} ou une version ult\u00e9rieure, vous disposez de {current_version}.",
"existing_instance_updated": "La configuration existante a \u00e9t\u00e9 mise \u00e0 jour.",
"single_instance_allowed": "Une seule configuration d'AdGuard Home est autoris\u00e9e."
},

View File

@@ -0,0 +1,13 @@
{
"config": {
"step": {
"user": {
"data": {
"password": "Jelsz\u00f3",
"port": "Port",
"username": "Felhaszn\u00e1l\u00f3n\u00e9v"
}
}
}
}
}

View File

@@ -1,21 +1,30 @@
{
"config": {
"abort": {
"existing_instance_updated": "Configurazione esistente aggiornata.",
"single_instance_allowed": "\u00c8 consentita solo una singola configurazione di AdGuard Home."
},
"error": {
"connection_error": "Impossibile connettersi."
},
"step": {
"hassio_confirm": {
"description": "Vuoi configurare Home Assistant per connettersi alla AdGuard Home fornita dal componente aggiuntivo di Hass.io: {addon} ?",
"title": "AdGuard Home tramite il componente aggiuntivo di Hass.io"
},
"user": {
"data": {
"host": "Host",
"password": "Password",
"port": "Porta",
"ssl": "AdGuard Home utilizza un certificato SSL",
"username": "Nome utente"
}
"username": "Nome utente",
"verify_ssl": "AdGuard Home utilizza un certificato appropriato"
},
"description": "Configura l'istanza di AdGuard Home per consentire il monitoraggio e il controllo.",
"title": "Collega la tua AdGuard Home."
}
}
},
"title": "AdGuard Home"
}
}

View File

@@ -1,6 +1,8 @@
{
"config": {
"abort": {
"adguard_home_addon_outdated": "\uc774 \ud1b5\ud569 \uad6c\uc131\uc694\uc18c\ub294 AdGuard Home {minimal_version} \uc774\uc0c1\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. \ud604\uc7ac \ubc84\uc804\uc740 {current_version} \uc785\ub2c8\ub2e4. Hass.io AdGuard Home \uc560\ub4dc\uc628\uc744 \uc5c5\ub370\uc774\ud2b8 \ud574\uc8fc\uc138\uc694.",
"adguard_home_outdated": "\uc774 \ud1b5\ud569 \uad6c\uc131\uc694\uc18c\ub294 AdGuard Home {minimal_version} \uc774\uc0c1\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. \ud604\uc7ac \ubc84\uc804\uc740 {current_version} \uc785\ub2c8\ub2e4.",
"existing_instance_updated": "\uae30\uc874 \uad6c\uc131\uc744 \uc5c5\ub370\uc774\ud2b8\ud588\uc2b5\ub2c8\ub2e4.",
"single_instance_allowed": "\ud558\ub098\uc758 AdGuard Home \ub9cc \uad6c\uc131 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4."
},

View File

@@ -1,6 +1,8 @@
{
"config": {
"abort": {
"adguard_home_addon_outdated": "D\u00ebs Integratioun ben\u00e9idegt AdgGuard Home {minimal_version} oder m\u00e9i, dir hutt {current_version}. Aktualis\u00e9iert w.e.g. \u00e4ren Hass.io AdGuard Home Add-on.",
"adguard_home_outdated": "D\u00ebs Integratioun ben\u00e9idegt AdgGuard Home {minimal_version} oder m\u00e9i, dir hutt {current_version}.",
"existing_instance_updated": "D\u00e9i bestehend Konfiguratioun ass ge\u00e4nnert.",
"single_instance_allowed": "N\u00ebmmen eng eenzeg Konfiguratioun vun AdGuard Home ass erlaabt."
},

View File

@@ -1,6 +1,8 @@
{
"config": {
"abort": {
"adguard_home_addon_outdated": "Deze integratie vereist AdGuard Home {minimal_version} of hoger, u heeft {current_version}. Update uw Hass.io AdGuard Home-add-on.",
"adguard_home_outdated": "Deze integratie vereist AdGuard Home {minimal_version} of hoger, u heeft {current_version}.",
"existing_instance_updated": "Bestaande configuratie bijgewerkt.",
"single_instance_allowed": "Slechts \u00e9\u00e9n configuratie van AdGuard Home is toegestaan."
},

View File

@@ -0,0 +1,12 @@
{
"config": {
"step": {
"user": {
"data": {
"username": "Brukarnamn"
}
}
},
"title": "AdGuard Home"
}
}

View File

@@ -1,8 +1,10 @@
{
"config": {
"abort": {
"adguard_home_addon_outdated": "Denne integrasjonen krever AdGuard Home {minimal_version} eller h\u00f8yere, du har {current_version}. Vennligst oppdater Hass.io AdGuard Home-tillegget.",
"adguard_home_outdated": "Denne integrasjonen krever AdGuard Home {minimal_version} eller h\u00f8yere, du har {current_version}.",
"existing_instance_updated": "Oppdatert eksisterende konfigurasjon.",
"single_instance_allowed": "Kun \u00e9n enkelt konfigurasjon av AdGuard Hjemer tillatt."
"single_instance_allowed": "Kun en konfigurasjon av AdGuard Hjemer tillatt."
},
"error": {
"connection_error": "Tilkobling mislyktes."

View File

@@ -1,15 +1,17 @@
{
"config": {
"abort": {
"adguard_home_addon_outdated": "Ta integracja wymaga AdGuard Home {minimal_version} lub nowszej wersji, masz {current_version}. Zaktualizuj sw\u00f3j dodatek Hass.io AdGuard Home.",
"adguard_home_outdated": "Ta integracja wymaga AdGuard Home {minimal_version} lub nowszej wersji, masz {current_version}.",
"existing_instance_updated": "Zaktualizowano istniej\u0105c\u0105 konfiguracj\u0119.",
"single_instance_allowed": "Dozwolona jest tylko jedna konfiguracja AdGuard Home."
},
"error": {
"connection_error": "Po\u0142\u0105czenie nieudane."
"connection_error": "Nie mo\u017cna nawi\u0105za\u0107 po\u0142\u0105czenia."
},
"step": {
"hassio_confirm": {
"description": "Czy chcesz skonfigurowa\u0107 Home Assistant'a, aby po\u0142\u0105czy\u0142 si\u0119 z AdGuard Home przez dodatek Hass.io {addon}?",
"description": "Czy chcesz skonfigurowa\u0107 Home Assistant, aby po\u0142\u0105czy\u0142 si\u0119 z AdGuard Home przez dodatek Hass.io {addon}?",
"title": "AdGuard Home przez dodatek Hass.io"
},
"user": {
@@ -21,8 +23,8 @@
"username": "Nazwa u\u017cytkownika",
"verify_ssl": "AdGuard Home u\u017cywa odpowiedniego certyfikatu."
},
"description": "Skonfiguruj swoj\u0105 instancj\u0119 AdGuard Home, aby umo\u017cliwi\u0107 monitorowanie i nadz\u00f3r sieci.",
"title": "Po\u0142\u0105cz sw\u00f3j AdGuard Home"
"description": "Skonfiguruj instancj\u0119 AdGuard Home, aby umo\u017cliwi\u0107 monitorowanie i kontrol\u0119.",
"title": "Po\u0142\u0105cz AdGuard Home"
}
},
"title": "AdGuard Home"

View File

@@ -0,0 +1,12 @@
{
"config": {
"step": {
"user": {
"data": {
"host": "Servidor",
"port": "Porta"
}
}
}
}
}

View File

@@ -1,6 +1,8 @@
{
"config": {
"abort": {
"adguard_home_addon_outdated": "\u042d\u0442\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 AdGuard Home \u0432\u0435\u0440\u0441\u0438\u0438 {current_version}. \u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u0441\u0438\u044f {minimal_version}, \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043d\u043e\u0432\u0430\u044f. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 Hass.io.",
"adguard_home_outdated": "\u042d\u0442\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 AdGuard Home \u0432\u0435\u0440\u0441\u0438\u0438 {current_version}. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0432\u0435\u0440\u0441\u0438\u044e {minimal_version} \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043d\u043e\u0432\u0443\u044e.",
"existing_instance_updated": "\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430.",
"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."
},

View File

@@ -1,6 +1,8 @@
{
"config": {
"abort": {
"adguard_home_addon_outdated": "Za to integracijo je potrebna AdGuard Home {minimal_version} ali vi\u0161ja, vi imate {current_version}. Prosimo posodobite va\u0161 hass.io AdGuard Home dodatek.",
"adguard_home_outdated": "Za to integracijo je potrebna AdGuard Home {minimal_version} ali vi\u0161ja, vi imate {current_version}.",
"existing_instance_updated": "Posodobljena obstoje\u010da konfiguracija.",
"single_instance_allowed": "Dovoljena je samo ena konfiguracija AdGuard Home."
},
@@ -9,7 +11,7 @@
},
"step": {
"hassio_confirm": {
"description": "\u017delite konfigurirati Home Assistant-a za povezavo z AdGuard Home, ki ga ponuja hass.io add-on {addon} ?",
"description": "\u017delite konfigurirati Home Assistant-a za povezavo z AdGuard Home, ki ga ponuja Hass.io add-on {addon} ?",
"title": "AdGuard Home preko dodatka Hass.io"
},
"user": {

View File

@@ -1,6 +1,8 @@
{
"config": {
"abort": {
"adguard_home_addon_outdated": "\u6574\u5408\u9700\u8981 AdGuard Home {minimal_version} \u6216\u66f4\u65b0\u7248\u672c\uff0c\u60a8\u76ee\u524d\u4f7f\u7528\u7248\u672c\u70ba {current_version}\u3002\u8acb\u66f4\u65b0 Hass.io AdGuard Home \u5143\u4ef6\u3002",
"adguard_home_outdated": "\u6574\u5408\u9700\u8981 AdGuard Home {minimal_version} \u6216\u66f4\u65b0\u7248\u672c\uff0c\u60a8\u76ee\u524d\u4f7f\u7528\u7248\u672c\u70ba {current_version}\u3002",
"existing_instance_updated": "\u5df2\u66f4\u65b0\u73fe\u6709\u8a2d\u5b9a\u3002",
"single_instance_allowed": "\u50c5\u5141\u8a31\u8a2d\u5b9a\u4e00\u7d44 AdGuard Home\u3002"
},

View File

@@ -1,8 +1,9 @@
"""Support for AdGuard Home."""
from distutils.version import LooseVersion
import logging
from typing import Any, Dict
from adguardhome import AdGuardHome, AdGuardHomeError
from adguardhome import AdGuardHome, AdGuardHomeConnectionError, AdGuardHomeError
import voluptuous as vol
from homeassistant.components.adguard.const import (
@@ -10,6 +11,7 @@ from homeassistant.components.adguard.const import (
DATA_ADGUARD_CLIENT,
DATA_ADGUARD_VERION,
DOMAIN,
MIN_ADGUARD_HOME_VERSION,
SERVICE_ADD_URL,
SERVICE_DISABLE_URL,
SERVICE_ENABLE_URL,
@@ -27,6 +29,7 @@ from homeassistant.const import (
CONF_USERNAME,
CONF_VERIFY_SSL,
)
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.entity import Entity
@@ -64,6 +67,17 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool
hass.data.setdefault(DOMAIN, {})[DATA_ADGUARD_CLIENT] = adguard
try:
version = await adguard.version()
except AdGuardHomeConnectionError as exception:
raise ConfigEntryNotReady from exception
if LooseVersion(MIN_ADGUARD_HOME_VERSION) > LooseVersion(version):
_LOGGER.error(
"This integration requires AdGuard Home v0.99.0 or higher to work correctly"
)
raise ConfigEntryNotReady
for component in "sensor", "switch":
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(entry, component)

View File

@@ -1,11 +1,12 @@
"""Config flow to configure the AdGuard Home integration."""
from distutils.version import LooseVersion
import logging
from adguardhome import AdGuardHome, AdGuardHomeConnectionError
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components.adguard.const import DOMAIN
from homeassistant.components.adguard.const import DOMAIN, MIN_ADGUARD_HOME_VERSION
from homeassistant.config_entries import ConfigFlow
from homeassistant.const import (
CONF_HOST,
@@ -83,11 +84,20 @@ class AdGuardHomeFlowHandler(ConfigFlow):
)
try:
await adguard.version()
version = await adguard.version()
except AdGuardHomeConnectionError:
errors["base"] = "connection_error"
return await self._show_setup_form(errors)
if LooseVersion(MIN_ADGUARD_HOME_VERSION) > LooseVersion(version):
return self.async_abort(
reason="adguard_home_outdated",
description_placeholders={
"current_version": version,
"minimal_version": MIN_ADGUARD_HOME_VERSION,
},
)
return self.async_create_entry(
title=user_input[CONF_HOST],
data={
@@ -156,11 +166,20 @@ class AdGuardHomeFlowHandler(ConfigFlow):
)
try:
await adguard.version()
version = await adguard.version()
except AdGuardHomeConnectionError:
errors["base"] = "connection_error"
return await self._show_hassio_form(errors)
if LooseVersion(MIN_ADGUARD_HOME_VERSION) > LooseVersion(version):
return self.async_abort(
reason="adguard_home_addon_outdated",
description_placeholders={
"current_version": version,
"minimal_version": MIN_ADGUARD_HOME_VERSION,
},
)
return self.async_create_entry(
title=self._hassio_discovery["addon"],
data={

View File

@@ -7,6 +7,8 @@ DATA_ADGUARD_VERION = "adguard_version"
CONF_FORCE = "force"
MIN_ADGUARD_HOME_VERSION = "v0.99.0"
SERVICE_ADD_URL = "add_url"
SERVICE_DISABLE_URL = "disable_url"
SERVICE_ENABLE_URL = "enable_url"

View File

@@ -2,9 +2,9 @@
"domain": "adguard",
"name": "AdGuard Home",
"config_flow": true,
"documentation": "https://www.home-assistant.io/components/adguard",
"documentation": "https://www.home-assistant.io/integrations/adguard",
"requirements": [
"adguardhome==0.2.1"
"adguardhome==0.3.0"
],
"dependencies": [],
"codeowners": [

View File

@@ -132,7 +132,7 @@ class AdGuardHomePercentageBlockedSensor(AdGuardHomeSensor):
async def _adguard_update(self) -> None:
"""Update AdGuard Home entity."""
percentage = await self.adguard.stats.blocked_percentage()
self._state = "{:.2f}".format(percentage)
self._state = f"{percentage:.2f}"
class AdGuardHomeReplacedParentalSensor(AdGuardHomeSensor):
@@ -205,7 +205,7 @@ class AdGuardHomeAverageProcessingTimeSensor(AdGuardHomeSensor):
async def _adguard_update(self) -> None:
"""Update AdGuard Home entity."""
average = await self.adguard.stats.avg_processing_time()
self._state = "{:.2f}".format(average)
self._state = f"{average:.2f}"
class AdGuardHomeRulesCountSensor(AdGuardHomeSensor):

View File

@@ -23,8 +23,10 @@
"connection_error": "Failed to connect."
},
"abort": {
"single_instance_allowed": "Only a single configuration of AdGuard Home is allowed.",
"existing_instance_updated": "Updated existing configuration."
"adguard_home_outdated": "This integration requires AdGuard Home {minimal_version} or higher, you have {current_version}.",
"adguard_home_addon_outdated": "This integration requires AdGuard Home {minimal_version} or higher, you have {current_version}. Please update your Hass.io AdGuard Home add-on.",
"existing_instance_updated": "Updated existing configuration.",
"single_instance_allowed": "Only a single configuration of AdGuard Home is allowed."
}
}
}
}

View File

@@ -7,6 +7,8 @@ from collections import namedtuple
import asyncio
import async_timeout
import pyads
import voluptuous as vol
from homeassistant.const import (
@@ -78,7 +80,6 @@ SCHEMA_SERVICE_WRITE_DATA_BY_NAME = vol.Schema(
def setup(hass, config):
"""Set up the ADS component."""
import pyads
conf = config[DOMAIN]
@@ -161,7 +162,6 @@ class AdsHub:
def shutdown(self, *args, **kwargs):
"""Shutdown ADS connection."""
import pyads
_LOGGER.debug("Shutting down ADS")
for notification_item in self._notification_items.values():
@@ -187,7 +187,6 @@ class AdsHub:
def write_by_name(self, name, value, plc_datatype):
"""Write a value to the device."""
import pyads
with self._lock:
try:
@@ -197,7 +196,6 @@ class AdsHub:
def read_by_name(self, name, plc_datatype):
"""Read a value from the device."""
import pyads
with self._lock:
try:
@@ -207,7 +205,6 @@ class AdsHub:
def add_device_notification(self, name, plc_datatype, callback):
"""Add a notification to the ADS devices."""
import pyads
attr = pyads.NotificationAttrib(ctypes.sizeof(plc_datatype))

View File

@@ -1,7 +1,7 @@
{
"domain": "ads",
"name": "Ads",
"documentation": "https://www.home-assistant.io/components/ads",
"documentation": "https://www.home-assistant.io/integrations/ads",
"requirements": [
"pyads==3.0.7"
],

View File

@@ -1,7 +1,7 @@
{
"domain": "aftership",
"name": "Aftership",
"documentation": "https://www.home-assistant.io/components/aftership",
"documentation": "https://www.home-assistant.io/integrations/aftership",
"requirements": [
"pyaftership==0.1.2"
],

View File

@@ -146,10 +146,10 @@ class AfterShipSensor(Entity):
async def async_added_to_hass(self):
"""Register callbacks."""
self.hass.helpers.dispatcher.async_dispatcher_connect(
UPDATE_TOPIC, self.force_update
UPDATE_TOPIC, self._force_update
)
async def force_update(self):
async def _force_update(self):
"""Force update of data."""
await self.async_update(no_throttle=True)
await self.async_update_ha_state()

View File

@@ -1,7 +1,7 @@
{
"domain": "air_quality",
"name": "Air quality",
"documentation": "https://www.home-assistant.io/components/air_quality",
"documentation": "https://www.home-assistant.io/integrations/air_quality",
"requirements": [],
"dependencies": [],
"codeowners": []

View File

@@ -0,0 +1,22 @@
{
"config": {
"error": {
"auth": "La clau API no \u00e9s correcta.",
"name_exists": "El nom ja existeix.",
"wrong_location": "No hi ha estacions de mesura Airly en aquesta zona."
},
"step": {
"user": {
"data": {
"api_key": "Clau API d'Airly",
"latitude": "Latitud",
"longitude": "Longitud",
"name": "Nom de la integraci\u00f3"
},
"description": "Configura una integraci\u00f3 de qualitat d\u2019aire Airly. Per generar la clau API, v\u00e9s a https://developer.airly.eu/register",
"title": "Airly"
}
},
"title": "Airly"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"error": {
"auth": "API-n\u00f8glen er ikke korrekt.",
"name_exists": "Navnet findes allerede.",
"wrong_location": "Ingen Airly m\u00e5lestationer i dette omr\u00e5de."
},
"step": {
"user": {
"data": {
"api_key": "Airly API-n\u00f8gle",
"latitude": "Breddegrad",
"longitude": "L\u00e6ngdegrad",
"name": "Integrationens navn"
},
"description": "Konfigurer Airly luftkvalitet integration. For at generere API-n\u00f8gle, g\u00e5 til https://developer.airly.eu/register",
"title": "Airly"
}
},
"title": "Airly"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"error": {
"auth": "Der API-Schl\u00fcssel ist nicht korrekt.",
"name_exists": "Name existiert bereits",
"wrong_location": "Keine Airly Luftmessstation an diesem Ort"
},
"step": {
"user": {
"data": {
"api_key": "Airly API-Schl\u00fcssel",
"latitude": "Breitengrad",
"longitude": "L\u00e4ngengrad",
"name": "Name der Integration"
},
"description": "Einrichtung der Airly-Luftqualit\u00e4t Integration. Um einen API-Schl\u00fcssel zu generieren, registriere dich auf https://developer.airly.eu/register",
"title": "Airly"
}
},
"title": "Airly"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"error": {
"auth": "API key is not correct.",
"name_exists": "Name already exists.",
"wrong_location": "No Airly measuring stations in this area."
},
"step": {
"user": {
"data": {
"api_key": "Airly API key",
"latitude": "Latitude",
"longitude": "Longitude",
"name": "Name of the integration"
},
"description": "Set up Airly air quality integration. To generate API key go to https://developer.airly.eu/register",
"title": "Airly"
}
},
"title": "Airly"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"error": {
"auth": "La clave de la API no es correcta.",
"name_exists": "El nombre ya existe.",
"wrong_location": "No hay estaciones de medici\u00f3n Airly en esta zona."
},
"step": {
"user": {
"data": {
"api_key": "Clave API de Airly",
"latitude": "Latitud",
"longitude": "Longitud",
"name": "Nombre de la integraci\u00f3n"
},
"description": "Establecer la integraci\u00f3n de la calidad del aire de Airly. Para generar la clave de la API vaya a https://developer.airly.eu/register",
"title": "Airly"
}
},
"title": "Airly"
}
}

View File

@@ -0,0 +1,22 @@
{
"config": {
"error": {
"auth": "La cl\u00e9 API n'est pas correcte.",
"name_exists": "Le nom existe d\u00e9j\u00e0.",
"wrong_location": "Aucune station de mesure Airly dans cette zone."
},
"step": {
"user": {
"data": {
"api_key": "Cl\u00e9 API Airly",
"latitude": "Latitude",
"longitude": "Longitude",
"name": "Nom de l'int\u00e9gration"
},
"description": "Configurez l'int\u00e9gration de la qualit\u00e9 de l'air Airly. Pour g\u00e9n\u00e9rer une cl\u00e9 API, rendez-vous sur https://developer.airly.eu/register.",
"title": "Airly"
}
},
"title": "Airly"
}
}

Some files were not shown because too many files have changed in this diff Show More