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
Simon Lamon
6c4e372908
Fix state classes issue translation in Group ( #110238 )
...
Fix state classes translation
2024-02-11 09:54:50 +01:00
Simon Lamon
fa4433c569
Fix device class repairs issues placeholders in Group ( #110181 )
...
fix translation placeholders
2024-02-10 20:09:02 +01:00
G Johansson
baa511b808
Fix group sensor uom's in not convertable device classes ( #109580 )
2024-02-04 14:56:23 +01:00
Erik Montnemery
fe4dd2cb93
Improve color mode handling in light groups ( #109390 )
...
* Improve color mode handling in light groups
* Update config flow test
2024-02-03 09:00:00 +01:00
Franck Nijhof
6869723003
Fix device class repairs issues UOM placeholders in Group ( #109294 )
2024-02-01 10:20:52 +01:00
Tucker Kern
340df38bd0
Suppress log warnings when a sensor group has non numeric members ( #102828 )
2024-01-31 20:02:21 +01:00
G Johansson
f9a4840ce2
Group sensor calculate attributes ( #106972 )
...
* Group sensor calculate attributes
* Use entity helpers
* Fix sensor tests
* Test change of uom
* Add tests and fix UoM issue
* Fix test
* Fix state class
* repair and logs
* delete issues
* pass through hass
* Update descriotion text to be more descriptive
* Comments
* Add pr to comment
* fix if in updating
* Fix test valid units
* Fix strings
* Fix issues
2024-01-23 08:16:51 +01:00
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
Ville Skyttä
24b1e01d71
Update Ruff to 0.1.8, avoid linter/formatter conflicts ( #106080 )
...
* Disable Ruff rules that may conflict with the formatter
* Upgrade Ruff to 0.1.8
- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8
* Format with Ruff 0.1.8
2023-12-20 23:55:09 +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
Robert Resch
bb90c1f168
Fix multilevel reference translations ( #102338 )
2023-10-20 08:12:53 +02:00
J. Nick Koston
393544b3e7
Make group _update_at_start a callback ( #102286 )
2023-10-18 22:41:39 -10:00
Franck Nijhof
1944b2952c
Replace object select in service calls with more UI-friendly selectors ( #101722 )
2023-10-10 05:50:12 +02: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
d1afcd773f
Revert "Cache entity properties that are never expected to change in the base class" ( #100422 )
...
Revert "Cache entity properties that are never expected to change in the base class (#95315 )"
This reverts commit 042776ebb8
.
2023-09-15 11:25:24 +02:00
J. Nick Koston
042776ebb8
Cache entity properties that are never expected to change in the base class ( #95315 )
2023-09-14 17:48:48 -05:00
Erik Montnemery
97710dc5b7
Correct state attributes in group helper preview ( #99723 )
2023-09-06 15:59:03 +02:00
Erik Montnemery
6223af1899
Don't set assumed_state in fan groups ( #99399 )
2023-09-04 14:08:50 +02:00
Erik Montnemery
f3d8a0eaaf
Don't set assumed_state in cover groups ( #99391 )
2023-09-04 14:08:38 +02:00
Erik Montnemery
e6eadc79e9
Small typing fix in light group ( #99259 )
2023-08-29 11:12:34 +02:00
Erik Montnemery
3e02fb1f07
Add preview support to all groups ( #98951 )
2023-08-25 08:59:33 +02:00
Erik Montnemery
2066cf6b31
Remove `group_type` from group preview events ( #98952 )
2023-08-24 19:54:04 +02:00
Franck Nijhof
0d013767ee
Add support for event groups ( #98463 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-24 12:49:38 +02:00
Erik Montnemery
d282ba6bac
Use a single WS command for group preview ( #98903 )
...
* Use a single WS command for group preview
* Fix tests
2023-08-24 11:59:24 +02:00
Erik Montnemery
3c10d0e1f7
Deduplicate entities derived from GroupEntity ( #98893 )
2023-08-23 19:20:58 +02:00