Commit Graph
100 Commits
Author SHA1 Message Date
Erik MontnemeryandPaulus Schoutsen 89ebc17fb1 Only generate device trigger for sensor with unit (#27152) 2019-10-03 13:30:59 -07:00
Erik MontnemeryandPaulus Schoutsen cda7692f24 Add support for for to binary_sensor, light and switch device conditions (#27153)
* Add support for `for` to binary_sensor, light and switch device conditions

* Fix typing

* Fixup

* Fixup
2019-10-03 13:29:57 -07:00
Erik MontnemeryandGitHub 9902209ad2 Add above and below to sensor trigger extra_fields (#27160) 2019-10-03 22:17:58 +02:00
Erik MontnemeryandGitHub 3e99743244 Add device trigger support to sensor entities (#27133)
* Add device trigger support to sensor entities

* Fix typing

* Fix tests, add test helper for comparing lists
2019-10-03 06:14:35 +02:00
Erik MontnemeryandPaulus Schoutsen c43eeee62f Improve validation of device condition config (#27131)
* Improve validation of device condition config

* Fix typing
2019-10-02 15:58:14 -07:00
Erik MontnemeryandGitHub 65ce3b49c1 Add support for for to binary_sensor, light and switch device triggers (#26658)
* Add support for `for` to binary_sensor, light and switch device triggers

* Add WS API device_automation/trigger/capabilities
2019-10-02 22:14:52 +02:00
Erik MontnemeryandGitHub 0eb1d49046 Disable flaky/slow test (#27125) 2019-10-02 20:52:15 +02:00
Erik MontnemeryandPaulus Schoutsen 5a1da72d5e Improve validation of device action config (#27029) 2019-10-01 20:35:36 -07:00
Erik MontnemeryandGitHub e57e7e8449 Improve validation of device trigger config (#26910)
* Improve validation of device trigger config

* Remove action and condition checks

* Move config validation to own file

* Fix tests

* Fixes

* Fixes

* Small tweak
2019-09-27 17:48:48 +02:00
Erik MontnemeryandPaulus Schoutsen e5f6f33340 Add device automation support to binary_sensor entities (#26643)
* Add device automation support to binary_sensor entities

* turn_on -> turned_on

* Correct spelling of present

* Improve tests

* Fix strings

* Fix stale comment
2019-09-22 11:13:17 -07:00
Erik MontnemeryandBram Kragten bc7ff8323c Fix translation, adjust trigger names (#26635) 2019-09-18 18:43:31 +02:00
Erik MontnemeryandBram Kragten 4a30c1023c Rename MockToggleDevice to MockToggleEntity (#26644)
* Rename MockToggleDevice to MockToggleEntity

* Fix tests
2019-09-18 18:41:58 +02:00
Erik MontnemeryandGitHub 504b8c7685 Fix translation, adjust trigger names (#26635) 2019-09-17 21:55:01 +02:00
Erik MontnemeryandPaulus Schoutsen 10572a62b1 Add support for automation description (#26662)
* Add support for automation annotation

* Rename annotation to description
2019-09-17 12:12:54 -07:00
Erik MontnemeryandGitHub 6a60ebdb30 Rename MockToggleDevice to MockToggleEntity (#26644)
* Rename MockToggleDevice to MockToggleEntity

* Fix tests
2019-09-15 09:50:17 +02:00
Erik MontnemeryandPaulus Schoutsen 02ded7a4a8 Remove device from device action schema (#26536) 2019-09-09 10:40:22 -07:00
Erik MontnemeryandGitHub b14b14c3c9 Add device automation support to switch entities (#26466)
* Add device automation support to switch entities

* Update switch translations

* Address review comments
2019-09-09 16:55:47 +02:00
Erik MontnemeryandAndrew Sayre 28b9416b0c Device automations: Rename name to entity_name in translations (#26491) 2019-09-07 19:07:11 -05:00
Erik MontnemeryandPaulus Schoutsen b1c2a5fa08 Add device automation action (#26455)
* Add support for device actions, with light as example.

* Add translation; return list
2019-09-05 16:26:22 -07:00
Erik MontnemeryandGitHub f7dc537275 Add device automation condition (#26313)
* Add support for device conditions

* Lint

* Update test case

* Make and+or conditions async, adjust tests

* Cleanup tests

* Remove non callback versions of conditions, correct typing

* Correct typing

* Update light/strings.json

* Address review comments

* Make device automation lists simple lists, not dicts

* Add device_automation/const.py

* Use IS_ON/IS_OFF everywhere for conditions
2019-09-05 16:49:32 +02:00
Erik MontnemeryandPaulus Schoutsen 3aa2729716 Add improvements of device_automation from frontend PR 3514 (#26295)
* Add improvements from frontend PR 3514

* Fix test

* Tweak
2019-09-01 21:40:18 -07:00
Erik MontnemeryandGitHub fad54cd6d8 Ensure sun conditions are using the right date (#23664)
* Ensure sun conditions are using the right date
2019-08-16 17:34:56 +02:00
Erik MontnemeryandPaulus Schoutsen e0be4efe3e Add test case to identify missing MQTT configuration abbreviations (#25616)
* Add missing abbreviations

* Move abbreviations to own file, add script to find missing abbreviations

* Move check from script to test case

* Lint

* Rewrite to use pathlib

* Lint
2019-08-06 17:32:15 -07:00
Erik MontnemeryandPaulus Schoutsen 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
Erik MontnemeryandGitHub fc58746bc3 Add websocket API for updating core config (#24009)
* Add websocket API for updating core config
2019-05-21 07:21:31 +02:00
Erik MontnemeryandGitHub 9ae878d8f2 Update CODEOWNERS (#24015) 2019-05-21 07:20:23 +02:00
Erik MontnemeryandGitHub afe9fc221e Fire event when core config is updated (#23922)
* Fire event when core config is updated
2019-05-20 20:02:36 +02:00
Erik MontnemeryandPaulus Schoutsen c2fc8a0d61 Load HA core config from storage (#23872)
* Load HA core config from storage

* Tweak

* Lint, review comments

* Fix test

* Add tests

* Lint

* Address comments
2019-05-16 16:27:53 +02:00
Erik MontnemeryandPaulus Schoutsen 102beaa044 Add debug prints to sun (#23598)
* Add debug prints to sun

* Review comment
2019-05-07 09:37:08 -07:00
Erik MontnemeryandPascal Vizeli 3c5abcc71a Improve sun automation tests (#23588)
* Improve sun automation tests

* Lint

* Restore timezone after test
2019-05-02 09:46:32 +02:00
Erik MontnemeryandPaulus Schoutsen 0fe573ecc0 Fix cleanup of dynamic group (#23475) 2019-05-01 22:43:12 -07:00
Erik MontnemeryandPaulus Schoutsen 185595c113 Bump pychromecast (#23463) 2019-05-01 22:43:12 -07:00
Erik MontnemeryandPaulus Schoutsen 407e0c58f9 Migrate tests to pytest (#23544)
* Migrate tests to pytest

* Fixup

* Use loop fixture in test_check_config

* Lint
2019-04-30 09:20:38 -07:00
Erik MontnemeryandPaulus Schoutsen 8d775caaac Always print invalid configuration data (#21972)
* Always print invalide configuration data

* Print offending data as yaml

* Revert "Print offending data as yaml"

This reverts commit 01721a21a9ff918ed2c8595151ebfe55eb2f7d36.

* Do not print sensitive data

* Print MQTT topic

* Add line break

* Review comments

* review comments
2019-04-29 13:45:53 -07:00
Erik MontnemeryandPaulus Schoutsen 84f778d23c Improve logging of exceptions in async_create_task (#22689)
* Improve logging of exceptions in async_create_task

* Move wrapping+logging to util.logging

* Minor refactor, fix typing

* Add test

* Remove useless @wraps, fix confusing parameter name

* Review comment
2019-04-29 09:53:22 -07:00
Erik MontnemeryandPaulus Schoutsen 2f45a7e3b9 Fix cleanup of dynamic group (#23475) 2019-04-28 12:09:06 -07:00
Erik MontnemeryandPaulus Schoutsen b6a13262da Bump pychromecast (#23463) 2019-04-27 09:17:50 -07:00
Erik MontnemeryandMartin Hjelmare 5376e15286 Convert some test helpers to coroutines and adjust tests (#23352)
* Convert some test helpers to coroutines

* Fix tests
2019-04-25 10:14:16 +02:00
Erik MontnemeryandCharles Garwood a89c7f8feb Improve MQTT tests (#23296)
* Improve MQTT tests

* Tweak
2019-04-22 08:48:50 -04:00
Erik MontnemeryandPaulus Schoutsen 35da3f053c Fix clearing error message for MQTT vacuum (#23206)
* Fix clearing error message

* Remove redundant hass.async_block_till_done
2019-04-19 17:05:39 -07:00
Erik MontnemeryandJason Hu 1e0bc97f56 Drop unnecessary block_till_done (#23256) 2019-04-19 16:08:11 -07:00
Erik MontnemeryandJason Hu eebb452fb5 Drop unnecessary block_till_done, improve tests for MQTT Cover tests (#23255) 2019-04-19 16:07:28 -07:00
Erik MontnemeryandJason Hu 2c42e1a5cb Drop unnecessary block_till_done for MQTT tests (#23254)
* Drop unnecessary block_till_done

* Drop unnecessary block_till_done
2019-04-19 14:59:16 -07:00
Erik MontnemeryandJason Hu 28c411c742 Drop unnecessary block_till_done for MQTT fan tests (#23253) 2019-04-19 14:58:44 -07:00
Erik MontnemeryandJason Hu 73a7d5e6f4 Drop unnecessary block_till_done, improve tests (#23252) 2019-04-19 14:52:23 -07:00
Erik MontnemeryandJason Hu f584878204 Drop unnecessary block_till_done (#23251) 2019-04-19 14:51:48 -07:00
Erik MontnemeryandJason Hu 416af5cf57 Drop unnecessary block_till_done (#23250) 2019-04-19 14:10:48 -07:00
Erik MontnemeryandJason Hu 557211240e Drop unnecessary block_till_done, improve tests (#23249) 2019-04-19 14:08:54 -07:00
Erik MontnemeryandJason Hu 13e0691c90 Drop unnecessary block_till_done, improve tests (#23248) 2019-04-19 14:08:02 -07:00
Erik MontnemeryandJason Hu 0e429cca33 Drop unnecessary block_till_done, improve tests (#23247) 2019-04-19 12:26:56 -07:00
Erik MontnemeryandJason Hu 887e1cd8e3 Drop unnecessary block_till_done, improve tests (#23246) 2019-04-19 12:19:46 -07:00
Erik MontnemeryandPaulus Schoutsen bea7e2a7fa Fix clearing error message for MQTT vacuum (#23206)
* Fix clearing error message

* Remove redundant hass.async_block_till_done
2019-04-18 21:01:19 -07:00
Erik MontnemeryandPaulus Schoutsen 7a84cfb0be Fix optimistic mode + other bugs, tests (#22976) 2019-04-18 20:59:41 -07:00
Erik MontnemeryandPaulus Schoutsen 70ba5eb0ef Add json_attributes_template (#22981) 2019-04-18 20:55:10 -07:00
Erik MontnemeryandPaulus Schoutsen c6bc47b32d Refactor MQTT climate to deduplicate code (#23044) 2019-04-13 20:34:39 -07:00
Erik MontnemeryandPaulus Schoutsen b390de1598 Fix bugs in MQTT vacuum (#23048) 2019-04-13 20:29:01 -07:00
Erik MontnemeryandPaulus Schoutsen d99637e51b Deprecate implicit state_topic for MQTT discovery (#22998)
* Deprecate implicit state_topic for MQTT discovery

* Lint

* Add comments

* Modernize tests
2019-04-13 20:25:45 -07:00
Erik MontnemeryandPaulus Schoutsen 38d92b2abf Fix optimistic mode and add tests (#22899) 2019-04-10 13:56:34 -07:00
Erik MontnemeryandFabian Affolter bc5f0ff0b3 Use dict[key] for required config keys and keys with default values of MQTT light (#22834)
* Use dict[key] for required config keys and keys with default values.

* Improve tests

* Lint

* Improve tests of JSON data
2019-04-10 11:16:41 +02:00
Erik MontnemeryandPaulus Schoutsen 49a2f5a40b Use dict[key] for required config keys and keys with default values. (#22832) 2019-04-08 08:47:40 -07:00
Erik MontnemeryandFabian Affolter fa2e07d7c5 Use dict[key] for required config keys and keys with default values. (#22830) 2019-04-07 10:11:45 -04:00
Erik MontnemeryandFabian Affolter 58220a9448 Use dict[key] for required config keys and keys with default values. (#22829) 2019-04-07 10:11:20 -04:00
Erik MontnemeryandFabian Affolter dbb42e5890 Use dict[key] for required config keys and keys with default values. (#22838) 2019-04-07 10:10:57 -04:00
Erik MontnemeryandFabian Affolter 2a62906965 Use dict[key] for required config keys and keys with default values. (#22837) 2019-04-07 10:10:13 -04:00
Erik MontnemeryandFabian Affolter b1213b7a2d Use dict[key] for required config keys and keys with default values. (#22836) 2019-04-07 10:09:43 -04:00
Erik MontnemeryandFabian Affolter a4e7708450 Use dict[key] for required config keys and keys with default values. (#22833) 2019-04-07 10:08:47 -04:00
Erik MontnemeryandFabian Affolter 439197ea3e Use dict[key] for required config keys and keys with default values. (#22828) 2019-04-07 10:08:04 -04:00
Erik MontnemeryandFabian Affolter 842534d472 Use dict[key] for required config keys and keys with default values. (#22831) 2019-04-07 10:00:40 -04:00
Erik MontnemeryandFabian Affolter 83fb3637d9 Sort configuration schema. (#22835) 2019-04-07 09:56:38 -04:00
Erik MontnemeryandPaulus Schoutsen 353fca3b6e Raise severity of MQTT callback deprecation warning (#22792) 2019-04-06 20:31:39 -07:00
Erik MontnemeryandPaulus Schoutsen 55619da722 Remove unused group status (#22791) 2019-04-06 20:31:21 -07:00
Erik MontnemeryandPaulus Schoutsen 563e4fbfca Add deprecation warning to embedded broker (#22753) 2019-04-04 23:38:10 -07:00
Erik MontnemeryandGitHub 98644135fa Update light/services.yaml (#22662) 2019-04-03 20:30:03 +02:00
emontnemeryandPaulus Schoutsen e736521e9f Fix regression from PR #22396 (#22661)
* Fix regression from PR #22396

* Fix test
2019-04-02 19:58:28 -07:00
emontnemeryandPaulus Schoutsen 4f2435103b Cast: Fix next/previous track (#22634)
* Fix next/previous track

* Bump pychromecast

* Update test, fixup
2019-04-02 19:58:02 -07:00
emontnemeryandPaulus Schoutsen 4d1633807c Turn light off if brightness is 0 (#22400)
* Turn light off if brightness is 0

* Lint

* Review comments

* Lint

* Fixup, add tests

* Fix trådfri light + test
2019-03-30 21:04:32 -07:00
emontnemeryandPaulus Schoutsen 54777a81bc Forward media control to playing group (#22566)
* Forward media control to playing group

* Fix forwarding control to dynamic group

* Fix, add tests
2019-03-30 20:07:01 -07:00
emontnemeryandPaulus Schoutsen 2e375aa802 Improve handling of audio groups (#22396)
* Improve handling of audio groups

* Review comments

* Fix tests

* Add tests

* Review comment

* Bump pychromecast
2019-03-30 10:19:18 -07:00
emontnemeryandPaulus Schoutsen 90c878a7ed Update additional platforms to use new MQTT message callback (#22030)
* Move additional platforms to new MQTT callback

* Fix automation.mqtt
2019-03-14 16:19:18 -07:00
emontnemeryandPaulus Schoutsen b25e951dcc Update additional platforms to use new MQTT message callback (#22030)
* Move additional platforms to new MQTT callback

* Fix automation.mqtt
2019-03-14 10:58:32 -07:00
emontnemeryandPaulus Schoutsen 5957e4b75b Pass Message object to MQTT message callbacks (#21959)
* Pass Message object to MQTT message callbacks

* Improve method of detecting deprecated msg callback

* Fix mysensors

* Fixup

* Review comments

* Fix merge error
2019-03-13 12:58:20 -07:00
emontnemeryandPaulus Schoutsen ce1fe06193 Write state directly in all MQTT platforms (#21971) 2019-03-12 14:46:48 -07:00
emontnemeryandPaulus Schoutsen fc85b3fc5f Don't hang forever if manually added cast is down (#21565)
* Don't hang forever if manually added cast is down

* Adapt to pychromecast

* Do not set available until connected

* Update __init__.py

* Update requirements

* Lint, tests

* Fix tests
2019-03-10 19:57:30 -07:00
emontnemeryandPaulus Schoutsen fc81826763 Introduce Entity.async_write_ha_state() to not miss state transition (#21590)
* Copy state in schedule_update_ha_state

* Lint

* Fix broken test

* Review comment, improve docstring

* Preserve order of state updates

* Rewrite

* Break up async_update_ha_state

* Update binary_sensor.py

* Review comments

* Update docstring

* hass -> ha

* Update entity.py

* Update entity.py
2019-03-09 09:52:22 -08:00
emontnemeryandPaulus Schoutsen e877983533 Make time trigger data trigger.now local (#21544)
* Make time trigger data trigger.now local

* Make time pattern trigger data trigger.now local

* Lint

* Rework according to review comment

* Lint
2019-03-04 15:59:13 -08:00
emontnemeryandPaulus Schoutsen cd89809be5 Make time trigger data trigger.now local (#21544)
* Make time trigger data trigger.now local

* Make time pattern trigger data trigger.now local

* Lint

* Rework according to review comment

* Lint
2019-03-01 23:09:12 -08:00
emontnemeryandPaulus Schoutsen b05062e9d9 Add missing retain option to mqtt.climate configuration schema (#21536) 2019-02-28 17:46:31 -08:00
emontnemeryandGitHub c340083ba5 Add missing retain option to mqtt.climate configuration schema (#21536) 2019-02-28 18:26:54 +01:00
emontnemeryandDiogo Gomes 22af9707ad Add support for device_class to MQTT cover (#21044) 2019-02-13 19:58:46 +00:00
emontnemeryandPaulus Schoutsen 888345e4ff Fix discovery of audio groups (#20947)
* Fix discovery of audio groups

* Fix tests

* Re-discover

* Review comments

* Remove failing tests

* Update dependencies

* Fix test
2019-02-12 15:00:54 -08:00
emontnemeryandFabian Affolter 5f7f7777a0 Fix encoding for MQTT camera (#20932) 2019-02-10 12:35:54 +01:00
emontnemeryandPaulus Schoutsen b1faad0a50 Use PLATFORM_SCHEMA_BASE as base schema for additional components. (#20578)
* Disable extra=vol.ALLOW_EXTRA for additional platforms.

* Remove PLATFORM_SCHEMA_2

* Add entity_namespace to base platform schema
2019-02-04 21:52:19 -08:00
emontnemeryandPaulus Schoutsen 79d3f533a9 Add missing abbreviations (#20741) 2019-02-04 10:54:40 -08:00
emontnemeryandPaulus Schoutsen 4255f2c62f Add entity_namespace to PLATFORM_SCHEMA (#20693)
* Add entity_namespace to base platform schema

* Add test

* Fix
2019-02-02 14:09:43 -08:00
emontnemeryandGitHub bada9b5e0b Add entity_namespace to PLATFORM_SCHEMA (#20693)
* Add entity_namespace to base platform schema

* Add test

* Fix
2019-02-02 18:31:28 +01:00
emontnemeryandPaulus Schoutsen c702e1e3c6 Add PLATFORM_SCHEMA_BASE support to check_config.py (#20663) 2019-02-01 14:10:39 -08:00
emontnemeryandPaulus Schoutsen 44c2a83105 Add PLATFORM_SCHEMA_BASE support to check_config.py (#20663) 2019-02-01 08:14:02 -08:00
emontnemeryandPaulus Schoutsen 89fc3b2a1b Disable extra=vol.ALLOW_EXTRA for MQTT platforms. (#20562) 2019-01-29 09:29:02 -08:00
emontnemeryandPaulus Schoutsen 3ee3acd550 Update device registry of MQTT light (#20441)
* Update device registry of MQTT light

* Move config_entry to constructor
2019-01-28 19:45:34 -08:00
emontnemeryandPaulus Schoutsen bb1583c453 Add discovery update support to MQTT camera (#20529) 2019-01-28 16:21:38 -08:00