96 Commits

Author SHA1 Message Date
epenet
d02bceb6f3
Migrate alexa color_temp handlers to use Kelvin (#132995) 2024-12-12 21:17:31 +01:00
Jan Bouwhuis
3a7fc15656
Add Dutch locale on supported Alexa interfaces (#132936) 2024-12-11 19:01:20 +01:00
epenet
b1217f5792
Use ATTR_COLOR_TEMP_KELVIN in alexa (#132733) 2024-12-09 18:01:24 +01:00
Jan Bouwhuis
d790a2d74c
Allow Alexa to stop a cover (#130846)
* Allow Alexa to stop a cover

* Fix tests

* Update tests/components/alexa/test_smart_home.py

Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>

---------

Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
2024-11-24 17:11:56 +01:00
Nathan Spencer
eda36512ec
Change alexa arm handler to allow switching arm states unless in armed_away mode (#129701)
* Change alexa arm handler to allow switching arm states unless in armed_away mode

* Address PR comments
2024-11-04 07:49:48 +01:00
G Johansson
cdfec7ebb4
Implement new state property for alarm_control_panel which is using an enum (#126283)
* Alarm state from enum

* Fixes

* Set final

* Fix rebase

* Test const

* Fix breaking version

* Fix other for alarm_control_panel

* Fix integrations

* More

* More

* More

* More

* Fix zha

* Replace _attr_state

* Fix alarm_control_panel

* Fix tests

* Fixes

* Mods

* Change some

* More

* More

* More

* Tests

* Last tests

* Return enum

* Fix zha

* Remove not needed check

* Fix wording

* Fix homekit

* Mod prometheus

* Fix mypy

* Fix homekit

* Fix ifttt
2024-10-21 22:54:27 +02:00
Jan Bouwhuis
aee1be1e64
Use elif in alexa handlers code to avoid additional checks (#123853) 2024-08-14 21:47:47 +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
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 fbdf37904a3e613f4d3107a1b176fdfe6c9429bf.

* 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
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Sid
a5b609f081
Enable ruff TRY401 (#114395)
* Enable ruff TRY401

* fix tests
2024-03-29 07:20:36 +01:00
Marc Mueller
ff3a801936
Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01: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
Jan Bouwhuis
c725238c20
Fix alexa fails reporting the state in specific cases (#108743)
* Fix alexa fails reporting the state in specific cases

* More cases
2024-01-23 23:36:44 +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
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
Marco Ranieri
54223fe06c
Enable Alexa Unlock directive (#97127)
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2023-08-14 17:47:50 +02:00
Jan Bouwhuis
500d9a4da0
Alexa strict type hints (#97485)
* Enable strict typing

* Adjustments for stict typing
2023-08-08 17:15:25 +02:00
Jan Bouwhuis
d403625e60
Alexa typing part 3 (handlers) (#97912)
handlers
2023-08-07 23:59:56 +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
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
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
Jan Bouwhuis
f182e314e5
Add number platform support to Alexa (#86553)
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
2023-01-25 13:34:53 +01:00
Franck Nijhof
91aaca6471
Code styling tweaks to the Alexa integration (#86121) 2023-01-18 01:01:30 +02:00
Franck Nijhof
b0cee0bc46
String formatting and max line length - Part 1 (#84390)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-12-22 10:12:50 +01:00
epenet
91d6d620c2
Use new unit enums in alexa (#83409)
* Use new unit enums in alexa

* Adjust for mypy
2022-12-06 17:31:40 +01:00
Jan Bouwhuis
fcccc44ccb
Cleanup unused AlexaPercentageController code (#82880) 2022-11-29 10:06:53 +01:00
Jan Bouwhuis
5d4c4a1293
Add humidifier support for Alexa (#81329) 2022-11-28 09:55:22 -10:00
epenet
825f9502ad
Align temperature conversion with other converters (#79521)
* Align temperature conversion with other converters

* Add comments and docstring

* Align tests
2022-10-03 10:09:55 +02:00
epenet
24c26dc032
Use unit_conversion in components (#79204)
* Use unit_conversion in components

* Two more
2022-09-28 16:05:31 +02:00
epenet
416a5cb279
Import constants from component root (#78395) 2022-09-14 00:12:54 +02:00
epenet
89729b2c49
Improve Registry typing in Alexa handlers (#75921) 2022-08-01 00:39:38 +02:00
epenet
4f494a876e
Use EntityFeature enums in alexa (#69570) 2022-04-07 14:46:50 +02:00
Marc Mueller
ec980a574b
Improve typing [util.decorator] (#67087) 2022-02-23 20:58:42 +01:00
Paulus Schoutsen
bf138c4ffb
Alexa to handle brightness and catch exceptions (#65322) 2022-01-31 15:01:46 -08:00
Franck Nijhof
99b2161365
Add input_button support to Alexa (#62592) 2021-12-23 07:36:45 +01:00
Franck Nijhof
7a0ff4e2e1
Add button support to Alexa (#60163) 2021-11-23 08:19:13 -08:00
Marc Mueller
2b72b7b7b9
Use assignment expressions 09 (#57790) 2021-10-17 20:19:56 +02:00
Marc Mueller
5048bad050
Use assignment expressions 05 (#57785) 2021-10-17 19:56:00 +02:00
Jan Bouwhuis
e73ca9bd18
Alexa fix Fan support and cleanup (#56053)
* del PowerLevelController, ena fan PowerController

* Use AlexaRangeContoller for speed or default

* Update tests

* no-else-return

* Avoid cases with only one preset_mode

* Only report ghost_mode to Alexa - fix bug

* Add some tests for patched code

* pylint

* pylint and tests with one preset_mode

* correct ghost preset mode check in test

* add tests for RangeController

* ghost preset_mode locale agnostic

* isort

* Update homeassistant/components/alexa/capabilities.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/alexa/entities.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/alexa/entities.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/alexa/entities.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/alexa/entities.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update entities.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-09-24 08:14:45 +02:00
Elliot Morales Solé
097fae0348
Correct Alexa scene activation (#56469)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-09-20 22:51:17 -07:00
Jan Bouwhuis
755835ee2e
Alexa - Remove legacy speed support for fan platform (#55174)
* Remove legacy fan speed support

* remove fan range controller tests

* retrigger tests
2021-09-06 10:19:57 +02:00
Jan Bouwhuis
7403ba1e81
Alexa fan preset_mode support (#50466)
* fan preset_modes

* process preset mode updates from alexa correctly

* add tests

* codecov patch additional tests
2021-05-31 20:58:01 +02:00
Erik Montnemery
4d428b87cb
Remove incorrect check in Alexa for SERVICE_ALARM_DISARM fail (#51224) 2021-05-29 14:06:02 +02:00
Marc Mueller
f1d48ddfe3
Update pylint to 2.8.0 (#49637) 2021-04-24 14:39:24 -10:00