epenet
1fbe880c5f
Deprecate light constants ( #132680 )
...
* Deprecate light constants
* Reference deprecated values in MQTT light
* Reference deprecated values in test_recorder
* Adjust
* Adjust
* Add specific test
2024-12-13 16:52:47 +01:00
epenet
8080ad14bf
Add warning when light entities do not provide kelvin attributes or properties ( #132723 )
2024-12-13 15:34:02 +01:00
epenet
b9a7307df8
Refactor light reproduce state to use kelvin attribute ( #132854 )
2024-12-12 21:17:05 +01:00
epenet
2ce2765e67
Adjust light test helpers to use Kelvin, and cleanup unused helpers ( #133048 )
...
Cleanup light test helper methods
2024-12-12 16:49:25 +01:00
epenet
0e8fe1eb41
Improve coverage in light reproduce state ( #132929 )
2024-12-11 19:15:36 +01:00
epenet
4ff41ed2f8
Refactor light significant change to use kelvin attribute ( #132853 )
2024-12-11 08:42:48 +01:00
epenet
1f8913d6cd
Remove deprecated supported features warning in LightEntity ( #132371 )
2024-12-06 20:29:30 +01:00
epenet
0c8ebbe588
Log warning on use of deprecated light constants ( #132387 )
2024-12-06 09:56:28 +01:00
Petar Petrov
c68cadad7a
Improve precision of HSV color conversion ( #130880 )
2024-11-19 22:06:57 +01:00
Jan Bouwhuis
ac6d893758
Correct type hints on MQTT tests ( #128299 )
2024-10-16 13:49:18 +02:00
epenet
02139fcca6
Add missing hass type hint in component tests (l) ( #124220 )
2024-08-19 15:36:23 +02:00
J. Nick Koston
a67b6c5ba6
Avoid recording additional light attributes ( #121776 )
2024-07-12 16:27:50 +02:00
epenet
07f095aa42
Use service_calls fixture in core platform tests [a-l] ( #120904 )
2024-07-01 19:27:50 +02:00
epenet
904cf26d31
Add MockToggleEntity type hints in tests ( #120075 )
2024-06-21 12:32:03 +02:00
epenet
38a6e666a7
Add missing return type to some test functions ( #119665 )
2024-06-14 08:26:45 +02:00
epenet
abb8c58b87
Fix consider-using-tuple pylint warnings in core tests ( #119463 )
2024-06-12 12:35:01 +02:00
epenet
ac588ddc75
Use relative imports in tests [j-r] ( #119282 )
2024-06-10 13:32:31 +02:00
epenet
c7e065c413
Move enable_custom_integrations fixture to decorator ( #118844 )
2024-06-05 09:20:08 +02:00
epenet
7e62061b9a
Improve typing for `calls` fixture in tests (a-l) ( #118349 )
...
* Improve typing for `calls` fixture in tests (a-l)
* More
* More
2024-05-29 09:06:48 +02:00
Michael Hansen
75ab4d2398
Add temperature slot to light turn on intent ( #118321 )
2024-05-28 14:53:49 -04:00
Michael Hansen
7923471b94
Intent target matching and media player enhancements ( #115445 )
...
* Working
* Tests are passing
* Fix climate
* Requested changes from review
2024-05-07 22:01:03 -04:00
Sid
9bf87329da
Enable Ruff FLY002 rule ( #115112 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-04-12 09:04:16 +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
J. Nick Koston
cabc4f797a
Preload storage for integrations we know we are going to setup ( #114192 )
2024-03-25 15:49:54 -10: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
Marc Mueller
efc54971d3
Update empty line formatting after module docstring ( #114040 )
2024-03-23 00:27:57 +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
685468d845
Use `mock_platform` for light entity component tests instead of `hass.components` ( #113845 )
...
* Use `mock_platform` for light entity component tests instead of `hass.components`
* Move pytest_plugins to top
* Fix comment
2024-03-20 01:09:48 +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
soonsouth
cfc2f17f35
Remove repetitive words in comments and docstrings ( #113529 )
...
chore: remove repetitive words
Signed-off-by: soonsouth <cuibuwei@163.com>
2024-03-15 18:11:12 +01:00
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] ( #112737 )
2024-03-08 19:16:21 +01:00
Marc Mueller
1722e23df8
Add empty line after module docstring [tests l-p] ( #112710 )
2024-03-08 14:55:15 +01:00
Erik Montnemery
770e48d512
Simplify color mode logic in Tuya light ( #110327 )
...
* Simplify color mode logic in Tuya light
* Remove exclusion from LightEntity.__should_report_light_issue
* Fix test
2024-03-06 18:28:12 +01:00
puddly
016f2c7581
Improve ZHA group color modes ( #111669 )
...
* Set the color mode based on supported color modes
* Replace `zha` with `tuya` in unit test
2024-02-28 17:20:19 -05:00
Erik Montnemery
1764c031df
Warn when lights violate color mode rules ( #110336 )
...
* Warn when lights violate color mode rules
* Update test
* Remove redundant warning, add tests
* Improve test coverage
2024-02-12 17:43:50 +01:00
Erik Montnemery
4229c35fcd
Improve color mode handling in MockLight ( #109298 )
2024-02-02 09:49:32 +01:00
Erik Montnemery
c3de193e2e
Adjust color_mode checks when lights render effects ( #108737 )
...
* Adjust color_mode checks when lights render effects
* Improve comment
* Avoid calling effect property if light does not support effects
* Fix test
2024-01-24 15:44:45 +01:00
J. Nick Koston
e4a25825d3
Migrate light entity to use contains for LightEntityFeature with deprecation warnings ( #106622 )
2023-12-28 15:45:06 -10:00
Niccolò Maggioni
0232c8dcb0
Add temperature to the light color mode parameter fallbacks ( #86026 )
...
* Add color temperature to the color mode fallbacks
* Manually add ATTR_COLOR_TEMP since ATTR_COLOR_TEMP_KELVIN is pre-parsed
* Include the legacy ATTR_COLOR_TEMP attribute in the tests
* Apply suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add citation for McCamy's approximation formula
If still existing, also see page 3 of https://www.st.com/resource/en/application_note/an5638-how-correlated-color-temperature-is-calculated-by-vd6283-stmicroelectronics.pdf
* Update homeassistant/util/color.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-12-01 08:26:07 +01:00
Erik Montnemery
645f916cf4
Remove support for deprecated light attributes from light scenes ( #104254 )
2023-11-21 07:51:41 +01:00
Erik Montnemery
0304ac5a1b
Fix restore state for light when saved attribute is None ( #103096 )
2023-10-31 10:05:03 +01:00
Erik Montnemery
a6c5927976
Use real devices in light device condition tests ( #102756 )
2023-10-25 09:42:35 +02:00
Erik Montnemery
02a83740cc
Use real devices in light device action tests ( #102722 )
2023-10-24 21:38:24 +00:00
Erik Montnemery
691de148cf
Use real devices in light device trigger tests ( #102689 )
2023-10-24 21:58:37 +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
Franck Nijhof
868a5f377f
Ruff: isort don't split imports based on trailing comma ( #98162 )
2023-08-10 14:27:03 +02:00
Erik Montnemery
433d640071
Use entity registry id in light device actions ( #95271 )
2023-06-26 22:27:19 +02:00
Erik Montnemery
a338e7e242
Use entity registry id in toggle_entity device automations ( #94995 )
...
* Use entity registry id in toggle_entity device automations
* Update tests
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-26 09:59:01 +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
68cf796be8
Speed up entity service calls ( #94731 )
...
* Speed up entity service calls
- Avoid permissions check if the caller is an admin
- Use set intersection instead of linear search of entity platforms to find entities
* tweak
* fix light test to not use an admin user
2023-06-16 21:07:57 -04:00