Commit graph

306 commits

Author SHA1 Message Date
Erik Montnemery
ae127e7687
Change light white service call attribute to accept True () 2023-03-16 23:02:56 -04:00
J. Nick Koston
1c57339ec3
Refactor recorder tests to use recorder history API () 2023-03-11 21:51:16 -05:00
J. Nick Koston
e6c792deed
Add missing kelvin attributes to light recorder platform () 2023-02-21 14:23:53 -06:00
Erik Montnemery
9989a4787b
Fix recorder platform tests () 2023-02-17 08:22:15 -06:00
Franck Nijhof
ed79265843
Enable Ruff PT006 ()
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
ea11a30a35
Add type hints to integration tests (part 13) () 2023-02-13 14:38:37 +01:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const ()
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Franck Nijhof
51a9f65a01
Clean up unnecessary registry mocks from Core tests () 2023-02-08 13:28:44 -06:00
epenet
f75ac17554
Add type hints to integration tests (j-m) () 2023-02-08 19:06:59 +01:00
epenet
4142f0d15d
Add return type to tests without arguments ()
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +01:00
epenet
aa00114c2f
Add return type to async tests without arguments () 2023-02-07 10:26:56 +01:00
Michael Hansen
ea95abcb30
Use intent responses from home-assistant-intents ()
* 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
Michael Hansen
5aca996f22
HassTurnOn/Off intents to also handle cover entities ()
* 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
Michael Hansen
ecaec0332d
Hassil intents ()
* Add hassil to requirements

* Add intent sentences

* Update sentences

* Use hassil to recognize intents in conversation

* Fix tests

* Bump hassil due to dependency conflict

* Add dataclasses-json package contraints

* Bump hassil (removes dataclasses-json dependency)

* Remove climate sentences until intents are supported

* Move I/O outside event loop

* Bump hassil to 0.2.3

* Fix light tests

* Handle areas in intents

* Clean up code according to suggestions

* Remove sentences from repo

* Use home-assistant-intents package

* Apply suggestions from code review

* Flake8

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-01-07 16:20:21 -05:00
Erik Montnemery
31a787558f
Ensure recorder test fixture is setup before hass fixture ()
* Ensure recorder test fixture is setup before hass fixture

* Adjust more tests
2022-10-19 07:58:47 +02:00
Erik Montnemery
7b247a79cf
Correct min/max mireds for lights which use K for color temp () 2022-10-10 16:45:38 +03:00
Erik Montnemery
2ee6ea9877
Adapt group to color temperature in K ()
* Adapt group to color temperature in K

* Adjust tests

* Adjust tests
2022-10-10 14:57:22 +02:00
Erik Montnemery
47d0598e75
Use Kelvin as the preferred color temperature unit ()
* Use Kelvin as the preferred white temperature unit

* Update homekit

* Adjust tests
2022-10-06 12:22:39 +02:00
Erik Montnemery
60c8d95a77
Remove white_value support from light () 2022-08-18 08:21:05 -04:00
Erik Montnemery
5f2b4001f3
Separate recorder database schema from other classes ()
* Separate recorder database schema from other classes

* fix logbook imports

* migrate new tests

* few more

* last one

* fix merge

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-06-07 14:41:43 +02:00
Franck Nijhof
69e622b327
Clean up accessing intent helpers via hass () 2022-05-17 20:33:51 +02:00
Erik Montnemery
573e966d74
Migrate hue v1 light to color_mode ()
* Migrate hue v1 light to color_mode

* Fix test

* Correct filter_supported_color_modes + add test

* Use ColorMode enum
2022-04-28 09:49:51 +02:00
Erik Montnemery
28ba572d9d
Only apply color from light profile if no color specified () 2022-04-25 07:56:07 -07:00
Erik Montnemery
28ebab9c5a
Simplify waiting for recorder in tests () 2022-04-25 12:04:47 +02:00
Erik Montnemery
982e314de6
Use recorder_mock in tests ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-04-22 19:29:44 -10:00
Erik Montnemery
5e50a8abd5
Mark device triggers from hidden or auxiliary entities as secondary ()
* Mark device triggers from hidden or auxiliary entities as secondary

