Commit Graph

3760 Commits (cff7fd0ef3bb314455455b0fca07420a8c9c2fb6)

Author SHA1 Message Date
Alexei Chetroi f7cfe908f7 Refactor ZHA Zigbee Cluster report configuration (#25589)
* Move ZCL report configs to ZHA core channels.

* Refactor ZCL report configuratopm and cluster binding.

* Tests for ZHA channel configuration.

* Update tests.

* Remove INPUT_BIND_ONLY_CLUSTER ZHA core registry.

We always need bind a cluster, but not always need to configure
attribute reporting. No reporting is done on ZCL "client" clusters.

* Lint

* Black
2019-08-04 18:20:03 -04:00
Robert Svensson 576291779e
UniFi - reverse connectivity logic (#25691)
* Make connectivity control in line with other implementations
2019-08-04 16:57:36 +02:00
Robert Svensson 93dfd613aa
Options to not track wired clients (#25669) 2019-08-02 23:51:06 +02:00
Alexei Chetroi 77e4ff94fd ZHA code cleanup. (#25644)
* isort ZHA imports.

* Sort zha channel registry.

* Sort ZHA core registry.

* Sort ZHA core consts.
2019-08-02 06:05:23 -04:00
Robert Svensson 39257164a9
UniFi - allow configuration to not track clients or devices (#25642)
* Allow configuration to not track clients or devices
2019-08-02 10:13:00 +02:00
Santobert 944cd70753 Feature zwave preset modes (#25537)
* Initial commit

* Add some more code

* Local tests passing

* Remove unnecessary line

* Add preset attributes to __init__

* Remove some more debugger lines

* Add some tests

* Fix comparision to None

* Improve test coverage

* Use unknown modes as presets

* Bugfixes and test improvements

* Add tests for unknown preset modes

* linting

* Improve mappings

* Move PRESET_MANUFACTURER_SPECIFIC to zwave

* Replace isinstance with cast

* Add test for hvac_action

* hvac_mode is never None

* Improved mapping of current mode to hvac/preset modes

* Fix bugs where hvac_mode is None

* Add default hvac mode

* Fixed default hvac mode

* Fix linting

* Make flake happy

* Another linting

* Make black happy

* Complete list of default hvac modes

* Add mapping to heat/cool eco

* Fixed another bug where mapping goes wrong
2019-08-02 10:00:33 +02:00
Paulus Schoutsen a398b39e12
Expose comfort presets as HA presets (#25491)
* Expose comfort presets as HA presets

* Fix bugs

* Handle unavailable

* log level debug on update

* Lint
2019-08-01 12:32:48 -07:00
Paulus Schoutsen 3649a1b5e9
Filter out empty results in history API (#25633) 2019-08-01 11:52:57 -07:00
Ville Skyttä c2556d90ea
Huawei LTE sensor unique id improvements (#25609)
* Convert sensor setup to async

* Improve sensor unique ids

* Save some indent levels, use f-string formatting

* Require getmac in tests

* Fix RouterData init in tests

* Make discovery_info optional in async_setup_platform signature
2019-08-01 19:22:04 +03:00
Robert Svensson ceac35797e
Handle disabled devices (#25625) 2019-08-01 17:22:08 +02:00
Joakim Plate 84abb57ebc Fix test_install_existing_package (#25627)
homeassistant.util.package.install_package is not
a corutine.
2019-08-01 09:37:37 -05:00
tleegaard 61c6838fa2 Add support for HomeKit CO2 sensors (#25603) 2019-08-01 11:24:46 +01:00
Paulus Schoutsen 93c0db2328 Lint 2019-07-31 12:53:07 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Ville Skyttä 0490167a12 Azure flake8 dep, docstring fixes (#25605)
* Fix Azure CI flake8 deps

* Docstyle fixes
2019-07-31 12:21:36 -07:00
Thomas Lovén 671cb0d092 Return history for entities in the order they were requested (#25560)
* Return history for entities in the order they were requested

* Fix problems. Add tests

* Update __init__.py
2019-07-31 11:59:25 -07:00
Ross Dargan 5e7465a261 Change how ring polls for changes to allow more platforms to be added (#25534)
* Add in a switch to control lights and sirens

* Improve the way sensors are updated

* fixes following flake8

* remove light platform, and fix breaking test.

* Resolve issues with tests

* add tests for the switch platform

* fix up flake8 errors

* fix the long strings

* fix naming on private method.

* updates following p/r

* further fixes following pr

* removed import

* add additional tests to improve code coverage

* forgot to check this in
2019-07-31 11:08:40 -07:00
croghostrider 8ffc6c05b7 Fix wrong exposed light for emulated hue (#25581)
* Add auto detect if brightness is supported

* Fix

* Fix tests

* Cleanup
2019-07-31 10:34:37 -07:00
Paulus Schoutsen 39b8102ce6
Bump Python support to min Python 3.6.0 (#25582)
* Bump Python support to min Python 3.6.0

* Fix type
2019-07-30 16:44:39 -07:00
Paulus Schoutsen 0257fe0375
Fix Ecobee HVAC action + available presets (#25488)
* Fix Ecobee HVAC action + available presets

* Update python-ecobee-api to 0.0.21

* Include proper operation list.

* Allows pass on preset to set_climate_hold

* Remove aux heat as a preset

* Fix test
2019-07-30 15:25:03 -07:00
Alexei Chetroi 5aa35b52cc
ZHA log helper (#25543)
* Logging helper.
* Use log helper for ZHA entities.
* Use log helper for ZHA core device.
* Log helper for ZHA core channels.
* Lint
* ZHA fixture fix.
2019-07-30 15:19:24 -04:00
Robert Svensson 35900964cb
UniFi - Track devices (#25570) 2019-07-30 10:05:51 +02:00
Robert Svensson 891f19b43f
UniFi device tracker restore clients (#25532) 2019-07-29 23:13:04 +02:00
Robert Svensson dc722adbb5
UniFi POE control restore clients (#25558)
* Restore POE controls on restart
2019-07-29 19:48:38 +02:00
ktnrg45 2e300aec5a Add PS4 tests for media player (#25415)
* Add tests for media_player

* remove ps4/media_player.py

* Add unsubscribe method to unload

* Add_to_hass instead of add_to_manager

* Use hass.states for states

* Fix assertions

* fix tests

* Add schedule update

* Remove entity assertions
2019-07-29 09:38:17 -04:00
Maikel Punie 1f9f201571 Enable velbus config entries (#25308)
* Initial work on config_flow

* Finish config flow

* Pylint checks, make sure the import only happens once

* Added support for unloading, small fixes

* Check in the hassfest output files

* Flake8 fixes

* pylint mistake after flake8 fixes

* Work on comments

* Abort the import if it is already imported

* More comments resolved

* Added testcases for velbus config flow

* Fix pylint and flake8

* Added connection test to the config flow

* More sugestions

* renamed the abort reason

* excluded all but the config_flow.py from the velbus component in coveragerc

* Rewrote testcases with a patched version of _test_connection

* Docstyle fixes

* Updated the velbus testcases

* just yield

* flake8 fixes
2019-07-29 09:21:26 +02:00
Thomas Germain 4936e55979 Improve seventeentrack (#25454)
* Code improvement + tests

* review

* review + moving to pytest test function

* move test to async

* remove code comment
2019-07-28 19:55:46 +02:00
Robert Svensson da53e0a836 deCONZ - Add power attribute for consumption sensors (#25512)
* Add power attribute for consumption sensors

* Bump dependency to v62
2019-07-28 18:25:38 +02:00
Paulus Schoutsen 9efb759a98
Fire lovelace updated event when update detected (#25507) 2019-07-26 20:30:51 -07:00
Paulus Schoutsen 0df1bb5029 Fix python 3.5 test 2019-07-26 16:15:46 -07:00
aschamberger 3512d05467 Add ord() to template filters (#25398)
* Add ord() to template filters

* Remove trailing whitespace

* add test
2019-07-25 15:06:51 -07:00
Robert Svensson b6934f0cd0
UniFi block clients (#25478)
* Allow blocking clients on UniFi networks
2019-07-25 16:56:56 +02:00
Paulus Schoutsen fae3546910 Allow cors for static files (#25468) 2019-07-25 13:52:27 +02:00
Aaron Bach 9e36448f03 Add area support to vacuum service schemas (#25443)
* Add area support to vacuum service schemas

* Fixed tests

* De-couple platform schemas
2019-07-24 08:29:08 +02:00
Aaron Bach 5e2dfb14fb Add area support to lock service schemas (#25435)
* Add area support to lock service schemas

* extend

* Fixed tests

* Fixed tests
2019-07-23 16:05:21 -07:00
Joe Trabulsy a8ec826ef7 Add Support for VeSync Devices - Outlets and Switches (#24953)
* Change dependency to pyvesync-v2 for vesync switch

* async vesync component

* FInish data_entry_flow

* Update config flow

* strings.json

* Minor fix

* Syntax fix

* Minor Fixs

* UI Fix

* Minor Correct

* Debug lines

* fix device dictionaries

* Light switch fix

* Cleanup

* pylint fixes

* Hassfest and setup scripts

* Flake8 fixes

* Add vesync light platform

* Fix typo

* Update Devices Service

* Fix update devices service

* Add initial test

* Add Config Flow Tests

* Remove Extra Platforms

* Fix requirements

* Update pypi package

* Add login to config_flow

Avoid setting up component if login credentials are invalid

* Fix variable import

* Update config_flow.py

* Update config_flow.py

* Put VS object into hass.data instead of config entry

* Update __init__.py

* Handle Login Error

* Fix invalid login error

* Fix typo

* Remove line

* PEP fixes

* Fix change requests

* Fix typo

* Update __init__.py

* Update switch.py

* Flake8 fix

* Update test requirements

* Fix permission

* Address change requests

* Address change requests

* Fix device discovery indent, add MockConfigEntry

* Fix vesynclightswitch classs

* Remove active time attribute

* Remove time_zone, grammar check
2019-07-23 23:40:55 +02:00
Aaron Bach c92f287c73
Add area support to input datetime service schemas (#25430)
* Add area support to input datetime service schemas

* Fixed tests
2019-07-23 13:39:07 -06:00
Jc2k 8c69fd91ff Only poll HomeKit connection once for all entities on a single bridge/pairing (#25249)
* Stub for polling from a central location

* Allow connection to know the entity objects attached to it

* Move polling logic to connection

* Don't poll if no characteristics selected

* Loosen coupling between entity and HKDevice

* Disable track_time_interval when removing entry

* Revert self.entities changes

* Use @callback for async_state_changed

* Split out unload and remove and add a test

* Test that entity is gone and fix docstring
2019-07-22 09:22:44 -07:00
David Radcliffe 11c74cd0d7 Add support for contact binary sensors in homekit_controller (#25355) 2019-07-22 08:40:55 +01:00
Paulus Schoutsen 50d4921d0a
Introduce PRESET_NONE for climate (#25360)
* Introduce PRESET_NONE for climate

* Require preset mode to be a string

* Lint

* Fix tests
2019-07-21 11:00:42 -07:00
Aaron Bach aa27e22b17 Automatically expand WWLLN window to 1 hour (if necessary) (#25357)
* Expand default window for WWLLN

* Fleshed out conditions

* Fixed tests

* Removed unused import

* Linting
2019-07-21 08:58:50 +02:00
ktnrg45 48540fc21e Ps4 reformat media data (#25172)
* Reformat saved media data/ fix load + save helpers

* Add url constant

* Reformat saved media data

* Add tests for media data

* Refactor

* Revert deleted lines

* Set attrs after checking for lock

* Patch load games.

* remove unneeded imports

* fix tests

* Correct condition

* Handle errors with loading games

* Correct condition

* Fix select source

* add test

* Remove unneeded vars

* line break

* cleanup loading json

* remove test

* move check for dict

* Set games to {}
2019-07-20 07:36:45 +02:00
Andrew Sayre 752d0deb97 Turn on device before setting mode (#25314) 2019-07-19 10:19:34 -07:00
cgtobi 1eb66f3657 Fix fritzbox climate HVAC mode / temperature (#25275)
* Set the target temperature

* Update tests

* Update tests

* Fix linter complaints
2019-07-19 09:49:28 +02:00
Philip Rosenberg-Watt 1c6d55e51b Add MQTT climate precision (#25265)
* Add MQTT climate precision

* Remove stale code
2019-07-18 15:21:50 -07:00
definitio 93970b5621 Add hvac_action support for MQTT HVAC (#25260)
* Add hvac_action support

* Add tests
2019-07-18 10:17:26 -07:00
Andrew Sayre cfc2c58fe0 Restore SmartThings A/C on/off services (#25259)
* Restore ST A/C on/off services

* Use correct OFF const

* Support AC HVAC_MODE_OFF
2019-07-18 10:14:58 -07:00
David F. Mulcahey ac91423d71 Fix device name customization on ZHA add devices page (#25180)
* ensure new device exists

* clean up dev reg handling

* update test

* fix tests
2019-07-16 15:16:49 -07:00
Andrew Sayre 20301ae888 Use MockConfigEntry (#25190) 2019-07-16 14:51:30 -07:00
Ryan Claussen de3d28d9d5 Add severe weather sensor to Dark Sky (#22701)
* Add severe weather alert sensor to Dark Sky

* fixup test case

* address review comments and fixup testcases

* address comments, fix assertion order

* remove extra line

* remove index increment
2019-07-16 18:03:05 +02:00
Austin Drummond c2f4f06005 Add HomeKit Reset Accessory (#25158)
* added the ability to reset homekit accessories

* added tests for homekit reset accessory

* minor fixes
2019-07-16 03:43:37 +02:00
ktnrg45 99c6c60bec PS4 Add tests for init (#25161)
* Add some tests for init

* Remove init

* Add config entry version

* Use const for version

* Remove var
2019-07-15 08:47:47 -07:00
Robert Svensson 01b890f426
Merge UniFi device tracker to config entry (#24367)
* Move device tracker to use config entry

* Remove monitored conditions attributes based on ADR0003

* Add support for import of device tracker config to be backwards compatible

* Remove unnecessary configuration options from device tracker

* Add component configuration support
2019-07-14 21:57:09 +02:00
Franck Nijhof 9d4b5ee58d Add Twente Milieu integration (#25129)
* Adds Twente Milieu integration

* Addresses flake8 warnings

* Adds required test deps

* Fixes path typo in coveragerc

* dispatcher_send -> async_dispatcher_send

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Removes not needed __init__

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Remove explicitly setting None default value on get call

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Correct typo in comment

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Clean storage for only the unloaded entry

Signed-off-by: Franck Nijhof <frenck@addons.community>

* asyncio.wait on updating all integrations

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Use string formatting

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Set a more sane SCAN_INTERVAL

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Small refactor around services

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Small styling correction

* Extract update logic into own function

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Addresses flake8 warnings
2019-07-14 12:30:23 +02:00
Paulus Schoutsen d37d1ce4ad Simplify Alexa/Google for new climate turn_on/off (#25115) 2019-07-13 10:27:50 +02:00
Paulus Schoutsen 8ec75cf883 Verify cloud user exists during boot (#25119) 2019-07-13 09:33:31 +02:00
Alex S f705a1e62e Splunk component filter support (#25071)
* Added code to support entity and domain filters in the config for splunk component, and the code to enforce the filter.

* * Moved code for posting splunk request to separate function, primarily to more easily write a test case where I can mock the point where the post would occur and validate that filtering is working correctly.
* Test cases created for full config check and to test the filtering

* Correcting static check errors/issues

* Correcting flake8 static check issue (introduced when addressing prior static check issues)

* Removing unused parameter to setup function - cleanup from reviewer request.
2019-07-13 00:35:23 +02:00
Aaron Bach c73fa6157d
Add additional WWLLN test (#25111) 2019-07-12 14:36:49 -06:00
Aaron Bach 31dd6364c3 Fix window exception in WWLLN (#25100)
* Beta fix: handle window exception in WWLLN

* Fixed test

* Fix bug

* Member comments

* Removed unused import
2019-07-12 17:41:47 +02:00
Pascal Vizeli d47905d119 Add support for on/off climate (#25026)
* Add support for on/off climate

* address comments

* Add test for sync overwrite

* Add more tests
2019-07-11 15:28:11 -07:00
Pascal Vizeli 78a5dc71ac Fix powercontrol media player alexa (#25080) 2019-07-11 08:35:46 -07:00
Paulus Schoutsen 27d750db1c Guard module being None (#25077) 2019-07-11 09:38:58 +02:00
Martin Hjelmare 177f5a35ae Rewrite calendar component (#24950)
* Correct google calendar test name

* Rewrite calendar component

* Save component in hass.data.
* Rename device_state_attributes to state_attributes.
* Remove offset attribute from base state_attributes.
* Extract offset helpers to calendar component.
* Clean imports.
* Remove stale constants.
* Remove name and add async_get_events.
* Add normalize_event helper function. Copied from #21495.
* Add event property to base entity.
* Use event property for calendar state.
* Ensure event start and end.
* Remove entity init.
* Add comment about event data class.
* Temporary keep old start and end datetime format.

* Convert demo calendar

* Convert google calendar

* Convert google calendar.
* Clean up google component.
* Keep offset feature by using offset helpers.

* Convert caldav calendar

* Clean up caldav calendar.
* Update caldav cal on addition.
* Bring back offset to caldav calendar.
* Copy caldav event on update.

* Convert todoist calendar
2019-07-10 20:59:37 -07:00
Phil Bruckner c80683bb15 Restore automation last_triggered as datetime & fix test (#24951)
* Restore automation last_triggered as datetime & fix test

* last_triggered is always a string
2019-07-10 20:42:38 -07:00
Paulus Schoutsen 073327831f
Correctly store removed entities for restore state (#25073)
* Correctly store removed entities for restore state

* Lint

* Do not assume about set encoding
2019-07-10 20:41:03 -07:00
Martijn van Zal ca8118138c Change phrases in the logbook component for persons and binary_sensors (#25053)
Persons are now threated the same as device trackers, so the logbook states
"<name> is at <location>" or "<name> is away" instead of "<name> changed to <location|not_home>"

Binary sensors now show phrases that relate to their device_class attribute.
So "Front door is closed" instead of "Front door turned off" or "Hallway PIR detected movement"
instead of "Hallway PIR turned on"
2019-07-10 15:56:41 -07:00
Aaron Bach 9ccb85d959
Add support for World Wide Lightning Location Network (#25001)
* Add support for World Wide Lightning Location Network

* Updated .coveragerc

* Added test

* Updated requirements

* Fixed tests

* Use local time for nearest strike

* Base geo location in place

* Finished geolocation work

* Fixed tests

* Cleanup

* Removed no-longer-needed method

* Updated requirements

* Add support for window and attrs

* Add strike ID to entity name

* Member comments
2019-07-10 16:40:11 -06:00
Paulus Schoutsen 7d33b0a259
Fix broken test in Python 3.7 (#25067) 2019-07-10 12:17:10 -07:00
Johann Kellerman 2e26f0bd2b Add check_config helper (#24557)
* check_config

* no ignore

* tests

* try tests again
2019-07-10 11:56:50 -07:00
arigilder f3e542542a Add missing support for jewish_calendar.omer_count sensor (#24958)
* Add missing support for omer_count to jewish_calendar

* Add tests for omer sensor

* Add tests for omer after tzeit hakochavim

* Lint fixes
2019-07-09 11:58:57 +02:00
Aaron Bach c2e843cbc3 Add support for Notion Home Monitoring (#24634)
* Add support for Notion Home Monitoring

* Updated coverage

* Removed auto-generated translations

* Stale docstrings

* Corrected hardware version

* Fixed binary sensor representation

* Cleanup and update protection

* Updated log message

* Cleaned up is_on

* Updated docstring

* Modified which data is updated during async_update

* Added more checks during update

* More cleanup

* Fixed unhandled exception

* Owner-requested changes (round 1)

* Fixed incorrect scan interval retrieval

* Ugh

* Removed unnecessary import

* Simplified everything via dict lookups

* Ensure bridges are properly registered

* Fixed tests

* Added catch for invalid credentials

* Ensure bridge ID is updated as necessary

* Updated method name

* Simplified bridge update

* Add support for updating bridge via_device_id

* Device update guard clause

* Removed excess whitespace

* Whitespace

* Owner comments

* Member comments
2019-07-09 10:29:06 +02:00
Andrew Sayre a31e49c857
Improve SmartThings test mocking (#25028)
* Migrate to asynctest

* Simplify mock access

* Use mocks
2019-07-08 22:39:55 -04:00
Joakim Plate 2fbbcafaed
Support config flow on custom components (#24946)
* Support populating list of flows from custom components

* Re-allow custom component config flows

* Add tests for custom component retrieval

* Don't crash view if no handler exist

* Use get_custom_components instead fo resolve_from_root

* Switch to using an event instead of lock

* Leave list of integrations as set

* The returned list is not guaranteed to be ordered

Backend uses a set to represent them.
2019-07-09 01:19:37 +02:00
Phil Bruckner 9944e675a5 Add template support to state trigger's for option (#24912) 2019-07-08 13:59:58 -07:00
Phil Bruckner f9b9883aba Add template support to numeric_state trigger's for option (#24955) 2019-07-08 13:58:50 -07:00
Phil Bruckner 1431fd6fbd Add datetime option to input_datetime.set_datetime service (#24975) 2019-07-08 13:18:42 -07:00
Paulus Schoutsen 0b7a901c81
Fix ecobee flaky test (#25019) 2019-07-08 13:10:01 -07:00
Joakim Plate ab832cda71 Add support for arcam fmj receivers (#24621)
* Add arcam_fmj support

* Just use use state in player avoid direct client access

* Avoid leaking exceptions on invalid data

* Fix return value for volume in case of 0

* Mark component as having no coverage

* Add new requirement

* Add myself as maintainer

* Correct linting errors

* Use async_create_task instead of async_add_job

* Use new style string format instead of concat

* Don't call init of base class without init

* Annotate callbacks with @callback

Otherwise they won't be called in loop

* Reduce log level to debug

* Use async_timeout instead of wait_for

* Bump to version of arcam_fmj supporting 3.5

* Fix extra spaces

* Drop somewhat flaky unique_id

* Un-blackify ident to satisy pylint

* Un-blackify ident to satisy pylint

* Move default name calculation to config validation

* Add test folder

* Drop unused code

* Add tests for config flow import
2019-07-08 17:14:19 +02:00
Pascal Vizeli 84cf76ba36
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3

* fix flake

* Lint

* Update Google Assistant

* ambiclimate to climate 1.0 (#24911)

* Fix Alexa

* Lint

* Migrate zhong_hong

* Migrate tuya

* Migrate honeywell to new climate schema (#24257)

* Update one

* Fix model climate v2

* Cleanup p4

* Add comfort hold mode

* Fix old code

* Update homeassistant/components/climate/__init__.py

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

* Update homeassistant/components/climate/const.py

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

* First renaming

* Rename operation to hvac for paulus

* Rename hold mode to preset mode

* Cleanup & update comments

* Remove on/off

* Fix supported feature count

* Update services

* Update demo

* Fix tests & use current_hvac

* Update comment

* Fix tests & add typing

* Add more typing

* Update modes

* Fix tests

* Cleanup low/high with range

* Update homematic part 1

* Finish homematic

* Fix lint

* fix hm mapping

* Support simple devices

* convert lcn

* migrate oem

* Fix xs1

* update hive

* update mil

* Update toon

* migrate deconz

* cleanup

* update tesla

* Fix lint

* Fix vera

* Migrate zwave

* Migrate velbus

* Cleanup humity feature

* Cleanup

* Migrate wink

* migrate dyson

* Fix current hvac

* Renaming

* Fix lint

* Migrate tfiac

* migrate tado

* Fix PRESET can be None

* apply PR#23913 from dev

* remove EU component, etc.

* remove EU component, etc.

* ready to test now

* de-linted

* some tweaks

* de-lint

* better handling of edge cases

* delint

* fix set_mode typos

* apply PR#23913 from dev

* remove EU component, etc.

* ready to test now

* de-linted

* some tweaks

* de-lint

* better handling of edge cases

* delint

* fix set_mode typos

* delint, move debug code

* away preset now working

* code tidy-up

* code tidy-up 2

* code tidy-up 3

* address issues #18932, #15063

* address issues #18932, #15063 - 2/2

* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C

* add low/high to set_temp

* add low/high to set_temp 2

* add low/high to set_temp - delint

* run HA scripts

* port changes from PR #24402

* manual rebase

* manual rebase 2

* delint

* minor change

* remove SUPPORT_HVAC_ACTION

* Migrate radiotherm

* Convert touchline

* Migrate flexit

* Migrate nuheat

* Migrate maxcube

* Fix names maxcube const

* Migrate proliphix

* Migrate heatmiser

* Migrate fritzbox

* Migrate opentherm_gw

* Migrate venstar

* Migrate daikin

* Migrate modbus

* Fix elif

* Migrate Homematic IP Cloud to climate-1.0 (#24913)

* hmip climate fix

* Update hvac_mode and preset_mode

* fix lint

* Fix lint

* Migrate generic_thermostat

* Migrate incomfort to new climate schema (#24915)

* initial commit

* Update climate.py

* Migrate eq3btsmart

* Lint

* cleanup PRESET_MANUAL

* Migrate ecobee

* No conditional features

* KNX: Migrate climate component to new climate platform (#24931)

* Migrate climate component

* Remove unused code

* Corrected line length

* Lint

* Lint

* fix tests

* Fix value

* Migrate geniushub to new climate schema (#24191)

* Update one

* Fix model climate v2

* Cleanup p4

* Add comfort hold mode

* Fix old code

* Update homeassistant/components/climate/__init__.py

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

* Update homeassistant/components/climate/const.py

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

* First renaming

* Rename operation to hvac for paulus

* Rename hold mode to preset mode

* Cleanup & update comments

* Remove on/off

* Fix supported feature count

* Update services

* Update demo

* Fix tests & use current_hvac

* Update comment

* Fix tests & add typing

* Add more typing

* Update modes

* Fix tests

* Cleanup low/high with range

* Update homematic part 1

* Finish homematic

* Fix lint

* fix hm mapping

* Support simple devices

* convert lcn

* migrate oem

* Fix xs1

* update hive

* update mil

* Update toon

* migrate deconz

* cleanup

* update tesla

* Fix lint

* Fix vera

* Migrate zwave

* Migrate velbus

* Cleanup humity feature

* Cleanup

* Migrate wink

* migrate dyson

* Fix current hvac

* Renaming

* Fix lint

* Migrate tfiac

* migrate tado

* delinted

* delinted

* use latest client

* clean up mappings

* clean up mappings

* add duration to set_temperature

* add duration to set_temperature

* manual rebase

* tweak

* fix regression

* small fix

* fix rebase mixup

* address comments

* finish refactor

* fix regression

* tweak type hints

* delint

* manual rebase

* WIP: Fixes for honeywell migration to climate-1.0 (#24938)

* add type hints

* code tidy-up

* Fixes for incomfort migration to climate-1.0 (#24936)

* delint type hints

* no async unless await

* revert: no async unless await

* revert: no async unless await 2

* delint

* fix typo

* Fix homekit_controller on climate-1.0 (#24948)

* Fix tests on climate-1.0 branch

* As part of climate-1.0, make state return the heating-cooling.current characteristic

* Fixes from review

* lint

* Fix imports

* Migrate stibel_eltron

* Fix lint

* Migrate coolmaster to climate 1.0 (#24967)

* Migrate coolmaster to climate 1.0

* fix lint errors

* More lint fixes

* Fix demo to work with UI

* Migrate spider

* Demo update

* Updated frontend to 20190705.0

* Fix boost mode (#24980)

* Prepare Netatmo for climate 1.0 (#24973)

* Migration Netatmo

* Address comments

* Update climate.py

* Migrate ephember

* Migrate Sensibo

* Implemented review comments (#24942)

* Migrate ESPHome

* Migrate MQTT

* Migrate Nest

* Migrate melissa

* Initial/partial migration of ST

* Migrate ST

* Remove Away mode (#24995)

* Migrate evohome, cache access tokens (#24491)

* add water_heater, add storage - initial commit

* add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

delint

* Add Broker, Water Heater & Refactor

add missing code

desiderata

* update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

* bugfix - loc_idx may not be 0

more refactor - ensure pure async

more refactoring

appears all r/o attributes are working

tweak precsion, DHW & delint

remove unused code

remove unused code 2

remove unused code, refactor _save_auth_tokens()

* support RoundThermostat

bugfix opmode, switch to util.dt, add until=1h

revert breaking change

* store at_expires as naive UTC

remove debug code

delint

tidy up exception handling

delint

add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

delint

bugfix - loc_idx may not be 0

more refactor - ensure pure async

more refactoring

appears all r/o attributes are working

tweak precsion, DHW & delint

remove unused code

remove unused code 2

remove unused code, refactor _save_auth_tokens()

support RoundThermostat

bugfix opmode, switch to util.dt, add until=1h

revert breaking change

store at_expires as naive UTC

remove debug code

delint

tidy up exception handling

delint

* update CODEOWNERS

* fix regression

* fix requirements

* migrate to climate-1.0

* tweaking

* de-lint

* TCS working? & delint

* tweaking

* TCS code finalised

* remove available() logic

* refactor _switchpoints()

* tidy up switchpoint code

* tweak

* teaking device_state_attributes

* some refactoring

* move PRESET_CUSTOM back to evohome

* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome

* refactor SP code and dt conversion

* delinted

* delinted

* remove water_heater

* fix regression

* Migrate homekit

* Cleanup away mode

* Fix tests

* add helpers

* fix tests melissa

* Fix nehueat

* fix zwave

* add more tests

* fix deconz

* Fix climate test emulate_hue

* fix tests

* fix dyson tests

* fix demo with new layout

* fix honeywell

* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)

* Lint

* PyLint

* Pylint

* fix fritzbox tests

* Fix google

* Fix all tests

* Fix lint

* Fix auto for homekit like controler

* Fix lint

* fix lint
2019-07-08 14:00:24 +02:00
David Winn 628e12c944 Sleepiq single sleeper crash (#24941)
* Update sleepyq to 0.7

Fixes crash when working with a single sleeper.

* sleepiq: Handle null side definitions

These happen if no sleeper is defined for a side of the bed. Don't
create sensors for null sides; they'll crash every time we try to use
them.

* sleepiq: Fix urls mocked to match sleepyq 0.7

* sleepi: Fix test_sensor.TestSleepIQSensorSetup

Sleepyq 0.7 throws on empty strings, so we have to specify them.

* sleepiq: Test for ValueError thrown by sleepyq 0.7

* sleepiq: Drop no longer used HTTPError import

* sleepiq: Add tests for single sleeper case

* sleepiq: Shorten comments to not overflow line length

* sleepiq: Use formatted string literals for adding suffixes to test files

* sleepiq: Use str.format() for test suffixing
2019-07-07 08:40:02 +02:00
Franck Nijhof 31f569ada9 Batch of Component(s) -> Integration(s) (#24972) 2019-07-05 15:24:26 -07:00
Aaron Bach a491f97eb9 Allow updating of via_device in device registry (#24921)
* Allow updating of via_device in device registry

* Added test
2019-07-04 19:10:23 -04:00
David F. Mulcahey 3c487928d4 New scanner device tracker and ZHA device tracker support (#24584)
* initial implementation for zha device trackers

* constant

* review comments

* Revert "review comments"

This reverts commit 2130823566820dfc114dbeda08fcdf76ed47a4e7.

* rename device tracker entity

* update trackers

* raise when not implemented

* Update homeassistant/components/device_tracker/config_entry.py

Review comment

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

* move source type to base state attrs

* review comments

* review comments

* review comments

* fix super call

* fix battery and use last seen from device

* add test

* cleanup and add more to test

* cleanup post zha entity removal PR

* add tests for base entities

* rework entity tests
2019-07-04 12:44:39 +02:00
Phil Bruckner 8dca73d08e Add missing trigger.for variable to template trigger (#24893) 2019-07-02 17:46:26 +02:00
Phil Bruckner 3f4ce70414 Fix 'same state' monitoring in state trigger (#24904) 2019-07-02 17:29:38 +02:00
Phil Bruckner 945afbc6d4 Fix 'same state' monitoring in numeric_state trigger (#24910) 2019-07-02 17:28:02 +02:00
Penny Wood 23dd644f4a Update IDs for rename node/value (#24646)
* Update IDs for rename node/value

* Rename devices and entities

* Improved coverage
2019-07-01 15:54:19 -07:00
Dennis Keitzel 8cd138608c Support mqtt discovery topic prefix with slashes (#24840) 2019-07-01 10:23:01 -07:00
Daniel Høyer Iversen 3d2f843c1d Upgrade pytest to 5.0.0 (#24885)
* Upgrade pytest to 5.0.0

* exception message for pytest 5
2019-07-01 10:47:42 -04:00
Andrew Sayre 7db4eeaf7f
Move SmartThings imports to top (#24878)
* Move imports to top

* use lib constants

* Add missing three_axis mapping
2019-06-30 22:29:21 -04:00
Phil Bruckner 03e6a92cf3 Add template support to template trigger's for option (#24810) 2019-06-28 22:30:47 -07:00
Paulus Schoutsen 3cafc1f2c6
Alexa sync state report (#24835)
* Do a sync after changing state reporting

* Fix entity config being None
2019-06-28 20:43:57 -07:00
Paulus Schoutsen f67693c56c Fix vacuum tests 2019-06-28 13:41:25 -07:00
Luuk 468b0e8934 Add template vacuum support (#22904)
* Add template vacuum component

* Fix linting issues

* Make vacuum state optional

* Fix pylint issues

* Add context to template vacuum service calls

* Added tests to template vacuum

* Fix indent

* Fix docstrings

* Move files for new component folder structure

* Revert additions for template_vacuum tests to common.py

* Use existing constants for template vacuum config

* Handle invalid templates

* Add tests for unused services

* Add test for invalid templates

* Fix line too long

* Do not start template change tracking in case of MATCH_ALL

* Resolve review comments
2019-06-28 12:19:00 -04:00
Paulus Schoutsen 4e5b1ccde6
Fix calling empty script turn off (#24827) 2019-06-28 08:49:33 -07:00
Josh Anderson 69089da88e Use climate device's target temp step value (#24804) 2019-06-27 15:14:23 -07:00
Paulus Schoutsen c87d6e4720
Catch uncaught Alexa error (#24785) 2019-06-26 20:24:20 -07:00
Ville Skyttä 71346760d0 Upgrade pytest to 4.6.3 (#24782)
* Upgrade pytest to 4.6.3

https://docs.pytest.org/en/latest/changelog.html#pytest-4-6-2-2019-06-03
https://docs.pytest.org/en/latest/changelog.html#pytest-4-6-3-2019-06-11

* Make litejet switch test work with pytest 4.6.3

Essentially reverts the corresponing change that was made for pytest
4.2 compatibility.
2019-06-26 20:01:03 -07:00
Paulus Schoutsen 06af6f19a3
Entity to handle updates via events (#24733)
* Entity to handle updates via events

* Fix a bug

* Update entity.py
2019-06-26 09:22:51 -07:00
Paulus Schoutsen 26fc57d1b3
Ignore duplicate tradfri discovery (#24759)
* Ignore duplicate tradfri discovery

* Update name
2019-06-25 09:54:40 -07:00
Paulus Schoutsen f5f86993f1
Improve Alexa error handling (#24745) 2019-06-24 22:04:31 -07:00
Martin Hjelmare d4fc22add4 Fix locative device update (#24744)
* Add a test for two devices

* Fix locative updating all devices

* Add a guard clause that checks if correct device is passed.
2019-06-24 20:00:28 -07:00
Paulus Schoutsen 4aedd3a09a
AdGuard to update entry (#24737) 2019-06-24 14:46:32 -07:00
Conrad Juhl Andersen 0792e72f71 Add support for sensor state STATE_UNAVAILABLE (#24641)
* Fixed integration with ESPhome, which caused an error if ESPhome did not update fast enough on startup

* Set state to problem if sensor is unavailable

* Fix line length.
2019-06-24 11:30:44 -07:00
David F. Mulcahey d22bb8fc7d
Update ZHA dependencies (#24718)
* update deps and remove legacy constants bridge

* run deps script and fix test import
2019-06-23 13:43:19 -04:00
Anders Melchiorsen a439e087e1 Fix time expression parsing (#24696) 2019-06-22 13:39:33 +02:00
Penny Wood 22d9bee41a Template: Expand method to expand groups, and closest as filter (#23691)
* Implement expand method

* Allow expand and closest to be used as filters

* Correct patch

* Addresses review comments
2019-06-22 00:32:32 -07:00
Pascal Vizeli c9453bab19 Prefere binary with wheels (#24669) 2019-06-21 08:47:56 -07:00
Paulus Schoutsen 78b7ed0ebe Clean up Google Config (#24663)
* Clean up Google Config

* Lint

* pylint

* pylint2
2019-06-21 11:17:21 +02:00
Paulus Schoutsen 319ac23736
Warn when user tries run custom config flow (#24657) 2019-06-20 13:22:12 -07:00
Martin Hjelmare 7881081207
Fix device tracker see for entity registry entities (#24633)
* Add a test for see service gaurd

* Guard from seeing devices part of entity registry

* Await registry task early

* Lint

* Correct comment

* Clean up wait for registry

* Fix spelling

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

* Fix spelling

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
2019-06-20 03:22:33 +02:00
Paulus Schoutsen f2962a0d16
Set up Met during onboarding (#24622)
* Set up Met during onboarding

* Lint

* Add pyMetNo to test reqs
2019-06-19 14:41:27 -07:00
Paulus Schoutsen 4e066f4681
Fix sending update when not logged in (#24624)
* Fix sending update when not logged in

* Fix test
2019-06-19 13:58:00 -07:00
Malte Franken 03bb3d9ddc Queensland bushfire alert feed platform (#24473)
* initial version of qfes bushfire geolocation platform

* removed all occurrences of legally protected names; using new georss library

* regenerated codeowners

* fixed pylint

* added one more valid category

* moved library import to top and ran isort
2019-06-19 07:59:29 -04:00
Paulus Schoutsen 6d9f1b3fd3 Notify Alexa when exposed entities change (#24609) 2019-06-19 10:06:28 +02:00
Aaron Bach a89c8eeabe
Add config entry for Met.no (#24608)
* Add config entry for Met.no

* Fixed tests
2019-06-18 17:44:41 -06:00
Paulus Schoutsen f382be4c15
Cloud: Make sure on_connect forwards platform only once (#24582)
* Make sure on_connect forwards platform only once

* Make sure right handler
2019-06-18 13:59:40 -07:00
Paulus Schoutsen f3e4e8dce8
Fix alarm control panel tests (#24586) 2019-06-17 20:23:12 -07:00
escoand 73008885c8 Add source selection to Samsung TV media player (#22612)
* add source selection

* return generic list

* remove useless timeout

* Fix test

* Add test for select_source

* Add negative source test

* Change order

* Arghhh

* Add hass object

* Simplify source list

Co-Authored-By: escoand <escoand@users.noreply.github.com>
2019-06-17 15:00:11 -07:00
Kevin Cooper 1460f7bd80 Add code_arm_required to manual alarm (#22618)
* Add code_arm_required to manual alarm

* Add fix for alarm front end more-info-alarm_control_panel
2019-06-17 14:59:20 -07:00
Kevin Cooper f722a6c08d Add code_arm_required to manual alarm with MQTT (#22641)
* add code_arm_requited to manual-mqtt alarm

* Add fix for alarm front end more-info-alarm_control_panel

* Fix code mistake
2019-06-17 14:49:10 -07:00
Tommaso Marchionni cb5426c1fa Added invert_percent configuration for zwave rollershutter (#23101)
* Added invert_percent configuration for zwave rollershutter

* Added invert_percent configuration for zwave rollershutter

* Fix typo in zwave default configuration
2019-06-17 14:44:47 -07:00
kbickar 7564d1fb52 Added toggle service to covers (#23198)
* Added toggle service to cover

* Added toggle tilt service and tilt closed property

* Added is_tilt_closed so tilt can be toggled

* Added toggle services

* Added toggle tilt service

* Removed spaces

* Added tests for tilt services

* Updated tests

* Added range conversion in comparison

* Added tests to cover broken areas

* Fixed open/close tilt values and added toggle function

* Added default toggle behavior using tilt_position of 0, reverted other changes

* blank space

* Added constants and swapped assert comparisons

* Fixed attribute name

* Added mqtt responses in test

* Added constants

* Space

* Fix tilt_optimistic flag being ignored if status topic set

* Added more tests

* Changed async toggle call

* Updated group tilt test

* Updated format of asserts

* Updated states calls

* Updated function variables

* merge fixes

* Added blank line

* Changed calls to async

* More async updates
2019-06-17 14:09:31 -07:00
Paulus Schoutsen a02b69db38
Cloud: Add Alexa report state (#24536)
* Cloud: Add Alexa report state

* Lint

* Lint

* Only track state changes when we are logged in
2019-06-17 13:50:01 -07:00
Otto Winter 05bb645263 Fix zeroconf migration messing up ESPHome discovery (#24578) 2019-06-17 09:19:39 -07:00
Robert Svensson e9b0f54a43
UniFi simplify update (#24304) 2019-06-15 17:38:22 +02:00
Penny Wood aa8ddeca34
Flux switch (#24542)
* Updated to pytest

* Additional test case
2019-06-15 13:32:51 +08:00
Tomer Figenblat fe8a330a45 Update requirement version and add switcher_kis services (#23477)
* Update aioswitcher requirement to 2019.4.26.

* Removed unnecessary legacy function call.

* Fixed log message capital first letter.

* Replaced None argument with empty dict.

* Replaced guard.

* Added ServiceCallType.

* Added set_auto_off and update_device_name services to the component.

* Added test cases for service calls.

* Conditioned the component services registry with the platform discovery.

* Update homeassistant/components/switcher_kis/__init__.py

Co-Authored-By: TomerFi <tomer.figenblat@gmail.com>

* Update homeassistant/components/switcher_kis/__init__.py

Co-Authored-By: TomerFi <tomer.figenblat@gmail.com>

* Resolved change requests.

* Added ContextType.

* Addes permission verification for service calls.

* Added test cases for permision verification and more.

* Replaced POLICY_CONTROL with the more suited POLICY_EDIT.

* More appropriate function name.

* Added domain and entity_id validation for calling services.

* Removed service for setting the vendor's device name.
2019-06-14 15:48:21 -07:00
BackSlasher 50d282ff37 Pyyaml5.1 (#24529)
* Migrated to PyYAML 5.1

* More intelligent fixing of yaml safe_load

Based on https://circleci.com/gh/home-assistant/home-assistant/34831?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
2019-06-14 15:30:47 -07:00
Paulus Schoutsen 6c5124e12a
Cloud: allow managing Alexa entities via UI (#24522)
* Clean up Alexa config

* Cloud: Manage Alexa entities via UI

* Add tests for new cloud APIs
2019-06-13 11:58:08 -07:00
Paulus Schoutsen 7e2278f1cc
Clean up Alexa smart home code (#24514)
* Clean up Alexa smart home code

* lint

* Lint

* Lint
2019-06-13 08:43:57 -07:00
Paulus Schoutsen f54ad26630
Migrate HEOS discovery to manifest (#24508)
* Migrate HEOS discovery to manifest

* Fix tests
2019-06-12 16:08:08 -07:00
Phil Bruckner b817609adc Fix owntracks source_type for location messages with default trigger (#24503)
Some location update messages do not contain the 't' (trigger) key. Before the change in 0.94 to
entity based trackers, these would default to source_type of 'gps' (due to default parameter
value in async_see method.) To mirror this behavior in the new entity based tracker, the
source_type property should default to SOURCE_TYPE_GPS under the same conditions.
2019-06-12 11:40:01 -07:00
Ties de Kock 0eb387916f Camera platform for buienradar imagery (#23358)
* Add camera for buienradar radar

* Use asyncio.Conditions instead of asyncio.Lock

* Add test and fix python 3.5 compatibility

* rename interval to delta for consistency with BOM integration

* fix linting error introduced during rebase

* Improved buienradar.camera documentation and tests

  * Incorporated one comment on a redundant/cargo cult function
  * Improved documentation
  * Increase test coverage by fixing one test by making it a coroutine
    (to make it actually run), adding another test case, and changing
    the flow in the implementation.

* style changes after review, additional test case

* Use python 3.5 style mypy type annotations in __init__

* Remove explicit passing of event loop

* Adopt buienradar camera as codeowner

* Update manifest.json

* Update CODEOWNERS through hassfest

Updated CODEOWNERS through hassfest (instead of manually), thanks to
@balloob for the hint.
2019-06-11 15:26:04 -07:00
Philip Rosenberg-Watt 8fcfcc40fc Add APRS device tracker component (#22469)
* Add APRS device tracker component

This component keeps open a connection to the APRS-IS infrastructure so
messages generated by filtered callsigns can be immediately acted upon.
Any messages with certain values for the 'format' key are position
reports and are parsed into device tracker entities.

* Log errors and return if startup failure

* Fix unit tests
2019-06-11 10:16:13 -07:00
tetienne 0a7919a279 Somfy open api (#19548)
* CREATE Somfy component

* CREATE cover Somfy platform

* USE somfy id as unique id

* UPDATE all the devices in one call to limit the number of call

* FIX Don't load devices if not yet configured

* IMP Replace configurator by a simple notification

* ADD log in case state does not match

* IMP wording

* REMOVE debug stuf

* ADD support for tilt position

* UPDATE requirements

* FIX Use code instead of authorization response

 - Will allow to setup Somfy without https

* HANDLE stateless devices (Somfy RTS)

* FIX import locally 3rd party library

* UPDATE pymfy to 0.4.3

* ADD missing docstring

* FIX For Somfy 100 means closed and 0 opened

* FIX position can be None

* ENHANCE error management when error 500 occurs at setup

* FIX indent

* ROLLBACK tilt modification

 - See https://community.home-assistant.io/t/somfy-tahoma-official-api/61448/90?u=tetienne

* FIX Look for capability instead of state

* DON'T use exception to test if a feature is available

* UPDATE dependency

* ADD device_info property

* AVOID object creation in each method

* REMOVE unused constants

* ADD missing doc

* IMP Only make one call to add_entities

* USE dict[key] instead of get method

* IMP Don't pass hass object to the entities

* FIX Don't end logging messages with period

* USE config entries instead of a cache file

* IMPLEMENT async_unload_entry

* CONSOLIDATE package

 - see home-assistant/architecture#124

* UPDATE to pymfy 0.5.1

* SIMPLIFY config flow

* ADD French translation

* FIX 80 vs 79 max length

* ABORT flow asap

* FIX A tupple was returned

* MIGRATE to manifest.json

* ADD a placeholder async_setup_platform coroutine

 - It's currently required and expected by the platform helper.

* FIX codeowner

* ADD missing translations file

* USE new external step

* UPGRADE pymfy version

* Close Somfy tab automatically

* ADD manufacturer

  - Somfy only for the moment.

* HANDLE missing code or state in Somfy request

* REMOVE unused strings

* DECLARE somfy component to use config_flow

* APPLY static check remarks

* FIX async method cannot be called from sync context

* FIX only unload what has been loaded during entry setup

* DON't catch them all

* DON'T log full stacktrace

* ABORT conflig flow if configuration missing

* OMIT Somfy files for coverage

* ADD tests about Somfy config flow

* ADD pymfy to the test dependencies
2019-06-11 08:45:34 -07:00
Paulus Schoutsen 820b381a8d
Update Hass.io when core config is updated (#24461)
* Update Hass.io when core config is updated

* Lint

* Fix tests

* Lint sigh
2019-06-10 16:05:43 -07:00
Paulus Schoutsen 236c5deeee
Sun listener to adapt to core config updates (#24464)
* Adaptable sun listener

* Lint
2019-06-10 16:05:32 -07:00
Erik Montnemery 935240f8c3 Add websock command to query device for triggers (#24044)
* Add websock command to query device for triggers

* Lint

* Refactor

* Add support for domain automations

* Make device automation an automation platform

* lint

* Support device_id in light trigger

* Review comments

* Add tests

* Add tests

* lint
2019-06-10 15:36:11 -07:00
Robert Svensson 34e3d2f997 Axis discovery MAC filter (#24442)
* Make sure to abort if the MAC is not from Axis

* Fix tests

* Andrew Sayre suggestion

Co-Authored-By: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>
2019-06-10 09:12:17 -07:00
Julien Brochet fadfb89b4c Load the SSDP component only when it's needed (#24420)
* fix(hue): Load the SSDP component only when it's needed

* fix(deconz): Don't load the SSDP component when it's not needed

* Update config_flow.py

* Update test_config_flow.py
2019-06-10 09:11:07 -07:00
Penny Wood 84e6813779 Rename via_hub to via_device (#24360)
* Rename via_hub to via_device

* Fixed registry interactions
2019-06-10 09:10:44 -07:00
Franck Nijhof d648eb1e4f Minor improvements to automation test suite (#24424)
* Minor improvements to automation test suite

* Removes unused asyncio imports

* Removes some vars that are not needed
2019-06-08 19:10:23 -05:00
Paulus Schoutsen 848a2a95a8 Fix recorder defaults (#24399)
* Fix recorder defaults

* Address comment
2019-06-08 18:18:28 -05:00
Franck Nijhof 9235b52828 Restore automation last_triggered with initial_state override (#24400)
* Restore automation last_triggered with initial_state override

* Made test async/await

* Fixes linter warning

* Update test_init.py
2019-06-08 12:48:36 -07:00
Paulus Schoutsen 929f3c2594
Use loose version (#24394) 2019-06-08 08:19:00 -07:00
Robert Svensson 48276b041c
deCONZ - properly identify configured bridge (#24378) 2019-06-08 08:43:18 +02:00
Penny Wood 4cb1d77783 Fix for sun issues (#24309) 2019-06-07 23:21:41 -07:00
Paulus Schoutsen f77514c6f2
Check cloud trusted proxies (#24395) 2019-06-07 23:08:55 -07:00
Paulus Schoutsen 7887d6d6e4
Fix automation failing to restore state (#24390)
* Fix automation off

* Fix tests
2019-06-07 23:08:22 -07:00
Paulus Schoutsen 0dc0706eb2
Add more HomeKit models for discovery (#24391)
* Add more HomeKit models for discovery

* Discover Tradfri with HomeKit

* Add Wemo device info

* Allow full match for HomeKit model

* Fix tests
2019-06-07 22:59:51 -07:00
Penny Wood b30f4b8fc0 Improve boolean validator (#24294)
* Improve boolean validator

* Remove extra throw

* Remove None test as discussed

* Fix for tests depending on None == False
2019-06-07 22:18:02 -07:00
Phil Bruckner 61dabae6ab Add for option for template triggers (#24330) 2019-06-07 21:45:37 -07:00
presslab-us cb460a85ba Add support for ZHA door locks #2 (#24344)
* Add support for DoorLock cluster
* Add test for zha lock
* Change lock_state report to REPORT_CONFIG_IMMEDIATE
* Update channel command wrapper to return the entire result
This allows for return values other than result[1]

* Fix tests
* Fix lint
* Update DoorLock test to work with updated zigpy schema
* Fix lint
* Fix unlock test
2019-06-07 11:16:33 -04:00
David F. Mulcahey 592d30d495 Remove binary sensors for ZHA remotes and controllers (#24370)
* remove remote binary sensor profiles
* fix contact sensors
2019-06-07 11:13:55 -04:00
Paulus Schoutsen 7c5da67d74 Add service to update core location (#24328)
* Add service to update core location

* Update test_init.py
2019-06-07 09:09:25 -05:00
Tommy Long e98054accb Add templating to MQTT Cover tilt_status (#24355) 2019-06-06 15:30:27 -07:00
David F. Mulcahey ae1bcd5fef
Use node descriptor from Zigpy for ZHA (#24316)
* use zigpy node descriptor

* cleanup
2019-06-06 08:31:03 -04:00
Felipe Martins Diel 0ed9e185b2 Add support for learning new commands (#23888)
* Add support for learning new commands

This update creates a generic service in the 'remote' component to enable remote control platforms to learn new commands.

* Update __init__.py with the proposed changes

- Add 'supported_features' property and a constant related to the 'learn_command' functionality.
- Redefine 'async_learn_command' function as a coroutine.

* Update __init__.py

* Fix assertion error

Adding the 'supported_features' attribute generated an assertion error on the 'Demo Remote' platform. This update fixes this.

* Fix duplicated 'hass' object

This update fixes a typo that occurred at the last update.
2019-06-05 11:32:59 +02:00
Paulus Schoutsen df1da7554c
Fix OwnTracks race condition (#24303)
* Fix OwnTracks race condition

* Lint
2019-06-04 14:06:49 -07:00
Pascal Vizeli bf52aa8ccc Create progress file for pip installs (#24297)
* Create progress file for pip installs

* fix dedlock

* unflacky test

* Address comments

* Lint

* Types
2019-06-04 11:04:20 -07:00
Paul Bottein 976bf3e979 Add temperature sensor support to google smarthome thermostat device (#24264)
* Add temperature sensor support to google smarthome thermostat device

* fix lint for trait_test

* Reset temperature unit in tests

* Address comment
2019-06-03 12:40:15 -07:00
Paulus Schoutsen 0b70419859
Remove deps folder in config when on Docker (#24284)
* Remove deps folder in config

* Fix tests

* Fix tests with docker check
2019-06-03 12:37:27 -07:00
Paulus Schoutsen 6f903db8c4
Fix cors on the index view (#24283) 2019-06-03 11:43:13 -07:00
Robert Svensson 449a7d3fd5 deCONZ migrate to SSDP discovery (#24252)
* Migrate deCONZ to use new SSDP discovery
Add new discovery info manufacturer URL to be able to separate Hue and deCONZ bridges

* Mark deCONZ as migrated in Discovery component

* Fix tests

* Fix Hue discovery ignore deCONZ bridge

* Less snake more badger

* Mushroom

* Fix indentation

* Config flow ignore manufacturer url that is not philips
2019-06-03 09:26:01 -07:00
Paulus Schoutsen 6795db9bd6 Mobile app device tracker to restore state (#24266) 2019-06-03 10:30:56 +02:00
Paulus Schoutsen 6a693546a3 Add restore state to Geofency (#24268)
* Add restore state to Geofency

* Lint
2019-06-03 10:29:45 +02:00
Paulus Schoutsen ca20b0cf17
Add restore state to OwnTracks device tracker (#24256)
* Add restore state to OwnTracks device tracker

* Lint

* Also store entity devices

* Update test_device_tracker.py
2019-06-02 13:57:21 -07:00
Robert Svensson 4d4fd19f87
Replace pyunifi with aiounifi in UniFi device tracker (#24149)
* Replace pyunifi with aiounifi

* Fix tests

* Add sslcontext

* Fix tests

* Fix import order
2019-06-02 18:24:13 +02:00
Franck Nijhof 9220270948 Adds AdGuard Home integration (#24219)
* Adds AdGuard Home integration

* 👕 Addresses linting warnings

* 🚑 Fixes typehint in async_setup_entry

* 👕 Take advantage of Python's coalescing operators

* 👕 Use adguard instance from outer scope directly in service calls

* 👕 Use more sensible scan_interval default for sensors

* 👕 Adds specific files to .coveragerc

*  Added tests and small changes to improve coverage

* 🔨 Import adguardhome dependencies at the top

* 🚑 Converted service handlers to be async

* 🔥 Removed init step from config flow
2019-06-01 22:13:14 -07:00
Jef D 278b9d0f71 Round Awair sensor values (#24093)
* Round sensor values

* Add code owner

* Update code owners

* Fix tests
2019-06-01 17:03:41 +02:00
Paulus Schoutsen 276ab191b5 Do not use the cache dir for PIP installs (#24233) 2019-06-01 10:04:12 +02:00
Paulus Schoutsen b90636f640
Update home zone when core config updated (#24237)
* Update home zone when core config updated

* Lint
2019-05-31 23:03:45 -07:00
Paulus Schoutsen b4374c8c4c Mobile app to use device tracker config entry (#24238)
* Mobile app to use device tracker config entry

* Lint

* Re-use device_info

* Lint
2019-05-31 23:01:45 -07:00
Paulus Schoutsen e6a54013dc
GeoFency unique ID and device info (#24232) 2019-05-31 22:59:44 -07:00
Paulus Schoutsen 3edc58a04e
Add GPSLogger device_info and unique_id (#24231) 2019-05-31 22:59:35 -07:00
Paulus Schoutsen 3c1cdecb88
Add manifest support for homekit discovery (#24225)
* Add manifest support for homekit discovery

* Add a space after model check

* Update comment
2019-05-31 11:58:48 -07:00
Paulus Schoutsen 3a0616c680
Use resource for index routing. (#24223) 2019-05-31 11:27:05 -07:00
Robert Van Gorkom bf91a8c1b3 Fixing tplink issues with offline devices during setup (#23668)
* Fixing tplink issues with offline devices during setup.

* Fixing circleci errors.

* Adding code to defer the creation of entities that are not online.

* Addressing code review changes and cleaning up a little.

* Fixing tests and static analysis.

* Adding test to satisfy coverage requirements.

* Resolving merge conflicts.

* Fixing issue where lights don't appear in the integration page.

* Using pyHS100 properties for most sysinfo.
Addressing some PR feedback.

* Addressing some PR feedback.

* Better testing async_add_entities_retry
Testing for static dimmers.
Making greater use of conf constants.

* Fixing all static analysis issues.

* Adding non-blocking call for getting discovering devices.

* Address PR feedback
2019-05-31 01:51:04 -04:00
Paulus Schoutsen 6f299e7245
Improve error handling (#24204) 2019-05-30 16:23:42 -07:00
Paulus Schoutsen f32d1c0dea
Allow discovery flows to be discovered via zeroconf/ssdp (#24199) 2019-05-30 14:08:05 -07:00
Otto Winter 1ce2d97d3d Fix ESPHome discovered when already exists (#24187)
* Fix ESPHome discovered when already exists

* Update .coveragerc
2019-05-30 09:48:58 -07:00
Paulus Schoutsen 1a3a38d370 Dynamic panels (#24184)
* Don't require all panel urls to be registered

* Allow removing panels, fire event when panels updated
2019-05-30 13:37:01 +02:00
Paulus Schoutsen 59ce31f44f No longer allow invalid slugs or extra keys (#24176)
* No longer allow slugs

* Lint

* Remove HASchema

* Lint

* Fix tests
2019-05-30 13:33:26 +02:00
Jc2k 9303a56d8f Fix duplicated discovered homekit devices (#24178) 2019-05-29 15:49:59 -07:00
Pascal Vizeli d9852bc75d Support Hass.io wheels / docker env (#24175)
* Support Hass.io wheels / docker env

* address comments

* fix lint
2019-05-29 15:30:09 -07:00
Robert Svensson 84baaa324c Revert Zeroconf back to previously used library (#24139)
* Revert back to previously used library

* Fix test

* Remove unused import

* Fix import

* Update __init__.py

* Update __init__.py

* Fix test after rebase
2019-05-29 14:20:06 -07:00
Robert Svensson 42ee8eef50 Move Homekit controller component to user zeroconf discovery (#24042) 2019-05-29 11:20:04 -07:00
Robert Svensson 3fef9a93cf Trådfri component to use new zeroconf discovery (#24041)
* Move tradfri component to use new zeroconf discovery

* Will this work?

* Remove prints

* Correct order in generated zeroconf

* Update test_init.py

* Update test_init.py

* Update test_init.py

* Update test_init.py
2019-05-29 11:19:50 -07:00
Paulus Schoutsen 6947f8cb2e
Cloud: Websocket API to manage Google assistant entity config (#24153)
* Extract exposed devices function

* Add might_2fa info to trait

* Do not filter with should_expose in Google helper func

* Cloud: allow setting if Google entity is exposed

* Allow disabling 2FA via config

* Cloud: allow disabling 2FA

* Lint

* More changes

* Fix typing
2019-05-29 08:39:12 -07:00
Robert Svensson 31b2f331db
Library refactorization of deCONZ (#23725)
* Improved sensors

* Lib update signalling

* Replace reason with changed

* Move imports to top of file

* Add support for secondary temperature reported by some Xiaomi devices

* Bump dependency to v59
2019-05-27 06:56:00 +02:00
Paulus Schoutsen 9debbfb1a8
Add SSDP integration (#24090)
* Add SSDP integration

* Fix tests

* Sort all the things

* Add netdisco to test requirements
2019-05-26 19:48:27 -07:00
Paulus Schoutsen 179fb0f3b5
Use importlib metadata to check installed packages (#24114)
* Use importlib metadata

* Fix script

* Remove unused import

* Update requirements"
2019-05-26 11:58:42 -07:00
Otto Winter 9438dd1cbd Use name in ESPHome discovery title (#24100)
* Use name in ESPHome discovery title

* Add test

* Lint
2019-05-26 13:48:05 +02:00
Andrew Sayre 0194905e97 Move imports to top (#24108) 2019-05-26 13:47:11 +02:00
Paulus Schoutsen e6d7f6ed71
Config entry device tracker (#24040)
* Move zone helpers to zone root

* Add config entry support to device tracker

* Convert Geofency

* Convert GPSLogger

* Track unsub per entry

* Convert locative

* Migrate OwnTracks

* Lint

* location -> latitude, longitude props

* Lint

* lint

* Fix test
2019-05-25 13:34:53 -07:00
Paulus Schoutsen 1de0a0bbb9
Convert stream source to method (#23905)
* Convert stream source to method

* Use async with
2019-05-23 09:45:30 -07:00
Robert Svensson 085303c349 ESPHome component to use zeroconf discovery (#24043)
* Move ESPHome component to use zeroconf discovery

* Remove esphome from discovery component
2019-05-23 08:55:08 +02:00
Paulus Schoutsen f995ab9d54
Don't pass in loop (#23984)
* Don't pass in loop

* Revert some changes

* Lint + Axis revert

* reinstate loop

* Fix a test

* Set loop

* Update camera.py

* Lint
2019-05-22 21:09:59 -07:00
Paulus Schoutsen 9e96397e6a
Require core config detection to be triggerd manually (#24019)
* Detect core config

* Remove elevation

* Lint

* Lint

* Fix type
2019-05-22 17:24:46 -07:00