Commit Graph
155 Commits
Author SHA1 Message Date
Ville SkyttäandGitHub a598d9f353 Use HTTPStatus instead of HTTP_ consts and magic values in components/a* (#57988) 2021-10-22 14:21:34 +02:00
a679ebcee7 Patch for Alexa percentage_step to precision (#58062)
* speed_step must be an integer and a divider of 100

* use percentage_step in tests to test patch

* test with not supported percentage_step

* undo change in test_capabilities

* Use a default precision of one not percentage_step

* typo 2

* Update tests/components/alexa/test_smart_home.py

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

* Update homeassistant/components/alexa/capabilities.py

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

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-10-20 13:05:11 +02:00
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
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 BouwhuisandGitHub 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
J. Nick KostonandGitHub 4d122fc366 Update alexa lock to support locking, unlocking, jammed (#52841) 2021-07-20 23:21:05 -05:00
Jan BouwhuisandGitHub 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
Paulus SchoutsenandGitHub 5ea2dd8ce3 Alexa: Set Equalizer property to retrievable (#50730) 2021-05-17 09:26:37 +02:00
Erik MontnemeryandGitHub 1230c46e1e Use supported_color_modes in alexa (#49174) 2021-04-14 09:18:49 +02:00
05aeff5591 Describe Google Assistant events (#49141)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-13 09:31:01 -07:00
Paulus SchoutsenandGitHub 2ebca88950 Fix Alexa doorbells (#47257) 2021-03-02 15:13:45 +01:00
Paulus SchoutsenandGitHub 7c2545af6e Use async_capture_events to avoid running in executor (#47111) 2021-02-26 13:28:52 -08:00
J. Nick KostonandGitHub 6707496c5d Update alexa for new fan model (#45836) 2021-02-19 22:45:14 -08:00
Paulus SchoutsenandGitHub 538df17a28 Restore Google/Alexa extra significant change checks (#46335) 2021-02-10 16:30:29 +01:00
Paulus SchoutsenandGitHub 4739e8a207 Limit data sending to Alexa to significant changes (#45563) 2021-01-26 15:48:35 +01:00
Paulus SchoutsenandGitHub 732cf47ff6 Filter some Alexa reports that are duplicate (#45093)
* Filter some Alexa reports that are duplicate

* When state changes during reporting, only report last state, not all state changes
2021-01-13 16:54:54 +01:00
Paulus SchoutsenandGitHub 69b5176730 Make Alexa custom ID unique (#44839)
* Make Alexa custom ID unique

* Lint

* Lint
2021-01-05 17:35:28 +01:00
Franck NijhofandGitHub 65cf2fcb6f Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
ochlocracyandGitHub 178b2d8c22 Update display categories in Alexa (#41626)
* Add new display categories from Alexa Smart Home API

* Update Vacuum entities to use VACUUM_CLEANER category.

* Update Automation entities to use ACTIVITY_TRIGGER category.

* Update tests for Automation entities to use ACTIVITY_TRIGGER category.
2020-10-11 11:09:05 -05:00
springstanandGitHub 6a7caad8dc Use content type json constant (#40312) 2020-09-23 20:21:55 +02:00
Paulus SchoutsenandGitHub ba75856f2b Do not break Alexa sync when encounter bad entity (#39380) 2020-08-30 14:36:00 +02:00
Franck NijhofandGitHub 1c2ebdf307 Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
J. Nick KostonandGitHub 6b7a7939d2 Include the first seen context data in the logbook api (#39194)
* Include the context_entity_id in the logbook api

context_entity_id is the first entity seen during
a time period that includes the context

* update test

* more of them

* include friendly name

* pylint wants a ternary

* Refactor

* performance

* fix homekit context

* Fix self describing events

* Fix external_events
2020-08-24 12:44:40 -05:00
7d77fa92c2 Add mode info attributes to script and automation (#37815)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-07-14 10:47:59 -07:00
Paulus SchoutsenandGitHub 5bc6ed4cef Add logbook platforms (#37078)
* Add logbook platforms

* Fix logbook describe test
2020-06-24 18:14:50 -07:00
Thomas HollsteggeandGitHub 2c7876fa66 Fix alexa flash briefings after removal of api_password auth (#36789) 2020-06-23 08:58:25 -07:00
J. Nick KostonandGitHub 59e43ab6e4 Prefilter more logbook events in sql (#36958)
* Prefilter more logbook events in sql

Prefilter sensor events in _keep_event before humanify

Cache static attribute lookup

Reduces logbook execution time by ~35%

* fix mocking in benchmark

* Update tests for logbook users
2020-06-21 10:50:58 -07:00
J. Nick KostonandGitHub 0a219081ea Only process logbook timestamps for events we will keep (#36792)
* Only process logbook timestamps for events we will keep

Since we group by minute we were previously processing
every timestamp. We can avoid this by making all the
minute checks use the unprocessed datetime since
the groupings will be the same regardless of timezone.

This reduces the number of datetime object recreations
by at least an order of magnitude.
2020-06-15 14:54:20 -05:00
276f3afb00 Do async_setup_platform in background (#36244)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-31 22:18:30 -07:00
Paulus SchoutsenandGitHub 2a86d52dba Alexa media player only include equalizer if supported sound mode (#36285) 2020-05-30 21:42:40 -07:00
QuentameandGitHub 1855c91988 Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const (#36233)
* Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const

* Fix pylint

* Use in tests

* Search for "client_id"

* Fix tests

* Fix test

* Fix test
2020-05-30 17:27:20 +02:00
Franck NijhofandGitHub 2223592486 Add get_url helper, deprecate base_url (#35224) 2020-05-08 02:29:47 +02:00
J. Nick KostonandGitHub 6f6c670b3b Make alexa and google aware of DEVICE_CLASS_GATE (#35103) 2020-05-03 13:29:12 -07:00
Paulus SchoutsenandGitHub 76f392476b Use a future for mock coro (#34989) 2020-04-30 16:31:00 -07:00
ochlocracyandGitHub 0d598dd6d6 Modify requirements for CameraStreamController in Alexa (#34470) 2020-04-21 10:46:56 -07:00
springstanandGitHub 9a40d5b7ed Use HTTP_NOT_FOUND constant (#33835) 2020-04-09 00:57:47 +02:00
Franck NijhofandGitHub 476072927a Collection of random test improvements (#33742) 2020-04-06 10:09:44 -07:00
Franck NijhofandGitHub d33cf28936 Add check executables have shebangs (in pre-commit and CI) (#33703)
* Add check executables have shebangs (in pre-commit and CI)

* Fix file permissions

* Adjust Azure Pipelines
2020-04-05 18:45:43 +02:00
Franck NijhofandGitHub 03dd92d51b Use set literals in tests (#33669) 2020-04-05 02:20:09 +02:00
Franck NijhofandGitHub 906385172a String formatting improvements for tests (#33663) 2020-04-05 00:26:08 +02:00
ochlocracyandGitHub 28a2c9c653 Implement Alexa.CameraStreamController in Alexa (#32772)
* Implement Alexa.CameraStreamController.

* Add dependencies.

* Add camera helpers for image url, and mjpeg url.

* Remove unsupported AlexaPowerController from cameras.

* Refactor camera_stream_url to hass_url

* Declare HLS instead of RTSP.

* Add test for async_get_image_url() and async_get_mpeg_stream_url().

* Sort imports.

* Fix camera.options to camera.stream_options. (#32767)


(cherry picked from commit 9af95e8577)

* Remove URL configuration option for AlexaCameraStreamController.

* Update test_initialize_camera_stream.

* Optimize camera stream configuration.

* Update Tests for optimized camera stream configuration.

* Sort imports.

* Add check for Stream integration.

* Checks and Balances.

* Remove unnecessary camera helpers.

* Return None instead of empty list for camera_stream_configurations().
2020-03-27 21:19:11 -07:00
Thomas HollsteggeandGitHub f3c07a5653 Alexa: Add support for starting and cancelling timers (#32616) 2020-03-09 21:59:06 -07:00
David NielsenandGitHub 988b400a9c Fix TypeError Exception in AlexaSpeaker (#32318)
* alexa/capabilities.py: Fix TypeError Exception

    - Remove division by zero try/catch -- there is no division
    - Handle TypeError exception when current_volume = None
    - Simplify math and return logic

* Add test for Alexa.Speaker's valid volume range
2020-03-09 09:38:31 -07:00
Thomas HollsteggeandGitHub 22b5690607 Alexa: Support vacuums without turn_on/turn_off feature (#32570)
* Alexa: Support vacuums without turn_on/turn_off feature
2020-03-09 11:58:47 -04:00
ochlocracyandGitHub fa4f27f78e Remove AlexaPowerController from device_class garage covers in… (#32607) 2020-03-09 08:25:33 -07:00
Paulus SchoutsenandGitHub 8aea538662 Allow teaching logbook about events (#32444)
* Allow teaching logbook about events

* Use async_add_executor_job

* Fix tests
2020-03-05 11:55:50 -08:00
springstanandGitHub 524a1a7587 Use f-strings in integrations starting with "A" (#32110)
* Use f-strings in integrations starting with A

* Use f-strings in tests for integrations starting with A

* Fix pylint by renaming variable

* Fix nested for loop in f-string for aprs device_tracker

* Break long lines into multiple short lines

* Break long lines into multiple short lines v2
2020-02-23 13:38:05 -08:00
ochlocracyandGitHub 4602d7370c Remove Alexa.InputController from devices without supported inputs in Alexa (#31450)
* Yield Alexa.InputController only for supported inputs.

* Add Comment.

* Comment fix.
2020-02-03 16:19:40 -08:00
ochlocracyandGitHub c8d9b83b24 Update StepSpeaker and Speaker interfaces in Alexa (#31444)
* Yield only one Speaker interface.

* Yield PowerController only is supported.

* Revert "Yield PowerController only is supported."

This reverts commit c0dbf7e4

* Add Alexa.Speaker interface properties.

* Refactor tests for Alexa.Speaker and Alexa.StepSpeaker.

* Code Smell Change.

* Fix R1705: Unnecessary "elif" after "return".
2020-02-03 14:20:39 -08:00
ochlocracyandGitHub e796de6c59 Filter int in fan speed_list when yielding RangeController in Alexa (#31375)
* Allow for int in fan speed_list.

* Test for int in fan speed_list.

* prevent yielding preset for int labels.
2020-02-01 16:44:40 -08:00