Commit Graph

3002 Commits (c3c92232da042392cb7a49c993ceed499260e0ca)

Author SHA1 Message Date
David F. Mulcahey 868820c424
add device info API (#20950) 2019-02-11 14:38:04 -05:00
Patrick T.C 49ecca9cb9 Set cover level using emulated_hue (#19594)
* set cover level using emulated_hue

* changed mapping for service turn_on/off for cover.

* removed whitespace for the sake of hound

* using const for domains instead of hardcoded strings.

* change length of lines for the sake of hound

* fixed under-intended line

* changed intent for the sake of hound
2019-02-11 13:59:34 -05:00
Tim van Cann d049b521b2 Add Google pubsub component (#20049)
* Add google pubsub component

* Add tests and requirements

* Make python3.5 compatible

* Fix linting

* Fix pubsub test

* Code review comments

* Add missing docstrings

* Update requirements_all

* Code review comment

- Remove pylint ignores
- Don't modify global environment
2019-02-10 21:45:46 +01:00
javicalle 13421b326b Fix RFLink restore state (#20588)
* some minor tests refactor

* unused import

* async/await refactor

* Correct tests failures

* Restore state bug
added call to super().async_added_to_hass()

* Show brightness attribute if device supports it

* Fix light/test_rflink 

Dimmable devices defaults to 255 brightness

* delete super().device_state_attributes call
2019-02-10 12:50:40 +01:00
emontnemery 5f7f7777a0 Fix encoding for MQTT camera (#20932) 2019-02-10 12:35:54 +01:00
David F. Mulcahey 326010629c
Add some api tests for ZHA (#20909)
* start API tests

* blank lines
2019-02-10 06:29:36 -05:00
Jason Hu 8137b0bb9e Fix coroutine never awaited warning in test (#20892) 2019-02-09 15:13:12 -06:00
Paulus Schoutsen 987b5cd905
Person component: add storage and WS commands (#20852)
* Forbid duplicate IDs

* Allow loading persons from storage

* Convert to PersonManager

* Add storage support and WS commands to Person component

* Convert list command to differentiate types

* Allow loading person component without defining persons

* Fix cleanups after update/delete

* Address comments

* Start tracking when HA started
2019-02-09 10:41:40 -08:00
Joakim Plate d16d14b648 Media player const.py move (#20822)
* Move more constants to const.py

* Import constants directly from const

* ATTR_ENTITY_ID is not defined in media_player

* MEDIA_PLAYER_PLAY_MEDIA_SCHEMA is still in __init__.py

* Correct imports in tts

* PLATFORM_SCHEMA, SCHEMA is still defined in __init__.py

* Pandora imports several services

* Some additional fixes for move of const in media_player

* Fix hound lengths
2019-02-08 14:18:18 -08:00
Rohan Kapoor d5fad33599 Add better handling of deprecated configs (#20565)
* Add better handling of deprecated configs

* Embed the call to has_at_most_one_key in deprecated

* Add tests for checking the deprecated logs

* Add thoroughly documented tests

* Always check has_at_most_one_key

* Fix typing

* Move logging helpers to homea new logging helper

* Lint

* Rename to KeywordMessage instead of BraceMessage

* Remove unneeded KeywordStyleAdapter

* Lint

* Use dict directly rather than dict.keys() when creating set

* Patch the version in unit tests, update logging and use parse_version

* Re-add KeywordStyleAdapter and fix tests

* Lint

* Lint
2019-02-08 11:14:50 +01:00
Diogo Gomes 55d1d3d8ae Move weather.ipma into a component (#20706)
* initial version

* works

* lint

* move

* hound

* fix formatting

* update

* add extra features

* houmd

* docstring

* fix tests

* lint

* update requirements_all.txt

* new tests

* lint

* update CODEOWNERS

* MockDependency pyipma

* hound

* bump pyipma version

* add config_flow tests

* lint

* improve test coverage

* fix test

* address comments by @MartinHjelmare

* remove device_info

* hound

* stale comment

* Add deprecation warning

* address comments

* lint
2019-02-08 10:55:58 +01:00
Andrew Sayre 706810bbce Add SmartThings Sensor platform (#20848)
* Add Sensor platform and update pysmartthings 0.6.0

* Add tests for Sensor platform

* Redesigned capability subscription process

* Removed redundant Entity inheritance

* Updated per review feedback.
2019-02-07 21:51:17 -07:00
Paulus Schoutsen e59240fa00
Add default_config component (#20799)
* Add default config component

* Add default_config to default config

* Fix comments
2019-02-07 20:07:15 -08:00
Paulus Schoutsen 49bab574b9
Clean up Z-Wave pt2 (#20842) 2019-02-07 17:27:31 -08:00
Martin Hjelmare 5f76628665 Add MVP person component (#20290)
* Add person component

* Required first name.
* Optional last name and user id.
* Optionally track device trackers. Last device tracker state change will
  set state.
* Set device tracker state entity_id as source attribute.
* Set coordinates of device tracker state as state attributes.
* Restore state.

* Parse restored state too

* Clean up

* Add missing property decorator

* Validate source entities as device trackers

* Only use name instead of first and last name

* Add user_id validation

* Add unique_id

* Remove not needed properties

* Uniform docstrings

* Fail component setup if no valid entities

* Add tests

* Add id and use that for unique_id

* Clean up
2019-02-07 15:25:30 -08:00
Paulus Schoutsen a9672b0d52 Load as many components in parallel as possible (#20806)
* Load as many components in parallel as possible

* Lint
2019-02-07 22:56:40 +01:00
Paulus Schoutsen f3b20d138e Embed Z-Wave platforms (#20810) 2019-02-07 22:50:59 +01:00
Paulus Schoutsen 16159cc3d0
Update platform loading path (#20807)
* Warn when platform loaded from an entity component folder

* Fix tests
2019-02-07 13:33:12 -08:00
Diogo Gomes e0f63132e8 Deduplication of log entries in system_log (#20493)
* Deduplication of log entries

* fix
2019-02-07 13:32:37 -08:00
David F. Mulcahey d4c34c6b02 Cleanup zha listener lifecycle (#20789) 2019-02-07 09:23:01 +01:00
David F. Mulcahey 03ab152c82 Enable the available property for zha entities (#20788) 2019-02-07 09:14:19 +01:00
Robert Schindler 06f3e8137a Added command_line auth provider that validates credentials by calling a command (#19985)
* Added external auth provider that calls a configurable program

Closes #19975

* Raise proper InvalidAuth exception on OSError during program execution

* Changed name of external auth provider to command_line

* Renamed program config option to command in command_line auth provider

* Made meta variable parsing in command_line auth provider optional

* Added tests for command_line auth provider

* Fixed indentation

* Suppressed wrong pylint warning

* Fixed linting

* Added test for command line auth provider login flow

* Log error when user fails authentication

* Use %r formatter instead of explicit repr()

* Mix all used names of typing module into module namespace

I consider this nasty and bad coding style, but was requested by
@awarecan for consistency with the remaining codebase.

* Small code style change

* Strip usernames with command_line auth provider
2019-02-06 16:36:41 -08:00
Greg Johnson fb1da53568 Allow both VOLUME_STEP and VOLUME_SET (#20732)
* Allow both VOLUME_STEP and VOLUME_SET

Seems like it should be possible to support both at the same time.

* Update test to allow VOLUME_SET and VOLUME_STEP
2019-02-06 11:16:21 -08:00
Paulus Schoutsen 59393ab085
Prevent template changing options (#20775)
* Prevent complex template validation changing input value

* Remove deprecation warnings
2019-02-06 11:15:27 -08:00
David F. Mulcahey e6cd04d711
ZHA component rewrite (#20434)
* rebase reorg

* update coveragerc for now

* sensor cleanup

* remove availability tracking for entities

* finish removing changes from tests

* review comments pass 1

* use asyncio.gather - review comments

* review comments

* cleanup - review comments

* review comments

* review comments

* cleanup

* cleanup - review comments

* review comments

* review comments

* use signal for removal

* correct comment

* remove entities from gateway

* remove dead module

* remove accidently committed file

* use named tuple - review comments

* squash bugs

* squash bugs

* add light and sensor back to coveragerc until % is higher
2019-02-06 13:33:21 -05:00
Paulus Schoutsen b8cc547fa3
Move components to folders (#20774)
* Move all components into folders

* Move component tests into folders

* Fix init moving

* Move tests

* Lint

* Update coverage

* Fix service descriptions

* Update CODEOWNERS
2019-02-05 19:31:15 -08:00
Joakim Plate 3bb5caabe2 Reproduce states by letting each component opt in on handling state recovery itself (#18700)
* Move group to it's own setup

* Let each component to handle restore of state

* Move constants for climate into const.py

For now import all into __init__.py to keep backword compat

* Move media plyaer constants to const.py file

For now import all constants into __init__.py to keep
backword compatibility

* Move media player to it's own file

* Move climate to it's own file

* Remove ecobee service from common components

BREAKING CHANGE

* Add tests for climate

* Add test for media_player

* Make sure we clone timestamps of state

* Add tests for groups

* Remove old tests for media player, it's handled by other tests

* Add tests for calls to component functions

* Add docstring for climate const

* Add docstring for media_player const

* Explicitly import constants in climate

* Explicitly import constants in media_player

* Add period to climate const

* Add period to media_player const

* Fix some lint errors in climate

* Fix some lint errors in media_player

* Fix lint warnings on climate tests

* Fix lint warnings on group tests

* Fix lint warnings on media_player tests

* Fix lint warnings on state tests

* Adjust indent for state tests
2019-02-05 17:25:27 -08:00
Andreas Hartl a94a24f6f8 Added HomeKit fan speed based on speed_list (#19767)
Speed_list needs to be in ascending order.
2019-02-05 16:11:19 +01:00
Tomas Hellström 208ea6eae4 SMHI component: Bugfix - calc precipitation (#20745)
* Bugfix - calc precipitation

* Feedback: better way to skip first forecast

* Even less messy way

* lint error
2019-02-05 07:43:04 -05:00
Daniel Høyer Iversen ef6b0b8e0b Update flake8 to 3.7.5 (#20761)
* Upgrade flake8

* Upgrade flake8

* Add noqa for hound
2019-02-05 11:12:09 +01:00
Paulus Schoutsen 2733919cd8 Keep cloud tokens always valid (#20762)
* Keep auth token always valid

* Remove unused refresh_auth message

* Capture EndpointConnectionError

* Lint
2019-02-05 10:45:03 +01:00
emontnemery b1faad0a50 Use PLATFORM_SCHEMA_BASE as base schema for additional components. (#20578)
* Disable extra=vol.ALLOW_EXTRA for additional platforms.

* Remove PLATFORM_SCHEMA_2

* Add entity_namespace to base platform schema
2019-02-04 21:52:19 -08:00
Pascal Vizeli 29b64d56be Fix cloud webhook body (#20739)
* Bugfix cloud webhooks text response

* address comments

* Fix lint
2019-02-04 10:58:38 -08:00
emontnemery 79d3f533a9 Add missing abbreviations (#20741) 2019-02-04 10:54:40 -08:00
David F. Mulcahey 0cf71d5bcb
Add ZHA light tests (#20713)
* add sensor tests

* add light test

* update comments

* fix coveragerc after rebase
2019-02-04 06:51:47 -05:00
David F. Mulcahey ff9a33ba36
Add ZHA fan tests (#20712)
* add sensor tests

* add fan tests

* hound

* fix coveragerc

* update comments
2019-02-04 06:51:32 -05:00
David F. Mulcahey b9d108284b
Add ZHA binary sensor tests (#20711)
* add sensor tests

* add binary sensor tests

* add comments

* fix coveragerc after rebase
2019-02-04 06:51:13 -05:00
Paulus Schoutsen 07b5b68a51 Improve cloud error handling (#20729)
* Improve cloud error handling

* Lint
2019-02-04 10:14:30 +01:00
David F. Mulcahey 9c11602674 Add ZHA sensor tests (#20710)
* add sensor tests

* update switch test

* add sensor back to coveragerc

* review comments

* added comments
2019-02-03 22:03:35 +01:00
David F. Mulcahey 74cdf7c347
Add tests for ZHA switch (#20691)
* start test setup

test cleanup

test deps

update switch test

actually update test deps

cleanup and remove switch from coveragerc

comment

refactor to use fixtures and shared components

lint

* remove availability part that isn't in zha yet

* review comments and cleanup

* review comments

* add switch back unil post reorg merge
2019-02-03 07:03:31 -05:00
Andrew Sayre 38ea43b678 Add SmartThings button support via events (#20707)
* Add event support for buttons

* binary_sensor test clean-up
2019-02-02 22:08:37 -08:00
Andrew Sayre 6458abca2e Add SmartThings Binary Sensor platform (#20699)
* Add SmartThings binary_sensor platform

* Fixed comment typo.
2019-02-02 14:06:30 -08:00
Andrew Sayre acf5b04231 Add SmartThings Fan platform (#20681)
* Add SmartThings fan

* Removed unnecessary update method

* Corrected usage of async_schedule_update_ha_state

* Clean-up/optimization
2019-02-02 14:04:29 -08:00
emontnemery bada9b5e0b
Add entity_namespace to PLATFORM_SCHEMA (#20693)
* Add entity_namespace to base platform schema

* Add test

* Fix
2019-02-02 18:31:28 +01:00
Paulus Schoutsen e2d3c27e85
Embed all platforms into components (#20677)
* Consolidate all components with platforms

* Organize tests

* Fix more tests

* Fix Verisure tests

* one final test fix

* Add change

* Fix coverage
2019-02-02 07:13:16 -08:00
Andrew Sayre a24da611c5 Add SmartThings Light platform (#20652)
* Add SmartThings Light platform and tests

* Cleaned a few awk comments

* Updates per review feedback

* Switched to super

* Changes per review feedback
2019-02-02 07:12:24 -08:00
Diogo Gomes ca143f8a35 print() left behind (#20689) 2019-02-02 14:54:46 +01:00
Diogo Gomes 384a9625c9 fix test commented in #20678 (#20680) 2019-02-01 22:11:50 -08:00
Paulus Schoutsen c9671f8205 Test is broken 2019-02-01 16:31:53 -08:00
Paulus Schoutsen ec57db78b5
Consolidate config flow components (#20635)
* Consolidate config flow components

* Fix tests

* Fix tests

* Put unifi back

* Fix reqs

* Update coveragerc
2019-02-01 15:45:44 -08:00