J. Nick Koston
0695bf8988
Move group helpers into their own module ( #106924 )
...
This gets rid of the legacy need to use bind_hass, and
the expand function no longer looses typing.
2024-01-04 17:34:56 +01:00
Erik Montnemery
dd5a48996a
Keep capabilities up to date in the entity registry ( #101748 )
...
* Keep capabilities up to date in the entity registry
* Warn if entities update their capabilities very often
* Fix updating of device class
* Stop tracking capability updates once flooding is logged
* Only sync registry if state changed
* Improve test
* Revert "Only sync registry if state changed"
This reverts commit 1c52571596c06444df234d4b088242b494b630f2.
* Avoid calculating device class twice
* Address review comments
* Revert using dataclass
* Fix unintended revert
* Add helper method
2023-12-13 17:27:26 +01:00
Erik Montnemery
e880ad7bda
Improve reload of legacy groups ( #102925 )
...
* Improve reload of legacy groups
* Simplify reload
* Get rid of inner function
* Fix logic when there are no group.group entities
* Update homeassistant/components/group/__init__.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Fix type hints
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-11-01 00:18:21 +01:00
Erik Montnemery
03d3a87f23
Small cleanup of legacy groups ( #102918 )
...
* Small cleanup of legacy groups
* Update tests which create groups
2023-10-28 17:16:41 +02:00
J. Nick Koston
393544b3e7
Make group _update_at_start a callback ( #102286 )
2023-10-18 22:41:39 -10:00
Erik Montnemery
df73850f56
Move definition of attributes excluded from history to entity classes ( #100430 )
...
* Move definition of attributes excluded from history to entity classes
* Revert change which should be in a follow-up PR
* Fix sun unrecorded attributes
* Fix input_select unrecorded attributes
2023-09-21 15:02:47 +02:00
Erik Montnemery
3c10d0e1f7
Deduplicate entities derived from GroupEntity ( #98893 )
2023-08-23 19:20:58 +02:00
Marc Mueller
2618bfc073
Use EventType for state changed [core] ( #97115 )
2023-07-23 18:10:03 -05:00
J. Nick Koston
fca40be5df
Small cleanups to expand_entity_ids ( #96585 )
2023-07-18 09:41:37 +02:00
Franck Nijhof
3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap ( #94359 )
2023-06-27 17:42:46 +02:00
G Johansson
b3c5c6ae9c
Add sensor to group ( #83186 )
2023-01-24 20:12:27 +01:00
G Johansson
68dd2802a1
Add remove entity in group.set service ( #79401 )
...
* Group set remove entities
* simplify
* Add test
* Fix test
2023-01-23 15:00:40 +01:00
Michaël Arnauts
7142b4ecac
Fixes some grammar mistakes ( #84283 )
2022-12-20 11:10:31 +01:00
epenet
b4afb1cb6b
Make use of generic EntityComponent ( #78492 )
2022-09-15 11:53:00 +02:00
epenet
5cccb24830
Improve type hints in group ( #78350 )
2022-09-14 11:36:28 +02:00
Martin Hjelmare
c05905ebda
Remove callback decorator from coroutine functions ( #75626 )
...
* Remove callback decorator from coroutine functions
* Remove some more callback decorators
2022-07-22 19:09:02 +02:00
J. Nick Koston
cd03c49fc2
Wait for config entry platform forwards ( #73806 )
2022-07-09 17:27:42 +02:00
J. Nick Koston
db9c242723
Speed up creating group entities from YAML ( #73649 )
...
* Speed up creating group entities from YAML
- Pass all the entities to async_add_entities in one call to
avoid multiple levels of gather
* Speed up creating group entities from YAML
- Pass all the entities to async_add_entities in one call to
avoid multiple levels of gather
* Update homeassistant/components/group/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/group/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/group/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/group/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* typing
* unbreak
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-06-21 18:56:32 +02:00
J. Nick Koston
236d8aa277
Avoid recording static attributes for group entities ( #71256 )
2022-05-03 13:22:49 -05:00
Erik Montnemery
ae9c2df691
Return unsubscribe callback from start.async_at_start ( #69083 )
...
* Return unsubscribe callback from start.async_at_start
* Update calling code
2022-04-01 23:34:36 +02:00
Jason Hunter
94df0844b3
Add lock groups ( #68857 )
2022-03-29 17:07:23 -07:00
Franck Nijhof
01980f0445
Add switch groups ( #68528 )
2022-03-28 12:27:26 +02:00
Erik Montnemery
1b955970f8
Allow hiding and unhiding group members ( #68192 )
2022-03-22 12:14:34 +01:00
Erik Montnemery
e02c21a4de
Remove unused constant from group ( #67910 )
2022-03-09 16:45:09 +01:00
Erik Montnemery
a9cc2d2322
Add config flow for cover, fan, light and media_player groups ( #67660 )
...
* Add options flow support to HelperConfigFlowHandler
* Add config flow for cover, fan, light and media_player groups
* Update according to review comments
* Update translation strings
* Update translation strings
* Copy schema before adding suggested values
2022-03-07 13:05:04 +01:00
Erik Montnemery
1ebe82fc4b
Fix reload of media player groups ( #67653 )
2022-03-04 14:17:43 -08:00
epenet
bd859f428a
Add setup type hints to group ( #64002 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-13 12:25:20 +01:00
Marc Mueller
4e2cd1bec0
Update typing (2) [a-i] ( #63923 )
2022-01-11 21:23:26 +01:00
Erik Montnemery
8bf8709d99
Simplify groups ( #63477 )
...
* Simplify group
* Rename async_update to async_update_group_state and mark it as callback
* Simplify _async_start
2022-01-07 08:58:45 +01:00
Sebastian Lövdahl
bc3bf2ffe3
Use Platform constants all over the place 1/3 ( #62952 )
2021-12-28 21:13:20 +01:00
epenet
656d383ba6
Ensure service calls are typed [e-g] ( #62912 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-28 14:23:01 +01:00
Marc Mueller
7063c05127
Use assignment expressions 33 ( #58717 )
2021-10-30 16:32:41 +02:00
J. Nick Koston
def7c80e71
Add support for fan groups ( #57941 )
...
* Add support for fan groups
* dry
* dry
* fix refactor error
* tweaks
* wip
* tweaks
* tweaks
* fix
* fixes
* coverage
* tweaks
2021-10-26 10:32:49 +02:00
Marc Mueller
12d1dfdaf9
Use assignment expressions 10 ( #57791 )
2021-10-15 21:36:03 +02:00
Brian Egge
e638e5bb42
Add component for binary sensor groups ( #55365 )
...
* Add component for binary sensor groups
https://github.com/home-assistant/home-assistant.io/pull/19239
* Accidental push over prior commit
* Add test for any case
* Add unavailable attribute and tests for unique_id
* Added tests for attributes
link to documentation: https://github.com/home-assistant/home-assistant.io/pull/19297
2021-09-13 15:28:37 +02:00
Marc Mueller
c07646db5d
Update typing syntax ( #49480 )
...
* Update typing syntax
* Replace typing imports with ones from collections where possible
* Changes after review
2021-04-20 17:40:41 +02:00
Franck Nijhof
c1d5638739
Remove HomeAssistantType alias from entity components - Part 2 ( #48468 )
2021-03-29 13:24:56 -10:00
Erik Montnemery
346a724ac3
Mark base components' state_attribute @final, rename others to extra_state_attributes ( #48161 )
...
* Mark base state_attributes @final, rename others to extra_state_attributes
* Fix calendar, update tests
2021-03-21 10:38:24 +01:00
Marc Mueller
9e1a6610dc
Update typing 07 ( #48057 )
2021-03-18 08:02:55 +01:00
Franck Nijhof
5d5a110a20
None optional hass typing in base entity and notify ( #47528 )
2021-03-15 15:11:41 +01:00
tkdrob
00bbf8c3a2
Use core constants for group component ( #46239 )
2021-02-08 22:52:28 +01:00
J. Nick Koston
8b63e22c99
Bypass the slow update warning for group updates ( #43209 )
2020-11-14 21:46:24 +01:00
J. Nick Koston
78dfaa72a2
Ensure lights added after group is created have the correct state ( #41034 )
2020-10-03 21:29:41 +02:00
J. Nick Koston
42ad36e9f8
Switch group to use None for the state unknown case ( #40792 )
2020-09-30 17:25:50 +02:00
J. Nick Koston
9ccebdb8d5
Refactor group to extend domains that can be grouped ( #40607 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-30 09:13:53 -05:00
J. Nick Koston
a778690b64
Support reloading the group notify platform ( #39511 )
2020-09-03 00:12:07 +02:00
J. Nick Koston
3e9963a216
Overcome group concurrent setup limitation ( #39483 )
...
With a lot of groups the limitation that groups
had to be setup one at a time could account for
the bulk of startup time.
2020-09-02 10:14:16 +02:00
J. Nick Koston
810df38f0d
Add the ability to reload light/cover groups from yaml ( #39250 )
...
* Add the ability to reload light/cover groups from yaml
Update previous usage to reduce code duplication.
* Fix conflict from rebase
2020-08-25 18:13:43 -05:00
J. Nick Koston
63ebea1706
Ensure the context is passed to group changes ( #39221 )
2020-08-26 00:22:10 +02:00
J. Nick Koston
4a5a09a0e9
Speed up group setup ( #38048 )
2020-07-21 17:29:57 -07:00