Alexa Three-State-Switch with ModeController.mode

Hi,
I’m using ModeController.mode for choosing the lights in my garage. Switching between 1 and 2 works perfectly. But sending an OFF command seems not to be working. Alexa says “…does not support the command”.

My item definition looks as follows:
Number SWI10_Scene "Licht Garage" <light_bulb> {alexa="ModeController.mode" [supportedModes="0=Aus,1=Stufe 1,2=Stufe 2"]}

Some sample phrases in german:
“Alexa, stell das Licht in der Garage auf Stufe 1” → state switches to 1
“Alexa, stell das Licht in der Garage auf Stufe 2” → state switches to 2
“Alexa, stell das Licht in der Garage auf Aus” → alexa says, “Licht Garage unterstützt das nicht”

Via alexa?

Via openHAB

Your item is a Number which doesn’t support the OFF command.

Per the issue below, you have to request ON/OFF commands slightly differently. This is probably a limitation on the Alexa side due to the overlapping with the PowerController/ToggleController interfaces.

“Alexa, stell das Licht Garage auf Aus”

Simulator Screenshot

Event Logs

2019-12-28 18:23:42.596 [ome.event.ItemCommandEvent] - Item 'SWI10_Scene' received command 1
2019-12-28 18:23:42.597 [vent.ItemStateChangedEvent] - SWI10_Scene changed from 0 to 1
2019-12-28 18:23:47.109 [ome.event.ItemCommandEvent] - Item 'SWI10_Scene' received command 2
2019-12-28 18:23:47.110 [vent.ItemStateChangedEvent] - SWI10_Scene changed from 1 to 2
2019-12-28 18:23:56.988 [ome.event.ItemCommandEvent] - Item 'SWI10_Scene' received command 0
2019-12-28 18:23:56.989 [vent.ItemStateChangedEvent] - SWI10_Scene changed from 2 to 0

Hmm I think that is not really practical. Bit thank your for research!
Do you think there is a way to combine it bit the powercontroller (I guess thiss is also suported for the color controller?

Exactly

I don‘t think so, for what would be the mappings useful for?

Obviously you know better, so I’ll shut up now.

Sorry for that, I don‘t know it better. But does it really make sense if a Number item does not support ON/OFF states?
And related to @jeshab answer: Why does alexa react to ON/OFF if the item‘s name was spoken exactly as defined?
Thank you!

Yes it does. If you send an OFF command to a Number item OH will complain.

Sorry for asking again, but I don’t understand, because I don‘t send a off command directly to the number item. It should be translated to 0:

The post by @jeshab is your answer. The correct commands are sent to OH
I don’t understand german but Alexa is limited as he said and you may have to put up with it until it gets clever enough or the amazon devs resolve the issue:

1 Like

You can certainly create a group endpoint for that device using a proxy Switch item, modeled as PowerController, that would update the Number item on ON/OFF requests. This will resolve your issue although you would have to support ON requests as well.

Group gSWI10_Scene "Licht Garage" {alexa="Endpoint.Light"}
Switch SWI10_Scene_Power "Power" (gSWI10_Scene) {alexa="PowerController.powerState"}
Number SWI10_Scene_Mode "Mode" (gSWI10_Scene) {alexa="ModeController.mode" [supportedModes="0=Aus,1=Stufe 1,2=Stufe 2"]}

There are no other solutions here. As @vzorglub mentioned, we can’t go around the Alexa limitations. You can always post on the Amazon developer forum with your feedback and concerns.

You need to change the utterance. If you say:
„Alexa, Licht Garage aus“ it should work.