Commit Graph

1582 Commits (c5c132e1d49e4e32ba61c33f7655df4506ec0071)

Author SHA1 Message Date
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
epenet 54f709f704
Adjust registry access in intent (#88881) 2023-02-28 21:58:19 -05:00
J. Nick Koston e6c792deed
Add missing kelvin attributes to light recorder platform (#88561) 2023-02-21 14:23:53 -06:00
Erik Montnemery 90d7fb8418
Sort manifests 5 (#87026) 2023-02-08 20:35:25 +01:00
Marc Mueller f7b39aa4a8
Add Self typing (3) [mypy 1.0] (#87600) 2023-02-06 22:30:07 -06: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
Franck Nijhof 8c993116e1
Enable Ruff SIM401 (#86790)
* Enable Ruff SIM401

* Adjust found cases
2023-01-27 13:08:44 +01:00
Michael Hansen ea95abcb30
Use intent responses from home-assistant-intents (#86484)
* Use intent responses from home_assistant_intents

* Use error responses from home_assistant_intents

* Remove speech checks for intent tests (set by conversation now)

* Bump hassil and home-assistant-intents versions

* Use Home Assistant JSON reader when loading intents

* Remove speech checks for light tests (done in agent)

* Add more tests for code coverage

* Add test for reloading on new component

* Add test for non-default response
2023-01-23 22:38:41 -05:00
Franck Nijhof 79b52a2b41
Stricter pylint message control (#86154) 2023-01-20 13:47:55 +01:00
Michael Hansen 5aca996f22
HassTurnOn/Off intents to also handle cover entities (#86206)
* Move entity/area resolution to async_match_states

* Special case for covers in HassTurnOn/Off

* Enable light color/brightness on areas

* Remove async_register from default agent

* Remove CONFIG_SCHEMA from conversation component

* Fix intent tests

* Fix light test

* Move entity/area resolution to async_match_states

* Special case for covers in HassTurnOn/Off

* Enable light color/brightness on areas

* Remove async_register from default agent

* Remove CONFIG_SCHEMA from conversation component

* Fix intent tests

* Fix light test

* Fix humidifier intent handlers

* Remove DATA_CONFIG for conversation

* Copy ServiceIntentHandler code to light

* Add proper errors to humidifier intent handlers
2023-01-19 17:15:01 -06:00
Franck Nijhof cf5fca0464
Code styling tweaks to core entity components (#85460) 2023-01-08 13:40:08 -10:00
GitHub Action b3ab0a0199 [ci skip] Translation update 2022-12-29 00:23:20 +00:00
Franck Nijhof baef267f33
String formatting and max line length - Part 3 (#84394) 2022-12-22 13:35:47 +01:00
Michael Hansen 961c8cc167
Update intent response (#83858)
* Add language to conversation and intent response

* Move language to intent response instead of speech

* Extend intent response for voice MVP

* Add tests for error conditions in conversation/process

* Move intent response type data into "data" field

* Move intent response error message back to speech

* Remove "success" from intent response

* Add id to target in intent response

* target defaults to None

* Update homeassistant/helpers/intent.py

* Fix test

* Return conversation_id and multiple targets

* Clean up git mess

* Fix linting errors

* Fix more async_handle signatures

* Separate conversation_id and IntentResponse

* Add unknown error code

* Add ConversationResult

* Don't set domain on single entity

* Language is required for intent response

* Add partial_action_done

* Default language in almond agent

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-12-13 16:46:40 -06:00
GitHub Action 230b50d099 [ci skip] Translation update 2022-11-29 00:26:01 +00:00
GitHub Action eaf6d43508 [ci skip] Translation update 2022-11-23 00:26:26 +00:00
epenet 7f1e1ed1d8
Enforce LightEntityFeature (#82460) 2022-11-22 07:14:47 +01:00
GitHub Action fe5246fb6f [ci skip] Translation update 2022-11-19 00:26:11 +00:00
epenet dd7bc7971f
Adjust type hints for LightEntityFeature (#82251) 2022-11-17 12:46:42 +01:00
epenet a91abebea8
Use IntFlag for EntityFeature (#81903) 2022-11-16 12:43:17 +01:00
Erik Montnemery 7b247a79cf
Correct min/max mireds for lights which use K for color temp (#79998) 2022-10-10 16:45:38 +03:00
Erik Montnemery 96a8beb29f
Tweak comment in LightEntity (#79750) 2022-10-06 21:17:24 +02:00