Commit Graph

380 Commits (0a26e68d0cd23cf4d5fa1ad1cb0cf22251eb28d5)

Author SHA1 Message Date
epenet 2699eb62bd
Rename DOMAIN_DATA HassKey constants to DATA_COMPONENT (#126746)
* Rename DOMAIN_DATA HassKey constant to DATA

* DATA -> DATA_COMPONENT
2024-09-25 15:53:58 +02:00
G Johansson 93aade6e8e
Change lock state to an enum (#126379)
* Add new LockState enum for lock states

* Add rest

* Fix insteon tests

* Fix mqtt tests

* Fix tesla_fleet

* Revert back ST_STATE_LOCKED

* Add back constant
2024-09-24 12:30:50 +02:00
epenet f7004188d2
Use HassKey in group (#126321)
* Use HassKey in group

* Adjust

* Improve
2024-09-21 13:11:57 +02:00
epenet 06e876aee0
Add alias to DOMAIN import in group (#125569) 2024-09-09 11:07:19 +02:00
Erik Montnemery cffa8b4feb
Update icons.json to new service schema part 2 (#124769) 2024-08-28 13:47:41 +02:00
epenet 0bb8c4832d
Enable raise-within-try (TRY301) rule in ruff (#123351) 2024-08-12 09:16:33 +02:00
Franck Nijhof 228db1c063
Support action YAML syntax in old-style notify groups (#123457) 2024-08-09 17:18:42 +02:00
Pete Sage 186ca49b16
Fix group media player `play_media` not passing kwargs (#122258) 2024-07-22 14:30:23 +02:00
Joost Lekkerkerker 7d46890804
Add support for grouping notify entities (#122123)
* Add support for grouping notify entities

* Add support for grouping notify entities

* Add support for grouping notify entities

* Fix test

* Fix feedback

* Update homeassistant/components/group/notify.py

Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>

* Test config flow changes

* Test config flow changes

---------

Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
2024-07-21 20:57:49 +02:00
G Johansson ca4c617d4b
Add TURN_OFF/TURN_ON feature flags for fan (#121447) 2024-07-19 11:35:24 +02:00
Franck Nijhof f94b28f72d
Add button group support (#121715)
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-07-11 09:37:32 +02:00
epenet 36d8ffa79a
Force alias when importing media player PLATFORM_SCHEMA (#120537) 2024-06-26 12:19:04 +02:00
epenet c49fce5541
Force alias when importing sensor PLATFORM_SCHEMA (#120536) 2024-06-26 12:14:13 +02:00
epenet 32bab97f00
Force alias when importing light PLATFORM_SCHEMA (#120529) 2024-06-26 11:53:15 +02:00
epenet 912136be25
Force alias when importing lock PLATFORM_SCHEMA (#120531) 2024-06-26 11:52:57 +02:00
epenet 7b7b97a7a4
Force alias when importing event and fan PLATFORM_SCHEMA (#120524) 2024-06-26 11:35:39 +02:00
epenet 2c17d84fab
Force alias when importing cover PLATFORM_SCHEMA (#120522) 2024-06-26 11:25:14 +02:00
epenet 399130bc95
Force alias when importing binary sensor PLATFORM_SCHEMA (#120510) 2024-06-26 10:54:19 +02:00
epenet 9b8922a678
Force alias when importing switch PLATFORM_SCHEMA (#120504) 2024-06-26 10:36:54 +02:00
epenet 4bfecea2f4
Force alias when importing notify PLATFORM_SCHEMA (#120494) 2024-06-26 10:02:24 +02:00
Marc Mueller 49df0c4366
Improve schema typing (2) (#120475) 2024-06-26 02:25:30 +02:00
Jan Bouwhuis 854b6c99fe
Address review on comment group registry maintenance (#119952)
Address late review on comment group registry maintenance
2024-06-19 10:51:56 +02:00
Jan Bouwhuis 66faeb28d7
Fix late group platform registration (#119789)
* Fix late group platform registration

* use a callback instead

* Run thread safe

* Not working domain filter

* Also update if a group has nested group's

* Only update if the siingle state type key could change

* Avoid redundant regisister hooks

* Use set, add comment

* Revert changes

* Keep callback cleanup const

* Cleanup after dependencies

* Preimport and cleanup excluded domains

* Revert test changes as we assume early set up now

* Migrate alarm_control_panel

* Migrate climate

* Migrate cover

* Migrate device_tracker

* Migrate lock

* Migrate media_player

* Migrate person

* Migrate plant

* Migrate vacuum

* Migrate water_heater

* Remove water_heater group_pre_import

* Use Platform enum if possible

* Also use platform enum for excluded domains

* Set registry to self._registry

* move deregistering call back hook to async_added_to_hass

* Add comment

* Do no pass mutable reference to EXCLUDED_DOMAINS

* Remove unneeded type hint
2024-06-18 20:01:16 +02:00
Jan Bouwhuis 05e690ba0d
Remove not used group class method (#119798) 2024-06-17 00:27:07 +02:00
Jan Bouwhuis 9e146a51c2
Fix group enabled platforms are preloaded if they have alternative states (#119621) 2024-06-14 07:46:24 +02:00
G Johansson fc915dc1bf
Calculate attributes when entity information available in Group sensor (#119021) 2024-06-11 09:26:44 +02:00
Jan Bouwhuis 796d940f2f
Fix group platform dependencies (#118499) 2024-05-30 19:14:54 +02:00
Bertrand Roussel 11f5b48724
Add standard deviation calculation to group (#112076)
* Add standard deviation calculation to group

* Add missing bits

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-05-10 10:16:09 +02:00
G Johansson 7862596ef3
Add `open` state to LockEntity (#111968)
* Add `open` state to LockEntity

* Add tests

* Fixes

* Fix tests

* strings and icons

* Adjust demo open lock

* Fix lock and tests

* fix import

* Fix strings

* mute ruff

* Change sequence

* Sequence2

* Group on states

* Fix ruff

* Fix tests

* Add more test cases

* Sorting
2024-05-08 20:42:22 +02:00
Jan Bouwhuis 41b688645a
Refactor group state logic (#116318)
* Refactor group state logic

* Fix

* Add helper and tests for groups with entity platforms multiple ON states

* Adress comments

* Do not store object and avoid linear search

* User dataclass, cleanup multiline ternary

* Add test cases for grouped groups

* Remove dead code

* typo in comment

* Update metjod and module docstr
2024-05-02 21:55:46 +02:00
Jan Bouwhuis 986df70fe3
Refactor group setup (#116317)
* Refactor group setup

* Add @callback decorator and remove commented out code

* Keep set, add default on state
2024-04-28 16:32:17 +02:00
Jan Bouwhuis 855bb57d5e
Revert "Return specific group state if there is one" (#116176)
Revert "Return specific group state if there is one (#115866)"

This reverts commit 350ca48d4c.
2024-04-25 17:32:42 +02:00
Jan Bouwhuis 350ca48d4c
Return specific group state if there is one (#115866)
* Return specific group state if there is one

* Refactor

* Additional test cases

* Refactor

* Break out if more than one on state

* tweaks

* Remove log, add comment

* add comment

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <nick@koston.org>

* Refactor and improve comments

* Refactor to class method

* More filtering

* Apply suggestions from code review

* Only active if not excluded

* Do not use a set

* Apply suggestions from code review

Co-authored-by: Erik Montnemery <erik@montnemery.com>

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-24 15:12:29 +02:00
Marc Mueller 14e19c6d9c
Remove unnecessary type ignores (#116036) 2024-04-23 17:32:21 +02:00
Jan Bouwhuis a8025a8606
Fix mutable objects in group registry class (#115797) 2024-04-19 18:41:29 +02:00
Sid 3799d20d43
Enable Ruff B905 (#114197) 2024-04-14 00:14:26 -05:00
J. Nick Koston aa85e59c6f
Migrate group to use shorthand attributes for name and icon (#115244) 2024-04-08 11:05:56 -10:00
Marc Mueller 3c5089bc3f
Update import for EventStateChangedData [a-h] (#114899) 2024-04-04 11:48:36 -10:00
Erik Montnemery 426f73b1f4
Add State.last_reported (#113511)
* Add State.last_reported

* Update tests

* Update test snapshots

* Call state_reported listeners when firing state_changed event

* Add tests
2024-03-20 21:05:07 +01:00
J. Nick Koston 9a6804b5d7
Adjust config flow pre-import comment in group (#113702) 2024-03-17 14:28:29 -10:00
Sid 6ee273a548
Clean up unneeded ruff noqa directives (#113616) 2024-03-16 09:48:37 -10:00
J. Nick Koston 702488062b
Move group config flow pre-import to its init (#113564) 2024-03-15 18:44:10 -10:00
J. Nick Koston bb667abd51
Cleanup some circular imports in group (#113554) 2024-03-15 15:45:43 -10:00
Joost Lekkerkerker 774b2800bf
Add service icons to Group (#113302) 2024-03-14 14:01:30 +01:00
J. Nick Koston c3b5e819c5
Fix group loading too late resulting in incorrect state (#113262) 2024-03-13 19:18:15 -10:00
Joost Lekkerkerker 761933acfe
Improve lists in integrations [G-H] (#113168) 2024-03-13 17:25:27 +01:00
Marc Mueller 25237e0377
Replace EventType with Event [a-g] (#112739) 2024-03-08 19:35:17 +01:00
Marc Mueller 8809d3aa88
Add empty line after module docstring [g-i] (#112699) 2024-03-08 08:52:48 -05:00
Steve HOLWEG 4a128f1225
Return group unit of measurement when device_class is None (#110973)
* Groups: Return units when device_class is None

* Fixes

* Mods

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-02-25 22:44:05 -05:00
J. Nick Koston 0d4c82b54d
Convert Integration platforms processors where nothing is awaited to callbacks (#110825)
Convert Integration platforms processors where nothing is awaited callbacks
2024-02-17 20:49:47 -05:00