Commit Graph

23 Commits (94316f07a21b35cdd34a34a575e07fae9b97e89a)

Author SHA1 Message Date
Phil Frost ffcc41d6ef Implement Alexa temperature sensors (#11930) 2018-01-26 10:40:39 -08:00
Phil Frost 920f9f132b Report scripts and groups as scenes to Alexa (#11900)
* Send Alexa Smart Home responses to debug log

* Report scripts and groups as scenes to Alexa

The Alexa API docs have a couple display categories that sound relevant
to scenes or scripts:

    ACTIVITY_TRIGGER: Describes a combination of devices set to a
    specific state, when the state change must occur in a specific
    order.  For example, a “watch Neflix” scene might require the: 1. TV
    to be powered on & 2. Input set to HDMI1.

    SCENE_TRIGGER: Describes a combination of devices set to a specific
    state, when the order of the state change is not important. For
    example a bedtime scene might include turning off lights and
    lowering the thermostat, but the order is unimportant.

Additionally, Alexa has a notion of scenes that support deactivation.
This is a natural fit for groups, and scripts with delays which can be
cancelled.

https://developer.amazon.com/docs/device-apis/alexa-discovery.html#display-categories

The mechanism to map entities to the Alexa Discovery response is
refactored since extending the data structures in MAPPING_COMPONENT to
implement supportsDeactivation would have added complication to what I
already found to be a confusing construct.
2018-01-25 21:06:57 -08:00
Phil Frost 990e076c2c Expose Alexa Smart Home via HTTP POST (#11859)
* Expose Alexa Smart Home via HTTP POST

Haaska uses the deprecated v2 Alexa Smart Home payload. Exposing the v3
implementation this way allows an easy path to upgrading Haaska and
reducing code duplication with Home Assistant Cloud.

* Expose Alexa Smart Home via HTTP POST

Haaska uses the deprecated v2 Alexa Smart Home payload. Exposing the v3
implementation this way allows an easy path to upgrading Haaska and
reducing code duplication with Home Assistant Cloud.
2018-01-23 10:45:28 -08:00
Phil Frost 95592d9283 Respond to Alexa scene activation correctly (#11869)
The API documentation[1] specifies that Alexa.SceneController Activate
must get a ActivationStarted response. Responding with just a `Response`
will elicit a "Hmm... $scene is not responding" from Alexa.

[1]: https://developer.amazon.com/docs/smarthome/provide-scenes-in-a-smart-home-skill.html
2018-01-23 00:01:18 -08:00
Fabian Affolter 47e31dc9ee Fixes for PEP257 (#11810)
* Fixes for PEP257

* More updates
2018-01-20 22:35:38 -08:00
Paulus Schoutsen 5c2cecde70 Clean up Alexa.intent and DialogFlow.intent (#11492)
* Clean up Alexa.intent

* Restructure dialogflow too

* Lint

* Lint
2018-01-07 01:39:32 +01:00
Paulus Schoutsen 8b57777ce9
Alexa to not use customize for entity config (#11461)
* Alexa to not use customize for entity config

* Test Alexa entity config

* Improve tests

* Fix test
2018-01-05 12:33:22 -08:00
Pascal Vizeli 49bc95549b Don't block on sevice call for alexa (#11358)
* Don't block on sevice call for alexa

* fix tests
2017-12-29 09:44:06 -08:00
Phil Kates 94ac0b5ed8 alexa: Add handling for covers (#11242)
* alexa: Add handling for covers

Covers don't support either cover.turn_on or homeassistant.turn_on so
use cover.[open|close]_cover.

* alexa: Add tests for covers
2017-12-24 15:05:56 -08:00
Paulus Schoutsen fcc164c31e
Fix scene description formatting. (#10785) 2017-11-24 15:52:59 -08:00
Robbie Trencheny 1317297191 Implement entity and domain exclude/include for Alexa (#10647)
* Implement entity and domain exclude/include for Alexa

* Switch to using generate_filter

* Use proper domain for turn on/off calls except for groups where we must use the generic homeassistant.turn_on/off

* travis fixes

* Untangle

* Lint
2017-11-17 21:10:24 -08:00
Robbie Trencheny 2b60fca08d Alexa improvements (#10632)
* Initial scene support

* Initial fan support

* ordering

* Initial lock support

* Scenes cant be deactivated; Correct the scene display category

* Initial input_boolean support

* Support customization of Alexa discovered entities

* Initial media player support

* Add input_boolean to tests

* Add play/pause/stop/next/previous to media player

* Add missing functions and pylint

* Set manufacturerName to Home Assistant since the value is displayed in app

* Add scene test

* Add fan tests

* Add lock test

* Fix volume logic

* Add volume tests

* settup -> setup

* Remove unused variable

* Set required scene description as per docs

* Allow setting scene category (ACTIVITY_TRIGGER/SCENE_TRIGGER)

* Add alert, automation and group support/tests

* Change display categories to match docs

* simplify down the display category props into a single prop which can be used on any entity

* Fix tests to expect proper display categories

* Add cover support

* sort things

* Use generic homeassistant domain for turn on/off
2017-11-17 09:14:22 -08:00
Corey Pauley 6cf2e758a8 Alexa slot synonym fix (#10614)
* Added logic to the alexa component for handling slot synonyms

* Moved note with long url to the top of the file

* Just made a tiny url instead of messing with Flake8

* Refactored to be more Pythonic

* Put trailing comma back
2017-11-16 21:09:00 -08:00
Michael Chang 48181a9388 Support script execution for Alexa (#10517)
* Support script execution for Alexa

* Use PowerController for the script component
2017-11-15 21:44:27 -08:00
Kenny Millington 7c24d77031 Don't use the 'id' field since it can be autogenerated (fixes #10551). (#10554) 2017-11-13 22:46:26 -08:00
Kenny Millington 16dd90ac78 Add support for Alexa intent slot synonyms. (#10469) 2017-11-10 09:35:57 -08:00
Pascal Vizeli 619d329a16
Add xy support to Alexa HomeAPI v3 (#10268)
* Add xy support to Alexa HomeAPI v3

* Update smart_home.py

* Update smart_home.py

* fix lint

* fix copy paste

* Update smart_home.py

* simplify

* Add test for xy/rgb

* Update test_smart_home.py

* Update smart_home.py

* add test
2017-11-01 12:16:05 +01:00
Pascal Vizeli 8c266f9266 Alexa SmartHome API extend (#10251)
* Implement adjustment

* Add color support

* fix lint

* Fix lint & use only RGB

* fix HSB + Test

* Add tests & fix bugs

* add rgb test

* add setColorTemperature

* Add color light support + tests

* Fix color temp

* use kelvin for converting

* use correct calculation
2017-10-31 20:28:17 -07:00
Pascal Vizeli c1f156fd2b Rewrite Alexa Smart-Home skill to v3 (#9699)
* Rewrite Alexa Smart-Home skill to v3

* add discovery & fix brigness

* Rewrite Tests

* fix lint

* fix lint p2

* fix version

* fix tests

* fix test message generator

* Update smart_home.py

* fix test

* fix set bug

* fix list

* fix response name for discovery

* fix flucky tests
2017-10-07 13:31:57 -07:00
Paulus Schoutsen 2df433eb0a Migrate Alexa smart home to registry (#9616)
* Migrate Alexa smart home to registry

* Fix tests
2017-09-28 21:26:27 +02:00
Michael Prokop 08b0629eca Fix a bunch of typos (#9545)
s/Addres /Address /
s/Chnage/Change/
s/Converion/Conversion/
s/Supressing/Suppressing/
s/agains /against /
s/allready/already/
s/analagous/analogous/
s/aquired/acquired/
s/arbitray/arbitrary/
s/argment/argument/
s/aroung/around/
s/attibute/attribute/
s/auxillary/auxiliary/
s/befor /before /
s/commmand/command/
s/conatin/contain/
s/conection/connection/
s/coresponding/corresponding/
s/entites/entities/
s/enviroment/environment/
s/everyhing/everything/
s/expected expected/expected/
s/explicity/explicitly/
s/formated/formatted/
s/incomming/incoming/
s/informations/information/
s/inital/initial/
s/inteface/interface/
s/interupt/interrupt/
s/mimick/mimic/
s/mulitple/multiple/
s/multible/multiple/
s/occured/occurred/
s/occuring/occurring/
s/overrided/overridden/
s/overriden/overridden/
s/platfrom/platform/
s/positon/position/
s/progess/progress/
s/recieved/received/
s/reciever/receiver/
s/recieving/receiving/
s/reponse/response/
s/representaion/representation/
s/resgister/register/
s/retrive/retrieve/
s/reuqests/requests/
s/segements/segments/
s/seperated/separated/
s/sheduled/scheduled/
s/succesfully/successfully/
s/suppport/support/
s/targetting/targeting/
s/thats/that's/
s/the the/the/
s/unkown/unknown/
s/verison/version/
s/while loggin out/while logging out/
2017-09-23 17:15:46 +02:00
Pascal Vizeli c2bbc2f74e Alexa smart home native support (#9443)
* Init commit for alexa component

* more struct component

* Add mapping for device/component to alexa action

* finish discovery

* First version with support on/off/percent

* fix spell

* First init tests

* fix tests & lint

* add tests & fix bugs

* optimaze tests

* more tests

* Finish tests

* fix lint

* Address paulus comments

* fix lint

* Fix lint p2

* Optimaze & paulus comment
2017-09-16 12:35:28 -07:00
Paulus Schoutsen 05192e678e Break up Alexa per functionality (#9400)
* Break up Alexa per functionality

* Lint

* Lint
2017-09-12 21:24:44 +02:00