Commit Graph

2408 Commits (35005474f8760da8b4f2a49e66441f8722b34d21)

Author SHA1 Message Date
Robin cccd0deb65 Fix Facebox face data parsing (#14951)
* Adds parse_faces

* Update facebox.py
2018-06-13 21:02:46 +02:00
Paulus Schoutsen e014a84215
Nest config flow (#14921)
* Move nest to dir based component

* Add config flow for Nest

* Load Nest platforms via config entry

* Add tests for Nest config flow

* Import existing access tokens as config entries

* Lint

* Update coverage

* Update translation

* Fix tests

* Address strings

* Use python-nest token resolution

* Lint

* Do not do I/O inside constructor

* Lint

* Update test requirements
2018-06-13 11:14:52 -04:00
Marius 08adfd87f7 Add unique_id for mqtt binary sensor (#14929)
* Added unique_id for mqtt binary sensor

* Added missing mqtt message fire in test
2018-06-13 16:20:38 +02:00
Hate-Usernames a373793029 pytradfri 5.5.1: Improved 3rd party bulb support (#14887)
* Bump pytradfri version

* Update light component

* Add tests

* lint

* Docstring typos

* Blank line

* lint

* 5.5.1

* Fix tests on py3.5
2018-06-13 07:17:52 +02:00
Ong Vairoj be4776d039 Add more test cases for samsungtv (#14900)
More test cases to cover retry logic added in 58a1c3839
2018-06-12 07:33:21 +02:00
Malte Franken f242418986 UVC camera platform handling unavailable NVR or cameras better (#14864)
* fixed tests: using correct camera configuration now and error handling tests must be separated out to ensure that the setup_component call is actually executed

* better error handling during setup; raising PlatformNotReady in likely recoverable cases; added tests
2018-06-09 07:22:17 +02:00
Robert Svensson 0748466ffc Zone - Hass configuration name is optional (#14449)
* Hass configuration name is optional

* Check explicitly if name is none

* Reverted back to old logic for zones configured in configuration.yaml, where many zones can have the same name

* New test to verify use case of allowing multiple zones having the same name

* Fix too long line
2018-06-07 17:06:13 -04:00
Dale Higgs fe018fd58c Add set_default_level to logger (#14703)
* Add set_default_service to logger

* Fix 2-line lint error

* Add set_default_level to services.yaml

* Add tests for set_default_level

* Remove function and add else when setting default
2018-06-07 17:03:04 -04:00
Paulus Schoutsen 67d137cfd5 Store config entry id in entity registry (#14851)
* Store config entry id in entity registry

* Lint
2018-06-07 20:23:09 +02:00
Philip Rosenberg-Watt bb4d1773d3 Add min_temp and max_temp to MQTT climate device (#14690)
* Add min_temp and max_temp to MQTT climate device

* Add unit tests

* Remove blank line

* Fix unit tests & temp return values

* PEP-8 fixes

* Remove unused import
2018-06-07 13:50:12 -04:00
Paulus Schoutsen bf74cab7af Fix non awaited test (#14854) 2018-06-07 15:58:54 +02:00
nielstron 33990badcd Fixed Rangefilter constructor call 2018-06-06 20:40:56 +02:00
nielstron 25f7c31911 Fixed wrong bound assignment on values below the lower bound 2018-06-06 20:40:54 +02:00
nielstron bb98331ba4 Fix doctring newline and handle ha.state string-being 2018-06-06 20:40:53 +02:00
nielstron 07d139b3a8 Fix wrong comparison 2018-06-06 20:40:53 +02:00
nielstron f4ef8fd1bc Changes for new FilterState construct 2018-06-06 20:40:52 +02:00
nielstron ba836c2e36 Fix indent 2018-06-06 20:40:52 +02:00
nielstron a0ab356936 Renamed to range filter 2018-06-06 20:40:51 +02:00
nielstron b42f4012d1 Fixed test 2018-06-06 20:40:50 +02:00
nielstron 3faed2edc1 Add test for new band_pass filter 2018-06-06 20:40:49 +02:00
Paulus Schoutsen fa2e6ada26 Route themes and translations over websocket (#14828) 2018-06-06 10:12:43 +02:00
Paulus Schoutsen a6880c452f Migrate entity registry to using websocket (#14830)
* Migrate to using websocket

* Lint
2018-06-06 10:08:36 +02:00
Diogo Gomes 4bccb0d2a1
Merge pull request #14831 from home-assistant/sim-sensor
Limit sensor.simulated to 3 decimals (fixes #14773)
2018-06-05 21:06:11 +01:00
Thomas Krüger 549abd9c7e Improved Fritz!Box thermostat support (#14789) 2018-06-05 20:06:25 +02:00
Fabian Affolter f1aba5511f
Limit to 3 decimals (fixes #14773) 2018-06-05 19:44:41 +02:00
Paulus Schoutsen b3b4f7468d
Further cleanup frontend (#14805)
* Remove registering panels

* Remove unused image

* Lint
2018-06-05 10:50:16 -04:00
Diogo Gomes aec425d1f6 Weather Platform - IPMA (#14716)
* initial commit

* lint

* update with pyipma

* Added test

* Added test

* lint

* missing dep

* address comments

* lint

* make sure list is iterable

* don't bother with list

* mock dependency

* no need to add test requirements

* last correction
2018-06-03 23:01:48 +02:00
Matt Schmitt f5d74e07d5 Add support for outlets in HomeKit (#14628) 2018-06-01 18:04:54 +02:00
Anders Melchiorsen fcbc399809 Disallow automation.trigger without entity_id (#14724) 2018-06-01 10:27:12 -04:00
Paulus Schoutsen f6eb9e79d5
Custom panel (#14708)
* Add support for custom panels in JS

* Allow specifying JS custom panels

* Add trust external option

* Fix tests

* Do I/O outside event loop

* Change config to avoid breaking change
2018-06-01 10:06:17 -04:00
roiff ab3717af76 Homekit Thermostat: Better support for temperature ranges (#14679)
* Support for obtaining temperature range
* Fallback to Defaults
* Fixed unit conversion
* Added test
2018-06-01 13:49:16 +02:00
cdce8p f1f4d80f24
Homekit Bugfixes (#14689)
* Fix async bug
* Fix debounce bug
2018-05-30 12:39:27 +02:00
Paulus Schoutsen e746b92e0e Fix deprecated code (#14681) 2018-05-29 23:14:58 +02:00
cdce8p 7d2563eb1f
Update HAP-python to 2.2.2 (#14674)
* Pass driver to accessory
* Added 'hk_driver' fixture for tests
2018-05-29 22:43:26 +02:00
Robert Svensson 8c93b484c4 deCONZ - Option to load or not to load clip sensors on start (#14480)
* Option to load or not to load clip sensors on start

* Full flow

* Fix config flow and add tests

* Fix attribute dark reporting properly

* Imported and properly configured deCONZ shouldn't need extra input to create config entry
2018-05-29 10:09:53 -04:00
Otto Winter fcb60d472e MQTT Cover Fix Assumed State (#14672) 2018-05-29 09:03:45 -04:00
Paulus Schoutsen 8c7f0669c6 Allow hassio frontend development (#14675)
* Allow hassio frontend development

* Fix tests
2018-05-29 08:51:08 +02:00
Andrey 6c3e2021df Give unknown zwave nodes a better name (#14353)
* Give unknown zwave nodes a better name

* Update util.py
2018-05-28 21:49:38 -04:00
cdce8p 6f4dd7b057 Improve Homekit media_player options (#14637)
* Optimize imports

* Optimize name

* Optimize config schema

* Rename mode to feature

* Replace mode with feature_list
2018-05-28 10:26:33 -04:00
Paulus Schoutsen b6e4a7771a
Allow Hass.io panel dir (#14655) 2018-05-27 17:17:19 -04:00
cdce8p 6ceafabd78 Extend package support (#14611) 2018-05-25 16:41:50 -04:00
Marius Kotlarz b4f8d52fb1 Add configurable decimal rounding of display value for CoinMarketCap sensor and upgrade to 5.0.3 (#14437) (#14604) 2018-05-25 15:39:04 +02:00
Matt Schmitt 143be49c66 Add HomeKit support for automations (#14595) 2018-05-25 11:38:48 +02:00
Matt Schmitt a9f19a16ee Add HomeKit support for media players (#14446) 2018-05-25 11:37:20 +02:00
Paulus Schoutsen fa9b9105a8
Fix hue discovery popping up (#14614)
* Fix hue discovery popping up

* Fix result

* Fix tests
2018-05-24 14:24:14 -04:00
cdce8p 0589379de5 Homekit style cleanup (#14556)
* Style cleanup

* Sorted imports
* Harmonized service calls

* Test improvements

* Small update
2018-05-20 22:25:53 -04:00
Fabian Affolter e88fc33eef Fix sensor name (fixes #14535) (#14541) 2018-05-19 17:14:53 +02:00
cdce8p 12e76ef7c1
Update HAP-python to 2.1.0 (#14528) 2018-05-18 16:32:57 +02:00
cdce8p 4c328baaa6
Add code to HomeKit lock (#14524) 2018-05-18 13:52:52 +02:00
Diogo Gomes 97076aa3fd Fix probability_threshold in binary_sensor.bayesian (#14512) (Closes: #14362) 2018-05-18 07:48:16 +02:00
Malte Franken a3777c4ea8 Feedreader configurable update interval and max entries (#14487) 2018-05-18 07:25:08 +02:00
Nathan Henrie 1053473111 Add stdout and stderr to debug output for shell_command (#14465) 2018-05-16 13:47:41 +02:00
Matt Schmitt 25dcddfeef Add HomeKit support for fans (#14351) 2018-05-16 13:15:59 +02:00
Ville Skyttä e20f88c143 Use "Returns" consistently to avoid being treated as section (#14448)
Otherwise, by side effect, results in error D413 by recent pydocstyle.
2018-05-16 10:01:48 +02:00
Paulus Schoutsen df69680d24
Don't add a url to built-in panels (#14456)
* Don't add a url to built-in panels

* Add url_path back

* Lint

* Frontend bump to 20180515.0

* Fix tests
2018-05-15 14:47:46 -04:00
Malte Franken e49e0b5a13 Make Feedreader component more extendable (#14342)
* moved regular updates definition to own method to be able to override behaviour in subclass

* moved filter by max entries to own method to be able to override behaviour in subclass

* event type used when firing events to the bus now based on variable to be able to override behaviour in subclass

* feed id introduced instead of url for storing meta-data about the feed to be able to fetch the same feed from different configs with different filtering rules applied

* keep the status of the last update; continue processing the entries retrieved even if a recoverable error was detected while fetching the feed

* added test cases for feedreader component

* better explanation around breaking change

* fixing lint issues and hound violations

* fixing lint issue

* using assert_called_once_with instead of assert_called_once to make it compatible with python 3.5
2018-05-15 20:43:26 +02:00
Diogo Gomes d47006c98f Optimistic MQTT light (#14401)
* Restores light state, case the light is optimistic

* lint

* hound

* hound

* Added mqtt_json

* hound

* added mqtt_template

* lint

* cleanup

* use ATTR
2018-05-15 12:25:50 +02:00
Matt Schmitt 44e9783c7c Add support for direction to fan template (#14371)
* Initial commit

* Update and add tests
2018-05-14 22:37:49 +02:00
Fabian Affolter 954e4796b8 Use ATTR_NAME from const.py (#14450) 2018-05-14 13:05:52 +02:00
Fabian Affolter fb501282cc
Add SpaceAPI support (#14204)
* Add SpaceAPI support

* Changes according PR comments

* Add tests

* Remove print

* Minor changes
2018-05-14 09:13:59 +02:00
Ville Skyttä 146a9492ec Clean up some Python 3.4 remnants (#14433) 2018-05-13 17:56:42 +02:00
Ville Skyttä 234bf1f0ea Spelling, grammar etc fixes (#14432)
* Spelling, grammar etc fixes

* s/an api data/data of an api/
2018-05-13 12:09:28 +02:00
Ville Skyttä 843789528e Remove extra quotes from docstrings (#14431) 2018-05-13 11:06:15 +02:00
Andrey d1228d5cf4 Look at registry before pulling zwave config values (#14408)
* Look at registry before deciding on ID for zwave values

* Reuse the new function
2018-05-12 17:45:36 -04:00
Andrey 7aec098a05 Bring back typing check. Meanwhile just for homeassistant/*.py (#14410)
* Bring back typing check. Meanwhile just for homeassistant/.py

* Change follow-imports to silent. Add a few more checks.
2018-05-12 17:44:53 -04:00
cdce8p 990f476ac9
Homekit test cleanup (#14416) 2018-05-12 17:10:19 +02:00
Matt Schmitt 621c653fed Allow HomeKit name to be customized (#14159) 2018-05-11 14:22:45 +02:00
Robin 528ad56530 Adds facebox (#14356)
* Adds facebox

* Update .coveragerc

* Remove facebox

* Add test of faces attribute

* Add event test

* Adds more tests

* Adds tests to increase coverage

* Rename MOCK_FACES to MOCK_FACE

* Adds STATE_UNKNOWN
2018-05-11 09:57:00 +02:00
cdce8p 8fcf085829
Rewritten HomeKit tests (#14377)
* Use pytest fixtures and parametrize
* Use async
2018-05-11 01:21:59 +02:00
Paulus Schoutsen ea01b127c2
Add local auth provider (#14365)
* Add local auth provider

* Lint

* Docstring
2018-05-10 14:09:22 -04:00
Paulus Schoutsen 5ec7fc7ddb Backend tweaks to make authorization work (#14339)
* Backend tweaks to make authorization work

* Lint

* Add test

* Validate redirect uris

* Fix tests

* Fix tests

* Lint
2018-05-10 10:38:11 +02:00
Anders Melchiorsen d43e6a2888 Ignore NaN values for influxdb (#14347)
* Ignore NaN values for influxdb

* Catch TypeError
2018-05-08 20:54:38 -04:00
Andrey 10505d542a Make sure zwave nodes/entities enter the registry is proper state. (#14251)
* When zwave node's info is parsed remove it and re-add back.

* Delay value entity if not ready

* If node is ready consider it parsed even if manufacturer/product are missing.

* Add annotations
2018-05-08 15:30:28 -04:00
Nick Whyte e12994a0cd Fix BOM weather '-' value (#14042) 2018-05-08 13:35:55 -04:00
Tod Schmidt c664c20165 Snips: Added slot values for siteId and probability (#14315)
* Added solt values for siteId and probability

* Update snips.py

* Update test_snips.py
2018-05-08 11:43:31 -04:00
Paulus Schoutsen 5c95c53c6c Revert custom component loading logic (#14327)
* Revert custom component loading logic

* Lint

* Fix tests

* Guard for infinite inserts into sys.path
2018-05-07 11:25:48 +02:00
cdce8p 91fe6e4e56 Add debounce to move_cover (#14314)
* Add debounce to move_cover

* Fix spelling mistake
2018-05-06 20:55:38 -04:00
Paulus Schoutsen 34727be5ac
Fix module names for custom components (#14317)
* Fix module names for custom components

* Also set __package__ correctly

* bla

* Remove print
2018-05-06 20:54:56 -04:00
thepotoo 2bb1a95098 Add unique_id to MQTT switch (#13719) 2018-05-06 08:21:02 +02:00
Robert Svensson 8410b63d9c deCONZ add new device without restart (#14221)
* Add new device without restarting hass

* Remove debug prints

* Fix copy paste error

* Fix comments from balloob
Add tests to verify signalling with new added devices

* Fix hound comments
Add test to verify when new sensor is added

* Fix tests

* Unload entry should unsubscribe all deconz dispatchers

* Make sure mock setup also creates unsub in hass data

* Fix copy paste issue

* Lint
2018-05-05 10:11:00 -04:00
Lukas Barth af8cd63838 Matrix Chatbot (#13355)
* Add first version of the Matrix bot

* It's a stupid but necessary change…

* Dont list it twice

* All hail the linter!

* More linter-pleasing

* Use the correct user ID

* Add expression commands

* Add tests for new validators

* Fix room alias handling

* Wording

* Defer setup

* Simplify commands

* Handle exceptions

* Update requirements

* Review

* Move login back to constructor

* Fix review comments
2018-05-05 10:00:36 -04:00
cdce8p 95d27bd1fa Sensor device classes (#14282)
* Added light device class, moved device classes to const

* Removed unnecessary icons

* Replace 'lux' with 'lx'

* Fix comment

* Changed device_class name
2018-05-05 09:37:40 -04:00
blackwind ec3ce4c80d Publish attributes unconditionally (#14179)
* Publish attributes unconditionally

Because the attribute publish command was previously hidden behind `if val:`, falsy values like False and 0.0 weren't being published, thereby making Statestream -- particularly in the case of booleans, where the first True would be retained indefinitely -- a completely worthless indicator of state.

* Change bool test to False to confirm falsy values pass
2018-05-05 09:31:39 -04:00
Diogo Gomes 354470469f Fix filter sensor missing window_size argument (#14252)
* missing window_size argument

* test throttle filter configuration
2018-05-05 03:10:08 +02:00
Matt Schmitt 255a85ad02 HomeKit: Support triggered state for alarm_control_panel (#14285) 2018-05-05 00:09:16 +02:00
cdce8p bb76ba67f3
Homekit: Changed device_class requirement Humidity Sensor (#14277) 2018-05-04 22:48:38 +02:00
cdce8p e37fd5b132 Update HAP-python to 2.0.0 (#14278)
* Fixed async (added 'async_add_job' and 'add_job')

* Driver status

* Use pyhap category constants

* Changed 'set_broker' to 'set_driver'

* Changed loader method names

* Use 'serv.configure_char'

* Use 'self.set_info_service'

* Use 'self.add_preload_service'

* Fix hound issue

* Updated HAP-python to 2.0.0
2018-05-04 16:46:00 +02:00
Paulus Schoutsen 15e75b07d8 Allow fetching media player covers via websocket connection (#14233)
Lint
2018-05-03 22:03:26 +02:00
Paulus Schoutsen 58257af289 Add fetching camera thumbnails over websocket (#14231)
* Add fetching camera thumbnails over websocket

* Lint
2018-05-03 22:02:59 +02:00
roiff c9de2f015b HomeKit - Climate: power state on/off support (#14082)
* add power state  support on off
* Added check for current operation mode
* Extended 'set_heat_cool'
* Added tests
2018-05-03 18:22:43 +02:00
giangvo ef4498ec27 Issue/add template fans (#12027)
* add template fan

* add-template: address PR comments

* add-template: remove unused import

* add-template: revert async_track_state_change change

* add-template: use yield from

* Revert "add-template: use yield from"

This reverts commit 1e053714a7.

* add-template: use yield

* add-template: remove unused import

* add-template: remove async_add_job usages

* use components

* add-template: use async/await

* add-template: fix style

* add-template: remove str()

* address pr comments

* fix style
2018-05-02 17:45:31 -04:00
Diogo Gomes c851dfa2c7 Restores switch state, case the switch is optimistic (#14151)
* Add restore_state to optimistic switch

* no need to schedule update

* test added

* lint

* new async syntax

* lint
2018-05-02 17:29:07 -04:00
Andrey f72d568374 Add unique_id to zwave node entity (#14201)
* Add unique_id to zwave node entity

* Wait 30s before adding zwave node if its unique_id is not ready

* Use only node_id in unique_id. Update name, manufacturer, and product attributes on node update.
2018-05-02 16:10:26 -04:00
Otto Winter 14c7fa8882 WUnderground unique ids (#13311)
* WUnderground unique_id

* Remove async_generate_entity_id

* Lint

* Address comment
2018-05-02 14:23:07 -04:00
Anders Melchiorsen bf056b6f01 Fix Hue color state for missing xy (#14230) 2018-05-02 09:25:08 -04:00
Sebastian Muszynski 8b13658d3b Improve config schema of the blackbird component (#14007)
* Import moved, return values removed and redundant log message removed

* Improve config schema of the blackbird component

* Tests updated

* Handle updated

* Schema fixed
2018-05-02 09:21:50 -04:00
Otto Winter e4655a7e63 Add MQTT Sensor device_class (#14033)
* Add MQTT Sensor device_class

* Add test
2018-05-01 15:38:08 -04:00
Paulus Schoutsen 83d300fd11 Custom component loading cleanup (#14211)
* Clean up custom component loading

* Fix some tests

* Fix some stuff

* Make imports work again

* Fix tests

* Remove debug print

* Lint
2018-05-01 20:57:30 +02:00
Otto Winter 9bc8f6649b Template Sensor add device_class support (#14034)
* Template Sensor Device Class Support

* Lint

* Add tests
2018-05-01 14:32:44 -04:00
Paulus Schoutsen d82693b460
Allow easy extension of websocket API (#14186)
* Allow easy extension of websocket API

* Lint

* Move panel test to frontend

* Register websocket commands

* Simplify test

* Lint
2018-05-01 13:35:23 -04:00
Paulus Schoutsen cdd45e7878 Foundation for users (#13968)
* Add initial user foundation to Home Assistant

* Address comments

* Address comments

* Allow non-ascii passwords

* One more utf-8 hmac compare digest

* Add new line
2018-05-01 18:20:41 +02:00
Paulus Schoutsen 12dff5baa8 Add room hint support to Google Assistant cloud (#14180) 2018-04-30 21:05:29 +02:00
Paulus Schoutsen 853a16938b
Fix poorly formatted automations (#14196) 2018-04-30 09:56:42 -04:00
Paulus Schoutsen 5dcad89a0d
Do not sync entities with an empty name (#14181) 2018-04-30 09:18:18 -04:00
cdce8p 46c260fd85 Added CONF_IP_ADDRESS to HomeKit (#14163) 2018-04-30 08:58:17 -04:00
Otto Winter 76c9c0179b Improve chromecast disconnection logic (#14190)
* Attempt Cast Fix

* Cleanup
2018-04-30 08:46:44 -04:00
Anders Melchiorsen 30d987f59f
Revert Hue color state to be xy-based (#14154) 2018-04-30 00:49:19 +02:00
escoand 8e7f500f28 Add precipitation to OpenWeatherMap forecast (#13971)
* add initial precipitation support

* move attr to component

* remove blank line

* add forecast attributes to platform and update demo

* add tests

* break long lines

* calc lower temp correctly

* move all new attributes to component

* convert temp low only when existing
2018-04-29 17:50:49 +02:00
Kane610 3fd4987baf deCONZ allow unloading of config entry (#14115)
* Working but incomplete

* Remove events on unload

* Add unload test

* Fix failing sensor test

* Improve unload test

* Move DeconzEvent to init

* Fix visual under-indentation
2018-04-29 10:16:20 -04:00
Otto Winter a4bf421044 Convert more files to async/await syntax (#14142)
* Move more files to async/await syntax

* Attempt Work around pylint bug

Using lazytox :P
2018-04-28 19:26:20 -04:00
Otto Winter a0b14c2913 Light mqtt_json: Add HS color support (#14029)
* Light mqtt_json HS color support

* Lint

* Catch float ValueError
2018-04-29 00:33:10 +02:00
Matt Schmitt 2091f86e25 Clean up HomeKit accessory information characteristics (#14114)
* Update accessory information characteristics
* Add firmware revision characteristic
2018-04-28 23:17:30 +02:00
Paulus Schoutsen 93fe61bf13
System log: make firing event optional (#14102)
* Syste log: make firing event optional

* Add test

* Lint

* Doc string
2018-04-28 17:09:38 -04:00
Maciej Bieniek c78e8eb578 Add support for light sensors with 'lx' unit to HomeKit (#14131)
* add support for light sensors with lx unit

* add test for light sensor with 'lx' unit
2018-04-28 17:14:34 +02:00
Anders Melchiorsen 0b350993b5 Improve precision of Hue color state (#14113) 2018-04-27 13:18:58 +02:00
Otto Winter 9d1f9fe204 Improve MQTT topic validation (#14099)
* Improve MQTT topic validation

* Fix test

* Improve length check
2018-04-27 13:15:45 +02:00
Kane610 4b06392442 Zone component config entry support (#14059)
* Initial commit

* Add error handling to config flow
Change unique identifyer to name
Clean up hound comments

* Ensure hass home zone is created with correct entity id
Fix failing tests

* Fix rest of tests

* Move zone tests to zone folder
Create config flow tests

* Add possibility to unload entry

* Use hass.data instead of globas

* Don't calculate configures zones every loop iteration

* No need to know about home zone during setup of entry

* Only use name as title

* Don't cache hass home zone

* Add new tests for setup and setup entry

* Break out functionality from init to zone.py

* Make hass home zone be created directly

* Make sure that config flow doesn't override hass home zone

* A newline was missing in const

* Configured zones shall not be imported
Removed config flow import functionality
Improved tests
2018-04-26 17:59:22 -04:00
Robin 3e18078700 Adds update file_path service to local_file camera (#13976)
* WIP: Add update_file service to local_file camera

* Add event on update

* Update local_file.py

* Update services.yaml

* Fix indent

* Update test_local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update local_file.py

* Update test_local_file.py

* Update local_file.py

* Adds file_path to device_state_attributes

* Update test_local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update local_file.py

* Update test_local_file.py

* fixed test_update_file_path

* Update local_file.py

* Update test_local_file.py

* Update test_local_file.py

* Update services.yaml

* Update local_file.py

* Update local_file.py

* Update test_local_file.py

* Update local_file.py
2018-04-26 15:01:58 -04:00
c727 a94864c86f Modify weather components for "new" frontend card (#14076)
* Enable weather condition for all forecasts (OWM)

* Remove entity_picture from BR

* Remove summary texts from Dark Sky

* Update test_darksky.py
2018-04-25 12:37:57 +02:00
Paulus Schoutsen 5ed73fecd3
Order the output of the automation editor (#14019)
* Order the output of the automation editor

* Lint
2018-04-23 13:47:06 -04:00
Kane610 8a10fcd985 deCONZ use forward entry setup (#13990)
* Use forward entry setup with light platform

* Move sensor to forward entry setup

* Use forward entry setup with binary sensors

* Use forward entry setup with scene platform

* Remove import of unused functionality

* Move deconz setup in to setup entry
Create initial negative tests for setup entry

* Fix hound comment

* Improved tests

* Add test for scene platform

* Add test for binary sensor platform

* Add test for light platform

* Add test for light platform

* Add test for sensor platform

* Fix hound comment

* More asserts on sensor types
2018-04-23 12:00:16 -04:00
Otto Winter 7f634c6ed0 Revert cast platform polling mode (#14027) 2018-04-22 16:32:15 -04:00
Paulus Schoutsen 5d3471269a Show a notification when a config entry is discovered (#14022)
* Show a notification when a config entry is discovered

* update comment

* Inline functions

* Lint
2018-04-22 21:00:24 +02:00
Matt Schmitt 51f55bddb7 HomeKit Alarm Control Panel Code Exception Fix (#14025)
* Catch exception for KeyError
* Use get and added test
2018-04-21 16:16:46 +02:00
Jon Maddox f12ff6f297 Expose the condition code on condition sensors (#14011)
* expose the condition code on condition sensors

* 💄

* like thisss duh

* add test for condition_code

* It’s a string
2018-04-21 10:20:33 +02:00
Johann Kellerman 6ccb83584e
Qwikswitch binary sensors (#14008) 2018-04-21 08:34:42 +02:00
koolsb 37cd63ea5a Add blackbird media player component (#13549) 2018-04-19 11:35:38 +02:00
NovapaX 45eb611007 renaming icons (#13982)
* renaming icons

* remove mdi:robot-vacuum

* fix other vacuums
2018-04-18 15:46:44 -04:00
Michael Wei 0eb3e49880 Alexa thermostat fails to properly parse 'value' field for climate (#13958)
* Fix thermostat payload issue

* fix test payload

* style issue

* handle both string and value object
2018-04-18 14:19:05 -04:00
Kane610 c5cb28d41f deCONZ migrate setup fully to config entry (#13679)
* Initial working config entry with discovery

* No need for else

* Make sure that imported config doesnt exist as a config entry

* Improve checks to make sure there is only instance of deconz

* Fix tests and add new tests

* Follow upstream changes
Fix case when discovery started ongoing config entry and user completes setup  from other path it was possible to complete discovered config entry as well

* Add test to make sure link doesn't bypass any check for only allowing one config entry

* Dont use len to determine an empty sequence

* Cleanup

* Allways get bridgeid to use as unique identifier for bridge
2018-04-18 10:27:44 -04:00
Nick Whyte b589dbf26c Support basic covers with open/close/stop services HomeKit (#13819)
* Support basic covers with open/close/stop services
* Support optional stop
* Tests
2018-04-18 14:39:58 +02:00
Tod Schmidt f4b1a8e42d Added web view for TTS to get url (#13882)
* Added web view for to get url

* Added web view for TTS to get url

* Added web view for TTS to get url

* Added web view for TTS to get url

* Fixed test

* added auth

* Update __init__.py
2018-04-17 15:24:54 +02:00
Robin 569f5c111f Adds SigFox sensor (#13731)
* Create sigfox.py

* Create test_sigfox.py

* Update .coveragerc

* Fix lints

* Fix logger message string

* More lints

* Address reviewer comments

* edit exception handling

* Update sigfox.py

* Update sigfox.py

* Update sigfox.py

* Update sigfox.py
2018-04-17 13:08:32 +02:00
Paulus Schoutsen 534aa0e4b5 Add data entry flow helper (#13935)
* Extract data entry flows HTTP views into helper

* Remove use of domain

* Lint

* Fix tests

* Update doc
2018-04-17 11:44:32 +02:00
Benedict Aas 9677bc081e Add more math functions to templates (#13915)
We make `sin`, `cos`, `tan`, and `sqrt` functions, and the `pi`, `tau`,
and `e` constants available in templates.
2018-04-15 18:51:45 +02:00
Paulus Schoutsen 4d44c0feff
Further untangle data entry flow (#13855)
* Further untangle data entry flow

* Fix test

* Remove helper class
2018-04-14 14:38:24 -04:00
dersger 80a3220b88 Avoid unnecessary cast state updates (#13770)
* Avoid unnecessary cast state updates

* Add test

* Fixed bad syntax

* Fixed imports

* Fixed test
2018-04-13 22:22:02 -04:00
Matthew Garrett ac2298189e Add support for controlling homekit lights and switches (#13346)
* Add support for controlling homekit lights and switches

This adds support for controlling lights and switches that expose a HomeKit
control interface, avoiding the requirement to implement protocol-specific
components.

* Comment out the homekit requirement

This needs to build native code, so leave it commented for now

* Review updates

* Make HomeKit auto-discovery optional

Add an "enable" argument to the discovery component and add a list of
optional devices types (currently just HomeKit) to discover

* Further review comments

* Update requirements_all.txt

* Fix houndci complaints

* Further review updates

* Final review fixup

* Lint fixups

* Fix discovery tests

* Further review updates
2018-04-13 19:25:35 +02:00
Paulus Schoutsen 60508f7215
Extract config flow to own module (#13840)
* Extract config flow to own module

* Lint

* fix lint

* fix typo

* ConfigFlowHandler -> FlowHandler

* Rename to data_entry_flow
2018-04-13 10:14:53 -04:00
Diogo Gomes ddd2003629 initialize queue before filtering (#13842) 2018-04-13 14:25:03 +02:00
Paulus Schoutsen 20ababec3e Add authentication to error log endpoint (#13836) 2018-04-13 13:32:05 +02:00
Diogo Gomes 22a1b99e57 UPnP async (#13666)
* moved from miniupnpc to pyupnp-async

* update requirements

* Tests added

* hound

* update requirements_test_all.txt

* update gen_requirements_all.py

* addresses @pvizeli requested changes

* address review comments
2018-04-13 00:22:52 +02:00
Mark Coombes 993866a314 Support Garage Doors in HomeKit (#13796) 2018-04-12 18:08:48 +02:00
Yonsm c863b9614c Support CO2/PM2.5/Light sensors in HomeKit (#13804)
* Support co2/light/air sensor in HomeKit
* Add tests
* Added tests
* changed device_class lux to light
2018-04-12 15:01:41 +02:00
Paulus Schoutsen f47572d3c0 Allow platform unloading (#13784)
* Allow platform unloading

* Add tests

* Add last test
2018-04-12 14:28:54 +02:00
cdce8p dd7e6edf61
HomeKit type_cover fix (#13832)
* Removed char_position_state
* Changed service call
2018-04-12 13:19:21 +02:00
Anders Melchiorsen 9c1bc18def Fix too green color conversion (#13828)
* Prepare test

* Fix too green color conversion

* Fix remaining tests
2018-04-11 20:58:57 -04:00
cdce8p 2a5751c09d Homekit refactor (#13707) 2018-04-11 22:24:14 +02:00
Paulus Schoutsen 5ac52b74e0
Remove vendor lookup for mac addresses (#13788)
* Remove vendor lookup for mac addresses

* Fix tests
2018-04-09 21:21:26 -04:00
Johann Kellerman 7595401dcb Qwikswitch Entity Register (#13791)
* Entity Register

* feedback
2018-04-10 01:24:06 +02:00
Tod Schmidt e593117ab6 Snips sounds (#13746)
* Added feedback sound configuration

* Added feedback sound configuration

* Cleaned up feedback off

* Cleaned up whitespace

* Moved feedback pus to helper funx

* Async

* Used async_mock_service for tests

* Lint
2018-04-09 11:46:27 -04:00
Phil Kates c61611d2b4 Add Homekit locks support (#13625)
* homekit: Add locks support
* Improved upgradeability
2018-04-09 16:23:49 +02:00
Paulus Schoutsen 73de749411
Use config entry to setup platforms (#13752)
* Use config entry to setup platforms

* Rename to async_forward_entry

* Add tests

* Catch if platform not exists for entry
2018-04-09 10:09:08 -04:00
Yonsm cb51553c2d Support binary_sensor and device_tracker in HomeKit (#13735)
* Support binary_sensor and device_tracker for HomeKit
* Add test for get_accessory and binary sensor
* Test service.display_name and char_detected.display_name
* Split test to improve speed
2018-04-09 15:32:28 +02:00
Johann Kellerman b01dceaff2
Qwikswitch sensors (#13622) 2018-04-08 21:59:19 +02:00
Paulus Schoutsen 40d7857f3b
Prepare entity component for config entries (#13730)
* Prepare entity component for config entries

* Return in time
2018-04-07 23:04:50 -04:00
Otto Winter 81b1d08d35 Add MQTT Sensor unique_id (#13318)
* Add MQTT Sensor unique_id

* Add test

* Update comment
2018-04-07 22:32:09 -04:00
Diogo Gomes 286476f0d6 Initialise filter_sensor with historical values (#13075)
* Initialise filter with historical values
Added get_last_state_changes()

* fix test

* Major changes to accommodate history + time_SMA

# Conflicts:
#	homeassistant/components/sensor/filter.py

* hail the hound!

* lint fixed

* less debug

* ups

* get state from the proper entity

* sensible default

* No defaults in get_last_state_changes

* list_reverseiterator instead of list

* prev_state to state

* Initialise filter with historical values
Added get_last_state_changes()

* fix test

* Major changes to accommodate history + time_SMA

# Conflicts:
#	homeassistant/components/sensor/filter.py

* hail the hound!

* lint fixed

* less debug

* ups

* get state from the proper entity

* sensible default

* No defaults in get_last_state_changes

* list_reverseiterator instead of list

* prev_state to state

* update

* added window_unit

* replace isinstance with window_unit
2018-04-06 21:59:55 -04:00
cdce8p 262ea14e5a Add timeout / debounce (for brightness and others) (#13534)
* Add async timeout feature

* Decorator for setter methods to limit service calls to HA
* Changed to async
* Use async_call_later
* Use lastargs, async_add_job

* Use dict for lastargs

* Updated tests to stop patch
2018-04-06 23:11:53 +02:00
cgtobi 48fe2d18e8 Add option to ignore availability in google calendar events (#13714) 2018-04-06 21:48:50 +02:00
cdce8p 85487612d5 Update Homekit to 1.1.9 (#13716)
* Version bump to HAP-python==1.1.9

* Updated types and tests
2018-04-06 10:20:59 -04:00
PlanetJ 4008bf5611 Adding configration to disable ip address as a requirement Fixes: #13399 (#13692)
* Adding configration to disable ip address as a requirement Fixes: #13399

* Remove whitespace
2018-04-05 18:45:09 +02:00
Niklas Morberg bb5484edac Support color temperature in Homekit (#13658)
* Add support for color temperature
* Add test for color temp
2018-04-05 18:06:23 +02:00
cdce8p 206e38a2ab
Update HAP-python to 1.1.8 (#13563)
* Bump version to HAP-python==1.1.8
* Required changes for version change
* Small bugfix lights
2018-04-05 13:20:20 +02:00
John Arild Berentsen fe56844a3a
Bugfix: Zwave Print_node to logfile instead of console (#13302)
* Print to logfile instead of console

* Review changes

* Typo
2018-04-05 11:14:15 +02:00
cdce8p 692b2644c7
Minor style changes, cleanup (#13654)
* Minor style changes, cleanup
* Change 'self._entity.id' to 'self.entity_id'
* Use const 'STATE_OFF'
* Added CATEGORY constants
* Removed *args from accessory types
* Changed 'self._hass' to 'self.hass'
* Added log debug msg (for added lights)
2018-04-05 00:52:25 +02:00
Ville Skyttä 415af5e257 Spelling fixes (#13681) 2018-04-04 23:30:02 +02:00
mountainsandcode 032d6963d8 Add regex functions as templating helpers (#13631)
* Add regex functions as templating helpers

* Add regex functions as templating helpers - Style fixed

* Templating filters, third time lucky?
2018-04-04 15:34:01 +02:00
Paulus Schoutsen 92bd932679 Always enable config entries & remove config_entry_example (#13663) 2018-04-03 23:23:21 +02:00
Niklas Wagner 9fb73c1bab Hue mireds value is actually 153 not 154 (#13601) 2018-04-02 09:45:38 +02:00
Adam Mills be43c3bcfe
Fix mqtt_json color commands (#13617) 2018-04-01 14:12:55 -04:00
Paulus Schoutsen eb763764b3
Fix Hue error logging (#13616) 2018-04-01 09:03:01 -07:00
Paulus Schoutsen ff9f500c51
Unflake folder watcher test (#13569)
* Unflake folder watcher test

* Fix tests

* Lint
2018-04-01 08:30:14 -07:00
Tod Schmidt bf44dc422c Added HassOpenCover and HassCloseCover intents (#13372)
* Added intents to cover

* Added test for cover intents

* Style fixes

* Reverted reversions

* Async fixes

* Woof

* Added conditional loading

* Added conditional loading

* Added conditional loading

* Moved tests, fixed logic

* Moved tests, fixed logic

* Pylint

* Pylint

* Refactored componenet registration

* Refactored componenet registration

* Lint
2018-03-30 17:22:48 -07:00
Joe Lu ad5a11ba3d Add support for Canary Flex (#13280)
Add support for Canary Flex
2018-03-30 23:38:29 +02:00
Beat 8fad97a47a Add FreeDNS component (#13526)
* Add FreeDNS component

* Implement review changes in FreeDNS component

* Implement review changes in FreeDNS component

* Implement review changes in FreeDNS component
2018-03-30 21:33:30 +02:00
Kane610 931bceefd9 deCONZ config entry (#13402)
* Try config entries

* Testing

* Working flow

* Config entry text strings

* Removed manual inputs for config flow

* Support unloading of config entry

* Bump requirement to v33

* Fix comments from test

* Make sure that only one deCONZ instance can be set up

* Hass doesn't support unloading platforms yet

* Modify get_api_key to be testable

* Fix hound comments

* Add test dependency

* Add test for no key

* Bump requirement to v35
Add pydeconz to list of test components

* Don't have a check in async_setup that domain exists in hass.data
2018-03-30 00:34:26 -07:00
Albert Lee 5801d78017 Implement thermostat support for Alexa (#13340)
* Implement thermostat support for Alexa

* util.temperature: Support interval conversions

* Use climate.ATTR_OPERATION_MODE for Alexa thermostat mode

* Switch coroutines to async/await

* Log all Alexa error events
2018-03-29 23:49:08 -07:00
Paulus Schoutsen 184f2be83e
Convert Hue to always use config entries (#13034) 2018-03-29 20:15:40 -07:00
Johann Kellerman 507c658fe9 Check whitelisted paths #13107 (#13154) 2018-03-29 19:57:19 -07:00
Frederik Bolding 3e5462ebff Added file path validity checks to file sensor (#12505)
* Added file validity checks to file sensor

* Patched out 'is_allowed_path' for file sensor tests
2018-03-29 19:47:49 -07:00
Robin df78eecc1b Adds folder_watcher component (#12918)
* Create watchdog_file_watcher.py

* Rename watchdog_file_watcher.py to folder_watcher.py

* Address a number of issues

* Adds filter

* Adds pattern matching

* Adds create_event_handler()

* Update folder_watcher.py

* Adds run_setup()

* Remove stop_watching()

* Adds shutdown()

* Update config to allow patterns on each folder

* Update to patterns from filters

* Adds watchdog

* Fix indents on schema

* Update folder_watcher.py

* Create test_file_watcher.py

* Fix lints

* Add test_invalid_path()

* Adds folder_watcher

* Update test_file_watcher.py

* Update folder_watcher.py

* Simplify config

* Adapt for new config

* Run observer.schedule() on EVENT_HOMEASSISTANT_START

* Amend Watcher removing entity and tidying startup

* Tidy config

* Rename process to on_any_event for consistency

* Rename on_any_event back to process

Using `on_any_event` resulted in 2 events being fired

* Update folder_watcher.py

* Fix return False on setup

* Update test_file_watcher.py

* Update folder_watcher.py

* Adds watchdog

* Undo adding watchdog

* Update test_file_watcher.py

* Update test_file_watcher.py

* Update test_file_watcher.py

* Update test_file_watcher.py

* Update test_file_watcher.py

* Add event

* Update test_file_watcher.py

* Update .coveragerc

* Update test_file_watcher.py

* Update test_file_watcher.py

* debug + join

* test event

* lint

* lint

* Rename test_file_watcher.py to test_folder_watcher.py

* hound

* Tidy test

* Further refine test

* Adds to test_all

* Fix test for py35

* Change test again

* Update test_folder_watcher.py

* Fix test

* Add watchdog to test

* Update folder_watcher.py

* add watchdog

* Update folder_watcher.py
2018-03-29 18:10:20 -07:00
Johann Kellerman a6b63b669e Don't add Falsy items to list #13412 (#13536) 2018-03-29 17:13:08 -07:00
cdce8p cea2de5eb5
HomeKit: Fix setting light brightness (#13518)
* Added test
2018-03-29 18:35:57 +02:00
Mikael Svensson bdb4d754ae Adds template function state_attr to get attribute from a state (#13378)
* Adds template function state_attr to get attribute from a state
Refactored is_state_attr to use new function
Adds tests for state_attr

* Fixes line too long and test bug

* Fixes pylint error

* Fixes tests and D401 lint error
2018-03-28 00:04:18 -07:00
cdce8p 2bebfec3a6
Homekit: Fix security systems (#13499)
* Fix alarm_code=None
* Added test
2018-03-27 23:39:25 +02:00
cdce8p 9eda04b787
Homekit: Bugfix Thermostat Fahrenheit support (#13477)
* Bugfix thermostat temperature conversion
* util -> temperature_to_homekit
* util -> temperature_to_states
* util -> convert_to_float
* Added tests, deleted log msg
2018-03-27 11:31:18 +02:00
cdce8p 8a0facb747 Validate basic customize entries (#13478)
* Added schema to validate customize dictionary

* Added test
2018-03-26 19:50:29 -07:00
Philip Rosenberg-Watt 81cf0dacfe Fix Google Calendar caching when offline (#13375)
* Fix Google Calendar caching when offline

Events from Google Calendar were not firing under the following
circumstances:

1. Start ha as normal with Google Calendar configured as per
   instructions.
2. ha loses network connectivity to Google
3. ha attempts update of Google Calendar
4. calendar/google component throws uncaught Exception causing update
   method to not return
5. (cached) Google Calendar event does not fire, remains "Off"

Catching the Exception and returning False from the update() method
causes the correct behavior (i.e., the calendar component firing the
event as scheduled using cached data).

* Add requirements

* Revert code cleanup

* Remove explicit return value from update()

* Revert "Remove explicit return value from update()"

This reverts commit 7cd77708af.

* Use MockDependency decorator

No need to whitelist google-python-api-client for a single unit test at
this point.
2018-03-26 18:10:22 -07:00
Paulus Schoutsen f1d37fc849
Upgrade aiohue and fix race condition (#13475)
* Bump aiohue to 1.3

* Store bridge in hass.data before setting up platform

* Fix tests
2018-03-26 16:07:22 -07:00
Paulus Schoutsen 24e0bb198a
Hue: Convert XY to HS color if HS not present (#13465)
* Hue: Convert XY to HS color if HS not present

* Revert change to test

* Address comments

* Lint
2018-03-26 14:00:56 -07:00
Patrick Hofmann 6d20a84f0e Security fix & lock for HomeMatic (#11980)
* HomeMatic KeyMatic device become a real lock component

* Adds supported features to lock component.

Locks may are capable to open the door latch.
If component is support it, the SUPPORT_OPENING bitmask can be supplied in the supported_features property.

* hound improvements.

* Travis improvements.

* Improvements from review process

* Simplifies is_locked method

* Adds an openable lock in the lock demo component

* removes blank line

* Adds test for openable demo lock and lint and reviewer improvements.

* adds new line...

* Comment end with a period.

* Additional blank line.

* Mock service based testing, lint fixes

* Update description
2018-03-25 23:25:28 +02:00
cdce8p 7db37a3834 HomeKit: Bugfix & improved logging (#13431)
* Bugfix & improved logging

* Removed logging statements

* Removed logging test
2018-03-25 12:53:15 +02:00
Anders Melchiorsen 55daea5169 Improve detection of entity names in templates (#13432)
* Improve detection of entity names in templates

* Only test variables
2018-03-25 12:51:11 +02:00
Marc Forth 2d2e8034d6 Removed the google home warning from emulated_hue (#13436)
* Removed the google home warning from emulated_hue

* Update test_init.py

* Update test_init.py
2018-03-25 00:45:25 -07:00
Anders Melchiorsen 7166d53e2b Log invalid templates in script delays (#13423)
* Log invalid templates in script delays

* Abort on error

* Remove unused import
2018-03-25 01:12:26 +01:00
Franck Nijhof 872b6cf16b Updates default Pilight port number (#13419) 2018-03-23 23:22:33 +01:00
Otto Winter 6a625bdb37 Cast Integration Cleanup (#13275)
* Cast Integration Cleanup

* Fix long line

* Fixes and logging

* Fix tests

* Lint

* Report unknown state with None

* Lint

* Switch to async_add_job

Gets rid of those pesky "Setup of platform cast is taking over 10 seconds." messages.

* Re-introduce PlatformNotReady

* Add tests

* Remove unnecessary checks

* Test PlatformNotReady

* Fix async in sync context

* Blocking update

It's not using async anyway

* Upgrade pychromecast to 2.1.0

* Make reviewing easier

I like "protected" access, but I like reviewing more :)

* Make reviewing even easier :)

* Comment tests
2018-03-23 14:02:52 -07:00
Paulus Schoutsen 4bd6776443
Google assistant sync (#13392)
* Add Google Assistant Sync API

* Update const.py

* Async/await
2018-03-23 12:13:52 -07:00
Adam Mills 2497dd5e33 Hue: Use the currently active color mode (#13376)
* Hue: Use the currently active color mode

* Round hue/sat colors before reporting to API

* .gitignore cache fix
2018-03-23 11:01:40 -07:00
Paulus Schoutsen fb1fafefab
Include all config flow translations with backend translations (#13394) 2018-03-22 12:21:33 -07:00
Paulus Schoutsen d385e9645d Merge remote-tracking branch 'origin/master' into dev 2018-03-22 10:20:35 -07:00
cgtobi e9cdbe5d8c Add language parameter to darksky sensor (#13297) 2018-03-22 13:34:02 +01:00
Paulus Schoutsen da4e630f54 Fix tests 2018-03-21 10:38:06 -07:00
Paulus Schoutsen ffbafa687a Do not include unavailable entities in Google Assistant SYNC (#13358) 2018-03-21 10:14:56 -07:00
Anders Melchiorsen f8127a3902 Add a polling fallback for Sonos (#13310)
* Prepare for poll

* Add a polling fallback for Sonos
2018-03-20 19:27:07 -07:00
Paulus Schoutsen cfb0b00c0c
Do not include unavailable entities in Google Assistant SYNC (#13358) 2018-03-20 18:09:34 -07:00
John Arild Berentsen 5c4529d044
Bugfix: Zwave set_config_parameter failed when config list contained int (#13301)
* Cast list and bool options to STR

* Add button options to STR

* Add TYPE_BUTTON to value types

* Adjust comparison

* Remove Logging

* Remove Empty line

* Update tests

* Update tests

* Mistake
2018-03-20 14:04:24 +01:00
Johann Kellerman 4270bc7abb Perform check_config service in current process (#13017)
* Perform check_config service in current process

* feedback
2018-03-19 14:20:04 -07:00
Adam Mills 89c7c80e42 Use hue/sat as internal light color interface (#11288)
* Accept and report both xy and RGB color for lights

* Fix demo light supported_features

* Add new XY color util functions

* Always make color changes available as xy and RGB

* Always expose color as RGB and XY

* Consolidate color supported_features

* Test fixes

* Additional test fix

* Use hue/sat as the hass core color interface

* Tests updates

* Assume MQTT RGB devices need full RGB brightness

* Convert new platforms

* More migration

* Use float for HS API

* Fix backwards conversion for KNX lights

* Adjust limitless min saturation for new scale
2018-03-18 15:00:29 -07:00
uchagani 1dcc51cbdf Add ecobee fan mode (#12732)
* add ability to set fan on

* add tests and change "not on" status to "auto"

* hound fix

* more hounds

* I don't understand new lines

* fix linting errors

* more linting fixes

* change method signature

* lint fixes

* hopefully last lint fix

* correct temp ranges according to ecobee API docs

* update dependency to latest version

* update tests with values from new temp logic

* fix linting issue

* more linting fixes

* add SUPPORT_FAN_MODE to capabilities

* add fan_list to attributes.
restore current fan state to OFF if fan is not running.
change target high/low temps from null to target temp when not in auto mode.
change target temp from null to high/low temp when in auto mode
change mode attribute to climate_mode for consistency with other lists.

* remove unused import

* simplify logic

* lint fixes

* revert change for target temps
2018-03-18 09:02:07 -07:00
Diogo Gomes 1e17b2fd63 Added Time based SMA to Filter Sensor (#13104)
* Added Time based SMA

* move "now" to _filter_state()

* Addressed comments

* fix long line

* type and name

* # pylint: disable=redefined-builtin

* added test
2018-03-18 08:58:52 -07:00
Otto Winter 3442b6741d
Fix WUnderground duplicate entity ids (#13285)
* Fix WUnderground duplicate entity ids

* Entity Namespace
2018-03-17 13:14:53 +01:00
Paulus Schoutsen 5a9013cda5
Refactor Hue: phue -> aiohue (#13043)
* phue -> aiohue

* Clean up

* Fix config

* Address comments

* Typo

* Fix rebase error

* Mark light as unavailable when bridge is disconnected

* Tests

* Make Throttle work with double delay and async

* Rework update logic

* Don't resolve host to IP

* Clarify comment

* No longer do unnecessary updates

* Add more doc

* Another comment update

* Wrap up tests

* Lint

* Fix tests

* PyLint does not like mix 'n match async and coroutine

* Lint

* Update aiohue to 1.2

* Lint

* Fix await MagicMock
2018-03-16 20:27:05 -07:00
cdce8p f6ae2d338d
Homekit: Use util functions for unit conversion (#13253)
* Updated to util/color for conversion
* Updated temperature sensor to use util/temperature conversion
2018-03-16 11:38:44 +01:00
Fabien Piuzzi 0deef34881 Adding Foobot device sensor (#12417)
* Added Foobot device sensor

* Added error handling tests

* Corrections after PR review.

* Migrated to async/await syntax

 * lint fixes
 * stop raising HomeAssistantError
 * debug log for number of requests

* Moved shared data between sensors from a class attribute to a separate class

* Made test more async-aware

disabled setup error test for now as it's not working

* Working failure scenarios tests
2018-03-15 19:50:58 -07:00
cdce8p 2350ce96a6
Homekit: New supported devices (#13244)
* Fixed log message
* Added support for scripts
* Added support for lights
* Small refactoring
* Added support for humidity sensor
* Added tests
2018-03-16 01:05:28 +01:00
Paulus Schoutsen 89a19c89a7 Fix aiohttp deprecation warnings (#13240)
* Fix aiohttp deprecation warnings

* Fix Ring deprecation warning

* Lint
2018-03-15 21:49:49 +01:00
Anders Melchiorsen 5e675677ad
Cleanup Sonos platform setup (#13225)
* Cleanup Sonos platform setup

* Remove unneeded lists
2018-03-15 20:43:28 +01:00
maxlaverse ff416c0e7a Try to fix caldav (#13236)
* Fix device attribute type for event end

* Fix is_over and add tests
2018-03-15 10:58:11 -07:00
Paulus Schoutsen 170b8671b9
Fix logbook JSON serialize issue (#13229)
* Fix logbook JSON serialize issue

* Address flakiness

* Lint

* deflake ?

* Deflake 2
2018-03-15 10:54:22 -07:00
cdce8p 646ed5de52
Added cover.group platform (replaces #12303) (#12692)
* Added cover.group platform
* Added async/await, smaller changes
* Made (async_update) methods regular methods
* Small improvements
* Changed classname
* Changes based on feedback
* Service calls
* update_supported_features is now a callback method
* combined all 'update_attr_*' methods in 'async_update'
* Small changes
* Fixes
   * is_closed
   * current_position
   * current_tilt_position
* Updated tests
* Small changes 2
2018-03-15 12:31:31 +01:00
Otto Winter 27c1806897 Python 3.5 adjustments (#13173) 2018-03-15 13:10:54 +02:00
cdce8p d348f09d3d
HomeKit Restructure (new config options) (#12997)
* Restructure
* Pincode will now be autogenerated and display using a persistence notification
* Added 'homekit.start' service
* Added config options
* Renamed files for types
* Improved tests
* Changes (based on feedback)
* Removed CONF_PIN_CODE
* Added services.yaml
* Service will only be registered if auto_start=False
* Bugfix names, changed default port
* Generate aids with zlib.adler32
* Added entity filter, minor changes
* Small changes
2018-03-15 02:48:21 +01:00
Paulus Schoutsen 25fe6ec536 Fix input_boolean Google Assistant serialize error (#13220) 2018-03-14 15:08:23 -07:00
Paulus Schoutsen e1a5e5a8ba
Fix input_boolean Google Assistant serialize error (#13220) 2018-03-14 15:07:37 -07:00
Paulus Schoutsen a9917e7a56 Fix history API (#13214) 2018-03-14 22:29:51 +01:00
Paulus Schoutsen 0a2e949e0a Remove crazy JSON encoding things that are no longer used (#13029)
Catch JSON encoding errors in HTTP view
2018-03-12 23:22:08 +01:00
Otto Winter a34786fb2d Revert "Cast automatically drop connection (#12635)" (#13094)
This reverts commit e14893416f.
2018-03-11 12:52:00 -07:00
Paulus Schoutsen 7018806802 Run asyncio event loop in debug mode during tests (#13058)
* Run asyncio event loop in debug mode during tests

* Remove debug mode again
2018-03-11 12:51:57 -07:00
Paulus Schoutsen a7f34bbce9 Implement Hue available property (#12939) 2018-03-11 12:51:57 -07:00
Otto Winter 1dc5fa145f Revert "Cast automatically drop connection (#12635)" (#13094)
This reverts commit e14893416f.
2018-03-11 12:42:58 -07:00
Paulus Schoutsen d0f089975d
Run asyncio event loop in debug mode during tests (#13058)
* Run asyncio event loop in debug mode during tests

* Remove debug mode again
2018-03-11 12:32:12 -07:00
Adam Mills 26960283a0 Config flow translations (#13066)
* Development script for testing translation strings

* Localize backend of config flow

* Fix hue tests

* Update hue.en.json

* Move components to individual directories

* Bridge -> bridge
2018-03-11 12:04:34 -07:00
Matthias Urlichs f5cc40024d Rename homeassistant.util.async to .async_ (#13088)
"async" is (going to be) a reserved word.
2018-03-11 10:01:12 -07:00
Paulus Schoutsen d42b5a93dd
Implement Hue available property (#12939) 2018-03-11 09:49:28 -07:00
Adam Mills dc8424032b
Remove Z-Wave old/new entity_id attributes (#12652) 2018-03-11 10:30:03 -04:00
Otto Winter d74a2b68c1 Sensor template don't exit early on TemplateError (#13041)
* Sensor template don't exit early on TemplateError

* Add friendly name unknown state test

* Also track entites from attribute templates

* Use set instead of list
2018-03-10 20:45:32 -08:00
Paulus Schoutsen 42359b3b48 Convert decimals from SQL results (#13059) 2018-03-10 10:41:41 -08:00
Paulus Schoutsen 0e00de8a33
Convert decimals from SQL results (#13059) 2018-03-10 10:40:28 -08:00
cdce8p a58d8fc68b HomeKit Bugfix: names (#13031)
* Fix display_names, changed default port (+1)

* Revert port change
2018-03-09 19:42:36 -08:00
Paulus Schoutsen 3c41c0c46e Add support for input boolean to Google Assistant (#13030) 2018-03-09 19:42:36 -08:00
Paulus Schoutsen 6ffc53b290 Make Throttle async aware (#13027)
* Make Throttle async aware

* Lint
2018-03-09 19:42:35 -08:00
Paulus Schoutsen 34c694c20e allow ios device tracker see calls to go through (#13020) 2018-03-09 19:42:35 -08:00
cdce8p 3ca139e21e HomeKit Bugfix: names (#13031)
* Fix display_names, changed default port (+1)

* Revert port change
2018-03-09 19:41:59 -08:00
Paulus Schoutsen a8a895a61b
allow ios device tracker see calls to go through (#13020) 2018-03-09 19:39:50 -08:00
Paulus Schoutsen 36361d623d
Make Throttle async aware (#13027)
* Make Throttle async aware

* Lint
2018-03-09 19:38:51 -08:00
Paulus Schoutsen 652e0d45a9
Add support for input boolean to Google Assistant (#13030) 2018-03-09 19:38:33 -08:00
Otto Winter 4152ac4aa2 Clean up Light Groups (#12962)
* Clean up Light Groups

* Fix tests

* Remove light group from .coveragerc

* async_schedule_update_ha_state called anyway
2018-03-09 09:31:14 -08:00
Johann Kellerman 16d72d2351 check_config script evolution (#12792)
* Initial async_check_ha_config_file

* check_ha_config_file

* Various fixes

* feedback - return the config

* move_to_check_config
2018-03-09 09:31:13 -08:00