* Update tests
2022-04-21 08:01:32 +02:00
Erik Montnemery
150f173eed
Mark device conditions from hidden or auxiliary entities as secondary () 2022-04-20 21:41:59 +02:00
Erik Montnemery
64381acbaf
Mark device actions from hidden or auxiliary entities as secondary () 2022-04-20 10:48:46 -07:00
Franck Nijhof
27bc5e1d74
Add ColorMode enum to light platform () 2022-04-11 18:18:29 +02:00
J. Nick Koston
5b874ce6e8
Exclude static light attributes from being recorded in the database () 2022-04-03 06:13:03 -06:00
Franck Nijhof
ea148a1b8e
Add EntityFeature enum to Light ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-04-02 20:57:01 -07:00
Franck Nijhof
8aff8d89d2
Clean up async_reproduce_state helper usage () 2022-03-24 14:40:54 +01:00
J. Nick Koston
26ff6d2aa0
Fix warm/cold reversal in rgbww_to_color_temperature () 2022-02-04 11:36:30 -08:00
Erik Montnemery
513d6cc467
Change value of device_automation constant ()
* Change value of constant CONF_CHANGED_STATES

* Adjust tests
2022-01-17 16:34:40 +01:00
Erik Montnemery
e9b746e874
Add turned on or off device trigger to toggle entity ()
* Add turned on or off device trigger to toggle entity

* Renamed changed_states trigger to toggled

* Adjust tests

* Fix homekit triggers test

* Add tests

* Adjust tests after rebase

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-01-03 10:41:30 +01:00
Ville Skyttä
9b437ef146
Remaining DeviceAutomationType bits ()
* Use DeviceAutomationType in missed tests/components/*

* Tighten device automation type hints
2021-12-21 20:05:48 +02:00
Ville Skyttä
c5e6489475
Use DeviceAutomationType in tests/components/[h-l]* () 2021-12-20 22:18:53 +01:00
J. Nick Koston
94ae6ac2b2
Handle color temp to RGBWW conversion ()
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-12-16 05:39:33 -06:00
Franck Nijhof
cf371ea8dd
Remove deprecated base entity classes ()
* Remove deprecated base entity classes

* Clean up tests
2021-12-05 13:53:52 +01:00
Erik Montnemery
85786fd987
Make some device action tests more explicit ()
* Make some device action tests more explicit

* Adjust tests
2021-11-11 12:32:51 +01:00
Erik Montnemery
72d7817dbf
Update light turn_on schema to coerce colors to tuple before asserting sequence type ()
* Make color_name_to_rgb return a tuple

* Tweak

* Tweak

* Update test

* Tweak test
2021-10-29 15:51:14 +02:00
Erik Montnemery
39867c9b83
Convert RGBW and RGBWW colors in light turn_on calls () 2021-10-29 15:48:11 +02:00
J. Nick Koston
e6e8d7eded
Convert color temperature to visible color in lights () 2021-08-25 21:56:36 +02:00
Paulus Schoutsen
370799bd22
Revert "Improve light scene support for white mode ()" ()
This reverts commit 6ffe0f6405.
2021-07-30 21:10:32 -07:00
Erik Montnemery
6ffe0f6405
Improve light scene support for white mode () 2021-07-30 12:47:26 -07:00
Erik Montnemery
87813ea991
Tweak light.valid_supported_color_modes () 2021-06-09 12:53:08 +02:00
Erik Montnemery
443463e19d
Emulate color_temp for lights which support color or white ()
* Emulate color_temp for lights which support color or white

* Support legacy lights

* Tidy up group.light code

* Improve color_temp to white conversion

* Remove color_temp to white conversion

* Add test

* Tweak deconz test
2021-06-09 11:23:01 +02:00
Erik Montnemery
67f3e717a8
Add support for color_mode white to tasmota light () 2021-06-08 17:43:04 +02:00
Erik Montnemery
e560e623e9
Add color_mode white ()
* Add color_mode white

* Include brightness in white parameter

* Reformat

* Improve test coverage
2021-06-06 11:13:18 +02:00
Erik Montnemery
154c849eac
Filter unsupported parameters from light service calls ()
* Filter unsupported parameters from light service calls

* Silence pylint

* Fix deconz tests

* Fix mqtt tests

* Fix scene tests

* Fix trådfri emulated CT

* Fix mqtt tests
2021-05-26 08:02:59 +02:00