Commit Graph

1603 Commits (37c55d81e38d9e3359af2d8bec7dcc51fd682721)

Author SHA1 Message Date
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 b456d97e65
Replace pylint protected-access with Ruff SLF001 (#115735) 2024-05-06 20:33:26 +02:00
Sid 223fefbbfa
Enable Ruff RUF018 (#115485) 2024-04-13 09:56:33 +02:00
Sid 0d66d298ec
Enable Ruff RET504 (#114528)
* Enable Ruff RET504

* fix test

* Use noqa instead of cast

* fix sonos RET504

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
Marc Mueller 816ce116bf
Remove unnecessary functools.cached_property backport (#114239) 2024-04-04 11:24:26 +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 900e0c07bf
Load light profiles in a task to avoid delaying platform setup (#114038) 2024-03-23 10:51:03 +01:00
Sid ccd2e989c3
Enable ruff RUF005 and fix occurrences (#113589) 2024-03-16 07:37:20 -10:00
J. Nick Koston b26928878f
Remove group integration platforms that use the default states (#113562)
Remove group integration platforms that use the default

There is no need to register platforms that use the defaults
as the group code already uses STATE_ON/STATE_OFF when there
are no on/off states in the GroupIntegrationRegistry
2024-03-15 20:51:21 -04:00
J. Nick Koston c3b5e819c5
Fix group loading too late resulting in incorrect state (#113262) 2024-03-13 19:18:15 -10:00
Marc Mueller aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller 59a6035d3f
Add empty line after module docstring [j-m] (#112700) 2024-03-08 09:01:29 -05: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 6bd7a74fab
Update list of integrations known to violate color mode rules (#111647) 2024-02-27 18:17:26 +01:00
Martin Hjelmare 058eec114b
Freeze light profiles for further development (#110946) 2024-02-19 16:02:27 +01: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 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
Erik Montnemery 8fa93f6fe5
Bump comments in light indicating backwards compatibility plan (#108770) 2024-01-24 13:49:26 +01:00
Franck Nijhof 2a58b6e56b
Add light icon translations (#108414) 2024-01-20 08:35:49 +01:00
J. Nick Koston 3f1263a533
Refactor light platform to avoid duplicate property calls (#106857) 2024-01-02 12:49:53 +01:00
J. Nick Koston 7702f971fb
Use built-in set methods for light supported checks (#106625) 2023-12-29 08:37:44 +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
J. Nick Koston 3d9fc8ed77
Add support for attribute caching to the light platform (#106260) 2023-12-23 08:04:30 -10:00
Erik Montnemery 104bcc64b7
Allow inheriting base component entity descriptions in frozen dataclasses (#105512)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-15 23:33:50 -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
schelv 31cab5803c
Add Option For Kelvin Unit To Color Temperature Selector (#103799) 2023-11-29 12:25:06 +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
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 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
Andy Barratt 6c573953e3
Update Light flash description (#98252)
* Update Light flash description

`light.turn_on` service description for the `flash` option gave the impression of a boolean value being required when in fact a string of either `short` or `long` was required.  Updated this to match the documentation found at https://www.home-assistant.io/integrations/light

`light.turn_off` also described the existence of a `flash` option when none exists.  I've removed this, which matches the aforementioned documentation too.

* Revert removal of flash from turn-off

As discussed in feedback, turn-off does indeed seem to support flash.
2023-08-16 10:06:37 +02:00
Sam Reed 45d4c307de
Hyphenate "human-readable" in light service description (#98057) 2023-08-08 19:43:09 +02:00
Franck Nijhof 30058297cf
Migrate backported StrEnum to built-in StrEnum (#97101) 2023-07-23 23:19:24 +02:00
Marc Mueller 77f38e33e5
Import names from typing instead of typing_extensions [3.11] (#97065) 2023-07-22 17:03:44 -05: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 f054de0ad5
Add support for service translations (#95984) 2023-07-11 15:52:12 +02:00
Jan Bouwhuis 7eb087a9d7
Use common string references for device_automation translations (#95897) 2023-07-10 12:56:51 +02:00
Erik Montnemery 86a397720f
Move platform_integration_no_support issue to the homeassistant integration (#95927)
* Move platform_integration_no_support issue to the homeassistant integration

* Update test

* Improve repair text

* Update test
2023-07-07 13:31:54 +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
G Johansson c6feb30c31
Raise issue "does not support platform setup" (#93585)
* Raise issue on platform missing

* Modify issue

* Remove deprecation

* Fix strings

* Strings

* Last strings

* strings to common
2023-05-28 21:53:32 +02:00
epenet bdf29b594f
Replace comments with docstring in ColorMode enum (#90408) 2023-03-28 16:32:39 +02:00
Franck Nijhof d106cb48d2
Add state attribute translations for light (#89818)
* Add state attribute translations for light

* Process review comments
2023-03-17 20:35:25 -04:00
Franck Nijhof b1a3bfb298
Drop flake8 in favor of Ruff (#89863) 2023-03-17 13:30:06 +01:00
Erik Montnemery ae127e7687
Change light white service call attribute to accept True (#89803) 2023-03-16 23:02:56 -04:00
Franck Nijhof f9919bb7cf
Add pre-defined entity name translations (#89792) 2023-03-16 21:10:20 +01:00
Erik Montnemery 9384ec18f8
Add filters to climate and light service descriptions (#86162)
* Add filters to climate and light service descriptions

* Allow specifying enums directly

* Update service descriptions

* Adjust test

* Cache entity features

* Lint

* Improve error handling, add list of known base components

* Don't allow specifying an entity feature as int
2023-03-16 15:59:51 +01:00
Franck Nijhof f32b7859b8
Restructure translations for entity components (#89702) 2023-03-16 12:16:08 +01:00