Commit Graph
2647 Commits
Author SHA1 Message Date
Robert SvenssonandPaulus Schoutsen 92c536ec0e Don't create a switch for POE device if said device is Cloud key (#18117) 2018-11-02 21:09:16 +01:00
Adam MillsandPaulus Schoutsen 1f290bad94 Update fan/demo tests to async (#18109)
* Update fan/demo tests to async

* Use async_create_task
2018-11-02 21:08:22 +01:00
Adam MillsandPaulus Schoutsen dd938d7460 Async generic thermostat tests (#18111) 2018-11-02 21:06:59 +01:00
Adam MillsandMartin Hjelmare 0a301f7dcb Convert nsw rural fire tests to async (#18112) 2018-11-02 14:03:05 +01:00
Anders MelchiorsenandPaulus Schoutsen 93689d68f7 Fix time zone for flux switch (#18102) 2018-11-02 12:32:41 +01:00
Neil CrosbyandPascal Vizeli cb7ae5cdf2 Allow MS face detection to handle updating entities when no face is detected (#17593)
* Allow Microsoft face detection to handle updating entities when no face is detected

* Remove microsoft_face_detect_no_face_detected.json and hard code in simple empty list into the tests
2018-11-02 10:50:43 +01:00
Ville SkyttäandJohann Kellerman a4c0c34028 Use ssdp udn uuid as Samsung TV unique id (#18022) 2018-11-02 11:50:07 +02:00
Rick van HattemandMartin Hjelmare 82edea6077 Removed assumptions about provided upnp data (#17604)
* Removed assumptions about incomplete UPnP devices

* Removed assumptions about incomplete UPnP devices
2018-11-01 22:59:42 +01:00
Lev AronskyandPaulus Schoutsen 02b46e2ba3 Ignore min_cycle_duration when manually controlling the thermostat. (#16128)
* Ignore min_cycle_duration when manually controlling the thermostat.

* style

* Generic thermostat: add minimum cycle duration to keep-alive tests.

There was a bug in previous versions of the code, that would not execute
the keep-alive action if the minimum cycle duration hasn't passed.
This test verifies that the keep-alive action is executed correctly.

* Generic thermostat: added tests to verify that changing the
thermostat mode manually triggers the switch, regardless of
minimum cycle duration.

* Updated tests to use `common` module instead of the deprecated `climate`
2018-11-01 21:25:50 +01:00
Oleksii SerdiukandJohann Kellerman 31dc6832e7 Darksky: Fetch summary for daily forecasts (#18031) 2018-11-01 21:57:32 +02:00
PawelandPaulus Schoutsen c3e3f662f4 Always save current position if payload is numeric value (#16148)
* Change of behaviour. Allow user to configure either a position topic or a state topic but not
both.

* optimistic mode in set_cover and tests added

* optimistic mode in set_cover_position using percentage_position

* fixes accroding to Martin review.

* added validation schema for set_position_topic and get_position_topic

* check only set_position_topic in supported_features.

* Multidoc string fix.
2018-11-01 20:09:43 +01:00
Charles GarwoodandPaulus Schoutsen bcea3a9cba Don't try to re-add existing Z-Wave entities (#17995)
* Keep track of created entities

* lint

* Update tests
2018-11-01 19:38:23 +01:00
Rohan KapoorandPaulus Schoutsen 23290fa6ee Use a fixture for dialogflow calls in unit tests (#17999)
* Use a fixture for dialogflow calls in unit tests

* Lint
2018-11-01 19:37:38 +01:00
cdce8pandPaulus Schoutsen 4a3f754033 Revert HomeKit update to 2.2.2 (#18069) 2018-11-01 19:35:02 +01:00
Mattias WelponerandPascal Vizeli 2fce79eccf HomematicIP_Cloud fix test (#17376)
* fix-homematicip_cloud-flow_config

* remove-homematicip_cloud-flow_config-stale-print

* Fix redundant backslash between brackets
2018-11-01 12:21:59 +01:00
thoscutandPaulus Schoutsen bfa86b8138 Add message template support for alert component (#17516)
* Add problem text to message if available

* Revert "Add problem text to message if available"

This reverts commit 7be519bf7f.

* Cleanup setup

* Add message template support

* Fix for failing test

* Added tests

* Refactor changes

* Fix lint violation

* Fix failing tests

* Unify handling for message and done_message parameter and sending function

* Update tests

* Fix lint warnings
2018-11-01 09:48:11 +01:00
Bram KragtenandPaulus Schoutsen 4163889c6b Add view commands to Lovelace (#18063)
* Add get and update view command

* Add add view command

* Add move view command

* Add delete command

* lint
2018-11-01 09:44:38 +01:00
Tsvi MostoviczandPaulus Schoutsen 329d128e03 Change test to parametrized test using pytest (#18047) 2018-11-01 09:40:31 +01:00
Robert SvenssonandGitHub a9140dc8f5 deCONZ - retry if setup fails (#17772)
* Make component retry if setup fails
* Improve overall test coverage
2018-10-31 22:38:04 +01:00
Phil FrostandPascal Vizeli 93706fa568 Report correct thermostat mode to Alexa (#18053)
We were erroneously reporting the _previous_ mode. So if the thermostat was off
and the user asks, "Alexa, set the thermostat to heat", the thermostat would be
set to heat but Alexa would respond, "The thermostat is off."

Bug caught by @Thunderbird2086 at
https://github.com/home-assistant/home-assistant/pull/17969#issuecomment-434654345
2018-10-31 16:09:13 +01:00
Bram KragtenandPaulus Schoutsen b763c0f902 Extract ruamel.yaml to util with secrets, lovelace ws decorators (#17958)
* Extract ruamel.yaml to util, ws decorators, secrets

* lint

* Extend SafeConstructor

Somehow my last commit is gone after rebase...

* lint

* Woof...

* Woof woof...

* Cleanup type hints

* Update homeassistant/scripts/check_config.py

* lint

* typing
2018-10-31 13:49:54 +01:00
Ville SkyttäandDaniel Høyer Iversen 9c840f93f0 Use const.SUN_EVENT_* more (#18039) 2018-10-31 09:10:28 +01:00
kennedysheadandMartin Hjelmare 4073f63256 Async version of melissa (#17721)
* rebase upstream

* Fixed tests

* Fixing lint
2018-10-30 21:29:11 +01:00
Neil CrosbyandPaulus Schoutsen 865ea82432 Allow jinja namespace command to work. (#18011) 2018-10-30 19:13:20 +01:00
Ville SkyttäandGitHub 4d9ef9e795 Import homeassistant domain instead of hardcoding it (#17985) 2018-10-30 17:38:09 +02:00
Tsvi MostoviczandPaulus Schoutsen 87bd2a32e4 Change hebrew date at sunset (#17449)
* Change date at sunset

* Fix tests to actually run and add fix to component

* Make tests pass

* Use get_astral_event_next instead of get_astral_event_date

* Revert to using get_astral_event_date

* Make tox happy: reset state on tearDown
2018-10-30 15:21:58 +01:00
Rohan KapoorandPaulus Schoutsen f0693f6f91 Switch mailgun webhooks to the new Mailgun webhook api (#17919)
* Switch mailgun webhooks to the webhook api

* Change mailgun strings to indicate application/json is in use

* Lint

* Revert Changes to .translations.

* Don't fail if the API key isn't set
2018-10-30 12:12:41 +01:00
Anders MelchiorsenandPaulus Schoutsen 3de822a0e2 RFC: Static templates match no entities, not all (#17991)
* Static templates match no entities, not all

* Clean up test values
2018-10-30 12:03:27 +01:00
Phil FrostandGitHub e16793013a Refactor Alexa API, fix thermostats (#17969)
* Refactor Alexa API to use objects for requests

This introduces _AlexaDirective to stand in for the previous model of passing
basic dict and list data structures to and from handlers. This gives a more
expressive platform for functionality common to most or all handlers.

I had two use cases in mind:

1) Most responses should include current properties. In the case of locks and
thermostats, the response must include the properties or Alexa will give the
user a vague error like "Hmm, $device is not responding." Locks currently work,
but thermostats do not. I wanted a way to automatically include properties in
all responses. This is implemented in a subsequent commit.

2) The previous model had a 1:1 mapping between Alexa endpoints and Home
Assistant entities. This works most of the time, but sometimes it's not so
great. For example, my Z-wave thermostat shows as three devices in Alexa: one
for the temperature sensor, one for the heat, and one for the AC. I'd like to
merge these into one device from Alexa's perspective. I believe this will be
facilitated with the `endpoint` attribute on `_AlexaDirective`.

* Include properties in all Alexa responses

The added _AlexaResponse class provides a richer vocabulary for handlers.

Among that vocabulary is .merge_context_properties(), which is invoked
automatically for any request directed at an endpoint. This adds all supported
properties to the response as recommended by the Alexa API docs, and in some
cases (locks, thermostats at least) the user will get an error "Hmm, $device is
not responding" if properties are not provided in the response.

* Fix setting temperature with Alexa thermostats

Fixes https://github.com/home-assistant/home-assistant/issues/16577
2018-10-29 22:16:35 -04:00
Phil FrostandGitHub 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 SchoutsenandGitHub 2f71f8908b Don't use keyset (#17984) 2018-10-29 21:25:17 +01:00
Paulus SchoutsenandGitHub d6913c6914 Fix operation mode for Alexa thermostat (#17972) 2018-10-29 20:52:34 +01:00
Mariusz ŁuciówandFabian Affolter a87a5d266e Fixed copy-paste errors (#17948) 2018-10-29 19:32:58 +01:00
Paulus SchoutsenandGitHub 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 SvenssonandPaulus Schoutsen 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 SchoutsenandGitHub 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 LoomanandPaulus Schoutsen 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 MelchiorsenandPaulus Schoutsen e5c97fdcab Extract entity ids from all templates (#17902) 2018-10-29 08:03:10 +01:00
kennedysheadandFabian Affolter 3802fec568 Merge conflicting changes (#17761) 2018-10-28 23:49:55 +01:00
Rohan KapoorandPaulus Schoutsen 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ówandPaulus Schoutsen 38576e5b74 Corrected fan device type in google assistant to fan (#17792) 2018-10-28 14:53:47 +01:00
Paulus SchoutsenandGitHub 9cd8a86eb4 Move migrate to separate WS command (#17890) 2018-10-27 23:51:40 +02:00
Paulus SchoutsenandGitHub 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 CostaandPaulus Schoutsen 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ówandPaulus Schoutsen cfbd84f450 Added vacuum dock and pause/unpause traits (#17657) 2018-10-26 23:02:07 +02:00
Bram KragtenandPaulus Schoutsen 3175627363 Add delete command (#17816) 2018-10-26 17:29:33 +02:00
Paulus SchoutsenandGitHub 644c33cc1e Convert MQTT Light tests to async (#17754) 2018-10-26 15:10:05 +02:00
Bram KragtenandPaulus Schoutsen 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 SchoutsenandGitHub 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 SchenkelandRobert Svensson 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