Philips Hue Tap Flow

Hello,
i'm trying to adapt this excellent node flow

https://flows.nodered.org/flow/c95d562d4858cbe1bf80fee95ba9815f?fbclid=IwAR3-tjjPPwWiTE-3W0XmurX5JN5mSCBqfY0aCg3RswcNnhLhnA-fgM-mgwk to convert it to my own device controlled by Z2M but I can't get anywhere because I'm too much of a novice :-(.
What I'd like is if the music is playing on the Sonos "Move" and I turn the knob left or right, the volume adapts.
If I press Button 4 and within 3 seconds I turn the wheel left or right, then the brightness decreases or increases.
However, the values I take from the Dial and manipulate in the functions don't work properly.
Could someone please help me :frowning:

Below is "my" Flow, which is a bit of a mess :frowning:

I can't upload my Json file and if i copy paste my Json Flow i have a 422 error :frowning: and don't know how to add this. I try also to upload file but not authorize.
Flow Hue Dial 5_05_Avec Dim et Volume chgt mais chaotique.json (68.2 KB)

I've just set you as a new user, see if you can upload your flow now.

Hello, Thank you very much for your help :slight_smile:

Hi @wise3

So, problem.

This is what the average user will see when they import your flow:

(I had to zoom out there is that much!)

  1. Not that many of us here use Home automation.
    • thats why you see lots of red dotted wires and unknown nodes
    • and even if we did, we do NOT have you configuration or your HA server or your physical equipment
  2. We don't have access to your MQTT broker so we have no idea what values pass through your flows
  3. You have exported a HUGE flow - is it REALLY necessary?

If you want help, I suspect you will need to

  • break this down into the smallest possible flow that demonstrates your need.
  • remove HA and MQTT nodes and replace them with change or inject nodes that simulate your HA and MQTT values
  • tell us what values you expect to be output from a given input.

Hope that helps.

Hi Steve-Mcl

First of all, thank you for taking the time to read. Because as you can see, the flow is VERY big :-(.
If I've left all the nodes, it's because I thought it might be useful to see all my tests... But I have to admit that I'm "afraid" of deleting some of them.
I thought it would be easy to replace the Mqtt server for "helper" and then put device type identical to mine, i.e. theSonos Move et The Philips Tap Dial ( https://www.zigbee2mqtt.io/devices/8719514440937_8719514440999.html#philips-8719514440937%252F8719514440999 ) and a light controllerhttps://www.zigbee2mqtt.io/devices/TS0505B_1.html#tuya-ts0505b_1

I can try to remove some nodes, but as I know that some nodes may be useful for taking over a variable, I'm afraid of deleting some of them.

I've been trying in vain for over 1 month to convert this flow for use with my type of device and I must admit I'm desperate lol

Here here it is a printscreen with the name of my node

You don't need to remove nodes. Just select the few important nodes, copy them, and paste them into a new flow tab. Then, on that tab, add the inject and debug nodes etc so that you can demonstrate the problem. Then mark those nodes and export them to the clipboard and paste them here as described in this canned text:

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

See this post for more details - How to share code or flow json

Hello Colin

I've isolated a "behavior" that I'd like to control with the Philips Hue wheel. This behavior is the color temperature, which ranges from Warm White (500) to Cool White (153).
At the moment, I can only switch from Warm White to Cool White with a single step. But I'd like it to decrease or increase by 2, for example, each time I turn the dial.

I can see that this exists but I can't put it into practice.

[
    {
        "id": "33f7254cd40140ee",
        "type": "inject",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "dial_rotate_right_step",
        "payloadType": "str",
        "x": 200,
        "y": 260,
        "wires": [
            [
                "f7fb988ebf4c67e3"
            ]
        ]
    },
    {
        "id": "f7fb988ebf4c67e3",
        "type": "switch",
        "z": "8d595d2b5ddfea11",
        "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": 490,
        "y": 340,
        "wires": [
            [
                "3353c06cab4d553b"
            ],
            [
                "3353c06cab4d553b"
            ],
            [
                "3353c06cab4d553b"
            ]
        ]
    },
    {
        "id": "95235b012bad7d34",
        "type": "switch",
        "z": "8d595d2b5ddfea11",
        "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": 470,
        "y": 420,
        "wires": [
            [
                "2ca7525c925a19fb"
            ],
            [
                "2ca7525c925a19fb"
            ],
            [
                "2ca7525c925a19fb"
            ]
        ]
    },
    {
        "id": "f9e473071b383bf0",
        "type": "inject",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "dial_rotate_left_step",
        "payloadType": "str",
        "x": 190,
        "y": 540,
        "wires": [
            [
                "95235b012bad7d34"
            ]
        ]
    },
    {
        "id": "3353c06cab4d553b",
        "type": "api-call-service",
        "z": "8d595d2b5ddfea11",
        "name": "Light UP",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.zig"
        ],
        "data": "{\t   \"color_temp\": 500}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1120,
        "y": 180,
        "wires": [
            [
                "7436f915208cbde6"
            ]
        ]
    },
    {
        "id": "2ca7525c925a19fb",
        "type": "api-call-service",
        "z": "8d595d2b5ddfea11",
        "name": "Light Down",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.zig"
        ],
        "data": "{\t   \"color_temp\": 153}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1130,
        "y": 520,
        "wires": [
            [
                "fdc460fab1aa2204"
            ]
        ]
    },
    {
        "id": "7436f915208cbde6",
        "type": "debug",
        "z": "8d595d2b5ddfea11",
        "name": "WarmColor",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1320,
        "y": 180,
        "wires": []
    },
    {
        "id": "fdc460fab1aa2204",
        "type": "debug",
        "z": "8d595d2b5ddfea11",
        "name": "Coldcolor",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1300,
        "y": 520,
        "wires": []
    },
    {
        "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
    }
]

