Commit Graph

323 Commits (f28f2e4ed46cd00647c8df63cc957aa2bfd163b3)

Author SHA1 Message Date
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
Erik Montnemery 6be20b5408
Add preview support to binary sensor group (#98872) 2023-08-23 14:24:48 +02:00
Erik Montnemery 3b16a3e1e0
Small typing fix in binary_sensor group (#98874) 2023-08-23 14:04:06 +02:00
Erik Montnemery b885dfa5a8
Add preview to sensor group config and option flows (#83638) 2023-08-22 10:29:16 +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
Marc Mueller 9e67bccb89
Replace EventType annotations with Event (#96426) 2023-07-18 08:51:06 +02:00
Paulus Schoutsen 7859be6481
Add deduplicate translations script (#96384)
* Add deduplicate script

* Fix forecast_solar incorrect key with space

* Fix utf-8

* Do not create references to other arbitrary other integrations

* Add commented code to only allow applying to referencing integrations

* Tweak

* Bug fix

* Add command line arg for limit reference

* never suggest to update common keys

* Output of script

* Apply suggestions from code review

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-07-13 11:52:50 -04:00
Joost Lekkerkerker b367c95c81
Add more common translations (#96429)
* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations
2023-07-12 22:00:05 -04:00
Franck Nijhof 11cd7692a1
Migrate group services to support translations (#96369)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-07-12 19:58:08 +02:00
Erik Montnemery 87f284c7e9
Add MEDIA_ANNOUNCE to MediaPlayerEntityFeature (#95906) 2023-07-10 12:58:53 +02:00
Erik Montnemery 6dae3553f2
Add MEDIA_ENQUEUE to MediaPlayerEntityFeature (#95905) 2023-07-08 10:55:25 +02:00
Franck Nijhof 3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
Allen Porter 84c66b3cad
Add support for services to return data (#94401)
* Add support for service calls with resopnse data.

Update the service calls to allow returning responses with data,
with an initial use case supporting basic service calls usable
within script.

* Revert enttiy platform/component changes

* Remove unnecessary comma diff

* Revert additional unnecessary changes

* Simplify service call

* Simplify and fix typing and revert whitespace

* Clarify typing intent

* Revert more entity service calls

* Revert additional entity service changes

* Set blocking=True for group notify service call

* Revert unnecessary changes

* Reverting more whitespace changes

* Revert more service changes

* Add test coverage for None return case

* Add parameter to service calls indicating return values were requested

* Update tests/test_core.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Add additional service call tests

* Update test comment

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-06-16 12:43:35 -04:00
G Johansson 6736ed67ba
Translate config flow for sensor measurement option in group (#87374)
* Translate config flow

* reset en

* Delete en.json
2023-05-30 21:23:47 -04:00
Erik J. Olson d228df6d81
Fix Notify Group payload data mis-merge (#90253)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-28 14:56:10 +02:00
G Johansson 706e8d5612
Add product calculation to Group sensor (#87373)
* Group product

* config flow
2023-03-28 09:35:09 +02:00
Franck Nijhof fb4b35709d
Add state translations for helpers (#90356)
* Add state translations for helpers

* Managed via the UI
2023-03-27 16:19:25 -04:00
epenet 4836404288
Improve media_player type hints in integrations (#90029)
Fix some media_player type hints
2023-03-21 11:10:12 +01:00
Franck Nijhof f9919bb7cf
Add pre-defined entity name translations (#89792) 2023-03-16 21:10:20 +01:00
Franck Nijhof f32b7859b8
Restructure translations for entity components (#89702) 2023-03-16 12:16:08 +01:00
epenet 4a3c0cd0a8
Adjust docstrings for ruff D404 (#89077) 2023-03-03 11:26:13 +01:00
J. Nick Koston f11ba1b7cb
Fix group integration with py3.11 (#88089)
In py3.11 `Passing coroutines is forbidden, use tasks explicitly`
2023-02-14 10:24:10 -05:00
G Johansson 7aa79415c1
Fix unbound variable in Group sensor (#87878)
* group bound last

* Add test
2023-02-11 16:27:22 +01:00
Erik Montnemery 899adef590
Sort manifests 4 (#87025) 2023-02-08 20:27:05 +01:00
Franck Nijhof 939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
GitHub Action f475446ebf [ci skip] Translation update 2023-02-06 00:23:07 +00:00
GitHub Action 3f992ed31d [ci skip] Translation update 2023-02-04 00:23:44 +00:00
Franck Nijhof 1b4f4edce2
Don't override icon in sensor group when device class is set (#87304) 2023-02-03 16:38:05 +01:00
Franck Nijhof 695a453159
Fix incorrect description in sensor group config flow (#87298) 2023-02-03 15:59:34 +01:00
GitHub Action ce79b26ab6 [ci skip] Translation update 2023-02-03 00:25:31 +00:00