Node-RED nodes for hubitat

One of the last missing functions for me to switch completely to Node-RED is the ability to gradually increase or decrease color temperature (CT). I make use of this extensively in the CT bulbs in my nightstand lamp - gradually increasing the CT from 2000-4000K makes it easier for me to wakeup; conversely, a gradual decrease from 3500-2000K makes me feel sleepy.

Thanks to @stephen_nutt pointing out the range node, I was able to create a sequence that can be used to gradually increase or decrease CT (or anything else that is desired).

Here's an example of a sequence that does exactly that - gradually raising a lamp from 2000K to 4000K over 450 secs

In addition to the standard palette, this sequence uses a loop-timer (node-red-contrib-looptimer or node-red-contrib-looptimer2 - either work) and a counter (node-red-contrib-counter).

In this sequence, I've used the range node to map the values of 0-99 to 2000-4000, which are passed along as color temperature arguments to the bulb. The loop timer causes this value to increase every 5 seconds.

In the event others should find this useful, here's the sequence:

Sequentially increase/decrease color temperature (or any other value)
[
    {
        "id": "eec02883.a6e538",
        "type": "range",
        "z": "1e432849.642ac",
        "minin": "1",
        "maxin": "99",
        "minout": "2000",
        "maxout": "4000",
        "action": "roll",
        "round": true,
        "property": "count",
        "name": "",
        "x": 959,
        "y": 1360,
        "wires": [
            [
                "d6ae1dde.3d1b"
            ]
        ]
    },
    {
        "id": "b8ceb483.bc902",
        "type": "counter",
        "z": "1e432849.642ac",
        "name": "0-99",
        "init": "0",
        "step": "1",
        "lower": "0",
        "upper": "99",
        "mode": "increment",
        "outputs": "1",
        "x": 810,
        "y": 1360,
        "wires": [
            [
                "eec02883.a6e538"
            ]
        ]
    },
    {
        "id": "d6ae1dde.3d1b",
        "type": "change",
        "z": "1e432849.642ac",
        "name": "msg.arguments",
        "rules": [
            {
                "t": "set",
                "p": "arguments",
                "pt": "msg",
                "to": "count",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1140,
        "y": 1360,
        "wires": [
            [
                "11292ede.45cd51"
            ]
        ]
    },
    {
        "id": "567b3b.06123cc4",
        "type": "change",
        "z": "1e432849.642ac",
        "name": "increment (1)",
        "rules": [
            {
                "t": "set",
                "p": "increment",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 650,
        "y": 1320,
        "wires": [
            [
                "b8ceb483.bc902"
            ]
        ]
    },
    {
        "id": "399dcb19.3a8e3c",
        "type": "change",
        "z": "1e432849.642ac",
        "name": "reset (0)",
        "rules": [
            {
                "t": "set",
                "p": "reset",
                "pt": "msg",
                "to": "0",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 651,
        "y": 1400,
        "wires": [
            [
                "b8ceb483.bc902"
            ]
        ]
    },
    {
        "id": "11292ede.45cd51",
        "type": "hubitat command",
        "z": "1e432849.642ac",
        "name": "Cat Light",
        "server": "a22e0ea9.276dc8",
        "deviceId": "1478",
        "command": "setColorTemperature",
        "commandArgs": "msg.arguments",
        "x": 1180,
        "y": 1420,
        "wires": [
            []
        ]
    },
    {
        "id": "22b963e2.d3a73c",
        "type": "looptimer2",
        "z": "1e432849.642ac",
        "duration": "5",
        "units": "Second",
        "maxloops": "90",
        "maxtimeout": "1",
        "maxtimeoutunits": "Hour",
        "name": "90 loops (5s)",
        "x": 450,
        "y": 1360,
        "wires": [
            [
                "567b3b.06123cc4"
            ],
            [
                "399dcb19.3a8e3c"
            ]
        ]
    },
    {
        "id": "bf0e54d4.034eb8",
        "type": "change",
        "z": "1e432849.642ac",
        "name": "msg.count = 0",
        "rules": [
            {
                "t": "delete",
                "p": "payload",
                "pt": "msg"
            },
            {
                "t": "set",
                "p": "count",
                "pt": "msg",
                "to": "0",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 260,
        "y": 1360,
        "wires": [
            [
                "22b963e2.d3a73c"
            ]
        ]
    },
    {
        "id": "4089ffa7.50a578",
        "type": "switch",
        "z": "1e432849.642ac",
        "name": "on",
        "property": "payload.value",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "on",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 230,
        "y": 1420,
        "wires": [
            [
                "bf0e54d4.034eb8"
            ]
        ]
    },
    {
        "id": "401896a.ad99568",
        "type": "hubitat device",
        "z": "1e432849.642ac",
        "name": "Cat Light",
        "server": "a22e0ea9.276dc8",
        "deviceId": "1478",
        "attribute": "switch",
        "sendEvent": true,
        "x": 80,
        "y": 1420,
        "wires": [
            [
                "4089ffa7.50a578"
            ]
        ]
    },
    {
        "id": "a22e0ea9.276dc8",
        "type": "hubitat config",
        "z": "",
        "name": "HubitatM",
        "usetls": false,
        "host": "192.168.1.46",
        "port": "80",
        "token": "496f7f11-256d-44c9-99c6-4ed460d3efb0",
        "appId": "1522",
        "nodeRedServer": "http://192.168.1.4:1880",
        "webhookPath": "/hubitat/webhook"
    }
]

Edit: for s & g, here's a single sequence that simultaneously adjusts the CT and the level:

Adjust CT and level
[
{
    "id": "22b963e2.d3a73c",
    "type": "looptimer2",
    "z": "1e432849.642ac",
    "duration": "5",
    "units": "Second",
    "maxloops": "90",
    "maxtimeout": "1",
    "maxtimeoutunits": "Hour",
    "name": "90 loops (5s)",
    "x": 450,
    "y": 1420,
    "wires": [
        [
            "567b3b.06123cc4"
        ],
        [
            "399dcb19.3a8e3c"
        ]
    ]
},
{
    "id": "567b3b.06123cc4",
    "type": "change",
    "z": "1e432849.642ac",
    "name": "increment (1)",
    "rules": [
        {
            "t": "set",
            "p": "increment",
            "pt": "msg",
            "to": "1",
            "tot": "num"
        }
    ],
    "action": "",
    "property": "",
    "from": "",
    "to": "",
    "reg": false,
    "x": 650,
    "y": 1380,
    "wires": [
        [
            "b8ceb483.bc902"
        ]
    ]
},
{
    "id": "399dcb19.3a8e3c",
    "type": "change",
    "z": "1e432849.642ac",
    "name": "reset (0)",
    "rules": [
        {
            "t": "set",
            "p": "reset",
            "pt": "msg",
            "to": "0",
            "tot": "str"
        }
    ],
    "action": "",
    "property": "",
    "from": "",
    "to": "",
    "reg": false,
    "x": 651,
    "y": 1460,
    "wires": [
        [
            "b8ceb483.bc902"
        ]
    ]
},
{
    "id": "bf0e54d4.034eb8",
    "type": "change",
    "z": "1e432849.642ac",
    "name": "msg.count = 0",
    "rules": [
        {
            "t": "delete",
            "p": "payload",
            "pt": "msg"
        },
        {
            "t": "set",
            "p": "count",
            "pt": "msg",
            "to": "0",
            "tot": "str"
        }
    ],
    "action": "",
    "property": "",
    "from": "",
    "to": "",
    "reg": false,
    "x": 260,
    "y": 1420,
    "wires": [
        [
            "22b963e2.d3a73c"
        ]
    ]
},
{
    "id": "b8ceb483.bc902",
    "type": "counter",
    "z": "1e432849.642ac",
    "name": "0-99",
    "init": "0",
    "step": "1",
    "lower": "0",
    "upper": "99",
    "mode": "increment",
    "outputs": "1",
    "x": 810,
    "y": 1420,
    "wires": [
        [
            "eec02883.a6e538",
            "9ad48a0e.d99d68"
        ]
    ]
},
{
    "id": "4089ffa7.50a578",
    "type": "switch",
    "z": "1e432849.642ac",
    "name": "on",
    "property": "payload.value",
    "propertyType": "msg",
    "rules": [
        {
            "t": "eq",
            "v": "on",
            "vt": "str"
        }
    ],
    "checkall": "true",
    "repair": false,
    "outputs": 1,
    "x": 230,
    "y": 1480,
    "wires": [
        [
            "bf0e54d4.034eb8"
        ]
    ]
},
{
    "id": "eec02883.a6e538",
    "type": "range",
    "z": "1e432849.642ac",
    "minin": "1",
    "maxin": "99",
    "minout": "2000",
    "maxout": "4000",
    "action": "roll",
    "round": true,
    "property": "count",
    "name": "",
    "x": 959,
    "y": 1380,
    "wires": [
        [
            "d6ae1dde.3d1b"
        ]
    ]
},
{
    "id": "9ad48a0e.d99d68",
    "type": "range",
    "z": "1e432849.642ac",
    "minin": "1",
    "maxin": "99",
    "minout": "1",
    "maxout": "100",
    "action": "roll",
    "round": true,
    "property": "count",
    "name": "",
    "x": 949,
    "y": 1460,
    "wires": [
        [
            "802bd5c5.97bbd"
        ]
    ]
},
{
    "id": "401896a.ad99568",
    "type": "hubitat device",
    "z": "1e432849.642ac",
    "name": "Cat Light",
    "server": "a22e0ea9.276dc8",
    "deviceId": "1478",
    "attribute": "switch",
    "sendEvent": true,
    "x": 80,
    "y": 1480,
    "wires": [
        [
            "4089ffa7.50a578"
        ]
    ]
},
{
    "id": "d6ae1dde.3d1b",
    "type": "change",
    "z": "1e432849.642ac",
    "name": "msg.arguments",
    "rules": [
        {
            "t": "set",
            "p": "arguments",
            "pt": "msg",
            "to": "count",
            "tot": "msg"
        }
    ],
    "action": "",
    "property": "",
    "from": "",
    "to": "",
    "reg": false,
    "x": 1140,
    "y": 1380,
    "wires": [
        [
            "11292ede.45cd51"
        ]
    ]
},
{
    "id": "802bd5c5.97bbd",
    "type": "change",
    "z": "1e432849.642ac",
    "name": "msg.arguments",
    "rules": [
        {
            "t": "set",
            "p": "arguments",
            "pt": "msg",
            "to": "count",
            "tot": "msg"
        }
    ],
    "action": "",
    "property": "",
    "from": "",
    "to": "",
    "reg": false,
    "x": 1140,
    "y": 1460,
    "wires": [
        [
            "687a0c3e.1c29ac"
        ]
    ]
},
{
    "id": "11292ede.45cd51",
    "type": "hubitat command",
    "z": "1e432849.642ac",
    "name": "Cat Light CT",
    "server": "a22e0ea9.276dc8",
    "deviceId": "1478",
    "command": "setColorTemperature",
    "commandArgs": "msg.arguments",
    "x": 1190,
    "y": 1320,
    "wires": [
        []
    ]
},
{
    "id": "687a0c3e.1c29ac",
    "type": "hubitat command",
    "z": "1e432849.642ac",
    "name": "Cat Light LVL",
    "server": "a22e0ea9.276dc8",
    "deviceId": "1478",
    "command": "setLevel",
    "commandArgs": "msg.arguments",
    "x": 1200,
    "y": 1520,
    "wires": [
        []
    ]
},
{
    "id": "a22e0ea9.276dc8",
    "type": "hubitat config",
    "z": "",
    "name": "HubitatM",
    "usetls": false,
    "host": "192.168.1.46",
    "port": "80",
    "token": "496f7f11-256d-44c9-99c6-4ed460d3efb0",
    "appId": "1522",
    "nodeRedServer": "http://192.168.1.4:1880",
    "webhookPath": "/hubitat/webhook"
}

]

3 Likes

It's great how finding the existence of a simple node can greatly open up what you can do with Node Red and the Hubitat Nodes. I use this CT Virual Dimmer so that I can quickly control on a mobile dashboard. I quickly found that I needed to add another sequence that turns the virtual device off when I turn the actual device off. So, now, I have 2 sequences for each CT Bulb group.
image

Now, I can just adjust temperature directly on a dimmer tile instead of using the Color Bulb tile that opens up a new dialog box that includes stuff I don't need for a CT Bulb.
image

2 Likes

If I could figure out a safe way to do cloud based endpoints, I could eliminate RM in Hubitat. However, I don't think there is a safer way and it's only 10 Rules. Plus, I have one that restarts my WyseSense Integration on a hub reboot and I don't think we have access to Hub rebooting in Node Red thru this Node Red integration.... yet.

Is there ANYTHING worse than having this automation stuff as a hobby just to run into:

"why is this light on?"
or
"why doesn't this switch turn on the light?"

My outside lights are on and I have zero clue why that is so lol (they should have turned off at sunrise)

I think today and tomorrow I'm just going to wipe out both RM and NR rules and start fresh, there are some great posts from yesterday above that got me thinking a few different ways to attack this stuff

I've also been spending the past few nights learning about MQTT and have Mosquito installed on the new Pi 4 in case I can leverage that at all for some of my things

Here's the one I use for ramping values. I will say, though, it is a little hard to tune/is kind of chatty on the output. Also, there is no way to "stop" it once started, other than giving it a new target to ramp to.

Duration = in ms
Interval = how much change before it sends a new output.

NOTE: How often it sends a value is dependent on starting value, ending value, and duration. That's why I say it is 'hard' to tune...

Example:
starting value=3000
ending value=5000
Duration=5000 (5s)
Interval=100

Would send out a value every...

ABS(3000-5000)=2000 change
(2000 change) / (100 change/interval)=20 intervals
(5000 ms) / (20 intervals)=250 ms/interval

Probably too fast (?)... So you might need to make interval greater to not pound your Maker API/mesh networks.

1 Like

Ooh - that is nice! That works better for my "goodnight" flow when I can ramp down from whatever values the CT and level are at

Hi Guys,

I'm in the process of moving all of my rules from RM4.
Can you guys please advise the best plugin for setting schedule? (day time sunrise sunset)
I've looked at node-red-contrib-light-scheduler, but dont think i can use a more granular time e.g 16:12
I'm trying to set kids night light on in the evening at certain time and if also sun has set.

thanks all!

There are a zillion of them. I use:
node-red-node-timeswitch

But there are many others that work fine. I like to use the lightest weight / least # of features for the task at hand (less code=less execution and memory overhead), which is why I don't use bigtimer.

If you want full featured and don't care about overhead, bigtimer is probably the best choice.

1 Like

I use bigtimer

1 Like

Thanks @aaiyar, I'll take a look at this. Cheers bud

1 Like

This is for my fellow Node-RED newbies. I’ve created a sample dimming-over-time sequence using the easing node described by @JasonJoel.

This node is superior to the combination of the counter and range nodes whose use I described earlier, both of which require pre-configured values. (Note: the counter node permits the increment/decrement value to be set via incoming msg properties).

The easing node accepts many configuration settings via JSON-formatted incoming msg properties. It also permits sophisticated control of the increment or decrement curve using a number of built-in functions.

Key to my use (in dimming), the “from” value can be set via the incoming msg. This is of practical value. Let’s say I want my living room to dim to 0 over 30 seconds. With the counter/range combination, the starting point is pre-defined in the range node. So, even if the living room were presently dimmed to 50%, if the range node has it configured to dim from a level of 100 to a level of 0, the lights would first increase in level from 50 to 100 before dimming down to 0.

In contrast, with the easing node, the current level of the living room can be recovered and passed to the easing node as the “from” value along with the desired “to” value (0 in this example) and the dimming duration (30 secs in this example). Practically speaking this means the lights will begin dimming at 50% and just go down to 0 over 30 seconds. The input for the easing node is JSON formatted; the change node permits using JSONata to convert the recovered level value into a “from” value and pass it along to the easing node along with “to” and “duration” values.

Here’s the test sequence I used to get this working in the event it is useful to anyone else:

Dimming from the current level to 0 using the easing node
[
{
    "id": "98ac60c.eb212a",
    "type": "change",
    "z": "1e432849.642ac",
    "name": "",
    "rules": [
        {
            "t": "set",
            "p": "payload",
            "pt": "msg",
            "to": "{\t   \"from\":(payload.value),\t   \"to\": 0,\t   \"duration\":30000\t}",
            "tot": "jsonata"
        }
    ],
    "action": "",
    "property": "",
    "from": "",
    "to": "",
    "reg": false,
    "x": 580,
    "y": 1900,
    "wires": [
        [
            "433c8f7b.dda948"
        ]
    ]
},
{
    "id": "faf0c0c7.fc45e",
    "type": "hubitat device",
    "z": "1e432849.642ac",
    "name": "Living Room",
    "server": "a22e0ea9.276dc8",
    "deviceId": "1481",
    "attribute": "level",
    "sendEvent": false,
    "x": 400,
    "y": 1900,
    "wires": [
        [
            "98ac60c.eb212a"
        ]
    ]
},
{
    "id": "433c8f7b.dda948",
    "type": "easing",
    "z": "1e432849.642ac",
    "name": "",
    "easingType": "linear",
    "outputType": "overTime",
    "duration": 1000,
    "interval": "2000",
    "numberOfValues": 10,
    "x": 750,
    "y": 1900,
    "wires": [
        [
            "7ac00886.a6d938"
        ]
    ]
},
{
    "id": "a1670489.3f815",
    "type": "function",
    "z": "1e432849.642ac",
    "name": "level",
    "func": "msg.attribute = \"level\"\nreturn msg;\n",
    "outputs": 1,
    "noerr": 0,
    "x": 240,
    "y": 1900,
    "wires": [
        [
            "faf0c0c7.fc45e"
        ]
    ]
},
{
    "id": "7ac00886.a6d938",
    "type": "change",
    "z": "1e432849.642ac",
    "name": "",
    "rules": [
        {
            "t": "set",
            "p": "arguments",
            "pt": "msg",
            "to": "payload",
            "tot": "msg"
        }
    ],
    "action": "",
    "property": "",
    "from": "",
    "to": "",
    "reg": false,
    "x": 630,
    "y": 1960,
    "wires": [
        [
            "bb78ee1f.ac0058"
        ]
    ]
},
{
    "id": "9991f1c5.ff2e9",
    "type": "inject",
    "z": "1e432849.642ac",
    "name": "",
    "topic": "",
    "payload": "",
    "payloadType": "date",
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": 0.1,
    "x": 100,
    "y": 1900,
    "wires": [
        [
            "a1670489.3f815"
        ]
    ]
},
{
    "id": "bb78ee1f.ac0058",
    "type": "hubitat command",
    "z": "1e432849.642ac",
    "name": "Living Room",
    "server": "a22e0ea9.276dc8",
    "deviceId": "1481",
    "command": "setLevel",
    "commandArgs": "msg.arguments",
    "x": 830,
    "y": 1960,
    "wires": [
        []
    ]
},
{
    "id": "a22e0ea9.276dc8",
    "type": "hubitat config",
    "z": "",
    "name": "HubitatM",
    "usetls": false,
    "host": "192.168.1.46",
    "port": "80",
    "token": "496f7f11-256d-44c9-99c6-4ed460d3efb0",
    "appId": "1522",
    "nodeRedServer": "http://192.168.1.4:1880",
    "webhookPath": "/hubitat/webhook"
}

]

3 Likes

Hi guys,

Hopefully this is another quick one.
I'm looking to use switch node for dashboard -->image
Where I have combined it with custom icon --> image

does anyone know how to update the status icon ONLY without changing the payload?
so for example, if I turn the light off using physical switch, then it will then update the icon accordingly?

If I understand what you are asking, just put an Office Light Device Node preceding the Dashboard Switch Node and make sure Send Events is checked.

EDIT: I just went to try and setup what you are asking and I created a sequence like this:
image

However when I clicked on switch on dashboard, it was immediately turning off again. I then unchecked this box in the Switch Node:

And it worked.

Nice! that is basically how I use it. It is a nice node.

1 Like

Yup, that is an important option/feature. It is especially important on something "chatty" as pushing the msg along can cause additional events, which them cause additional outputs/msgs, etc...

Here is how all of my dashboard light switches look:

Thanks @stephen_nutt. this is basically what I wanted to do.
I want to create a toggle button (using one of my aqara buttons)


that sequence seems to work okay.

but I only want the dashboard button to have the same toggle ability.

Should I just create 2 separate logic then?

I've tried that, and whatever I do, it doesn't seems to change the status of the icon image

Of what icon? The one on the dashboard? If so, show us the full config of that dashboard switch node.

EDIT: On all of my dashboard switches I have a change node like this before it. Might want to try it:
image

I think best for me to share my flow, what best way to do this?

[{"id":"1675665f.87d4da","type":"hubitat device","z":"f22467df.9f5308","name":"Button 1","server":"f6768d1f.7e358","deviceId":"644","attribute":"pushed","sendEvent":true,"x":320,"y":360,"wires":[["903541d5.5c954"]]},{"id":"bbf7674c.9a7268","type":"hubitat device","z":"f22467df.9f5308","name":"Office Light","server":"f6768d1f.7e358","deviceId":"259","attribute":"switch","sendEvent":false,"x":650,"y":240,"wires":[["350c150b.6f168a"]]},{"id":"350c150b.6f168a","type":"switch","z":"f22467df.9f5308","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":810,"y":240,"wires":[["71d2be31.552de"],["5cbd1fa5.2f98"]]},{"id":"5cbd1fa5.2f98","type":"hubitat command","z":"f22467df.9f5308","name":"Office Light On","server":"f6768d1f.7e358","deviceId":"259","command":"on","commandArgs":"","x":980,"y":260,"wires":[[]]},{"id":"71d2be31.552de","type":"hubitat command","z":"f22467df.9f5308","name":"Office Light Off","server":"f6768d1f.7e358","deviceId":"259","command":"off","commandArgs":"","x":980,"y":200,"wires":[[]]},{"id":"9db5c338.f8683","type":"ui_switch","z":"f22467df.9f5308","name":"","label":"Office Light","tooltip":"Think twice before click","group":"93d2b479.e70af8","order":2,"width":"4","height":"2","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"on","onvalueType":"str","onicon":"fa-lightbulb-o fa-3x","oncolor":"cyan","offvalue":"off","offvalueType":"str","officon":"fa-lightbulb-o fa-3x","offcolor":"red","x":450,"y":240,"wires":[["6dfbcf07.ccee3"]]},{"id":"f57da71.7648c58","type":"change","z":"f22467df.9f5308","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":240,"wires":[["9db5c338.f8683"]]},{"id":"6dfbcf07.ccee3","type":"debug","z":"f22467df.9f5308","name":"3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":430,"y":140,"wires":[]},{"id":"45f5291f.1d8588","type":"hubitat device","z":"f22467df.9f5308","name":"Office Light","server":"f6768d1f.7e358","deviceId":"259","attribute":"switch","sendEvent":true,"x":70,"y":240,"wires":[["f57da71.7648c58"]]},{"id":"903541d5.5c954","type":"hubitat device","z":"f22467df.9f5308","name":"Office Light","server":"f6768d1f.7e358","deviceId":"259","attribute":"switch","sendEvent":false,"x":470,"y":360,"wires":[["d7040d3d.dd591"]]},{"id":"d7040d3d.dd591","type":"switch","z":"f22467df.9f5308","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":630,"y":360,"wires":[["ee8c72c5.d08f8"],["5b57b439.725f3c"]]},{"id":"5b57b439.725f3c","type":"hubitat command","z":"f22467df.9f5308","name":"Office Light On","server":"f6768d1f.7e358","deviceId":"259","command":"on","commandArgs":"","x":800,"y":380,"wires":[[]]},{"id":"ee8c72c5.d08f8","type":"hubitat command","z":"f22467df.9f5308","name":"Office Light Off","server":"f6768d1f.7e358","deviceId":"259","command":"off","commandArgs":"","x":800,"y":320,"wires":[[]]},{"id":"f6768d1f.7e358","type":"hubitat config","z":"","name":"Hubitat","usetls":false,"host":"192.168.1.35","port":"80","token":"b3272fee-9084-49af-b06c-a535994463c7","appId":"513","nodeRedServer":"http://192.168.1.32:1880","webhookPath":"/hubitat/webhook"},{"id":"93d2b479.e70af8","type":"ui_group","z":"","name":"OFFICE","tab":"5dc8089c.bf4db8","order":2,"disp":true,"width":"4","collapse":false},{"id":"5dc8089c.bf4db8","type":"ui_tab","z":"","name":"HOME","icon":"dashboard","disabled":false,"hidden":false}]

I basically want this switch image to be used as a button too, so that I can toggle on and off


but obvious, if I do the above, it will create an infinite loop.

my final goal is, I would like to use 3 inputs for the light.

  1. aqara button
  2. dashboard button
  3. physical light wall switch

for the first 2, I need the ability to toggle
and whenever the actual physical switch is hit, I need it to update the dashboard button.

Hope I'm making sense. Cheers