Skip to content

Fix Alexa semantics for covers with tilt support.#30911

Merged
balloob merged 3 commits into
home-assistant:devfrom
ochlocracy:alexa-fix-cover-tilt
Jan 17, 2020
Merged

Fix Alexa semantics for covers with tilt support.#30911
balloob merged 3 commits into
home-assistant:devfrom
ochlocracy:alexa-fix-cover-tilt

Conversation

@ochlocracy
Copy link
Copy Markdown
Member

@ochlocracy ochlocracy commented Jan 17, 2020

Description:

After extensive testing; the following PR clears up some ambiguity from the Alexa documentation pertaining to semantics. Fixes issue introduced in 0.104.

In order for Alexa semantics to work with multiple controllers and in each of the supported locales the following guidelines need to be followed:

  • The instance property must be unique across ModeController, RangeController, ToggleController within the same device. The instance property should be a concatenated string of device domain period and single word. e.g. fan.speed & fan.direction.
  • The instance property must not contain words from other instance property strings within the same device. e.g. Instance property cover.position & cover.tilt_position will cause the Alexa.Discovery directive to fail.
  • An instance property string value may be reused for different devices.
  • Semantics stateMappings are only supported for one interface of the same type on the same device. If a device has multiple RangeControllers only one interface may use stateMappings otherwise discovery will fail.
  • You can support semantics actionMappings on different controllers for the same device, however each controller must support different phrases. For example, you can support "raise" on a RangeController, and "open" on a ModeController, but you can't support "open" on both RangeController and ModeController. Semantics stateMappings are only supported for one interface on the same device.
  • Resources objects labels must be unique across all modeResources and presetResources within the same device.
  • To provide support for all supported locales, one label from the AlexaGlobalCatalog should be included in the labels array.
  • You cannot use any words from the following list as friendly names: https://developer.amazon.com/docs/alexa/device-apis/resources-and-assets.html#names-you-cannot-use

Related issue (if applicable): fixes #30852 fixes #30830

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@probot-home-assistant
Copy link
Copy Markdown

Hey there @home-assistant/cloud, mind taking a look at this pull request as its been labeled with a integration (alexa) you are listed as a codeowner for? Thanks!

@ochlocracy ochlocracy marked this pull request as ready for review January 17, 2020 19:32
@ochlocracy ochlocracy added this to the 0.104.2 milestone Jan 17, 2020
@balloob balloob merged commit 1d41cf9 into home-assistant:dev Jan 17, 2020
balloob pushed a commit that referenced this pull request Jan 17, 2020
* Fix Alexa semantics for covers with tilt support.

* Clarify wording.

* Korrect grammar.
@balloob balloob mentioned this pull request Jan 17, 2020
@lock lock Bot locked and limited conversation to collaborators Jan 19, 2020
@ochlocracy ochlocracy deleted the alexa-fix-cover-tilt branch January 28, 2020 03:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alexa does not find my devices since 0.104.0 Alexa cover open/close semantics - "device does not support this feature"

3 participants