Commit Graph

336 Commits (aa05f7321066250e82df498fbea1464f5a4536d5)

Author SHA1 Message Date
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
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 2a48159b69
Alexa typing part 6 (state_report) (#97920)
state_report
2023-08-08 15:46:54 +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
Jan Bouwhuis 3f542c47fd
Alexa typing part 4 (capabilities) (#97915)
* capabilities

* hvacmode

* tweaks

* name

* Corrections

* Missed hints

* remove unreachabe code
2023-08-08 11:07:52 +02:00
Jan Bouwhuis d403625e60
Alexa typing part 3 (handlers) (#97912)
handlers
2023-08-07 23:59:56 +02:00
Jan Bouwhuis 5657cfa052
Alexa typing part 2 (#97911)
* Alexa typing part 2

* Update homeassistant/components/alexa/intent.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Missed type hints

* precision

* Follow up comment

* value

* revert abstract class changes

* raise NotImplementedError()

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-08-07 23:26:44 +02:00
Jan Bouwhuis 40a221c923
Alexa typing part 1 (#97909)
* Typing part 1

* mypy

* Correct typing for logbook
2023-08-07 20:36:30 +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
Ville Skyttä ced67e5800
Import `util.dt` as `dt_util` in `components/[a-d]*` (#93756) 2023-05-30 00:02:06 +03:00
Erik Montnemery 937ebb374c
Enable strict type checks of cloud (#92576)
* Enable strict type checks of cloud

* Fix circular import

* Address review comments

* Apply suggestions from code review
2023-05-24 11:46:11 +02:00