Jittering slider when input and output are equal

Hello,

when I feed the slider for my brightness with the current value and also set the same value when changing the slider I get the problem that the slider starts jittering and the brightness values are jumping around.

My flow looks like this:

How do I prevent this behaviour? I want my slider to mirror the current birghtness value as well as set the value with it.

Best regards

Can you export a flow showing the problem, maybe use link nodes instead of mqtt. Presumably you have disabled Pass Through in the node.

This is my flow:

[
    {
        "id": "578b1f3e.dac6e",
        "type": "ui_slider",
        "z": "9f1ed1de.da5b7",
        "name": "",
        "label": "Helligkeit",
        "tooltip": "",
        "group": "fe456f98.7dca5",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "outs": "all",
        "topic": "",
        "min": 0,
        "max": "100",
        "step": 1,
        "x": 620,
        "y": 380,
        "wires": [
            [
                "aeda3227.cf9aa"
            ]
        ]
    },
    {
        "id": "7c3051b0.8bfae",
        "type": "function",
        "z": "9f1ed1de.da5b7",
        "d": true,
        "name": "",
        "func": "if (msg.payload !== \"0\")\n    return {payload: 100};\nelse\n    return {payload: 0};",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 464.4444351196289,
        "y": 323.3333320617676,
        "wires": [
            [
                "9c2c42b8.b38db"
            ]
        ]
    },
    {
        "id": "9c2c42b8.b38db",
        "type": "ui_switch",
        "z": "9f1ed1de.da5b7",
        "name": "",
        "label": "An/Aus",
        "tooltip": "",
        "group": "fe456f98.7dca5",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": false,
        "decouple": "true",
        "topic": "",
        "style": "",
        "onvalue": "100",
        "onvalueType": "num",
        "onicon": "",
        "oncolor": "",
        "offvalue": "0",
        "offvalueType": "num",
        "officon": "",
        "offcolor": "",
        "x": 614.4444351196289,
        "y": 323.3333320617676,
        "wires": [
            [
                "aeda3227.cf9aa"
            ]
        ]
    },
    {
        "id": "7c822d36.75d064",
        "type": "mqtt in",
        "z": "9f1ed1de.da5b7",
        "name": "",
        "topic": "denis/light/brightness",
        "qos": "2",
        "datatype": "utf8",
        "broker": "ce38412c.c11f7",
        "x": 200,
        "y": 180,
        "wires": [
            [
                "cf86f741.a78b58"
            ]
        ]
    },
    {
        "id": "c1e77bf8.7877a8",
        "type": "ioBroker out",
        "z": "9f1ed1de.da5b7",
        "name": "Denis Zimmer Helligkeitslevel",
        "topic": "deconz.0.Groups.4.level",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 630,
        "y": 180,
        "wires": []
    },
    {
        "id": "aeda3227.cf9aa",
        "type": "mqtt out",
        "z": "9f1ed1de.da5b7",
        "name": "",
        "topic": "denis/light/brightness",
        "qos": "1",
        "retain": "",
        "broker": "ce38412c.c11f7",
        "x": 860,
        "y": 340,
        "wires": []
    },
    {
        "id": "cf86f741.a78b58",
        "type": "function",
        "z": "9f1ed1de.da5b7",
        "name": "str2Num",
        "func": "return {payload: Number(msg.payload)};",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 400,
        "y": 180,
        "wires": [
            [
                "c1e77bf8.7877a8"
            ]
        ]
    },
    {
        "id": "9457b274.b7c68",
        "type": "mqtt in",
        "z": "9f1ed1de.da5b7",
        "name": "",
        "topic": "denis/light/brightness",
        "qos": "2",
        "datatype": "utf8",
        "broker": "ce38412c.c11f7",
        "x": 200,
        "y": 340,
        "wires": [
            [
                "7c3051b0.8bfae",
                "578b1f3e.dac6e"
            ]
        ]
    },
    {
        "id": "fe456f98.7dca5",
        "type": "ui_group",
        "z": "",
        "name": "Licht",
        "tab": "12bbff51.05ec81",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false
    },
    {
        "id": "ce38412c.c11f7",
        "type": "mqtt-broker",
        "z": "",
        "name": "MQTT",
        "broker": "localhost",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "compatmode": false,
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "willTopic": "",
        "willQos": "0",
        "willPayload": ""
    },
    {
        "id": "12bbff51.05ec81",
        "type": "ui_tab",
        "z": "",
        "name": "Denis' Zimmer",
        "icon": "dashboard",
        "order": 4,
        "disabled": false,
        "hidden": false
    }
]

In the slider there is no option to pass through the message. I see this option only for the button but that element is not the problem.

Did you see that comment?

See the comment under my code. I can't see any option in the slider settings.

There is only this option:
image

1 Like

Oh, yes, sorry I never realised that node does not have a pass through option, which makes it rather different to the switch node, for example.
Unfortunately because of using mqtt it is not easy to run your flow. Could you make a simple example using link nodes instead? Put a small delay if necessary. Also don't include any non-core nodes if possible. Inject nodes can be used to simulate data.