Commit Graph

64 Commits (66494b0238b8dc8ab3f2671fc126c172a91de2fc)

Author SHA1 Message Date
Jan Bouwhuis 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
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
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
Milan Meulemans 020759d01d
Activate mypy for Alexa (#54042) 2021-08-10 10:46:33 +02:00
J. Nick Koston 4d122fc366
Update alexa lock to support locking, unlocking, jammed (#52841) 2021-07-20 23:21:05 -05: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
Shay Levy cf228e3fe5
Add constructor return type in integrations A-D (#50903) 2021-05-20 18:51:39 +03:00
Paulus Schoutsen 5ea2dd8ce3
Alexa: Set Equalizer property to retrievable (#50730) 2021-05-17 09:26:37 +02:00
Marc Mueller 76199c0eb2
Update typing 04 (#48037) 2021-03-17 23:34:25 +01:00
J. Nick Koston 6707496c5d
Update alexa for new fan model (#45836) 2021-02-19 22:45:14 -08:00
Bram Kragten 3767af14f3
Add more selectors (#43639) 2020-11-25 20:03:56 +01:00
100ferhas 9b3c97345a
Update Alexa supported languages (#43139) 2020-11-20 08:47:17 -05:00
springstan a967f689c7
Remove unnecessary instances of dict.keys() (#42518) 2020-10-28 20:43:48 +01:00
Paolo Antinori 225becc89a
Add alexa unofficial specific API support for Italian (#39475)
Co-authored-by: ochlocracy <5885236+ochlocracy@users.noreply.github.com>
2020-09-02 09:56:11 +02:00
Paulus Schoutsen ba75856f2b
Do not break Alexa sync when encounter bad entity (#39380) 2020-08-30 14:36:00 +02:00
Paulus Schoutsen 2a86d52dba
Alexa media player only include equalizer if supported sound mode (#36285) 2020-05-30 21:42:40 -07:00
foxy82 67f7a4bb57
Add more alexa doorbell event locales (#36252) 2020-05-29 14:39:17 -07:00
springstan 46bbe816f6
Remove None from dict.get(key, None) (#33794) 2020-04-07 21:06:05 +02:00
Franck Nijhof feed139ae7
Small code style improvements to Alexa integration (#33660) 2020-04-04 14:20:48 -07:00
ochlocracy 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 Hollstegge f3c07a5653
Alexa: Add support for starting and cancelling timers (#32616) 2020-03-09 21:59:06 -07:00
David Nielsen 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 Hollstegge 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
Ville Skyttä 9b2544c923
Remove some unneeded pylint suppressions (#32152) 2020-02-24 16:47:15 -08:00
ochlocracy 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
ochlocracy 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
ochlocracy 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
ochlocracy fa2e409abd
Protect for unknown state attributes. (#31354) 2020-01-31 14:14:43 -08:00
ochlocracy 0eee152386 Include supported states in Alexa SecurityPanelController configuration object (#31120)
* Update Security Panel Controller.

* Update Security Panel Controller.

* Sort imports.
2020-01-24 17:57:58 -08:00
ochlocracy 4015a046d2 Update AdjustRange Handler Service Calls. (#31016)
Add a AlexaGlobalCatalog value to all labels.
2020-01-22 11:04:31 -08:00
ochlocracy 1d41cf96ca Fix Alexa semantics for covers with tilt support. (#30911)
* Fix Alexa semantics for covers with tilt support.

* Clarify wording.

* Korrect grammar.
2020-01-17 15:04:46 -08:00
ochlocracy bb42ff93f4 Add support for vacuums to Alexa. (#30764) 2020-01-15 09:15:31 -08:00
ochlocracy 605b0ceb5f Add support for variable fan speed list length. (#30574) 2020-01-10 17:26:37 -08:00
ochlocracy 74a198e37b Implement TimeHoldController Interface in Alexa (#30650)
* Implement Alexa.TimeHoldController Interface

* Add test for timer resume directive.
2020-01-10 23:11:50 +01:00
ochlocracy d0062fc740 Fix Alexa ChangeReports Filter non-proactively_reported_properties (#30655)
* Fix Change Report Properties.

* Fix Change Report Properties.
2020-01-10 22:34:50 +01:00
ochlocracy 6387a50697 Implement supported locales for Alexa capabilities (#30285)
* Implement Alexa capability supported locales.

* Check config for supported locales.

* Removed unused import.

* Applied some potpourri to improve code smell.

* Change supported_locales to set.
2020-01-03 21:23:22 +01:00
ochlocracy 25f78dd1a9
Implement EqualizerController in Alexa for media_player. (#30159) 2019-12-24 17:06:39 -05:00
ochlocracy a2678b2aff Add support for input_number entities in Alexa integration (#30139)
* Add support for input_number entities

* Update homeassistant/components/alexa/capabilities.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Removed get methods to directly access required attributes dicts.

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2019-12-23 15:17:37 +01:00
ochlocracy 5baaa852dd Refactor Alexa capabilityResources object into class, Implement Alexa semantics object (#29917)
* Refactor capabilityResources object into class.
Implement semantics object to support open, close, raise, lower utterences.
Replace covers PercentageController with RangeController.
Add semantics for covers.
Remove PowerController for covers.
Add new display categories.
Add new items to Alexa Global Catalog.
Implement garage door voice PIN code support though Alexa app.
Fixed bug with getting property for ModeController.
Fixed bug were PercentageController AdjustPercentage would exceed 100.

* Comment fixes in Tests.

* Reorder imports.

* Added additional tests for more code coverage.

* Added and additional test for more code coverage.

* Explicitly return None for configuration() if not instance of AlexaCapabilityResource.
2019-12-19 12:44:17 +01:00
ochlocracy 3db7e8f5e9 Implement Alexa.EventDetectionSensor for Alexa (#28276)
* Implement Alexa.EventDetectionSensor Interface

* Removed references to PR #28218 not yet merged into dev.

* Update tests to include Alexa Interface

* Guard for `unknown` and `unavailible` states.

* Fixed Unnecessary "elif" after "return"
2019-12-14 08:47:45 +01:00
Bruno Filipe 942f654d92 Proactively report Alexa Endpoint Health properties (#29736) 2019-12-09 09:37:15 +01:00
Bas Nijholt ba34922b03 sort imports according to PEP8 for alexa (#29618) 2019-12-08 14:56:42 +01:00
ochlocracy b0925e60d7 Explicitly include "Alexa" Interface in discovery response (#28218)
* Explicitly include Alexa Interface to discovery response.

* Updated cloud component test to reflect additional Alexa interface.

* Updated test for recently added SeekController.
2019-11-25 23:05:10 -08:00
ochlocracy 970a80216d Add valid inputs to alexa InputController (#28483)
* Add supported Inputs for Alexa.InputController.

* Fixed Test.

* Added default parameter for get() per @quthla suggestion.

* Added additional tests, assets call data.

* Added additional tests, asserts call data.

* Accounted for space in input name, added tests to handle space.
2019-11-25 15:17:12 -08:00
ochlocracy 5ea5db32d2 Add Alexa.ModeController to cover entities, adds open/close utterances! (#28309)
* Added Alexa.ModeController to cover entities.

* Added synonyms for directives.

* Updated tests for additional synonyms for directives.

* Added Alexa.ModeController to cover entities.

* Sacrifice unused variable in split() to please the Pylint gods.

* Removed duplicate instance check.

* Corrected variable name, clarified definition and consistency.

* Changed list to tuple.
2019-11-25 15:07:33 -08:00
Franck Nijhof 48c289fad3 Alexa gracefully handle climate devices without presets (#29010) 2019-11-24 19:57:18 -08:00
ochlocracy ff5b070f4b Implement Alexa.SeekController Interface for media_player in Alexa (#28299)
* Implement Alexa.SeekController Interface for Alexa

* Added error handling and duration checks.

* Split out media_player SeekController tests and added error test.
2019-10-31 10:38:44 +01:00
ochlocracy d6654eaecb Implement Alexa.PlaybackStateReporter Interface for alexa (#28215) 2019-10-25 14:53:33 -07:00