Commit Graph

74 Commits (ef4a9bf35478eac72a7f9b3cdd4bab923600d251)

Author SHA1 Message Date
Pascal Vizeli baa8e53e66 Bugfix group reload (#5292)
* Bugfix group / hit update

* try to fix round 2

* Convert it to coro

* Don't check statemachine, check unsub listener.
2017-01-13 03:29:20 -08:00
Sebastian von Minckwitz cf0ff54d14 Add option to hide the group card switch (#4631)
* Add option to hide the group card switch

* Disallow control of hidden group switches

* Revert "Disallow control of hidden group switches"

This reverts commit 75e5ddfe30.

* Changed hide_switch to control
2016-12-03 17:50:11 -08:00
Paulus Schoutsen a343c20404 Async gather wait (#4247)
* Fix config validation for input_*, script

* Allow scheduling coroutines

* Validate entity ids when entity ids set by platform

* Async: gather -> wait

* Script/Group: use async_add_job instead of create_task
2016-11-06 09:26:40 -08:00
Paulus Schoutsen ee5f228309 Make services yield (#4187)
* Make services yield

* Disable pylint abstract-method check

* add input_select

* add input_slider

* change to async vers.

* fix lint

* yield on add_entities as other components does
2016-11-03 18:32:14 -07:00
Fabian Affolter be272ac64a Disable too-many-* (#4107)
* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Pierre Ståhl 33e46b484f Add service to change visibility of a group (#3998) 2016-10-29 16:54:26 -07:00
Pascal Vizeli d5368f6f78 Async bootstrap / component init (#3991)
* Async bootstrap

* Adress comments

* Fix tests

* More fixes

* Tests fixes
2016-10-27 00:16:23 -07:00
Pascal Vizeli 0b8b9ecb94 Async EntitiesComponent (#3820)
* first version

* First draft component entities

* Change add_entities to callback from coroutine

* Fix bug add async_prepare_reload

* Group draft v1

* group async

* bugfix

* bugfix v2

* fix lint

* fix extract_entity_ids

* fix other things

* move get_component out of executor

* bugfix

* Address minor changes

* lint

* bugfix - should work now

* make group init async only

* change update handling to old stuff

* fix group handling, remove generator from init

* fix lint

* protect loop for spaming with updates

* fix lint

* update test_group

* fix

* update group handling

* fix __init__ async trouble

* move device_tracker to new layout

* lint

* fix group unittest

* Test with coroutine

* fix bug

* now it works 💯

* ups

* first part of suggestion

* add_entities to coroutine

* change group

* convert add async_add_entity to coroutine

* fix unit tests

* fix lint

* fix lint part 2

* fix wrong import delete

* change async_update_tracked_entity_ids to coroutine

* fix

* revert last change

* fix unittest entity id

* fix unittest

* fix unittest

* fix unittest entity_component

* fix group

* fix group_test

* try part 2 to fix test_group

* fix all entity_component

* rename _process_config

* Change Group to init with factory

* fix lint

* fix lint

* fix callback

* Tweak entity component and group

* More fixes

* Final fixes

* No longer needed blocks

* Address @bbangert comments

* Add test for group.stop

* More callbacks for automation
2016-10-16 09:35:46 -07:00
Paulus Schoutsen 838b09bb8f Bugfix group order (#3323)
* Add ordered dict config validator

* Have group component use ordered dict config validator

* Improve config_validation testing

* update doc string config_validation.ordered_dict

* validate full dict entries

* Further simplify ordered_dict validator.

* Lint fix
2016-09-11 22:25:01 -07:00
Paulus Schoutsen 35b388edce Reload groups (#3203)
* Allow reloading groups without restart

* Test to make sure automation listeners are removed.

* Remove unused imports for group tests

* Simplify group config validation

* Add prepare_reload function to entity component

* Migrate group to use entity_component.prepare_reload

* Migrate automation to use entity_component.prepare_reload

* Clean up group.get_entity_ids

* Use cv.boolean for group config validation
2016-09-07 06:59:16 -07:00
Paulus Schoutsen d9ecc4af64 EventBus: return function to unlisten 2016-08-25 23:25:35 -07:00
Paulus Schoutsen 640a8b5a7f Limit dependencies of HA core (#2762) 2016-08-08 20:21:40 -07:00
John Lindley b5fb382c1c Add group state for locks (#2647)
* Add group state for locks

Added  ", (STATE_LOCKED, STATE_UNLOCKED)" to _GROUP_TYPES

Don't have a working HA right now, so can't test..

* Modified from homeassistant.const import

* Removed white space

* Line length change

* Removed white space.. again!
2016-07-29 11:55:18 -07:00
Adam Garcia 6a3c5b093b Update to group component to properly handle zone changes in tracked devices (#2631)
* pep8 fixes for group and test

* update to pass linting

* docstring fix.

* reduced length of docstring on test.
2016-07-28 20:40:25 -07:00
Daniel Høyer Iversen e44c2a4016 Improve config validation for group (#2206)
* Improve config validation if invalid entity for groups

* Improve error message when entity id is invalid
2016-06-08 20:55:08 -07:00
Jan Harkes 446d367aeb Accept group without entities in configuration. (#1768)
* Accept group without entities in configuration.

People seem to use these as placeholders for future expansion of their
home automation dreams, and we used to accept them.  We still have to
specify at least one of 'name', 'view' or 'icon' so that the group is
parsed as a dictionary.

* Also accept empty entities: key in a group.

* Additional fix for empty entities value in a group config.
2016-04-09 09:24:18 -07:00
Jan Harkes e5eb3b13c4 Maintain group ordering across validation. 2016-04-01 09:45:27 -04:00
Paulus Schoutsen 5baa98b79f Add initial config validation 2016-03-28 23:46:12 -07:00
Fabian Affolter b534244e40 Fix PEEP257 issues 2016-03-08 17:55:57 +01:00
Paulus Schoutsen bdad69307a Group: fix thread safety 2016-03-05 19:55:05 -08:00
Paulus Schoutsen 1eae74be58 Add assumed_state to group 2016-02-20 19:11:02 -08:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Paulus Schoutsen dc44ef7356 Support expanding nested groups 2016-02-09 22:43:07 -08:00
Paulus Schoutsen 6c91831baa Hide groups when they are views or auto defined 2016-01-24 23:45:06 -08:00
Paulus Schoutsen f6c53896e3 Allow groups to be used as views 2016-01-24 22:54:45 -08:00
Paulus Schoutsen 53484e46a3 Move generate_entity_id to entity helpers 2016-01-23 23:00:46 -08:00
Paulus Schoutsen bc19ef66bf Move split_entity_id to helpers 2016-01-23 22:49:49 -08:00
Paulus Schoutsen fabd0ced3f Make DEPENDENCIES optional for components 2015-11-26 13:11:59 -08:00
Fabian Affolter 97f9f8aa49 Update link to docs (Jekyll 3 update) 2015-11-09 13:12:18 +01:00
Fabian Affolter 55de563511 Add link to docs 2015-10-25 15:58:58 +01:00
Todd Ingarfield 33028dd143 Add STATE_OPEN/STATE_CLOSED to groupable states 2015-10-02 10:53:36 -05:00
Paulus Schoutsen 64fff48021 Allow spaces in group setup string 2015-08-30 20:44:38 -07:00
Paulus Schoutsen 1b89a502c4 Extract core into own submodule 2015-08-16 20:44:46 -07:00
Paulus Schoutsen fc6d7db81b Readd setting up groups with comma seperated list 2015-08-08 13:44:07 -07:00
Paulus Schoutsen d2b5f429fe Remove deprecated code 2015-08-04 16:21:09 -04:00
Paulus Schoutsen e47ac96587 Remove more deprecated method calls 2015-08-04 18:13:35 +02:00
Fabian Affolter fdb46d80ba Update documentation 2015-05-13 19:06:17 -07:00
Paulus Schoutsen bbdb0320f1 Have group inherit from entity 2015-04-22 22:31:16 -07:00
Ryan Kraus ff3dacedc0 Moved card visibility logic out of the Entity class and into a VisibilityABC. Then made the Group class inherit the VisibilityABC. No duplication of code now. This is definitely better. 2015-04-22 21:21:50 -04:00
Ryan Kraus 6b2dd69bcb Updated isy994 component to hide any device with the HIDDEN STRING in its ancestry. 2015-04-17 09:27:14 -04:00
Ryan Kraus b20424261c 1) Performed many pylint and flake8 fixes to clean up isy994 integration and hidden entities addition. 2) Added necessary code to allow groups to also be hidden. 3) Made most of the weather data from the isy994 component be hidden by default. 2015-04-15 02:05:34 -04:00
Paulus Schoutsen 80ffe74af6 Group component now supports lists in the config 2015-02-28 19:22:16 -08:00
Paulus Schoutsen ce39a6fb18 Bug fixes related to entity_ids being lowercase 2015-02-08 22:18:54 -08:00
Paulus Schoutsen d053f93419 Entity IDs are now always lowercase 2015-02-06 00:17:30 -08:00
Paulus Schoutsen ff230cefe3 Disable pylint unused-argument check 2015-01-19 23:40:51 -08:00
Paulus Schoutsen ba179bc638 Automatic discovery and setting up of devices 2015-01-09 00:07:58 -08:00
Paulus Schoutsen f1209a42a9 Ensure groups always have unique entity id 2015-01-08 20:17:05 -08:00
Paulus Schoutsen e0b424c88f Make group component more flexible 2015-01-08 20:02:34 -08:00
Paulus Schoutsen 81be3811dc Only save the valid entities in the group entity_ids attribute 2014-12-12 07:21:25 -08:00
Paulus Schoutsen df3521e706 Group component is more flexible when to setup a group 2014-12-11 17:31:01 -08:00