Commit graph

245 commits

Author SHA1 Message Date
G Johansson
93aade6e8e
Change lock state to an enum (#126379)
* Add new LockState enum for lock states

* Add rest

* Fix insteon tests

* Fix mqtt tests

* Fix tesla_fleet

* Revert back ST_STATE_LOCKED

* Add back constant
2024-09-24 12:30:50 +02:00
Jan Bouwhuis
5550b1a74e
Only support remote activity on Alexa if feature is set and at least one feature is in the activity_list (#124567)
Only support remote activity on Alexa if feaure is set and at least one feature is in the activity_list
2024-08-25 15:09:08 +02:00
epenet
9b11aaf1eb
Add missing hass type hint in alexa tests (#124064)
* Add missing hass type hint in alexa tests

* One more
2024-08-16 19:00:44 +02:00
epenet
3e967700fd
Add missing return type in test __init__ method (part 2) (#123939)
* Add missing return type in test __init__ method (part 2)

* Adjust

* One more

* One more

* More
2024-08-14 17:59:15 +02:00
epenet
178482068d
Add missing return type in test __init__ method (part 3) (#123940) 2024-08-14 17:38:30 +02:00
Jan Bouwhuis
3111951757
Fix alexa does to check current_position correctly when handling cover range changes (#121798) 2024-07-13 16:10:09 +02:00
CrazyMan2000
9120115577
Split media player select input test (#121633) 2024-07-09 23:28:41 +02:00
Jan Bouwhuis
805d4fcc40
Do not use curr as abbreviation in alexa tests and remove conditions (#121627) 2024-07-09 22:58:22 +02:00
CrazyMan2000
e44f00cf7c
Add alexa remote support (#120878)
* Updated the AlexaModeController to support the remote domain. Also added an alexa entitiy adapter for the remote domain.

* Fixed copy paste mistake.

* Fixed power state for remove domain.

* Updated the CapabilityResource to support labels with the corresponding locale. This local is read from the users config.

* Add the alexa display category 'REMOTE' and use it for the remote capability.

* Revert "Updated the CapabilityResource to support labels with the corresponding locale. This local is read from the users config."

This reverts commit fbdf37904a.

* Fix error when the remote does not have an activtiy list.

* Add tests for the state report of a remote entity.

* Add a test for alexas set mode directive for a remote entitiy.

* Add a test for alexas TurnOn and TurnOff directives for a remote entity.

* Apply suggestions from code review

Fix copy paste mistakes.

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Improve attribute name as suggested.

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Add test case with zero and one activity.

* Add a comment why we use the mode controller instead of the input controller.

* Add test to check of the discovery returns all required interfaces for a remote entitiy.

* Tweak comment

* Add line breaks to fix max allowed chars per line.

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-07-09 18:03:47 +02:00
epenet
fb1b0058ee
Fix consider-using-tuple pylint warnings in component tests (#119464)
* Fix consider-using-tuple pylint warnings in component tests

* Apply su

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2024-06-12 15:50:27 +02:00
epenet
6bb9011db3
Fix use-implicit-booleaness-not-len warnings in tests (#119407) 2024-06-11 17:57:58 +02:00
Sid
721b2c2ca8
Enable Ruff PT012 (#113957) 2024-06-08 17:59:08 +02:00
epenet
a59621bf9e
Add more type hints to pylint plugin (#118319) 2024-05-28 18:37:38 +02:00
Sid
895f73d8e4
Enable Ruff A001 (#115654) 2024-04-21 23:25:27 +02:00
J. Nick Koston
5630b3611d
Add an event filter to the alexa state report state change listener (#115076)
Co-authored-by: jbouwh <jan@jbsoft.nl>
2024-04-07 03:14:18 -10: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
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
Jan-Philipp Benecke
681705394d
Remove deprecated hass.components from network helper function (#113615)
* Remove deprecated `hass.components` from network helper function

* Remove deprecated use of `hass.components` in alexa camera tests
2024-03-17 17:42:48 +01:00
Sid
27e844e3bf
Add ruff B005, B015, B032 and fix occurrences (#113543)
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-15 17:48:37 -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
38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
J. Nick Koston
f3a9756f81
Avoid waiting for integration platforms in the parent integration (#112467) 2024-03-05 21:16:42 -10:00
Jan Bouwhuis
712ba2fdca
Add alexa PowerController on enabled features for climate entities (#109174)
Depend alexa PowerController on enabled features for climate entities
2024-01-30 20:38:32 -05:00
Jan Bouwhuis
a90d8b6a0c
Stabilize alexa discovery (#108787) 2024-01-24 18:56:21 +01:00
J. Nick Koston
c399cab427
Small speed up to checking core state (#107845) 2024-01-18 08:41:32 -10:00
Jan Bouwhuis
de9bb20135
Fix invalid alexa climate or water_heater state report with double listed targetSetpoint (#107673) 2024-01-10 16:23:42 +01:00
Jan Bouwhuis
5bdcbc4e8b
Redact sensitive data in alexa debug logging (#107676)
* Redact sensitive data in alexa debug logging

* Add wrappers to diagnostics module

* Test http api log is redacted
2024-01-10 16:20:47 +01:00
Jan Bouwhuis
f536bc1d0c
Add valve support to Amazon Alexa (#106053)
Add valve platform to Amazon Alexa
2023-12-22 12:08:06 +01:00
Jan Bouwhuis
93c800c4e8
Add water_heater to alexa (#106011)
* Add water_heater support to alexa

* Improve test coverage

* Follow up comments
2023-12-20 16:48:02 +01:00
Jan Bouwhuis
a7155b154e
Fix alexa calling not featured cover services (#105444)
* Fix alexa calls not supported cover services

* Follow up comment and additional tests
2023-12-10 17:27:01 +01:00
Jan Bouwhuis
5c72d3c2d8
Restore removed guard for non-string inputs in Alexa (#104263) 2023-11-21 07:59:39 +01:00
Franck Nijhof
04e0e2bd75
Update a* tests to use device & entity registry fixtures (#103711) 2023-11-09 20:46:20 +01:00
Jan Bouwhuis
6372bc3aaa
Fix missed case alexa light attr can be None (#102612)
* Fix missed cased alexa light attr can be None

* Add test
2023-10-24 00:20:03 +02:00
Jan Bouwhuis
c2abc3dcec
Fix brightness and color_temp can be None for alexa light entities (#102554)
* Fix brightness and color_temp can be None in alexa

* Add test
2023-10-22 23:34:04 +02:00
Jan Bouwhuis
7c7456df99
Handle alexa invalid climate temp adjustment (#99740)
* Handle temp adjust when target state not set

* Update homeassistant/components/alexa/errors.py

Co-authored-by: Robert Resch <robert@resch.dev>

* black

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2023-09-06 18:54:16 +02:00
Ville Skyttä
3b4774d9ed
Remove unnnecessary pylint configs from components/[a-d]* (#98911) 2023-08-24 00:54:02 +02:00
Jan Bouwhuis
fa6ffd994a
Update vacuum entity constants for Alexa tests (#98336)
* Update vacuum entity constants for Alexa tests

* Import VacuumEntityFeature
2023-08-13 15:35:00 +02:00
Jan Bouwhuis
b872d74b1f
Fix lingering test alexa (#98128) 2023-08-10 12:16:52 +02:00
Jan Bouwhuis
0614702f98
Alexa typing part 5 (smart_home) (#97918)
* smart_home

* Fix test_disabled

* Remove unused type ignore
2023-08-08 11:48:50 +02:00
Marc Mueller
cf4287cd0c
Fix alexa test RuntimeWarning (#97956) 2023-08-07 12:57:37 +02:00
Jan Bouwhuis
2e8e5aabae
Refactor alexa modules to avoid circular deps (#97618)
* Refactor alexa modules to avoid circula deps

* Add test http api auth and AlexaConfig

* Update test

* Improve test
2023-08-05 21:32:53 +02:00
Jan Bouwhuis
3183ce7608
Add doorbell event support to alexa (#97092) 2023-07-23 20:16:46 +02:00
Mike Keesey
44aa531a51
Alexa temperature adjustment handle multiple setpoint (#95821)
* Alexa temperature adjustment handle multiple setpoint

In "auto" mode with many thermostats, the thermostats expose both an
upper and lower setpoint representing a range of temperatures. When a
temperature delta is sent from Alexa (e.g. "lower by 2 degrees), we need
to handle the case where the temperature property is not set, but
instead the upper and lower setpoint properties are set. In this case,
we adjust those properties via service call instead of the singular
value.

* Updating tests to fix coverage
2023-07-18 01:12:15 +02:00
Flo
0f2caf864a
Alexa Intent: Use the 'id' field and expose nearest resolutions as variables (#86709)
* Use the 'id' field and nearest resolutions
Expose nearest Resolution (ID and Value) as Variables

* Add more specific type hints

* Change type definition of request

* Add deprecation warning and remove variables

* Remove deprecation warning & update tests

* Fix wrong value assignment

* revert future changes
2023-05-10 21:25:08 +02:00
Erik Montnemery
7d29d584fd
Fix race in Alexa async_enable_proactive_mode (#92785) 2023-05-09 19:58:00 +02:00
Erik Montnemery
0126cfa9d9
Allow exposing any entity to the default conversation agent (#92398)
* Allow exposing any entity to the default conversation agent

* Tweak

* Fix race, update tests

* Update tests
2023-05-03 09:45:54 -04:00
Erik Montnemery
4860a8d1e8
Don't use storage collection helper in ExposedEntities (#92396)
* Don't use storage collection helper in ExposedEntities

* Fix tests
2023-05-03 12:39:22 +02:00
Erik Montnemery
e3c16e634b
Allow exposing entities not in the entity registry to assistants (#92363) 2023-05-02 22:08:09 +02:00
J. Nick Koston
99b58f157e
Bump PyJWT to 2.6.0 (#90134)
* Bump PyJWT to 2.6.0

* fix time being frozen too late which makes the access token creation time in the future

* revert zha change

* fix repairs test

* fix ical test
2023-03-22 20:00:47 -04:00
Franck Nijhof
ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00