Commit Graph

2618 Commits

Author SHA1 Message Date
Phil Frost 3169c0416e
Update Alexa tests to async syntax (#17965)
See https://github.com/home-assistant/home-assistant/issues/12614
2018-10-29 17:57:27 -04:00
Paulus Schoutsen 2f71f8908b
Don't use keyset (#17984) 2018-10-29 21:25:17 +01:00
Paulus Schoutsen d6913c6914
Fix operation mode for Alexa thermostat (#17972) 2018-10-29 20:52:34 +01:00
Mariusz Łuciów a87a5d266e Fixed copy-paste errors (#17948) 2018-10-29 19:32:58 +01:00
Paulus Schoutsen 6ae345b01c
Pass hass_config to load_platform (#17952)
* Pass hass_config to load_platform

* Fix tests

* Lint
2018-10-29 19:21:21 +01:00
Robert Svensson b03e6050c5 Fix controller not being stored when setup fails and sequentially fails the retry functionality (#17927) 2018-10-29 19:09:54 +01:00
Paulus Schoutsen f4ac317d64
Permissions improv (#17811)
* Break up permissions file.

* Granular entity permissions

* Add "all" entity permission

* Lint

* Fix types
2018-10-29 11:28:04 +01:00
Steven Looman 96c5e4c507 Fixes for upnp-component/#17753 and missing hass-data when only setup from config entry (#17868)
* Upgrade to async_upnp_client==0.13.0, fixing #17753

* Fix missing 'local_ip' when upnp-component itself is not setup, but ConfigEntry is
2018-10-29 08:10:01 +01:00
Anders Melchiorsen e5c97fdcab Extract entity ids from all templates (#17902) 2018-10-29 08:03:10 +01:00
kennedyshead 3802fec568 Merge conflicting changes (#17761) 2018-10-28 23:49:55 +01:00
Rohan Kapoor 60080a529d Migrate dialogflow over to the new webhook component (#17804)
* Migrate dialogflow over to the new webhook component

* Updating dialogflow unit tests

* Lint

* Revert changes to HomeAssistantView

* Use json_response from aiohttp
2018-10-28 19:25:43 +01:00
Mariusz Łuciów 38576e5b74 Corrected fan device type in google assistant to fan (#17792) 2018-10-28 14:53:47 +01:00
Paulus Schoutsen 9cd8a86eb4
Move migrate to separate WS command (#17890) 2018-10-27 23:51:40 +02:00
Paulus Schoutsen 649bc55a3b
Allow a list ofr update entity (#17860)
* Allow a list ofr update entity

* Update services.yaml

* Update services.yaml
2018-10-27 21:34:33 +02:00
Abílio Costa 6b7cbca04c Alexa motion sensor (#17798)
* Alexa: add motion sensors

* Alexa: add motion sensor tests

* Fix comparison and lint
2018-10-26 23:43:31 +02:00
Mariusz Łuciów cfbd84f450 Added vacuum dock and pause/unpause traits (#17657) 2018-10-26 23:02:07 +02:00
Bram Kragten 3175627363 Add delete command (#17816) 2018-10-26 17:29:33 +02:00
Paulus Schoutsen 644c33cc1e
Convert MQTT Light tests to async (#17754) 2018-10-26 15:10:05 +02:00
Bram Kragten b7896491e3 Lovelace ws: add move command (#17806)
* Check for unique ids + ids are strings

* Add move command

* Add test for move

* lint

* more lint

* Address comments

* Update test
2018-10-26 12:56:14 +02:00
Paulus Schoutsen e276e899cf
Convert automation tests to async (#17794)
* Convert automation tests to async

* Fix 8 last tests

* Lint
2018-10-26 11:31:14 +02:00
Leonardo Brondani Schenkel 47003fc04f deCONZ: configure service can now use 'field' as a subpath together with 'entity' (#17722)
Allow both 'entity' and 'field' to be used simultaneously, where 'field' is used as a sub-path of the device path that is defined by 'entity'.
2018-10-26 09:15:26 +02:00
Rohan Kapoor b7b62a90e2 Delete sensor.yahoo_finance (#17805) 2018-10-26 08:29:41 +02:00
Paulus Schoutsen 77bf10e37c
Fix unloading an entry can leave states around (#17786)
* Add test that tests unloading on remove

* Add more test things

* Untangle entity remove code from entity platform

* Don't add default implementation of async_will_remove

* Keep entity weakref alive
2018-10-25 19:57:36 +02:00
Abílio Costa 9c7d3c2a63 Add contact sensors to alexa smart home (#17704)
* add contact sensors to alexa smart home

* door sensors are binary_sensors

* fix tests; cleanup

* lint

* fix state

* Add missing doc string
2018-10-25 16:46:43 +02:00
Paulus Schoutsen 312d49caec Allow creating signed urls (#17759)
* Allow creating signed urls

* Fix parameter

* Lint
2018-10-25 16:44:57 +02:00
Paulus Schoutsen b5284aa445 Fix device reg considered changed (#17764)
* Fix device reg considered changed

* Better syntax
2018-10-25 16:43:11 +02:00
liaanvdm 3c68db32d6 Restore manual alarm-control-panel state using async_get_last_state (#17521)
* Restore manual alarm-control-panel state using async_get_last_state

This is to address issue #10793

* Added tests for restoring manual alarm state on startup

* Cleaned up test formatting

* Fixed more linting errors

* Changed async methods to use asynch/await syntax

* Removed unused asyncio import
2018-10-25 12:21:20 +02:00
kennedyshead 67d92c4f5d This makes mqtt_template tests async (#17784) 2018-10-25 10:00:07 +02:00
kennedyshead 8bebfba21a Testing async in MQTT_json lights (#17768) 2018-10-25 09:54:53 +02:00
Rohan Kapoor 5024a80d61 Migrate twilio webhooks to the webhook component (#17715)
* Migrate twilio webhooks to the webhook component

* Fix typos in twilio

* Mock out twilio in the tests

* Lint

* Fix regression in twilio response
2018-10-25 09:46:22 +02:00
cdce8p 599390d985 Update HAP-python to 2.3.0 (#17778)
* Update HAP-python to 2.3.0

* Fix tests
2018-10-25 09:45:56 +02:00
kennedyshead ec7d33f277 Async MQTT sensor room (#17765) 2018-10-24 22:20:52 +02:00
kennedyshead c099c259ea Async tests for MQTT lock (#17763) 2018-10-24 22:20:25 +02:00
Paulus Schoutsen 08fe7c3ece
Pytest tests (#17750)
* Convert core tests

* Convert component tests to use pytest assert

* Lint 🤷‍♂️

* Fix test

* Fix 3 typos in docs
2018-10-24 12:10:05 +02:00
Steven Looman fc8af22191 IGD review fixes (#17400)
* Fix discovery-dependency for upnp

* Only delete port mappings on EVENT_HOMEASSISTANT_STOP + refactoring MockDevice

* Call and store local_ip from async_setup

* Don't depend on http-component

* Remove discovery dependency
2018-10-23 21:52:01 +02:00
Bram Kragten 0f69be117f Lovelace ws: add card (#17730)
* Change set to update

* Add 'add card'

* Woof.
2018-10-23 21:48:35 +02:00
Rohan Kapoor d5a5695411 Migrate Mailgun to use the webhook component (#17464)
* Switch mailgun to use webhook api

* Generalize webhook_config_entry_flow

* Add tests for webhook_config_entry_flow

* Add tests for mailgun

* Remove old mailgun file from .coveragerc

* Refactor WebhookFlowHandler into config_entry_flow

* Remove test of helper func from IFTTT

* Lint
2018-10-23 11:14:46 +02:00
kennedyshead 277a9a3995 Async version for asuswrt (#17692)
* Testing async data for asuswrt

* Moved to lib
2018-10-23 11:08:11 +02:00
Nicko van Someren 50f0eac7f3 Fixed issue #16903 re exception with multiple simultanious writes (#17636)
Reworked tests/components/emulated_hue/test_init.py to not be
dependent on the specific internal implementation of util/jsonn.py
2018-10-23 10:54:03 +02:00
Yegor Vialov 324587b2db Away mode temperature fix for generic thermostat (#17641)
* Resolves /home-assistant/home-assistant#17433

Away mode temperature issue fix for generic_thermostat

* Debug messages removed from generic_thermostat.py

* Test for repeat away_mode set

Test for fix of generic thermostat issue when away_mode was set several times in a row.

* Code style fix in generic_thermostat

* Remove blank line in the end of generic_thermostat

* Fix style
2018-10-23 09:04:47 +02:00
Malte Franken 75e42acfe7 Geo location trigger added (#16967)
* zone trigger supports entity id pattern

* fixed lint error

* fixed test code

* initial version of new geo_location trigger

* revert to original

* simplified code and added tests

* refactored geo_location trigger to be based on a source defined by the entity

* amended test cases

* small refactorings
2018-10-22 20:01:01 +02:00
Bram Kragten 96105ef6e7 Add lovelace websocket get and set card (#17600)
* Add ws get, set card

* lint+fix test

* Add test for set

* Added more tests, catch unsupported yaml constructors

Like !include will now give an error in the frontend.

* lint
2018-10-22 14:45:13 +02:00
Oscar Tin Lai b6d3a199ce Add support for Dyson Hot+Cool Fan as a climate device (#14598)
* Added support for dyson hot+cool fan as climate device

* Removed decimal place in kelvin units conversion

Minor edits to be consistent with Dyson's internal conversion of temperature from kelvin to celsius. It does not include decimal place to convert between kelvin and celsius.

* made changes according to comments

* Refactored target temp logics, fixed enum issues

* changed name of component to entity

* removed temperature conversion for min/max property

* changed back to 644 permission

* added extra tests for almost-all coverage

* changed assert method to avoid lack of certain method in py35

* added test_setup_component

* shorten line length

* fixed mock spec and added checking of message listener is called

* added doc string and debug msg

* shorten line length

* removed pending target temp
2018-10-21 17:35:07 +02:00
Paulus Schoutsen bdfd473aaa Reconnect if sub info comes in that is valid again (#17651) 2018-10-21 12:16:24 +02:00
Bob Clough 2e973c7572 Fix mqtt light brightness slider (#17075)
* Enable brightness slider for RGB

If we are using RGB with no brightness topic, the brighness slider
should still be visible, as we can scale the RGB amount to give us the
brightness.

* Output RGB scaled by brightness

If we are outputting to an RGB device, but do not have a dedicated
brightness topic set, when the brightness slider is changed, we should
output the current colour's HS, with the V coming from the brightness
slider.

* Brightness from RGB when we're not using a brightness topic

When we aren't using a brightness topic, set the brightness slider based
on the received value from an RGB -> HSV conversion.

* Test for new brightness state scaled by RGB

This adds a test to make sure the brightness stored in the state is
being computed correctly from the RGB value when a dedicated brightness
topic is not set.

* Changes from review

Fixes formatting of supported features flags, and checks HS colour
hasn't been set when operating in RGB-only mode

* Set optimistic brightness correctly in rgb mode

When we're using rgb mode to set the brightness, we want to set
optimistic brightness if:

we are running in optimistic mode
OR
the brightness state topic isn't set and we have a brightness command topic
OR
the rgb state topic isn't set and we don't have a brightness command topic

* Add test for turn_on in RGB brightness mode
2018-10-20 12:37:25 -04:00
Robert Svensson 26b7c2de7e
deCONZ - Add support for Xiaomi window covers (#17337)
Add support for Xiaomi window covers
2018-10-20 15:13:23 +02:00
cdce8p a9a8cbbd10
Homekit component cleanup (#17627)
* hass.async_add_executor_job
* Fix accessories.run -> async_track_state_change
* Fixed media_player test
* Flags are now local vars
* consistent use of " and '
2018-10-20 00:14:05 +02:00
cdce8p ff33cbd22f
Add water_heater support to HomeKit (#17614)
* Homekit add support for water_heater
* Added tests
2018-10-19 21:04:05 +02:00
Anders Melchiorsen cc4d29d42a
Fix flux switch update interval (#17458) 2018-10-18 23:04:22 +02:00
emontnemery 10c1378195 Add binary_sensor support to RFlink (#17146)
* Add binary_sensor support to RFlink

* Add support for aliases

* Fix review comments

* Refactor, add tests

* Review comments

* Review comments

* Review comments

* Review comments
2018-10-18 22:28:40 +02:00