Hello,

i progress a little :slight_smile: Not alone with help of ChatGPT but don't replace help of all of you expert.

But don't know if i use correctly the state and use to much ressource. May be there are nodes which don't be reason for existing.
No i must find a way if the light is not "ON", it switch on this one at the correct temp color.

[
    {
        "id": "8d595d2b5ddfea11",
        "type": "tab",
        "label": "TestTemperature",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "33f7254cd40140ee",
        "type": "inject",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "dial_rotate_right_step",
        "payloadType": "str",
        "x": 280,
        "y": 460,
        "wires": [
            [
                "f7fb988ebf4c67e3"
            ]
        ]
    },
    {
        "id": "f7fb988ebf4c67e3",
        "type": "switch",
        "z": "8d595d2b5ddfea11",
        "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": 570,
        "y": 540,
        "wires": [
            [
                "493c92ddcccf8207"
            ],
            [
                "493c92ddcccf8207"
            ],
            [
                "493c92ddcccf8207"
            ]
        ]
    },
    {
        "id": "95235b012bad7d34",
        "type": "switch",
        "z": "8d595d2b5ddfea11",
        "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": 550,
        "y": 620,
        "wires": [
            [
                "64b398cce0301e19"
            ],
            [
                "64b398cce0301e19"
            ],
            [
                "64b398cce0301e19"
            ]
        ]
    },
    {
        "id": "f9e473071b383bf0",
        "type": "inject",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "dial_rotate_left_step",
        "payloadType": "str",
        "x": 270,
        "y": 740,
        "wires": [
            [
                "95235b012bad7d34"
            ]
        ]
    },
    {
        "id": "3353c06cab4d553b",
        "type": "api-call-service",
        "z": "8d595d2b5ddfea11",
        "name": "Light UP",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.zig"
        ],
        "data": "payload",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1220,
        "y": 420,
        "wires": [
            [
                "8f2317f90cb7781a"
            ]
        ]
    },
    {
        "id": "7436f915208cbde6",
        "type": "debug",
        "z": "8d595d2b5ddfea11",
        "name": "WarmColor",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1590,
        "y": 440,
        "wires": []
    },
    {
        "id": "fdc460fab1aa2204",
        "type": "debug",
        "z": "8d595d2b5ddfea11",
        "name": "Coldcolor",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1440,
        "y": 720,
        "wires": []
    },
    {
        "id": "e5179f6abd6ab5ec",
        "type": "function",
        "z": "8d595d2b5ddfea11",
        "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": 1030,
        "y": 440,
        "wires": [
            [
                "3353c06cab4d553b",
                "41e22f30acd99c1a"
            ]
        ]
    },
    {
        "id": "247a82eee85cefcb",
        "type": "inject",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 730,
        "y": 440,
        "wires": [
            [
                "e5179f6abd6ab5ec"
            ]
        ]
    },
    {
        "id": "3690ccfbbb7c0d84",
        "type": "inject",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 970,
        "y": 800,
        "wires": [
            [
                "586f4cbd8a2e4a58"
            ]
        ]
    },
    {
        "id": "41e22f30acd99c1a",
        "type": "debug",
        "z": "8d595d2b5ddfea11",
        "name": "debug 72",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1280,
        "y": 540,
        "wires": []
    },
    {
        "id": "68561378b6fe68ed",
        "type": "mqtt in",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "topic": "zigbee2mqtt/HueSwitch/action",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "99709302a818dd3b",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 220,
        "y": 580,
        "wires": [
            [
                "f7fb988ebf4c67e3",
                "95235b012bad7d34"
            ]
        ]
    },
    {
        "id": "493c92ddcccf8207",
        "type": "api-current-state",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "light.zig",
        "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": 840,
        "y": 540,
        "wires": [
            [
                "e5179f6abd6ab5ec"
            ]
        ]
    },
    {
        "id": "8f2317f90cb7781a",
        "type": "api-current-state",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "light.zig",
        "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": 1420,
        "y": 320,
        "wires": [
            [
                "7436f915208cbde6"
            ]
        ]
    },
    {
        "id": "fbfec0d1669d9a0b",
        "type": "api-current-state",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "light.zig",
        "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": 1300,
        "y": 620,
        "wires": [
            [
                "fdc460fab1aa2204"
            ]
        ]
    },
    {
        "id": "586f4cbd8a2e4a58",
        "type": "function",
        "z": "8d595d2b5ddfea11",
        "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": 1040,
        "y": 720,
        "wires": [
            [
                "7093f6a761b273c5"
            ]
        ]
    },
    {
        "id": "57284b3dd2a6b7aa",
        "type": "api-call-service",
        "z": "8d595d2b5ddfea11",
        "name": "Light Down",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.zig"
        ],
        "data": "{\t   \"color_temp\": 153}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1210,
        "y": 820,
        "wires": [
            []
        ]
    },
    {
        "id": "7093f6a761b273c5",
        "type": "api-call-service",
        "z": "8d595d2b5ddfea11",
        "name": "Light DOWN",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.zig"
        ],
        "data": "payload",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1210,
        "y": 740,
        "wires": [
            [
                "fbfec0d1669d9a0b"
            ]
        ]
    },
    {
        "id": "64b398cce0301e19",
        "type": "api-current-state",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "light.zig",
        "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": 820,
        "y": 680,
        "wires": [
            [
                "586f4cbd8a2e4a58"
            ]
        ]
    },
    {
        "id": "61815ce19ba3d2d5",
        "type": "server-state-changed",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "outputs": 1,
        "exposeAsEntityConfig": "",
        "entityId": "light.zig",
        "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": 280,
        "y": 80,
        "wires": [
            [
                "cf754db00946cbc5",
                "41f6bea9fca80071",
                "c4ad8bc0a6d228ec"
            ]
        ]
    },
    {
        "id": "41f6bea9fca80071",
        "type": "debug",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "media.new_state.attributes.color_temp",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 670,
        "y": 100,
        "wires": []
    },
    {
        "id": "cf754db00946cbc5",
        "type": "change",
        "z": "8d595d2b5ddfea11",
        "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": 640,
        "y": 160,
        "wires": [
            [
                "b98b770842e756f5"
            ]
        ]
    },
    {
        "id": "c4ad8bc0a6d228ec",
        "type": "debug",
        "z": "8d595d2b5ddfea11",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "media.new_state.attributes.brightness",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 670,
        "y": 40,
        "wires": []
    },
    {
        "id": "b98b770842e756f5",
        "type": "debug",
        "z": "8d595d2b5ddfea11",
        "name": "debug 73",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1010,
        "y": 160,
        "wires": []
    },
    {
        "id": "ad43504401a2b40c",
        "type": "api-call-service",
        "z": "8d595d2b5ddfea11",
        "name": "Light Up",
        "server": "92ab386eaaffa3ef",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.zig"
        ],
        "data": "{\t   \"color_temp\": 500}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1200,
        "y": 280,
        "wires": [
            []
        ]
    },
    {
        "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": ""
    }
]