Changing the dimmer precision steps for Alexa

Hey guys,

I installed a shelly dimmer 2 behind my lightswitch and implemented it in OH3. Everything is working as expected, the only thing is that using voice commands with Alexa changes the brightness in steps of 25%, which I’d like to reduce to 10% or so.
My item definition is as follows:

Group gDiningTable "Esstisch" (gLivingRoom) ["Lightbulb"] {alexa="Light"}
Dimmer gDiningTable_brightness (gDiningTable,gAllLights) {alexa="PowerState,Brightness,RangeValue" [supportedRange="0:100:10"], channel="shelly:shellydimmer2:diningTable:relay#brightness"}

Do you have any idea what might be the issue here?

Regards

First, what utterance are you using to change the brightness level? Secondly, I assume you are referring to default level since you can technically specify the exact amount in your voice command (Alexa, dim the light by 10%). Finally, make sure that your RangeValue capability has a name configured as it is ignored based on the item definition you provided.

Anyway, I am not sure mixing Brightness and RangeValue will work as you intended as there is some overlaps between the two capabilities (The same could be said with Percentage). You might have to use one or the other based on what you are trying to achieve but keep in mind you will lose some the Alexa app integration if going with the latter.

“Alexa, dim ‘Esstisch’”

Exactly. WAF is significantly higher when leaving out specific values (and feels more natural as well

You mean like this?

Dimmer gDiningTable_brightness (gDiningTable,gAllLights) {alexa="PowerState,Brightness,RangeValue" [capabilityNames="Helligkeit" supportedRange="0:100:10"], channel="shelly:shellydimmer2:diningTable:relay#brightness"}

That utterance is specific to Brightness. You would have to use increase/decrease for RangeValue as listed in the documentation although like I said before it might still end up triggering Brightness due to overlap.

Correct. I would remove the Brightness attribute.

Thanks for clarifying. I’ll stick to the brightness bit then as it feels more natural when using voice activation.
I take it that’s an Echo limitation then that the Brightness steps can’t be specified, right?

It’s an Alexa Smart Home API limitation. And again to be clear, you can specify the brightness increment level in your request. It is only the default increment level that is driven by the API that is fixed at 25%.

OK, got it. I used the following code and if I say “Alexa, dim ‘Esstisch’”, it is reduced by 10.

Dimmer gDiningTable_brightness            (gDiningTable,gAllLights) {alexa="PowerState,RangeValue" [capabilityNames="Helligkeit", supportedRange="0:100:10"], channel="shelly:shellydimmer2:diningTable:relay#brightness"}

However, I seems that without the brightness attribute I now lost the option to give the opposite command.
So in German you would say “dim ‘Esstisch’” to reduce the brightness. The opposite is “mache ‘Esstisch’ heller” (“make Esstisch brighter”). Both commands used to work before. Now if I want to increase the brightness, I actually have to say “erhöhe ‘Esstisch’ Helligkeit” (increase ‘Esstisch’ brightness), refering directly to the capability name.
The documentation itself is inconsistent as well as the utterance examples in English are a plain “dim” while in German it uses a value. Alexa.BrightnessController Interface | Alexa Skills Kit

That’s what I highlighted above when using RangeValue. “You would have to use increase/decrease for RangeValue as listed in the documentation”. Since this is a generic capability, it is more barebone and less polished then using Brightness for your use-case. You would have to decide what’s more important to you in this case. Another option is using a proxy item on the OH and update the related item via rules. But again even that solution will have its limitations.

1 Like