Tap dial hue

Bonjour

J’envisage d’acheter ce bouton Hue, et j’aimerais avoir une intégration comme décrite sur ce site (Hue Tap Dial Switch: Unleash the ultimate Home Assistant switch).
Je trouve son intégration vraiment très bonne avec l’ajout des double-clics et le choix de l’action de la roue codeuse après avoir appuyé sur le bouton.

Pour cela, on crée deux helpers qui comptent et qui ont le statut, mais là où je vais bloquer, c’est que cette solution utilise Deconz, et je vais coupler le bouton Hue avec Z2M. Donc, si quelqu’un l’a déjà adaptée pour Z2M, je suis preneur, car je pense que cela doit changer pas mal de codes non ?

je me demande aussi commet il fait pour changer de scene avec le double click il doit appeler un script ? car ca demande aussi pas mal de chose merci

Bonjour,
j’ai le même souci que vous à savoir utiliser Z2M au lieu de Deconz mais pas pas Blueprint mais par Node Red…
Mon rêve serait d’avoir un Flow Nod Red dont la source serait faite par Z2M et ce Dial Tap avec en plus gestion de multiple clic…

J’essaye de convertir ce Flow Node Red mais par Z2M comme base :frowning:

[saisissez ou collez du code ici](https://flows.nodered.org/flow/c95d562d4858cbe1bf80fee95ba9815f)

Bonjour,
Il semblerait qu’ils aient rajouté le nécessaire pour z2m.

Bonjour,
j’ai progressé de mon côté et vu aussi qu’il y avait eu des adaptations.
Je suis arrivé avec beaucoup de chance et brouillon lol à ce Flow.
Ce que j’aimerais implanter maintenant dans mon « TriActionHueTap », c’est ceci par exemple:
-Double Button1Press + Dial right → Output
-Triple Button 1 Press + Dial right → Output
-Button3Hold + Button1 Press + Dial Right → Output

Et donc une séquence de touche pressées simultanément par exemple et puis le Dial permettra de lancer ce que je désire :frowning:

[
    {
        "id": "375b40b3b377c208",
        "type": "tab",
        "label": "Hue Dial 9",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "f6880d6ae485f043",
        "type": "comment",
        "z": "375b40b3b377c208",
        "name": "Philips Hue dial music control",
        "info": "",
        "x": 240,
        "y": 300,
        "wires": []
    },
    {
        "id": "f14eee12a5f0e2b3",
        "type": "switch",
        "z": "375b40b3b377c208",
        "name": "TriActionHueTap",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "button_1_press_release",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "button_2_press_release",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "button_3_press_release",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "button_4_hold",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "button_4_press_release",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "button_2_hold",
                "vt": "str"
            },
            {
                "t": "regex",
                "v": "dial_rotate_right_.*|dial_rotate_left_.*",
                "vt": "str",
                "case": false
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 7,
        "x": 300,
        "y": 580,
        "wires": [
            [
                "280bd47f9d6fb1f2"
            ],
            [
                "5d0cb31d8df02b37"
            ],
            [
                "04d3abcec6514936"
            ],
            [
                "30a8856284917b0e"
            ],
            [
                "7e6d154b09b1a0bc"
            ],
            [
                "852fdd2237412b4a"
            ],
            [
                "8e33ec862a942207"
            ]
        ]
    },
    {
        "id": "ce83eba52cd840d8",
        "type": "switch",
        "z": "375b40b3b377c208",
        "name": "last played?",
        "property": "lastplayed",
        "propertyType": "flow",
        "rules": [
            {
                "t": "eq",
                "v": "Discover Weekly",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Disco",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Flow, your personal mix",
                "vt": "str"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 4,
        "x": 2750,
        "y": 460,
        "wires": [
            [
                "38007c298aef2330",
                "cfd456ddf0b70c1b"
            ],
            [
                "07b6afe7d718b6c9",
                "1e20e3233a366017"
            ],
            [
                "635024c00d523315",
                "45d02a91c27e0ee9"
            ],
            [
                "a9329d62354ea15d",
                "93807f2991e52c81"
            ]
        ]
    },
    {
        "id": "3acaf6836fc2e831",
        "type": "switch",
        "z": "375b40b3b377c208",
        "d": true,
        "name": "playing?",
        "property": "playerstate",
        "propertyType": "flow",
        "rules": [
            {
                "t": "neq",
                "v": "playing",
                "vt": "str"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1580,
        "y": 2160,
        "wires": [
            [
                "fe0d919a81b5411f"
            ],
            [
                "5320cd066b4afc78"
            ]
        ]
    },
    {
        "id": "5320cd066b4afc78",
        "type": "function",
        "z": "375b40b3b377c208",
        "d": true,
        "name": "rotation -> volume",
        "func": "var currentVolume = flow.get(\"volume\") || 0.1;\nvar NEWexpectedrotation = msg.payload.rotaryevent;\nvar OLDexpectedrotation = flow.get(\"OLDexpectedrotation\") || 0;\nvar NETexpectedrotation = NEWexpectedrotation - OLDexpectedrotation;\n\n// Vérifier si NEWexpectedrotation est défini et est un nombre valide\nif (isNaN(NEWexpectedrotation)) {\n    node.warn(\"NEWexpectedrotation n'est pas un nombre valide\");\n    return null; // arrêter le traitement du message\n}\n\nif (msg.payload.hasOwnProperty(\"rotaryevent\")) {\n    var rotaryevent = msg.payload.rotaryevent;\n    if (rotaryevent == 1) {\n        if (NEWexpectedrotation < 0) {\n            //msg.payload = Math.round((NEWexpectedrotation) / 15);\n            msg.payload = Math.round((NEWexpectedrotation) /15);\n        } else if (Math.round((NEWexpectedrotation) / 25) + 1 > 9) {\n            msg.payload = 8.5;\n        } else {\n            //msg.payload = Math.round((NEWexpectedrotation) / 25);\n            msg.payload = Math.round((NEWexpectedrotation) / 2);\n        }\n    } else {\n        if (NEWexpectedrotation < 0) {\n            // msg.payload = Math.round((NETexpectedrotation) / 15);\n            msg.payload = Math.round((NETexpectedrotation) /15);\n        } else if (Math.round((NETexpectedrotation) / 25) + 1 > 9) {\n            //msg.payload = 9;\n            msg.payload = 8.5;\n        } else {\n            //msg.payload = Math.round((NETexpectedrotation) / 25);\n            msg.payload = Math.round((NETexpectedrotation) / 2);\n        }\n    }\n}\n\nflow.set(\"OLDexpectedrotation\", NEWexpectedrotation);\n\nmsg.payload = (msg.payload / 100) + currentVolume;\n\nif (msg.payload < 0.01) {\n    msg.payload = 0;\n}\n\nreturn msg;\n",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2240,
        "y": 2380,
        "wires": [
            [
                "4844d7c17a631aa6",
                "0eed3ee3dfdb5d57"
            ]
        ]
    },
    {
        "id": "38007c298aef2330",
        "type": "change",
        "z": "375b40b3b377c208",
        "name": "Modify To \"Disco\"",
        "rules": [
            {
                "t": "set",
                "p": "lastplayed",
                "pt": "flow",
                "to": "Disco",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 2990,
        "y": 300,
        "wires": [
            [
                "bbd72233fa27c592"
            ]
        ]
    },
    {
        "id": "08a3ed919b0d210e",
        "type": "inject",
        "z": "375b40b3b377c208",
        "name": "Auto-reset source and volume",
        "props": [],
        "repeat": "",
        "crontab": "26 23 * * *",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 270,
        "y": 60,
        "wires": [
            [
                "24fc2679778e6469"
            ]
        ]
    },
    {
        "id": "62bc1045198bc40d",
        "type": "trigger",
        "z": "375b40b3b377c208",
        "name": "",
        "op1": "light",
        "op2": "volume",
        "op1type": "str",
        "op2type": "str",
        "duration": "10",
        "extend": true,
        "overrideDelay": false,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 1010,
        "y": 900,
        "wires": [
            [
                "480fe1b1f2c31a7c"
            ]
        ]
    },
    {
        "id": "480fe1b1f2c31a7c",
        "type": "change",
        "z": "375b40b3b377c208",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "mode",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1180,
        "y": 900,
        "wires": [
            [
                "6e6acdc9e273730a"
            ]
        ]
    },
    {
        "id": "71440c40ae6a9573",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "toggle living room lights",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.credence"
        ],
        "data": "{\"brightness_step\": -150, \"transition\": 0.5}",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 1050,
        "y": 840,
        "wires": [
            [
                "f354f62f491e3974"
            ]
        ]
    },
    {
        "id": "5f43a5bfc2e75a19",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "toggle living room lights",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "toggle",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.credence"
        ],
        "data": "{\"brightness_step\": 155, \"transition\": 0.5}",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 1440,
        "y": 840,
        "wires": [
            []
        ]
    },
    {
        "id": "7e6d154b09b1a0bc",
        "type": "delay",
        "z": "375b40b3b377c208",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "2",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 780,
        "y": 820,
        "wires": [
            [
                "62bc1045198bc40d",
                "71440c40ae6a9573"
            ]
        ]
    },
    {
        "id": "cfd456ddf0b70c1b",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "\"Playing Smooth Jazz radio\"",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "tts",
        "service": "cloud_say",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "{\"message\":\"Playing smooth Jazz radio\",\"language\":\"en-GB\"}",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [
            {
                "property": "meta",
                "propertyType": "msg",
                "value": "",
                "valueType": "data"
            }
        ],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 3020,
        "y": 340,
        "wires": [
            [
                "bbd72233fa27c592",
                "5bd52e1f1112b293"
            ]
        ]
    },
    {
        "id": "93807f2991e52c81",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "\"Playing Discover Weekly on Spotify\"",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "tts",
        "service": "cloud_say",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "{\"message\":\"Playing Discover Weekly on Spotify\",\"language\":\"en-GB\"}",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [
            {
                "property": "meta",
                "propertyType": "msg",
                "value": "",
                "valueType": "data"
            }
        ],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 3050,
        "y": 740,
        "wires": [
            [
                "bbd72233fa27c592",
                "3027f44a71c1d2dc"
            ]
        ]
    },
    {
        "id": "82d4d2c94f99e7f7",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "volume_set",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "{    \"volume_level\": {{payload}}}",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [
            {
                "property": "meta",
                "propertyType": "msg",
                "value": "",
                "valueType": "data"
            }
        ],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 2610,
        "y": 2380,
        "wires": [
            [
                "4f799cab4c98e9a5"
            ]
        ]
    },
    {
        "id": "4f799cab4c98e9a5",
        "type": "trigger",
        "z": "375b40b3b377c208",
        "name": "",
        "op1": "",
        "op2": "",
        "op1type": "nul",
        "op2type": "payl",
        "duration": "1",
        "extend": true,
        "overrideDelay": false,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 2860,
        "y": 2380,
        "wires": [
            [
                "880e4e1163777501"
            ]
        ]
    },
    {
        "id": "880e4e1163777501",
        "type": "switch",
        "z": "375b40b3b377c208",
        "name": "if volume 0",
        "property": "volume",
        "propertyType": "flow",
        "rules": [
            {
                "t": "lte",
                "v": "0",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 3030,
        "y": 2380,
        "wires": [
            [
                "a1bb34f8c3b81dec"
            ]
        ]
    },
    {
        "id": "a1bb34f8c3b81dec",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "media_pause",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [
            {
                "property": "meta",
                "propertyType": "msg",
                "value": "",
                "valueType": "data"
            }
        ],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 3280,
        "y": 2380,
        "wires": [
            [
                "c96c4165346d7b44"
            ]
        ]
    },
    {
        "id": "04d3abcec6514936",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "media_play_pause",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "data"
            }
        ],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 1180,
        "y": 600,
        "wires": [
            [
                "6c3e3eee37bfec3d"
            ]
        ]
    },
    {
        "id": "2bb751fd1facc097",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "d": true,
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "volume_set",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "{\"volume_level\": 0.08}",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [
            {
                "property": "meta",
                "propertyType": "msg",
                "value": "",
                "valueType": "data"
            }
        ],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 2260,
        "y": 2160,
        "wires": [
            [
                "b74f858105380e87",
                "c96c4165346d7b44"
            ]
        ]
    },
    {
        "id": "b74f858105380e87",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "media_play",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [
            {
                "property": "meta",
                "propertyType": "msg",
                "value": "",
                "valueType": "data"
            }
        ],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 3090,
        "y": 2000,
        "wires": [
            [
                "c96c4165346d7b44"
            ]
        ]
    },
    {
        "id": "280bd47f9d6fb1f2",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "media_previous_track",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "data"
            }
        ],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 1190,
        "y": 480,
        "wires": [
            [
                "6c3e3eee37bfec3d"
            ]
        ]
    },
    {
        "id": "5d0cb31d8df02b37",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "media_next_track",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "data"
            }
        ],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 1170,
        "y": 540,
        "wires": [
            [
                "6c3e3eee37bfec3d"
            ]
        ]
    },
    {
        "id": "1a151777579b02cd",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "media_play",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 3810,
        "y": 740,
        "wires": [
            [
                "c7b5a25e63639641"
            ]
        ]
    },
    {
        "id": "c7b5a25e63639641",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "shuffle_set",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "{\"shuffle\": true}",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 4090,
        "y": 740,
        "wires": [
            []
        ]
    },
    {
        "id": "6f64b1c780256bf8",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "media_play",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 3690,
        "y": 340,
        "wires": [
            []
        ]
    },
    {
        "id": "099093297ba14d4a",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "volume_set",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "{\"volume_level\": 0.08}",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 790,
        "y": 60,
        "wires": [
            [
                "717d0e341b35f143"
            ]
        ]
    },
    {
        "id": "717d0e341b35f143",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "media_pause",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 1040,
        "y": 60,
        "wires": [
            [
                "939efe3fb202d937"
            ]
        ]
    },
    {
        "id": "24fc2679778e6469",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "select_source",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "{\"source\":\"Discover Weekly\"}",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 540,
        "y": 60,
        "wires": [
            [
                "099093297ba14d4a"
            ]
        ]
    },
    {
        "id": "939efe3fb202d937",
        "type": "change",
        "z": "375b40b3b377c208",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "lastplayed",
                "pt": "flow",
                "to": "Discover Weekly",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1270,
        "y": 60,
        "wires": [
            []
        ]
    },
    {
        "id": "f354f62f491e3974",
        "type": "delay",
        "z": "375b40b3b377c208",
        "name": "",
        "pauseType": "delay",
        "timeout": "0.3",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 1250,
        "y": 840,
        "wires": [
            [
                "5f43a5bfc2e75a19"
            ]
        ]
    },
    {
        "id": "e94bfb5499c1d7ba",
        "type": "change",
        "z": "375b40b3b377c208",
        "name": "save volume and playing state",
        "rules": [
            {
                "t": "set",
                "p": "volume",
                "pt": "flow",
                "to": "media.new_state.attributes.volume_level",
                "tot": "msg"
            },
            {
                "t": "set",
                "p": "playerstate",
                "pt": "flow",
                "to": "media.new_state.state",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 590,
        "y": 400,
        "wires": [
            []
        ]
    },
    {
        "id": "19158ff02bf8c799",
        "type": "server-state-changed",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "outputs": 1,
        "exposeAsEntityConfig": "",
        "entityId": "media_player.move",
        "entityIdType": "exact",
        "outputInitially": true,
        "stateType": "str",
        "ifState": "",
        "ifStateType": "str",
        "ifStateOperator": "is",
        "outputOnlyOnStateChange": false,
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": true,
        "ignoreCurrentStateUnavailable": true,
        "outputProperties": [
            {
                "property": "media",
                "propertyType": "msg",
                "value": "",
                "valueType": "eventData"
            }
        ],
        "x": 260,
        "y": 360,
        "wires": [
            [
                "e94bfb5499c1d7ba",
                "810921c1bb0b6cbd"
            ]
        ]
    },
    {
        "id": "4dbd3f38c587fb46",
        "type": "delay",
        "z": "375b40b3b377c208",
        "d": true,
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 2050,
        "y": 2160,
        "wires": [
            [
                "2bb751fd1facc097"
            ]
        ]
    },
    {
        "id": "4844d7c17a631aa6",
        "type": "delay",
        "z": "375b40b3b377c208",
        "d": true,
        "name": "limit",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "0.1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 2420,
        "y": 2380,
        "wires": [
            [
                "82d4d2c94f99e7f7"
            ]
        ]
    },
    {
        "id": "af8c7f578407748b",
        "type": "delay",
        "z": "375b40b3b377c208",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "2",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 2560,
        "y": 460,
        "wires": [
            [
                "ce83eba52cd840d8"
            ]
        ]
    },
    {
        "id": "810921c1bb0b6cbd",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "media.new_state.attributes.volume_level",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 630,
        "y": 360,
        "wires": []
    },
    {
        "id": "6c3e3eee37bfec3d",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload.service",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1540,
        "y": 540,
        "wires": []
    },
    {
        "id": "bbd72233fa27c592",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "meta.data.message",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 3430,
        "y": 300,
        "wires": []
    },
    {
        "id": "c96c4165346d7b44",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "meta.service",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 3530,
        "y": 2180,
        "wires": []
    },
    {
        "id": "0eed3ee3dfdb5d57",
        "type": "debug",
        "z": "375b40b3b377c208",
        "d": true,
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 2570,
        "y": 2430,
        "wires": []
    },
    {
        "id": "7c5bdbb04f1ba786",
        "type": "comment",
        "z": "375b40b3b377c208",
        "name": "link to latest version of this flow",
        "info": "Latest version of this flow can be found at \nhttps://flows.nodered.org/flow/c95d562d4858cbe1bf80fee95ba9815f#",
        "x": 540,
        "y": 300,
        "wires": []
    },
    {
        "id": "27ebe669c28dee9b",
        "type": "mqtt in",
        "z": "375b40b3b377c208",
        "name": "MQTT Trigger",
        "topic": "zigbee2mqtt/HueSwitch/action",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "99709302a818dd3b",
        "nl": false,
        "rap": false,
        "inputs": 0,
        "x": 90,
        "y": 580,
        "wires": [
            [
                "e84a42d5bda91874",
                "f14eee12a5f0e2b3"
            ]
        ]
    },
    {
        "id": "e84a42d5bda91874",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "MqTT Triggerr",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 140,
        "y": 700,
        "wires": []
    },
    {
        "id": "8e33ec862a942207",
        "type": "switch",
        "z": "375b40b3b377c208",
        "name": "Mode Light/Temp/Volume",
        "property": "mode",
        "propertyType": "flow",
        "rules": [
            {
                "t": "eq",
                "v": "temperature",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "volume",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "light",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 530,
        "y": 1080,
        "wires": [
            [
                "3123c60c449decd1",
                "203a91c0e24f20ef"
            ],
            [
                "046ba4d0b2ee12c9",
                "88999f8544eeb4d6"
            ],
            [
                "0381ed171da64419",
                "75aa8af20e733136",
                "7c700849c3654abe"
            ]
        ]
    },
    {
        "id": "6e6acdc9e273730a",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "debug 115",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1410,
        "y": 900,
        "wires": []
    },
    {
        "id": "53f53c6e5be02275",
        "type": "sonos-universal",
        "z": "375b40b3b377c208",
        "confignode": "421ce7d478b2e9b1",
        "command": "group.play.mysonos",
        "state": "",
        "stateType": "str",
        "avoidCheckPlayerAvailability": false,
        "name": "",
        "x": 3460,
        "y": 340,
        "wires": [
            []
        ]
    },
    {
        "id": "5bd52e1f1112b293",
        "type": "change",
        "z": "375b40b3b377c208",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "Liste",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 3260,
        "y": 340,
        "wires": [
            [
                "53f53c6e5be02275"
            ]
        ]
    },
    {
        "id": "658f35f8afa47db4",
        "type": "sonos-manage-mysonos",
        "z": "375b40b3b377c208",
        "confignode": "421ce7d478b2e9b1",
        "command": "mysonos.stream.item",
        "state": "",
        "stateType": "str",
        "avoidCheckPlayerAvailability": false,
        "name": "",
        "x": 3560,
        "y": 740,
        "wires": [
            [
                "1a151777579b02cd"
            ]
        ]
    },
    {
        "id": "3027f44a71c1d2dc",
        "type": "change",
        "z": "375b40b3b377c208",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "Qmusic",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 3320,
        "y": 740,
        "wires": [
            [
                "658f35f8afa47db4"
            ]
        ]
    },
    {
        "id": "a9329d62354ea15d",
        "type": "change",
        "z": "375b40b3b377c208",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "lastplayed",
                "pt": "flow",
                "to": "Discover Weekly",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 2990,
        "y": 700,
        "wires": [
            []
        ]
    },
    {
        "id": "ddb095d38c52d090",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "shuffle_set",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "{\"shuffle\": true}",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 3910,
        "y": 460,
        "wires": [
            []
        ]
    },
    {
        "id": "4962fd0f0993354d",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "media_play",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "output_location": "",
        "output_location_type": "none",
        "x": 3630,
        "y": 460,
        "wires": [
            [
                "ddb095d38c52d090"
            ]
        ]
    },
    {
        "id": "354a588f9b564aa5",
        "type": "sonos-manage-mysonos",
        "z": "375b40b3b377c208",
        "confignode": "421ce7d478b2e9b1",
        "command": "mysonos.stream.item",
        "state": "",
        "stateType": "str",
        "avoidCheckPlayerAvailability": false,
        "name": "",
        "x": 3380,
        "y": 460,
        "wires": [
            [
                "4962fd0f0993354d"
            ]
        ]
    },
    {
        "id": "1e20e3233a366017",
        "type": "change",
        "z": "375b40b3b377c208",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "Viva Cité Charleroi",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 2980,
        "y": 460,
        "wires": [
            [
                "354a588f9b564aa5"
            ]
        ]
    },
    {
        "id": "07b6afe7d718b6c9",
        "type": "change",
        "z": "375b40b3b377c208",
        "name": "Modify To \"Flow, your personal mix\"",
        "rules": [
            {
                "t": "set",
                "p": "lastplayed",
                "pt": "flow",
                "to": "Flow, your personal mix",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 3040,
        "y": 420,
        "wires": [
            []
        ]
    },
    {
        "id": "0381ed171da64419",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "debug 116",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1070,
        "y": 1680,
        "wires": []
    },
    {
        "id": "45d02a91c27e0ee9",
        "type": "sonos-universal",
        "z": "375b40b3b377c208",
        "confignode": "421ce7d478b2e9b1",
        "command": "group.play.mysonos",
        "state": "Flow, your personal mix",
        "stateType": "str",
        "avoidCheckPlayerAvailability": false,
        "name": "",
        "x": 3000,
        "y": 620,
        "wires": [
            [
                "bf1d7c2bed457806"
            ]
        ]
    },
    {
        "id": "bf1d7c2bed457806",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "End Flow, your personal mix",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 3390,
        "y": 620,
        "wires": []
    },
    {
        "id": "635024c00d523315",
        "type": "change",
        "z": "375b40b3b377c208",
        "name": "Modify To \"Nothing\"",
        "rules": [
            {
                "t": "set",
                "p": "lastplayed",
                "pt": "flow",
                "to": "Nothing",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 2990,
        "y": 580,
        "wires": [
            []
        ]
    },
    {
        "id": "4f4bb6aa32d5aba0",
        "type": "debug",
        "z": "375b40b3b377c208",
        "d": true,
        "name": "debug 120",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1970,
        "y": 2080,
        "wires": []
    },
    {
        "id": "a5093035ac3fe882",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "Set Volume UP",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "volume_up",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1770,
        "y": 1300,
        "wires": [
            [
                "b74f858105380e87"
            ]
        ]
    },
    {
        "id": "16caeae669e57d2b",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "Set Volume DOWN",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "volume_down",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.move"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1780,
        "y": 1400,
        "wires": [
            [
                "4f799cab4c98e9a5"
            ]
        ]
    },
    {
        "id": "88999f8544eeb4d6",
        "type": "switch",
        "z": "375b40b3b377c208",
        "name": "Switch on Dial Rotate Left",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "dial_rotate_left_step",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dial_rotate_left_slow",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dial_rotate_left_fast",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 1110,
        "y": 1400,
        "wires": [
            [
                "16caeae669e57d2b"
            ],
            [
                "16caeae669e57d2b"
            ],
            [
                "16caeae669e57d2b"
            ]
        ]
    },
    {
        "id": "046ba4d0b2ee12c9",
        "type": "switch",
        "z": "375b40b3b377c208",
        "name": "Switch on Dial Rotate Right",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "dial_rotate_right_step",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dial_rotate_right_slow",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dial_rotate_right_fast",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 1110,
        "y": 1320,
        "wires": [
            [
                "a5093035ac3fe882"
            ],
            [
                "a5093035ac3fe882"
            ],
            [
                "a5093035ac3fe882"
            ]
        ]
    },
    {
        "id": "75aa8af20e733136",
        "type": "switch",
        "z": "375b40b3b377c208",
        "name": "Switch on Dial Rotate Left",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "dial_rotate_left_step",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dial_rotate_left_slow",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dial_rotate_left_fast",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 1110,
        "y": 1800,
        "wires": [
            [
                "d8764705ba23c4a9"
            ],
            [
                "d8764705ba23c4a9"
            ],
            [
                "d8764705ba23c4a9"
            ]
        ]
    },
    {
        "id": "d8764705ba23c4a9",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "Light Down",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.credence"
        ],
        "data": "{\t   \"brightness_step_pct\": -10}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1780,
        "y": 1820,
        "wires": [
            []
        ]
    },
    {
        "id": "0cb4991513896681",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "Light UP",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.credence"
        ],
        "data": "{\t   \"brightness_step_pct\": 10}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1780,
        "y": 1740,
        "wires": [
            []
        ]
    },
    {
        "id": "7c700849c3654abe",
        "type": "switch",
        "z": "375b40b3b377c208",
        "name": "Switch on Dial Rotate Right",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "dial_rotate_right_step",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dial_rotate_right_slow",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dial_rotate_right_fast",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 1120,
        "y": 1720,
        "wires": [
            [
                "0cb4991513896681"
            ],
            [
                "0cb4991513896681"
            ],
            [
                "0cb4991513896681"
            ]
        ]
    },
    {
        "id": "852fdd2237412b4a",
        "type": "delay",
        "z": "375b40b3b377c208",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "2",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 780,
        "y": 1000,
        "wires": [
            [
                "3123c60c449decd1"
            ]
        ]
    },
    {
        "id": "3123c60c449decd1",
        "type": "trigger",
        "z": "375b40b3b377c208",
        "name": "",
        "op1": "temperature",
        "op2": "volume",
        "op1type": "str",
        "op2type": "str",
        "duration": "10",
        "extend": true,
        "overrideDelay": false,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 1050,
        "y": 1040,
        "wires": [
            [
                "2037e97fccec2bc0"
            ]
        ]
    },
    {
        "id": "2037e97fccec2bc0",
        "type": "change",
        "z": "375b40b3b377c208",
        "name": "Temperature",
        "rules": [
            {
                "t": "set",
                "p": "mode",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1830,
        "y": 1040,
        "wires": [
            []
        ]
    },
    {
        "id": "24fcb63769960537",
        "type": "switch",
        "z": "375b40b3b377c208",
        "name": "Switch on Dial Rotate Left",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "dial_rotate_left_step",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dial_rotate_left_slow",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dial_rotate_left_fast",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 3190,
        "y": 1420,
        "wires": [
            [
                "2d66a2e7dedcaadc"
            ],
            [
                "2d66a2e7dedcaadc"
            ],
            [
                "2d66a2e7dedcaadc"
            ]
        ]
    },
    {
        "id": "297c2e5e4142eb16",
        "type": "switch",
        "z": "375b40b3b377c208",
        "name": "Switch on Dial Rotate Right",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "dial_rotate_right_step",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dial_rotate_right_slow",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dial_rotate_right_fast",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 3200,
        "y": 1240,
        "wires": [
            [
                "51f3c41f529b9a23"
            ],
            [
                "51f3c41f529b9a23"
            ],
            [
                "51f3c41f529b9a23"
            ]
        ]
    },
    {
        "id": "e8d05a9c7a5583dc",
        "type": "inject",
        "z": "375b40b3b377c208",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "dial_rotate_right_step",
        "payloadType": "str",
        "x": 2960,
        "y": 1140,
        "wires": [
            [
                "297c2e5e4142eb16"
            ]
        ]
    },
    {
        "id": "40e34ae76661e5b0",
        "type": "inject",
        "z": "375b40b3b377c208",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "dial_rotate_left_step",
        "payloadType": "str",
        "x": 2950,
        "y": 1540,
        "wires": [
            [
                "24fcb63769960537"
            ]
        ]
    },
    {
        "id": "0fab00c33b00330e",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "Light UP",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.credence"
        ],
        "data": "payload",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 4080,
        "y": 1180,
        "wires": [
            [
                "b0dbf67f6ff73ada"
            ]
        ]
    },
    {
        "id": "4370c79218d58437",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "WarmColor",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 4670,
        "y": 1180,
        "wires": []
    },
    {
        "id": "68ecd74eb1cd282b",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "Coldcolor",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 4680,
        "y": 1460,
        "wires": []
    },
    {
        "id": "4b8882e1a8993172",
        "type": "function",
        "z": "375b40b3b377c208",
        "name": "GoToWarm",
        "func": "// Récupérer la valeur actuelle de \"color_temp\" depuis le contexte\n//var currentColorTemp = context.get('currentColorTemp') || 154;\nvar currentColorTemp = flow.get('Temp') || 154;\n// Ajouter 10 à la valeur actuelle de \"color_temp\"\nvar newColorTemp = currentColorTemp + 32;\n\n// Limiter la nouvelle valeur de \"color_temp\" à 500\nnewColorTemp = Math.min(newColorTemp, 500);\n\n// Mettre à jour la valeur de \"color_temp\" dans le contexte\ncontext.set('currentColorTemp', newColorTemp);\n\n// Mettre à jour le payload avec la nouvelle valeur de \"color_temp\"\nmsg.payload = {\n    \"color_temp\": newColorTemp\n};\n\nreturn msg;\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 3890,
        "y": 1180,
        "wires": [
            [
                "0fab00c33b00330e",
                "8195cf2f81bea287"
            ]
        ]
    },
    {
        "id": "c2d7225fa9a8fcc7",
        "type": "inject",
        "z": "375b40b3b377c208",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 3660,
        "y": 1100,
        "wires": [
            [
                "4b8882e1a8993172"
            ]
        ]
    },
    {
        "id": "a43a4ec604ad99da",
        "type": "inject",
        "z": "375b40b3b377c208",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 3760,
        "y": 1520,
        "wires": [
            [
                "1c6f87beb2b67b44"
            ]
        ]
    },
    {
        "id": "8195cf2f81bea287",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "debug 122",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 4090,
        "y": 1280,
        "wires": []
    },
    {
        "id": "51f3c41f529b9a23",
        "type": "api-current-state",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "light.credence",
        "state_type": "str",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "data",
                "propertyType": "msg",
                "value": "",
                "valueType": "entity"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 3700,
        "y": 1240,
        "wires": [
            [
                "4b8882e1a8993172"
            ]
        ]
    },
    {
        "id": "b0dbf67f6ff73ada",
        "type": "api-current-state",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "light.credence",
        "state_type": "str",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "data",
                "propertyType": "msg",
                "value": "",
                "valueType": "entity"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 4400,
        "y": 1180,
        "wires": [
            [
                "4370c79218d58437"
            ]
        ]
    },
    {
        "id": "7a48d1488e97a727",
        "type": "api-current-state",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "light.credence",
        "state_type": "str",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "data",
                "propertyType": "msg",
                "value": "",
                "valueType": "entity"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 4400,
        "y": 1460,
        "wires": [
            [
                "68ecd74eb1cd282b"
            ]
        ]
    },
    {
        "id": "1c6f87beb2b67b44",
        "type": "function",
        "z": "375b40b3b377c208",
        "name": "GoToCold",
        "func": "// Récupérer la valeur actuelle de \"color_temp\" depuis le contexte\nvar currentColorTemp = flow.get('Temp') || 500;\n\n// Soustrait 10 à la valeur actuelle de \"color_temp\"\nvar newColorTemp = currentColorTemp - 32;\n\n// Limiter la nouvelle valeur de \"color_temp\" à 154\nnewColorTemp = Math.max(newColorTemp, 154);\n\n// Mettre à jour la valeur de \"color_temp\" dans le contexte\ncontext.set('currentColorTemp', newColorTemp);\n\n// Mettre à jour le payload avec la nouvelle valeur de \"color_temp\"\nmsg.payload = {\n    \"color_temp\": newColorTemp\n};\n\nreturn msg;\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 3900,
        "y": 1460,
        "wires": [
            [
                "f23c6a13f2d57339"
            ]
        ]
    },
    {
        "id": "f23c6a13f2d57339",
        "type": "api-call-service",
        "z": "375b40b3b377c208",
        "name": "Light DOWN",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.credence"
        ],
        "data": "payload",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 4110,
        "y": 1460,
        "wires": [
            [
                "7a48d1488e97a727"
            ]
        ]
    },
    {
        "id": "2d66a2e7dedcaadc",
        "type": "api-current-state",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "light.credence",
        "state_type": "str",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "data",
                "propertyType": "msg",
                "value": "",
                "valueType": "entity"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 3700,
        "y": 1420,
        "wires": [
            [
                "1c6f87beb2b67b44"
            ]
        ]
    },
    {
        "id": "a6cfde168f05aff3",
        "type": "server-state-changed",
        "z": "375b40b3b377c208",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "outputs": 1,
        "exposeAsEntityConfig": "",
        "entityId": "light.credence",
        "entityIdType": "exact",
        "outputInitially": true,
        "stateType": "str",
        "ifState": "",
        "ifStateType": "str",
        "ifStateOperator": "is",
        "outputOnlyOnStateChange": false,
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": true,
        "ignoreCurrentStateUnavailable": true,
        "outputProperties": [
            {
                "property": "media",
                "propertyType": "msg",
                "value": "",
                "valueType": "eventData"
            }
        ],
        "x": 3920,
        "y": 940,
        "wires": [
            [
                "f8fb4dc36a9dad9f",
                "e2696f7d21832f81",
                "c235ed4651b7e564"
            ]
        ]
    },
    {
        "id": "e2696f7d21832f81",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "media.new_state.attributes.color_temp",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 4290,
        "y": 960,
        "wires": []
    },
    {
        "id": "f8fb4dc36a9dad9f",
        "type": "change",
        "z": "375b40b3b377c208",
        "name": "save Brightness and Temperature",
        "rules": [
            {
                "t": "set",
                "p": "Temp",
                "pt": "flow",
                "to": "media.new_state.attributes.color_temp",
                "tot": "msg"
            },
            {
                "t": "set",
                "p": "Bright",
                "pt": "flow",
                "to": "media.new_state.attributes.brightness",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 4260,
        "y": 1020,
        "wires": [
            [
                "b5535deb8b590d05"
            ]
        ]
    },
    {
        "id": "c235ed4651b7e564",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "media.new_state.attributes.brightness",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 4290,
        "y": 900,
        "wires": []
    },
    {
        "id": "b5535deb8b590d05",
        "type": "debug",
        "z": "375b40b3b377c208",
        "name": "debug 123",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 4630,
        "y": 1020,
        "wires": []
    },
    {
        "id": "30a8856284917b0e",
        "type": "link out",
        "z": "375b40b3b377c208",
        "name": "SelectMediaSource_Out",
        "mode": "link",
        "links": [
            "4807bd5d43455a37"
        ],
        "x": 1150,
        "y": 680,
        "wires": [],
        "l": true,
        "info": "SelectMediaSource"
    },
    {
        "id": "4807bd5d43455a37",
        "type": "link in",
        "z": "375b40b3b377c208",
        "name": "SelectMediaSource_In",
        "links": [
            "30a8856284917b0e"
        ],
        "x": 2320,
        "y": 460,
        "wires": [
            [
                "af8c7f578407748b"
            ]
        ],
        "l": true
    },
    {
        "id": "e011b41424f5a3cb",
        "type": "comment",
        "z": "375b40b3b377c208",
        "name": "MediaSource_Comment",
        "info": "",
        "x": 2450,
        "y": 220,
        "wires": []
    },
    {
        "id": "203a91c0e24f20ef",
        "type": "link out",
        "z": "375b40b3b377c208",
        "name": "SelectTemperatureWarm_Out",
        "mode": "link",
        "links": [
            "6a3a6448983a09da"
        ],
        "x": 1110,
        "y": 1080,
        "wires": [],
        "l": true
    },
    {
        "id": "6a3a6448983a09da",
        "type": "link in",
        "z": "375b40b3b377c208",
        "name": "SelectTemperatureWarm_In",
        "links": [
            "203a91c0e24f20ef"
        ],
        "x": 2800,
        "y": 1320,
        "wires": [
            [
                "297c2e5e4142eb16",
                "24fcb63769960537"
            ]
        ],
        "l": true
    },
    {
        "id": "fe0d919a81b5411f",
        "type": "change",
        "z": "375b40b3b377c208",
        "d": true,
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "OLDexpectedrotation",
                "pt": "flow",
                "to": "0",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1820,
        "y": 2160,
        "wires": [
            [
                "4dbd3f38c587fb46",
                "4f4bb6aa32d5aba0"
            ]
        ]
    },
    {
        "id": "92ab386eaaffa3ef",
        "type": "server",
        "name": "Home Assistant",
        "version": 5,
        "addon": true,
        "rejectUnauthorizedCerts": true,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": true,
        "cacheJson": true,
        "heartbeat": false,
        "heartbeatInterval": "30",
        "areaSelector": "friendlyName",
        "deviceSelector": "friendlyName",
        "entitySelector": "friendlyName",
        "statusSeparator": ": ",
        "statusYear": "hidden",
        "statusMonth": "short",
        "statusDay": "numeric",
        "statusHourCycle": "default",
        "statusTimeFormat": "h:m",
        "enableGlobalContextStore": false
    },
    {
        "id": "99709302a818dd3b",
        "type": "mqtt-broker",
        "name": "",
        "broker": "192.168.1.77",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "autoUnsubscribe": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthRetain": "false",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closeRetain": "false",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willRetain": "false",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    },
    {
        "id": "421ce7d478b2e9b1",
        "type": "sonos-config",
        "name": "Move",
        "serialnum": "",
        "ipaddress": "192.168.1.24"
    }
]