@orangebucket ChatGPT provided me with this updated code for on/off based on your feedback:
{
"name": "Sync Hue, Saturation, Brightness, and On/Off",
"actions": [
// ... (hue, saturation, and brightness syncing actions)
{
"if": {
"changes": {
"operand": {
"device": {
"devices": [
"master-bulb-id"
],
"component": "main",
"capability": "switch",
"attribute": "switch"
}
}
},
"equals": "on",
"then": [
{
"command": {
"devices": [
"bulb-1-id",
"bulb-2-id",
"bulb-3-id"
],
"component": "main",
"capability": "switch",
"command": "on"
}
}
]
}
},
{
"if": {
"changes": {
"operand": {
"device": {
"devices": [
"master-bulb-id"
],
"component": "main",
"capability": "switch",
"attribute": "switch"
}
}
},
"equals": "off",
"then": [
{
"command": {
"devices": [
"bulb-1-id",
"bulb-2-id",
"bulb-3-id"
],
"component": "main",
"capability": "switch",
"command": "off"
}
}
]
}
}
]
}