ioBroker.jarvis icon indicating copy to clipboard operation
ioBroker.jarvis copied to clipboard

ButtonGroupAction changes data type of state value

Open sm79 opened this issue 2 years ago • 5 comments

Running on Jarvis 3.1.2, incl PRO account features Browser Console shows no relevant errors.

Brief overview: To change brightness level (of a Shelly Dimmer 2) to predefined settings I want to use ButtonGroupAction instead of DropDownAction. However using ButtonGroupAction on predefined state values, the brightness is not updating due to data type error shown in iobroker log: State value to set for "shelly.0.SHDM-2#C45BBE47163C#1.lights.brightness" has to be type "number" but received type "string"

Long story:

At first I set predefined values and options on the "brightness" state of the Shelly Dimmer 2: setpoints_lvl

The values set in "Anzeigevariante" are then used for certain buttons in ButtonGroupAction: BtnGrpAct_settings

The widget looks like this: widget_BtnGrpAct

Pressing on any of the three buttons, the following errors are shown in the iobroker log: datatype-error

Using these settings in DropDownAction, everything works fine - It's just not as convenient as just pressing a button. Using these settings in ButtonGroupAction, the state value data type would need to be converted.

So it would be great if ButtonGroupAction could handle such type inconsistencies by itself or at least provides a setting or switch to enable type conversion.

sm79 avatar Feb 17 '23 11:02 sm79