After some investiguation, I notice that Alexa cannot control garage door when the Alexa Interface is ModeController.
However, when Alexa Interface is RangeController, I can open and close my garage door.
To put it in the context, I have a ESPHome relay+contact sensor that expose a garage door cover.
I can only open, close and stop the garage door.
That is why the entity has supported_features = 11
in HA.
After a discovery for an Alexa device, I get the following line:
{'displayCategories': ['GARAGE_DOOR'], 'cookie': {}, 'endpointId': 'cover#porte_de_garage', 'friendlyName': 'Porte de Garage', 'description': 'cover.porte_de_garage via Home Assistant', 'manufacturerName': 'Home Assistant', 'additionalAttributes': {'manufacturer': 'Home Assistant', 'model': 'cover', 'softwareVersion': '2021.4.6', 'customIdentifier': '-cover.porte_de_garage'}, 'capabilities': [{'type': 'AlexaInterface', 'interface': 'Alexa.ModeController', 'version': '3', 'instance': 'cover.position', 'properties': {'supported': [{'name': 'mode'}], 'proactivelyReported': True, 'retrievable': True, 'nonControllable': False}, 'capabilityResources': {'friendlyNames': [{'@type': 'text', 'value': {'text': 'Position', 'locale': 'en-US'}}, {'@type': 'asset', 'value': {'assetId': 'Alexa.Setting.Opening'}}]}, 'configuration': {'ordered': False, 'supportedModes': [{'value': 'position.open', 'modeResources': {'friendlyNames': [{'@type': 'asset', 'value': {'assetId': 'Alexa.Value.Open'}}]}}, {'value': 'position.closed', 'modeResources': {'friendlyNames': [{'@type': 'asset', 'value': {'assetId': 'Alexa.Value.Close'}}]}}, {'value': 'position.custom', 'modeResources': {'friendlyNames': [{'@type': 'text', 'value': {'text': 'Custom', 'locale': 'en-US'}}, {'@type': 'asset', 'value': {'assetId': 'Alexa.Setting.Preset'}}]}}]}, 'semantics': {'actionMappings': [{'@type': 'ActionsToDirective', 'actions': ['Alexa.Actions.Lower', 'Alexa.Actions.Close'], 'directive': {'name': 'SetMode', 'payload': {'mode': 'position.closed'}}}, {'@type': 'ActionsToDirective', 'actions': ['Alexa.Actions.Raise', 'Alexa.Actions.Open'], 'directive': {'name': 'SetMode', 'payload': {'mode': 'position.open'}}}], 'stateMappings': [{'@type': 'StatesToValue', 'states': ['Alexa.States.Closed'], 'value': 'position.closed'}, {'@type': 'StatesToValue', 'states': ['Alexa.States.Open'], 'value': 'position.open'}]}}, {'type': 'AlexaInterface', 'interface': 'Alexa.EndpointHealth', 'version': '3', 'properties': {'supported': [{'name': 'connectivity'}], 'proactivelyReported': True, 'retrievable': True}}, {'type': 'AlexaInterface', 'interface': 'Alexa', 'version': '3'}]}
So Alexa will use ModeController. And it does not work to open or close my garage door.
When I modify this value (to supported_features = 15
), the Alexa log becomes:
{'displayCategories': ['GARAGE_DOOR'], 'cookie': {}, 'endpointId': 'cover#porte_de_garage', 'friendlyName': 'Porte de Garage', 'description': 'cover.porte_de_garage via Home Assistant', 'manufacturerName': 'Home Assistant', 'additionalAttributes': {'manufacturer': 'Home Assistant', 'model': 'cover', 'softwareVersion': '2021.4.6', 'customIdentifier': '-cover.porte_de_garage'}, 'capabilities': [{'type': 'AlexaInterface', 'interface': 'Alexa.RangeController', 'version': '3', 'instance': 'cover.position', 'properties': {'supported': [{'name': 'rangeValue'}], 'proactivelyReported': True, 'retrievable': True, 'nonControllable': False}, 'capabilityResources': {'friendlyNames': [{'@type': 'text', 'value': {'text': 'Position', 'locale': 'en-US'}}, {'@type': 'asset', 'value': {'assetId': 'Alexa.Setting.Opening'}}]}, 'configuration': {'supportedRange': {'minimumValue': 0, 'maximumValue': 100, 'precision': 1}, 'unitOfMeasure': 'Alexa.Unit.Percent'}, 'semantics': {'actionMappings': [{'@type': 'ActionsToDirective', 'actions': ['Alexa.Actions.Lower', 'Alexa.Actions.Close'], 'directive': {'name': 'SetRangeValue', 'payload': {'rangeValue': 0}}}, {'@type': 'ActionsToDirective', 'actions': ['Alexa.Actions.Raise', 'Alexa.Actions.Open'], 'directive': {'name': 'SetRangeValue', 'payload': {'rangeValue': 100}}}], 'stateMappings': [{'@type': 'StatesToValue', 'states': ['Alexa.States.Closed'], 'value': 0}, {'@type': 'StatesToRange', 'states': ['Alexa.States.Open'], 'range': {'minimumValue': 1, 'maximumValue': 100}}]}}, {'type': 'AlexaInterface', 'interface': 'Alexa.EndpointHealth', 'version': '3', 'properties': {'supported': [{'name': 'connectivity'}], 'proactivelyReported': True, 'retrievable': True}}, {'type': 'AlexaInterface', 'interface': 'Alexa', 'version': '3'}]}
So it will use RangeController Interface, and it works! I can say “Open garage door”
I don’t know why there is a problem with ModeController Interface, because it is supported in my language (fr-FR).