Commit Graph

193 Commits (2cd44567627c5e7ba44baf28191c76512d856b08)

Author SHA1 Message Date
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
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 4589be2d11
Improve type hints in group tests (#121174) 2024-07-04 10:22:39 +02:00
Joost Lekkerkerker 03c6e0c55f
Fix SIM300 (#120725) 2024-06-28 10:46:02 +02:00
epenet 3d1165519d
Fix broad-exception-raised in component tests (#119467) 2024-06-12 17:53:42 +02:00
epenet abb8c58b87
Fix consider-using-tuple pylint warnings in core tests (#119463) 2024-06-12 12:35:01 +02:00
G Johansson fc915dc1bf
Calculate attributes when entity information available in Group sensor (#119021) 2024-06-11 09:26:44 +02:00
epenet fbaba3753b
Fix root-import pylint warning in components (#119294)
* Fix root-import pylint warning in components

* Adjust

* Adjust
2024-06-10 15:14:49 +02:00
epenet c7e065c413
Move enable_custom_integrations fixture to decorator (#118844) 2024-06-05 09:20:08 +02:00
Jan Bouwhuis 796d940f2f
Fix group platform dependencies (#118499) 2024-05-30 19:14:54 +02:00
J. Nick Koston a8fba691ee
Add types to event tracker data (#118010)
* Add types to event tracker data

* fixes

* do not test event internals in other tests

* fixes

* Update homeassistant/helpers/event.py

* cleanup

* cleanup
2024-05-24 10:09:39 -04: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 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 a0314cddd4
Fix invalid tuple annotations (#116035) 2024-04-23 16:02:16 +02:00
Jan Bouwhuis 5b082ed669
Add group tests with mixed domain entities (#115849) 2024-04-19 14:48:18 +02:00
Sid 3799d20d43
Enable Ruff B905 (#114197) 2024-04-14 00:14:26 -05:00
Jan Bouwhuis 197070486f
Set up notify group with the notify services in test (#115526) 2024-04-13 17:10:16 +02:00
Jan Bouwhuis 38c7b99aef
Make legacy notify group tests independent of demo platform (#115494) 2024-04-13 12:58:31 +02:00
J. Nick Koston d321906342
Always run keyed event trackers immediately (#114709) 2024-04-04 15:30:01 -10:00
Joost Lekkerkerker 906d3198e3
Use is in enum comparison in config flow tests F-J (#114670)
* Use right enum expression F-J

* Fix
2024-04-02 23:01:37 +02:00
Sid d5f883fbf0
Unignore Ruff PLR in tests (#114470)
* Unignore Ruff PLR in tests

* Address review comments

* review comments

* fix import

* Update test_api.py

* Update test_api.py

* Update test_api.py
2024-04-01 11:11:59 +02:00
Jan-Philipp Benecke 9580adfde9
Use new `setup_test_component_platform` helper instead of test fixture for light platform (#114200) 2024-03-26 00:17:16 +01:00
Jan-Philipp Benecke ff6812a798
Split light fixture from implementation to only import when fixture is actually used (#113892)
* Split light fixture from implementation to only import when fixture is actually used

* Non-local import
2024-03-21 10:49:32 +01:00
Jan-Philipp Benecke 638020f168
Remove deprecated `hass.components` from group light tests and use fixture (#113862) 2024-03-20 08:45:50 +01:00
Sid 00ec7f11f0
Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
J. Nick Koston c1f5c7c4b7
Remove usage of async_add_job in tests (#113259) 2024-03-13 19:33:33 -10:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller c88b337600
Add empty line after module docstring [tests f-k] (#112709) 2024-03-08 14:50:04 +01:00
J. Nick Koston f3a9756f81
Avoid waiting for integration platforms in the parent integration (#112467) 2024-03-05 21:16:42 -10:00
J. Nick Koston 8b017016b0
Refactor integration platforms to import in the executor (#112168)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-03-04 19:21:18 -10: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
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
Erik Montnemery 4229c35fcd
Improve color mode handling in MockLight (#109298) 2024-02-02 09:49:32 +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 c399cab427
Small speed up to checking core state (#107845) 2024-01-18 08:41:32 -10:00
Jan Bouwhuis 861bb48ab6
Assign specific error code for HomeAssistantError on websocket_api connection exceptions (#104700)
Assign specific error code for HomeAssistantError
2023-11-29 13:07:52 +01:00
Jan-Philipp Benecke 04a497343d
Update f-g* tests to use entity & device registry fixtures (#103841) 2023-11-12 13:07:38 +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
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
Ville Skyttä e7b6037419
Remove unnnecessary pylint configs from components [e-l]* (#99004) 2023-08-25 09:46: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