Commit Graph

187 Commits (7e11fec761dcdc108cd8e355c4f19d1a79d50270)

Author SHA1 Message Date
Erik Montnemery db8597a742
Reduce scope of JSON/XML test fixtures (#116197) 2024-04-25 19:12:36 -05:00
Sid 895f73d8e4
Enable Ruff A001 (#115654) 2024-04-21 23:25:27 +02:00
Joost Lekkerkerker b9281327c4
Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +02:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
J. Nick Koston 4f18f0d902
Fix setup timings when config entry platform loads are not awaited (#113959)
* Move setup time logging into the context manager

We were fetching the time twice but since the context
manager already has the timing, move it there

* remove log setup assertions from integration test

* tweak logging to give us better data for tracking issues

* redundant

* adjust

* preen

* fixes

* adjust

* make api change internal so nobody uses it

* coverage

* fix test

* fix more tests

* coverage

* more tests assuming internal calls

* fix more

* adjust

* adjust

* fix axis tests

* fix broadlink -- it does not call async_forward_entry_setup

* missed some

* remove useless patch

* rename, detect it both ways

* clear

* debug

* try to fix

* handle phase finishing out while paused

* where its set does not need to know its late as that is an implemenation detail of setup

* where its set does not need to know its late as that is an implemenation detail of setup

* tweak

* simplify

* reduce complexity

* revert order change as it makes review harder

* revert naming changes as it makes review harder

* improve comment

* improve debug

* late dispatch test

* test the other way as well

* Update setup.py

* Update setup.py

* Update setup.py

* simplify

* reduce
2024-03-23 15:26:38 -04:00
Sid d5fd005db8
Add ruff rule PIE808 (#113621) 2024-03-17 09:56:26 +01:00
Sid fe9cc6705c
Add ruff rule PIE804 (#113620)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-16 12:45:18 -10:00
Marcel van der Veldt 0eb1adccf8
Fix for Hue not applying effect in scene (#113057) 2024-03-11 15:08:00 +01:00
Marcel van der Veldt a7a30581fc
Fix adding Hue bridge manually by IP (#113055) 2024-03-11 12:35:41 +01:00
J. Nick Koston a2318c26c9
Run debouncer tasks eagerly to avoid scheduling on the event loop (#112789) 2024-03-10 08:37:10 -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 bef8376f83
Use MockConfigEntry in hue tests (#112149)
needed for https://github.com/home-assistant/core/pull/112141
2024-03-03 21:21:33 -05:00
J. Nick Koston 704ad67917
Ensure hue tests add config entry before updating it (#110428) 2024-02-13 04:59:26 +01:00
J. Nick Koston cc13d7eec7
Migrate hue to use async_update_entry to alter config entries (#110310) 2024-02-12 20:20:10 +01:00
J. Nick Koston 02efe41564
Avoid directly changing config entry state in tests (#110048) 2024-02-08 16:31:17 -06:00
Erik Montnemery b420c65016
Fix hue fallback onoff colormode (#109856)
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
2024-02-07 08:14:55 +01:00
Marc Mueller 7a89e58873
Use builtin TimeoutError [e-i] (#109679) 2024-02-05 12:00:37 +01:00
Erik Montnemery 6908497c3d
Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
Jan-Philipp Benecke eda475fe25
Update h* tests to use entity & device registry fixtures (#103866)
* Update h* tests to use entity & device registry fixtures

* Add missed lines
2023-11-12 13:52:32 -05:00
starkillerOG 93a8b60c2b
Philips Hue restore brightness after transition (#101293) 2023-10-25 07:46:49 +02:00
Paul Bottein c98c18f25e
Return 'None' for light attributes when off instead of removing them (#101946) 2023-10-19 01:08:08 +02:00
Marcel van der Veldt 6393171fa4
Adjust Hue integration to use Entity descriptions and translatable entity names (#101413)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-10-09 14:14:07 +02:00
Marcel van der Veldt 35616e100d
Discover switch entities from Hue behavior_script instances (#101262) 2023-10-02 17:15:41 +02:00
Marcel van der Veldt b569cb61e9
Adopt Hue integration to latest changes in Hue firmware (#101001) 2023-09-27 23:36:12 +02:00
J. Nick Koston 0eca433004
Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567) 2023-09-19 18:58:46 +02:00
Erik Montnemery dd39e8fe64
Use freezegun in hue tests (#99033) 2023-08-25 09:04:28 -05:00
Erik Montnemery 49011f0158
Adjust hue tests which create devices (#98195) 2023-08-10 18:27:05 +02:00
Franck Nijhof 868a5f377f
Ruff: isort don't split imports based on trailing comma (#98162) 2023-08-10 14:27:03 +02:00
Marcel van der Veldt 7ada88eab3
Hue event entity follow up (#97336) 2023-07-27 16:58:09 +02:00
Marcel van der Veldt 2ae059d4fc
Add Event platform/entity to Hue integration (#97256)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-07-26 16:42:01 +02:00
Erik Montnemery 7539cf25be
Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
Erik Montnemery 5884afd485
Teach sensor device trigger about entity registry ids (#94988) 2023-06-22 11:13:54 +02:00
Erik Montnemery fd822bce56
Replace assert_lists_same with pytest_unordered in integrations h-m (#94901) 2023-06-20 20:16:25 +02:00
J. Nick Koston 48485fc2bf
Complete persistent notifications migration (#92828)
* Complete migration of persistent notifications

Persistent notifications are no longer stored in
the state machine and no longer fire events

* Complete migration of persistent notifications

Persistent notifications are no longer stored in
the state machine and no longer fire events

* fixes

* fixes

* fixes

* ws test

* update tests

* update tests

* fix more tests

* fix more tests

* more fixes

* fix

* fix person

* fix person

* keep whitelist

* use singleton
2023-05-25 23:09:13 -04:00
epenet 5f7496f97b
Fix lingering timer in hue light tests (#92858) 2023-05-09 17:07:23 +02:00
Marcel van der Veldt fceb208381
Abort Hue config flow if bridge can not be reached (#88893)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-03-15 18:55:34 +01:00
epenet d65dff3f9e
Adjust entity registry access in tests (2) (#88960) 2023-03-01 16:23:36 +01:00
Marcel van der Veldt 36e6a879ad
Bump aiohue library to version 4.6.2 (#88907)
* Bump aiohue library to 4.6.2

* Fix long press (fixed in aiohue lib)

* fix test
2023-02-28 11:53:15 -05:00
Franck Nijhof 1e05697080
Enable Ruff B007 (#88356)
* Enable Ruff B007

* Adjust existing cases
2023-02-17 21:08:18 -05:00
epenet 9404a107b2
Add type hints to integration tests (part 10) (#87985) 2023-02-13 10:25:26 +01:00
Erik Montnemery cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
epenet 37a2040d7b
Add type hints to integration tests (h-i) (#87703) 2023-02-08 18:12:56 +01:00
epenet 4142f0d15d
Add return type to tests without arguments (#87613)
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +01:00
Franck Nijhof 5e81d28116
Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
Marcel van der Veldt f8c6e4c20a
Add support for Hue Smart Scenes (Natural Lights) (#85517)
* Bump aiohue to 4.6.0

* fix device name for lights

* fix name for groups too

* ignore smart scenes

* bump to 4.6.1 instead

* Add support for Smart Scenes (Natural lights) in Hue

* update base entity class

* fix test fixture

* update tests

* fix scene test

* fix typo

* use underlying scene controller

* use enum value

* update tests

* add current scene name within smart scene

* extra attributes are only valid if the scene is active

* Update v2_resources.json

* typo

* fix after merge
2023-01-30 23:32:37 -05:00
Marcel van der Veldt fe583b7c4a
Remove SSDP discovery from Hue (#85506)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-16 19:56:46 +01:00
Marcel van der Veldt c181fb6de0
Bump aiohue library to 4.6.1 (#85504)
* Bump aiohue to 4.6.0

* fix device name for lights

* fix name for groups too

* ignore smart scenes

* bump to 4.6.1 instead

* fix test fixture

* update tests

* fix scene test
2023-01-09 10:37:03 -05:00
epenet 6b3c91bd6a
Cleanup ColorMode in tests (#78807) 2022-09-20 18:33:45 +02:00
epenet 25b1dfb53a
Cleanup EntityCategory in tests (#78808) 2022-09-20 10:49:44 -04:00