hub.scene.changed
- Sent when a user makes changes to a scene via the UI. This broadcast is sent in response to the following commands –
hub.scenes.edit,
hub.scenes.enabled.set,
hub.scenes.notification.add,
hub.scenes.notification.remove and hub.scenes.room.set.
Edit
Field | Type | Required | Description |
---|---|---|---|
_id | string | + | Unique identifier of the scene. |
enabled | bool | + | States whether the scene is active or not. Can be ‘true’ or ‘false’. |
group_id | string | + | Identity of the group of triggers to which this scene belongs (if any). |
is_group | bool | + | States whether or not the changes apply to a group of linked triggers, or a single trigger. A group of triggers is formed when two or more triggers are related by conditions. For example, ‘If the door is open AND the thermostat is on, do X.’ Can be ‘true’ (group) or ‘false’ (single). |
name | string | + | Label of the scene affected by the changes. |
parent_id | string | + | Identifies the room associated with the scene (if any). |
when | Objects Array | + | A list of the conditions/triggers that will initiate the ‘then’ action. |
then | Objects Array | + | A list of the actions that will occur once the ‘when’ conditions are met. |
changed_by | string | + | The command responsible for the scene change. |
syncNotification | bool | + | Special mark to request data synchronization between the cloud and the controller. This is only true if the name of the scene was changed. |
Edit
{
"id": "ui_broadcast",
"msg_subclass": "hub.scene.changed",
"changed_by": "hub.scenes.edit",
"result": {
"_id": "5c7ff48b7f00002a07a408e3",
"enabled": true,
"group_id": null,
"is_group": false,
"name": "testRule",
"syncNotification":false,
"parent_id": "5c6ec961cc01eb07f86f9dd9",
"then": [
{
"blockOptions": {
"method": {
"args": {
"item": "item",
"value": "value"
},
"name": "setItemValue"
}
},
"blockType": "then",
"fields": [
{
"name": "item",
"type": "item",
"value": "5c7fea737f00000ab55f2e5d"
},
{
"name": "value",
"type": "bool",
"value": false
}
]
}
],
"when": [
{
"blockOptions":{
"method":{
"args":{
"sunstate":"sunrise",
"time":"time"
},
"name":"isSunState"
}
},
"blockType":"when",
"fields":[
{
"name":"sunrise",
"type":"string",
"value":"before"
},
{
"name":"time",
"type":"hms_interval",
"value":"10:30"
}
]
}
]
}
}