* 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().
* 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
* 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".
* 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>
* 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.
* 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"
* Explicitly include Alexa Interface to discovery response.
* Updated cloud component test to reflect additional Alexa interface.
* Updated test for recently added SeekController.
* 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.
* Update ThermostatController to map directives to supported modes and add support for CUSTOM mode.
* Removed erroneous config value from test.
* Removed unnecessary use of a comprehension by dumbing down comment so pylint could comprehend.
* Removed erroneous import variable caused by removing erroneous config value from test.
* Removed unnecessary use of a comprehension.
* Reverted Removal or erroneous import variable and erroneous config value from test.
Apparently need for additional tests outside this component. Whoops.
* Added missing Alexa.ChannelController functions. Specifically ChangeChannel
and SkipChannel commands. These functions will call the play_media function
in a media_player app if it has the capability published and pass on the
channel# or channel name. The selected media player can then use this to
select the channel on the device it is associated to.
Modified the existing Alexa.StepSpeaker Setvolume function to actually do
a stepped volume change using the steps sent by Alexa. The Alexa default
step of 10 for a simple volume up/down can be changed via an exposed
media_player attribute called volume_step_default.
The default is set to 1. Any other value then default will be sent
as sequential volume up /down to the media_player.
* The test code has some weird behaviour with passed boolean values. Had to surround them in quotes for the tests to pass properly.
* Reverted test_smart_home.py change. Issue was not the boolean value but the behavior in the handler. The test suite does not like multiple await calls in a loop. Will investigate further. The handler code works though.
* Added ChannelController/SkipChannels test in test_smart_home.py
Added test for callSign payload attribute.
* Modified smart home test to allow more than one call to services
* Added more tests for ChannelChange functions for various payload options.
Removed name options from metadata payload section. not needed.
* Reverted assert call change in alexa test __init__.py back to ==1. Not sure if it was the cause of the pytest's failing on github
* Corrected a comment. First commit after a rebase.
* Comment line change. Also wanted to force a code check on github.
* Added a loop delay in StepSpeaker and SkipChannel functions for safety
* Removed uneeded sleep from for loops. Let remote handle delays
Moved service type decision out of for loops in ChannelController and StepSpeaker
Used constants instead of numeric values for support options in test module
* Change media_player const import to be more specific in source
* Modifed test_smart_home to use media_play constants instead of hardcode valu
* Removed unecessary test volume_step_default attribute from test_smart_home
* Removed uneeded comment in StepSpeaker function.
Re-ordered constants in test_smart_home.py
* Modified call to media_player play_media service to use media_player constant instead of hard coded value.
* Changed constant use to be consistant with rest of function.
* Correct merge conflicts in handlers.py and capablities.py
* Implement AlexaToggleController, AlexaRangeController, and AlexaModeController interfaces.
* Implement AlexaToggleController, AlexaRangeController, and AlexaModeController interfaces.
* Unkerfuffled comments to please the pydocstyle gods.
* Unkerfuffled comments in Tests to please the pydocstyle gods.
* Added additional test for more coverage.
* Removed OSCILLATING property check from from ModeController.
* Added capability report tests for ModeController, ToggleController, RangeController, PowerLevelController.
* Update homeassistant/components/alexa/capabilities.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/alexa/capabilities.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Corrected mis-spelling of AlexaCapability class.
* Changed instance from method to property in AlexaCapability class.
* Refactored to add {entity.domain}.{entity.attribute} to the instance name.
* Improved type handling for configuration object.
Added additional test for configuration object.
* Added Tests for unsupported domains for ModeController and RangeController
* Made changes to improve future scaling for other domains.
* Split fan range to speed maps into multiple constants.
* Fixes#26405 Return None if light state is off since attribute is unavailable, prevents property from being reported with invalid value of 0.
* Update Test to check property is not reported when light state is off.
* Return None for AlexaThermostatController and AlexaTemperatureSensor properties if climate state is unavailable. Preserves raising an error for UnsupportedProperty, and allows Alexa.EndpointHealth to handle the unavailable state.
* Added additional tests for climate state reporting.