Commit Graph

349 Commits (b1a540a772c83ea3d434e3ff578dc59330eb11f4)

Author SHA1 Message Date
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
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
spongebobberts 9b9e98a26e
Fix typo in Alexa resources docstring (#124388)
Fixed typo in Alexa resources docstring
2024-08-22 09:05:13 +02:00
Jan Bouwhuis aee1be1e64
Use `elif` in alexa handlers code to avoid additional checks (#123853) 2024-08-14 21:47:47 +02:00
Erik Montnemery 5fb6c65d23
Remove unnecessary assignment of Template.hass from alexa (#123699) 2024-08-12 17:01:31 +02:00
epenet 0bb8c4832d
Enable raise-within-try (TRY301) rule in ruff (#123351) 2024-08-12 09:16:33 +02:00
Franck Nijhof d24a87145d
Mark Alexa integration as system type (#123232) 2024-08-06 13:18:22 +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 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
Marc Mueller ca55986057
Import Generator from collections.abc (1) (#120914) 2024-07-01 11:51:51 +02:00
Marc Mueller fe21e2b8ba
Import Generator from typing_extensions (1) (#118986) 2024-06-06 17:02:13 +02:00
Sid c2b3bf3fb9
Enable Ruff RET502 (#115139) 2024-05-21 22:19:33 +02:00
Sid 2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Marc Mueller 14e19c6d9c
Remove unnecessary type ignores (#116036) 2024-04-23 17:32:21 +02:00
Martin Hjelmare 47f0d5ed1f
Add script to compare alexa locales with upstream (#114247)
* Add script to compare alexa locales with upstream

* Use a function in script

* Add test base

* Complete output assertion

* Add type annotation

* Add note to docstring

* Update script call example

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

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-04-18 13:41:34 +02:00
Marc Hörsken e08301f362
Move Alexa entity id generation into abstract config class (#115593)
This makes it possible to change the id schema in implementations.
2024-04-14 23:11:42 +02:00
J. Nick Koston ca5ed274cb
Deprecate calling async_listen and async_listen_once with run_immediately (#115169) 2024-04-08 10:07:54 -10:00
Sid 9cbed10372
Enable Ruff PYI041 (#115229) 2024-04-08 09:29:05 -10: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 a5b609f081
Enable ruff TRY401 (#114395)
* Enable ruff TRY401

* fix tests
2024-03-29 07:20:36 +01:00
Marc Mueller 81c34ac952
Fix spelling [docstrings + comments] (#114168) 2024-03-25 11:33:00 +01:00
Sid 82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Sid 0b9c9aff62
Add ruff rules PIE790, PIE794, PIE807, PIE810 (#113617) 2024-03-16 11:04:58 -10:00
Joost Lekkerkerker 690ba103ed
Improve lists in integrations [A] (#113006)
* Use list comprehension [A]

* Use list comprehension [A]

* Update homeassistant/components/aws/notify.py
2024-03-11 16:17:44 +01:00
Marc Mueller aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller 2c06d4fcb9
Add empty line after module docstring (2) [components] (#112736) 2024-03-08 19:15:59 +01:00
Marc Mueller ff3a801936
Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00
Marc Mueller f3594c543d
Use KEY_HASS [a-g] (#112609) 2024-03-07 18:09:20 +01:00
Erik Montnemery b7284b92ac
Clean up Alexa when logging out from cloud (#109738)
* Clean up Alexa when logging out from cloud

* Add test
2024-02-05 23:58:34 +01:00
Marc Mueller c82933175d
Use builtin TimeoutError [a-d] (#109678) 2024-02-05 11:31:33 +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 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
Franck Nijhof 6a3c422d2f
Improve Amazon Alexa endpoint validation (#105287)
* Improve Amazon Alexa endpoint validation

* Add source comment

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2023-12-10 13:38:10 +01:00
Jan Bouwhuis 5c72d3c2d8
Restore removed guard for non-string inputs in Alexa (#104263) 2023-11-21 07:59:39 +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
Erik Montnemery 51576b7214
Improve typing of entity.entity_sources (#99407)
* Improve typing of entity.entity_sources

* Calculate entity info source when generating WS response

* Adjust typing

* Update tests
2023-09-12 20:41:26 +02:00
J. Nick Koston 0fe88d60ac
Guard expensive debug logging with isEnabledFor in alexa (#100137) 2023-09-11 11:39:10 -05: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
J. Nick Koston 262483f3f6
Replace async_timeout with asyncio.timeout A-B (#98415) 2023-08-15 10:29:28 +02:00