Commit Graph
100 Commits
Author SHA1 Message Date
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
emontnemeryandPaulus Schoutsen d7ba2aad1d Add COMPONENT_SCHEMA and use it in alarm_control_panel (#20224)
* Add COMPONENT_SCHEMA and use in alarm and mqtt

* Revert MQTT changes

* Lint

* Small tweak

* Add tests

* Rename COMPONENT_SCHEMA to PLATFORM_SCHEMA_BASE

* Fix tests

* Improve tests
2019-01-28 16:14:55 -08:00
emontnemeryandPaulus Schoutsen bb4ca1f525 Cleanup if discovered mqtt vacuum can't be added (#20549) 2019-01-28 15:56:47 -08:00
emontnemeryandFabian Affolter 648adcc708 Small cleanup of MQTT platforms (#20503)
* Move CONF_UNIQUE_ID to init

* Sort imports

* Update ordering
2019-01-27 18:54:52 +01:00
emontnemeryandFabian Affolter 8804f55fcc Update device registry of MQTT Vacuum (#20500) 2019-01-27 17:43:16 +01:00
emontnemeryandFabian Affolter 1f93984fd5 Update device registry of MQTT Lock (#20501) 2019-01-27 17:42:45 +01:00
emontnemeryandPaulus Schoutsen 60dc337f3f Update device registry of MQTT cover (#20443)
* Update device registry of MQTT cover

* Move config_entry to constructor
2019-01-26 10:52:41 -08:00
emontnemeryandPaulus Schoutsen 85c72fbca6 Update device registry of MQTT alarm (#20439) 2019-01-26 10:48:35 -08:00
emontnemeryandPaulus Schoutsen 85ccd71d39 Update device registry of MQTT sensor (#20440) 2019-01-26 10:48:18 -08:00
emontnemeryandPaulus Schoutsen 1d16bb2cd4 Update device registry of MQTT fan (#20445) 2019-01-26 10:46:41 -08:00
emontnemery 6d2e7db123 Update device registry of MQTT climate 2019-01-26 09:04:02 +08:00
emontnemery d8e43978b7 Update device registry of MQTT binary_sensor 2019-01-26 08:58:08 +08:00
emontnemeryandPaulus Schoutsen ec5da05804 Add character encoding to MQTT automation. (#20292) 2019-01-24 22:43:56 -08:00
emontnemeryandPaulus Schoutsen d84cd01cbf Cleanup if discovered mqtt light can't be added (#19740)
* Cleanup if discovered mqtt light can't be added

* No bare except

* Clear ALREADY_DISCOVERED list with helper

* Use constant instead of string literal
2019-01-24 22:40:52 -08:00
emontnemeryandPaulus Schoutsen a1da6a677a Update device registry of MQTT Switch (#19540)
* MQTT Switch: Update device registry

* Move config_entry to constructor

* Remove duplicated code

* Fix merge error
2019-01-24 22:39:16 -08:00
emontnemeryandPaulus Schoutsen 3fcbcd5a38 Add JSON attribute topic to MQTT alarm (#20238) 2019-01-20 16:42:56 -08:00
emontnemeryandPaulus Schoutsen dbba3eb0d4 Add JSON attribute topic to MQTT climate (#20239) 2019-01-20 16:42:35 -08:00
emontnemeryandPaulus Schoutsen 89e9d827a2 Add JSON attribute topic to MQTT fan (#20240) 2019-01-20 16:42:17 -08:00
emontnemeryandPaulus Schoutsen ab4e4787e3 Add JSON attribute topic to MQTT lock (#20241) 2019-01-20 16:41:50 -08:00
Erik 5b8f64093b Add JSON attribute topic to MQTT vacuum 2019-01-19 11:58:21 +01:00
emontnemeryandPaulus Schoutsen 6800871c13 Log exceptions thrown by signal callbacks (#20015)
* Log exceptions thrown by signal callbacks

* Fix unsub

* Simplify traceback print

* Typing

* Add test

* lint

* Review comments

* Rework MQTT test case

* Fix bad merge

* Fix bad merge
2019-01-17 14:44:57 -08:00