Commit Graph

3417 Commits

Author SHA1 Message Date
Erik Montnemery eebb452fb5 Drop unnecessary block_till_done, improve tests for MQTT Cover tests (#23255) 2019-04-19 16:07:28 -07:00
Erik Montnemery 2c42e1a5cb Drop unnecessary block_till_done for MQTT tests (#23254)
* Drop unnecessary block_till_done

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

* Fixed conflicts.

* Updated requirements.

* Added manifest.json file and updated CODEOWNERS.

* Fixed requirements_all.txt.

* Better component tests.

* Removed unnecessary parameter from fixture function.

* Removed tests section from mypy.ini.

* Remove unused ENTITY_ID_FORMAT.

* Stop udp bridge when failed to setup the component.

* Replace DISCOVERY_ constants prefix with DATA_.

* Various change requests.

* Fixed constant name change remifications.

* Added explicit name to fixture.

* Various change requests.

* More various change requests.

* Added EventType for homeassistant.core.Event.

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

* Removed name and icon keys from the component configuration.

* Various change requests.

* Various change reqeusts and clean-ups.

* Removed unnecessary DEPENDENCIES constant from swith platform.

* Replaced configuration data guard with assert.

* Removed unused constants.

* Removed confusing type casting for mypy sake.

* Refactor property device_name to name.

* Removed None guard effecting mypy only.

* Removed unnecessary function from switch entity.

* Removed None guard in use by mypy only.

* Removed unused constant.

* Removed unnecessary context manager.

* Stopped messing around with mypy.ini.

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

* Added test requierment correctyly.

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

* Revert changes in mypy.ini.

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

* Fixed typo in constant name.

* Remove unnecessary async keyword from callable.

* Waiting for tasks on event loop to end.

* Added callback decorator to callable.
2019-04-19 16:54:48 -05:00
Erik Montnemery 73a7d5e6f4 Drop unnecessary block_till_done, improve tests (#23252) 2019-04-19 14:52:23 -07:00
Erik Montnemery f584878204 Drop unnecessary block_till_done (#23251) 2019-04-19 14:51:48 -07:00
Paulus Schoutsen 0533f56fe3
Ask users for a pin when interacting with locks/garage doors (#23223)
* Ask users for a pin when interacting with locks/garage doors

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

* Name the sensors 'motion' instead of 'presence' - match the HA paradigm.
2019-04-19 11:01:54 -07:00
Jc2k b3a8b0056b Add and use an async_fire_service_discovered helper (#23232) 2019-04-19 08:38:50 -04:00
Pascal Vizeli 3e443d253c
Hass.io Add-on panel support for Ingress (#23185)
* Hass.io Add-on panel support for Ingress

* Revert part of discovery startup handling

* Add type

* Fix tests

* Add tests

* Fix lint

* Fix lint on test
2019-04-19 09:43:47 +02:00
Erik Montnemery bea7e2a7fa Fix clearing error message for MQTT vacuum (#23206)
* Fix clearing error message

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

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

* Use regular if statement

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

* Add test for default values

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

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

* Verify we get a timestamp attribute for input_datetime

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

* Simplify the change for a default value

Based on @balloob comment. Simplifying the code

* Revert "Simplify the change for a default value"

This reverts commit c2d67f19a6.
2019-04-18 21:00:35 -07:00
Erik Montnemery 7a84cfb0be Fix optimistic mode + other bugs, tests (#22976) 2019-04-18 20:59:41 -07:00
Erik Montnemery 70ba5eb0ef Add json_attributes_template (#22981) 2019-04-18 20:55:10 -07:00
Jc2k 4ac9a2e9de Add storage for cacheable homekit entity maps. (#23191) 2019-04-18 08:55:34 -07:00
Rohan Kapoor f588fef3b4
Add minimum/maximum to counter (#22608)
* Added minimum/maximum to counter

* Added min/max testcases

* remove duplicate

* cosmetic changes

* removed blank lines at eof

* added newline at eof

* type cv -> vol

* more fixes

* - fixed min/max warnings
- fixed failing tests

* Added linewrap

* - Added cast to int
- Fixed double quotes

* - removed None check in __init__
- fixed failing test

* copy paste fix

* copy paste fix

* Added possibility to change counter properties trough service call

* fixed copy paste errors

* Added '.' to comment

* rephrased docstring

* Fix tests after rebase

* Clean up per previous code review comments

* Replace setup service with configure

* Update services description

* Update tests to use configure instead of setup
2019-04-18 19:02:01 +09:00
Joakim Plate 4a2a130bfa Google assistant skip missing type (#23174)
* Skip entity if no device type found

* Add test for potentially skipped binary sensors

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

* Lint

* Fix tests

* Lint
2019-04-17 22:37:39 -07:00
Richard Mitchell 474ac8b09e Add basic support for native Hue sensors (#22598)
* Add basic support for native Hue sensors

* Update coveragerc

* Simplify attributes

* Remove config option

* Refactor and document device-ness and update mechanism

* Entity docstrings

* Remove lingering config for sensors

* Whitespace

* Remove redundant entity ID generation and hass assignment.

* More meaningful variable name.

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

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

* formatting

* make linter happy.

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

* Remove unnecessary assignment

* Small fixes.

* docstring

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

* Tests & test fixes

* Flake & lint

* Use gather and dispatcher

* Remove unnecessary whitespace change.

* Move component related stuff out of the shared module

* Remove unused remnant of failed approach.

* Increase test coverage

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

* relative imports
2019-04-17 22:13:03 -07:00
Paulus Schoutsen 77244eab1e Fix empty components (#23177) 2019-04-17 19:17:13 -07:00
Jc2k a97fb8fd10 Support fetching/setting humidity of HomeKit controller thermostats (#23040)
* Add support for homekit humidity control

* Add tests
2019-04-17 10:03:32 -07:00
Jc2k f7afd9d6bc Fix handling of homekit_controler zeroconf c# changes (#22995) 2019-04-17 10:02:51 -07:00
Jc2k 88455a8a8b homekit_controller: Support cover stop (#23046) 2019-04-17 10:02:04 -07:00
Pascal Vizeli 073f947ca4 Bump Home Assistant Cloud 0.12 (#23159)
* Home Assistant Cloud 0.12

* Fix raising error

* Fix requirements

* Fix lint
2019-04-17 06:57:26 -07:00
Robert Svensson 0b7e62f737
Axis change how new event is signalled (#23152) 2019-04-17 15:21:42 +02:00
Paulus Schoutsen 37ca9cabd1 Fix check config script (#23151)
* Fix check config script

* Fix typings

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

* Add a test for cover device class sync

* Drop remnant unused import
2019-04-16 17:07:14 -07:00
Jason Hu 308d1fbba0 Rename google/tts.py to google_translate/tts.py (#23090)
* Rename google/tts.py to google_translate/tts.py

* Move config migration before load config file

Migrate default config google tts to google_translate tts

* Revert change in process component config

* Fix tests
2019-04-16 14:27:07 -07:00
Paulus Schoutsen 10e8f4f70a
Add support for after_dependencies (#23148)
* Add support for after_dependencies

* Remove assert false"

* Fix types
2019-04-16 13:40:21 -07:00
Robert Svensson a45df7aac9
Axis - improved internal parameter handling (#23122)
Will result in faster startup per entry due to less network data
2019-04-16 10:46:29 +02:00
Paulus Schoutsen 8b86bf7dd2
Load integrations only once (#23132) 2019-04-15 20:38:24 -07:00
Paulus Schoutsen 6a2da9f9a5
load cleanups (#23112)
* load cleanups

* Remove unused methods

* Allow importing requirements at the top of a file

* Fix test

* Lint

* Install reqs ASAP when loading platforms
2019-04-15 16:45:46 -07:00
Pascal Vizeli 7a78d65633 Fix ingress bug with Firefox (#23121)
* Fix ingress bug with Firefox

* Fix mock

* Fix tests

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

* Improve config entry tests

* Improve coverage for device

* Remove callback when relevant
2019-04-15 15:06:45 -07:00
Andrew Loe dbcdc32f05 Ensure Boolean configuration values are handled correctly. (#22810) 2019-04-15 14:24:20 -07:00
giefca 497038b332 Add Google Assistant garage type (#23115)
* Tests

* Add Google Assistant GARAGE type

* Update test_trait.py

* Key device class by domain

* Update smart_home.py
2019-04-15 13:05:53 -07:00
Jc2k e97b2b7015 Fix homekit_controller climate supported operation_list being blank (#23095)
* Fix tado supported operation modes when used with homekit_controller

* Replace with list comp as requested in review

* More list comps
2019-04-15 17:09:21 +02:00
Paulus Schoutsen b0d893afc9 Remove loader.get_component (#23111)
* Remove get_component

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

* Update gateway to handle new address signal

* Improve description why whe need to keep step_init
2019-04-14 21:50:01 -07:00
giefca b804919eaa Fix for stateless covers (#22962)
* Corrections and test

* Raise error if does not support setting position

* Raising error for stateless and assumed state covers

* Fix pylint

* Tests

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

* Fix tests

* Unflake MQTT vacuum command test
2019-04-14 19:07:05 -07:00
Paulus Schoutsen 6b0180f753
Fix demo (#23087)
* Fix demo

* Fix types

* Fix all the things

* Fix type

* Fix test

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

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

* Added test for query webhook

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

* Fix typing

* Fix check config script
2019-04-14 07:23:01 -07:00
choss c314220167 Ignore secrets.yaml when using include_dir_named (#22929)
* ignore secrets.yaml in include_dir_named include

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

* Lint

* Add comments

* Modernize tests
2019-04-13 20:25:45 -07:00
Andrew Sayre 8c89e260df
HEOS confirm discovered devices before adding (#23063)
* Add host selection step to discovery

* Review feedback

* Fix failing test
2019-04-13 16:44:45 -05:00
Aaron Bach fc481133e7
Create decorator to check service permissions (#22667)
* Create decorator to check service permissions

* Typing

* Linting

* Member comments

* Linting

* Member comments

* Updated import

* Owner comments

* Linting

* Linting

* More work

* Fixed tests

* Removed service helper tests in RainMachine

* Linting

* Owner comments

* Linting

* Owner comments

Co-Authored-By: bachya <bachya1208@gmail.com>
2019-04-13 13:54:29 -06:00
Jason Hu 73a473ac29
Allow aws credential skip validation (#22991)
* Allow aws credential skip validation

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

* Simplify after comments

* Lint

* Fix typing

* Typo
2019-04-12 17:10:19 -07:00
Joakim Plate 0a3e11aa12 Move Broadlink services to component (#21465)
* Register services in broadlink domain

* Add tests for broadlink services

* Resolve review comments

* One more review fix

* Restore auth retry

* Drop unused constants

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

* ImportError
2019-04-12 10:14:16 -07:00
Paulus Schoutsen f7d4c48199
Convert service helper to use async_get_integration (#23023)
* Convert service helper to use async_get_integration

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

* Change load method per PR comments

* update tests
2019-04-12 12:22:56 -04:00
Malte Franken 6c51592e34 Instituto Geográfico Nacional Sismología (Earthquakes) Feed platform (#22696)
* wip

* added new requirements

* fixed tests

* improved test coverage

* added feed entry's title

* added manifest

* updated codeowners

* generated requirements
2019-04-12 09:01:28 +02:00
Robbie Trencheny 7303d56a55
Mobile App: Remove component loading support (#23025)
Loading a component defined in a registration didn't actually work and was undocumented, so let's just remove it instead of fixing #23005.

## Checklist:
  - [X] The code change is tested and works locally.
  - [X] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [X] There is no commented out code in this PR.
2019-04-11 19:06:36 -07:00
Jason Hu ac7f1a7a37
Fix test failed in py35 (#23002) 2019-04-11 12:52:02 -07:00
Rohan Kapoor 6ba9ccf052 Load requirements and dependencies from manifests. Fallback to current `REQUIREMENTS` and `DEPENDENCIES` (#22717)
* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Fix tests

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix light tests [skip ci]

* Fix tests/common

* Fix some mqtt tests [skip ci]

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Fix more tests and manifests

* Readability over shorthand format

* Fix demo/notify tests

* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Load requirements from manifests. Fallback to current REQUIREMENTS

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Readability over shorthand format

* Clean up requirements

* Use integration to resolve deps/reqs

* Lint

* Lint

* revert a change

* Revert a test change

* Fix types

* Fix types

* Add back cache for load component

* Fix test_component_not_found

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

* Fix broken device_tracker tests

* Add docstrings to __init__

* Fix all of the light tests that I broke earlier

* Embed the test.switch platform to fix other tests

* Embed and fix the test.imagimage_processing platform

* Fix tests for nx584

* Add dependencies from platform file's DEPENDENCIES

* Try to setup component when entity_platform is setting up

Fix tests in helpers folder

* Rewrite test_setup

* Simplify

* Lint

* Disable demo component if running in test

Temp workaround to unblock CI tests

* Skip demo tests

* Fix config entry test

* Fix repeat test

* Clarify doc

* One extra guard

* Fix import

* Lint

* Workaround google tts
2019-04-11 01:26:36 -07:00
Paulus Schoutsen f33bf718c7
Google Assistant: Migrate light setting trait to use HSV color spectrum (#22980)
* Migrate light setting trait to use HSV

* Fix tests

* Fix all the typos
2019-04-10 21:35:37 -07:00
Erik Montnemery 38d92b2abf Fix optimistic mode and add tests (#22899) 2019-04-10 13:56:34 -07:00
Andrew Sayre 7624d0e79f Check for supported features in media_player services (#22878)
* Add check for supported features

* Move logic to service helper

* Fix hacked in test for seek

* Test for service required features
2019-04-10 09:44:58 -07:00
Erik Montnemery bc5f0ff0b3 Use dict[key] for required config keys and keys with default values of MQTT light (#22834)
* Use dict[key] for required config keys and keys with default values.

* Improve tests

* Lint

* Improve tests of JSON data
2019-04-10 11:16:41 +02:00
cdce8p 6d2412022b
Fix HomeKit fan speed conversion (#22951)
* Check that speed value from state is not 'None'
* Added tests
2019-04-10 08:35:17 +02:00
Paulus Schoutsen 51e6d5380e
Add color setting trait (#22894) 2019-04-09 20:17:13 -07:00
Paulus Schoutsen e48ef7f441
Fix broken platform components (#22943)
* Fix broken platform components

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

* Remove more usage
2019-04-09 14:45:09 -07:00
Austin Drummond c4e31bc4df Add linked battery sensor to HomeKit (#22788) 2019-04-09 23:13:48 +02:00
Jason Hu c82d2cb11c
Cherry pick test fix (#22939) 2019-04-09 13:59:15 -07:00
Paulus Schoutsen cac00f5b26 Test for circular dependencies using manifests (#22908)
* Integration dependencies

* Lint

* Lint

* Fix one test

* Lint

* Fix load custom component integration

Fix async issue
Add circular dependency detection in manifest validation

* Fix test

* Address review comment

* Apply suggestions from code review

Co-Authored-By: balloob <paulus@home-assistant.io>
2019-04-09 09:30:32 -07:00
Andrew Sayre 4110bd0acf Add support for when device is not logged in to HEOS (#22913) 2019-04-09 18:21:00 +02:00
Evan Bruhn a48c0f2991 Logi Circle public API refactor and config flow (#20624)
* Logi Circle now uses OAuth2 for authentication, added config flow.

* Service calls now dispatched to camera entities via signalled events

* Update from PR review

* Add unit tests for config flow

* Updated CODEOWNERS

* Reverted change to .coveragerc

* Improved test coverage of config flow
2019-04-09 14:26:58 +02:00
Paulus Schoutsen 590eead128
Test fixes (#22911)
* Fix light tests [skip ci]

* Fix tests/common

* Fix some mqtt tests [skip ci]

* Fix tests and component manifests which have only one platform

* Fix more tests and manifests

* Fix demo/notify tests

* Rollback test for demo.geo_location
2019-04-08 23:16:55 -07:00
Andrew Sayre 38f063a158
Fix HEOS discovery could result in multiple config entries (#22903)
* Prevent duplicate entries from discovery

* Update reqs files

* Prevent duplicate entries from discovery
2019-04-08 21:24:40 -05:00
Otto Winter c9ec166f4b Add MQTT climate two-point target temperature support (#22860)
* Add MQTT climate two-point target temperature support

* Sort

* Fix test
2019-04-08 06:28:42 -07:00
cgtobi 8cc5cc7f43 Add zwave network key validator (#22785)
* Add zwave network key validator

* Move validator to zwave component

* Move validator to zwave component

* Move stuff

* Move stuff

* Remove helper and replace with voluptuous method

* Add test

* Fix long line

* Improve tests

* Add more negative tests

* Remove unnecessary assertion

* Make the linter happy

* Remove print
2019-04-08 06:18:52 -07:00
Robbie Trencheny 137d80452d
Minor sensor fixes (#22884)
* Minor sensor fixes

* Fix tests
2019-04-08 01:13:26 -07:00
Jason Hu abe85c73ae
Fix flaky test (#22850) 2019-04-07 12:42:16 -07:00
Robbie Trencheny 3ce6be6297 Add a new mobile_app webhook command to get config (#22813)
* Add a new mobile_app webhook command to get config

* Limit fields returned
2019-04-07 01:16:54 -07:00
Robert Svensson d1bf470899
deCONZ multiple gateways fixup (#22774)
* Initial PR was merged before a proper review was performed
* These fixes follow Martins review comments after merge
2019-04-05 22:21:06 +02:00
teliov b3e60df82a Add google hangouts manual authentication option (#22158)
* Added option to use manual authentication for google hangout component
See: https://hangups.readthedocs.io/en/latest/user_guide.html#logging-in for manual log in example

Bumped up version of hangups to 0.4.9

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

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

Bumped up version of hangups to 0.4.9

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

* fixing missing rebase
2019-04-05 10:11:04 -07:00
Fredrik Erlandsson 876b5fbe96 fixes configuration flow #22706 (#22754) 2019-04-04 23:48:41 -07:00
Jason Hunter a75b151dfa fix flaky test (#22748) 2019-04-04 23:39:19 -07:00
Robert Svensson b50afec5f1 Support multiple deCONZ gateways (#22449)
* Store gateways inside a dict in deconz domain

* Make reachable events gateway specific

* Gateway shall always exist

* Adapt new device signalling to support multiple gateways

* Services follow gateway master

* Working on unload entry

* Make unload and master handover work
Improve tests for init

* Fix config flow

* Fix linting

* Clean up init tests

* Clean up hassio discovery to fit with the rest

* Store gateways inside a dict in deconz domain

* Make reachable events gateway specific

* Gateway shall always exist

* Adapt new device signalling to support multiple gateways

* Services follow gateway master

* Working on unload entry

* Make unload and master handover work
Improve tests for init

* Fix config flow

* Fix linting

* Clean up init tests

* Clean up hassio discovery to fit with the rest

* Add support for services to specify bridgeid
2019-04-04 17:48:24 -07:00
Pascal Vizeli 9bb88a6143
Fix ingress routing with / (#22728) 2019-04-04 17:43:18 +02:00
Pascal Vizeli beb6ddfa68
Change URL handling (#22713) 2019-04-04 11:10:44 +02:00
Kyle Niewiada a5a926bcc6 Raise ConfigEntryNotReady for MQTT connection exception (#22540)
* Raise ConfigEntryNotReady for connection exception

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

* Add new exception

* grammar fix

* Possibly resolve hound comments

* raise `ConfigEntryNotReady` for mqtt connection error

* revert exceptions.py

* Update exceptions.py

* modify test to handle exception

* use constants to control exception scope

* Raise ConfigEntryNotReady for connection exception

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

* Add new exception

* Add new exception

* grammar fix

* Possibly resolve hound comments

* raise `ConfigEntryNotReady` for mqtt connection error

* revert exceptions.py

* Update exceptions.py

* modify test to handle exception

* use constants to control exception scope

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

* Update test_init.py

* Add test for MQTT OSError

* revert file changes from a bad rebase

* Rewrite test with valid syntax

* rewrite test to be less ambiguous

* add empty line

* add back 'axis'

* Remove empty line

* Update tests and undo merge from earlier

* correctly restore test for no connect broker

* fix test mock correctly

* line was too long. hit enter.
2019-04-03 21:51:01 -07:00
Paulus Schoutsen 14da2fd8c9
Google Assistant: Add support for open/close binary sensors (#22674)
* Google Assistant: Add support for binary sensors

* Update test
2019-04-03 10:20:56 -07:00
Jason Hu b4fc1d77ea Fix trend binary sensor and tests (#22686) 2019-04-03 09:04:30 -07:00
Robbie Trencheny b797b1513a Add mobile_app notify platform (#22580)
* Add mobile_app notify platform

* Requested changes

* Fix incorrect param for status code

* Move push_registrations to notify platform file

* Trim down registration information sent in push

* quotes

* Use async version of load_platform

* Add warning for duplicate device names

* Switch to async_get_service

* add mobile_app.notify test

* Update tests/components/mobile_app/test_notify.py

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

* Add docs
2019-04-03 13:53:44 +02:00
Diogo Gomes 7c5846aed2 Fix #22648 - Utility_meter would try to cancel a non existing task (#22669)
* don't cancel tariff that are paused

* test tariffs
2019-04-03 08:49:53 +02:00
Johann Kellerman f2941522ca
Person tests - split from #21703 (#22663) 2019-04-03 05:35:33 +02:00
emontnemery e736521e9f Fix regression from PR #22396 (#22661)
* Fix regression from PR #22396

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

* Bump pychromecast

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

* empty list

* skip empty persons

* hound

* test schema

* ensure_none

* remove any test changes

* remove_falsy validator

* nice!

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

* add bridge ID

* fix attribute

* fix strings

* Address comments

* Add test

* Add only instance / changed maybe later
2019-04-02 19:23:33 -07:00
Andrew Sayre 5651db4b5c
Add discovery support to HEOS component (#22652)
* Add discovery entry point

* Fix test

* Correct test call method

* Update netdisco to 2.6.0
2019-04-02 15:22:49 -05:00
Alex Bahm 471afb4702 Add color support to emulated hue (#19590)
* [Hue API] Add color support

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

* [Hue API] Add unit test for color support
2019-04-02 11:25:58 -07:00
Robert Svensson 8a0b210f87 Axis discovery updates host address (#22632)
* Discovery can update host on existing entries

* Add support in device to update host on entry update

* Fix tests and listener

* Fix hound comment

* Fix failing tests from cleanup
2019-04-02 11:13:11 -07:00
Paulus Schoutsen e00ae35e07
Admin service to automatically add empty schema (#22637)
* Admin service to automatically add empty schema

* Lint
2019-04-02 09:34:11 -07:00
David Bonnes 3bd37d6a65 Improve evohome exception handling and fix bugs (#22140)
* Use latest client library, evohomeclient v0.3.1

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

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

* BUGFIX: missing exception handler, and inappropriate delint hints

* Improve exception handling, and also better messages

* improve code (REDACT secrets); remove TODOs

* minor refactor - improve error message

* more refactoring - improve error message

* remove TODOs

* update to latest evohomeclient library

* Use latest client library, evohomeclient v0.3.1

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

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

* BUGFIX: missing exception handler, and inappropriate delint hints

* Improve exception handling, and also better messages

* improve code (REDACT secrets); remove TODOs

* minor refactor - improve error message

* more refactoring - improve error message

* remove TODOs

* update to latest evohomeclient library

* fix requests for houndci-bot

* Tidy up requests exception handling

* Correct lint error

* update to latest client library

* minor de-lint

* more cleanup of exceptions, messages

* refactored for new exception

* fix error in requirements*_all.txt

* de-lint

* delint unused import

* import 3rd-party library only inside methods

* change honeywell tests

* delint, fix typo

* we dont log usernames, passwords, etc.

* de-lint
2019-04-02 15:11:26 +02:00
Johann Kellerman 2578c8525b
Qwikswitch fix listen loop (#22600)
* Qwikswitch fix listen loop
* 0.93 fix qwikcord upstream
2019-04-02 05:57:25 +02:00
Pascal Vizeli e708032669 Support GET params for websocket ingress path (#22638) 2019-04-01 17:41:08 -07:00
etheralm e78709c5f5 Add support for Dyson Purecool 2018 Air Purifiers models TP04 and DP04 (#22215)
* initial commit

initial commit

rewrite tests

fix merge issue with fan component

fix merge issue with fan component

* correct line length

* change to sync_setup_component for tests

* rename services and move services.yaml

* move hepa and carbon filter state from sensor to fan

* add test for duplicate entities

* fix method call tests

* fix docstring
2019-04-01 19:57:11 +02:00
Andrew Sayre 9f2c5b7231
Add source selection to Heos component (#22592)
* Add select source support

* Review feedback changes

* Removed unused import

* Ignore 'umused' import used in typing

* Only include trace back on useful errors

* Remove return from play_source
2019-04-01 11:58:52 -05:00
Pascal Vizeli 6829ecad9d
Hass.io ingress (#22505)
* Fix API stream of snapshot / Add ingress

* fix lint

* Fix stream handling

* Cleanup api handling

* fix typing

* Set proxy header

* Use header constant

* Enable the ingress setup

* fix lint

* Fix name

* Fix tests

* fix lint

* forward params

* Add tests for ingress

* Cleanup cookie handling with aiohttp 3.5

* Add more tests

* Fix tests

* Fix lint

* Fix header handling for steam

* forward header too

* fix lint

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

* Protect WS API

* Lint
2019-04-01 10:22:51 +02:00
Robbie Trencheny 7bd8c0d39a
Add new mobile_app webhook command: get_zones (#22604)
## Description:

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

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-31 21:30:45 -07:00
Aaron Bach 3d8efd4200 Add permission checking to all RainMachine services (#22399)
* Add permission checking to all RainMachine services

* Linting

* Some initial work

* Owner comments

* Test in place (I think)

* Linting

* Update conftest.py
2019-03-31 19:32:55 -07:00
Jason Hu 388d614e30 Ignore flaky test (#22563) 2019-03-30 21:10:32 -07:00
emontnemery 4d1633807c Turn light off if brightness is 0 (#22400)
* Turn light off if brightness is 0

* Lint

* Review comments

* Lint

* Fixup, add tests

* Fix trådfri light + test
2019-03-30 21:04:32 -07:00
emontnemery 54777a81bc Forward media control to playing group (#22566)
* Forward media control to playing group

* Fix forwarding control to dynamic group

* Fix, add tests
2019-03-30 20:07:01 -07:00
emontnemery 2e375aa802 Improve handling of audio groups (#22396)
* Improve handling of audio groups

* Review comments

* Fix tests

* Add tests

* Review comment

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

* Lint

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

* Fix alpha order
2019-03-30 08:52:17 -05:00
Jc2k 906f0113ad Add more HomeKit device enumeration tests (#22194)
* Test that Aqara Gateway, Ecobee 3 and Lennox E30 is correctly enumerated

* Move json to fixtures directory

* Move IO to executor
2019-03-30 11:21:11 +01:00
Kevin Cooper 4b9e3258dc Add command_template and value_template for MQTT alarm (#21438)
* Option to send pin code with the MQTT payload for MQTT alarm

* publish code via json

Add publish code via json
add code_disarm_required

* publish code via json

Add publish code via json
add code_disarm_required

* implemented command_template

* Fix issue with night arm and add template test

* implemented value_template for mqtt alarm

* Fixed merge errors

* Requested changes

* Resolve lint errors

* Resolve hound issues

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

* Update requirements files

* Removed unecessary mock_coro usage

* Remove assert_called_once usage

* Updates from review feedback

* Remove extra param to error format
2019-03-29 21:10:00 -07:00
giefca b04fd08cea Google assistant: add blinds trait for covers (#22336)
* Update const.py

* Update smart_home.py

* Update trait.py

* Update test_trait.py

* Update smart_home.py

* Update test_trait.py

* Update trait.py

* Update trait.py

* Update test_trait.py

* Update test_trait.py

* Update __init__.py

* Update test_trait.py

* Change email

* Trying to correct CLA

* Update __init__.py

* Update trait.py

* Update trait.py

* Update trait.py

* Update trait.py

* Update __init__.py

* Update test_trait.py

* Update test_google_assistant.py

* Update trait.py

* Update trait.py

* Update test_trait.py

* Update test_trait.py
2019-03-29 20:51:47 -07:00
Robert Svensson 5f6037d563
Axis component reflect device availability (#22401) 2019-03-29 15:20:12 +01:00
Jason Hu 8d86722c0e Fix dev branch (#22493) 2019-03-28 11:09:12 +01:00
Jason Hu 6ba2891604 Add trusted_users in trusted networks auth provider (#22478) 2019-03-27 21:53:11 -07:00
Jason Hunter 26726af689 Stream Record Service (#22456)
* Initial commit of record service for live streams

* fix lint

* update service descriptions

* add tests

* fix lint
2019-03-27 21:47:07 -07:00
Robbie Trencheny 7741ec4d5a Great migration notify (#22406)
* Move notify platforms into components

* Move notify tests

* Fix notify tests

* More fixes

* Update requirements

* Update .coveragerc

* Run gen reqs
2019-03-27 20:36:13 -07:00
Heine Furubotten f11f5255ae Entur upgrade to v0.2.0: async polling, number of departures, omit non boarding departures (#22001)
* The Great Migration

* removed outdated tests

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

* reduced nesting and clearing of attributes

* Removed test data

* ensure attribution and stop id in attributes

* docstring fixes

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

* fix test requirements comment from gen
2019-03-27 20:04:35 -07:00
Jc2k 8bf5e57b7f Move HKDevice into connection (#22430) 2019-03-27 20:01:10 -07:00
Jack Wilsdon 14ceb8472f Return percentage information in Alexa Smart Home response (#22440) 2019-03-27 19:58:52 -07:00
Alexei Chetroi e670491c86 Targeted ZHA permit joins. (#22482)
* Targeted ZHA permit service.

* Convert IEEE string to EUI64 usiv vol schema.

* Update test units.

* Lint.

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

* Clean up test
2019-03-27 19:48:05 -07:00
Ryan Claussen c3f090af17 Add hourly forecasts to Dark Sky (#21820) 2019-03-27 20:11:25 +00:00
Leonardo Merza 29ad3961e5 Use voluptuous error string for websocket validation error (#21883)
* use voluptuous error string to websocket validation error

* added exception logging to websocket error

* add detailed message to websocket validation error

* add error message to websocket validation error

* Add humanize error for websocket invalid vol error

* Add humanize error for websocket invalid vol error

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

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

* Loading registries concurent with stage 1.

* Removed comments
2019-03-27 22:06:20 +08:00
Pascal Vizeli a55afa8119 Update ha-ffmpeg 2.0 (#22427) 2019-03-27 07:55:05 +01:00
Paulus Schoutsen 1766536812
Fix test name (#22421) 2019-03-26 15:24:28 -07:00
Pascal Vizeli 3fddf5df08 Enable hass.io panel without ping (#22388)
* Enable hass.io panel without ping

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

* Migrate tts tests

* Update requirements

* Fix path to demo mp3
2019-03-26 07:34:16 -07:00
Paulus Schoutsen 65432ba552 Move core stuff into Home Assistant integration (#22407)
* Move core stuff into Home Assistant integration

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

* cleanup and add tests

* respect camera preferences on each request stream call

* return the new prefs after update
2019-03-26 08:31:29 -04:00
Jason Hu e85b089eff
Set default parallel_update value should base on async_update (#22149)
* Set default parallel_update value should base on async_update

* Set default parallel_update value should base on async_update

* Delay the parallel_update_semaphore creation

* Remove outdated comment
2019-03-25 23:53:36 -07:00
uchagani 0c4380a78d remove config sections from hass.config.components (#22370)
* remove config sections from hass.config.components

* fix tests
2019-03-25 22:36:39 -07:00
Paulus Schoutsen f1a0ad9e4a
Frontend indicate require admin (#22272)
* Allow panels to indicate they are meant for admins

* Panels to indicate when they require admin access

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

* Fix flake8
2019-03-25 10:04:35 -07:00