Не срабатывает правило. Почему?

Всем привет, нужна помощь.

defineVirtualDevice(“SecuritySystem”, {
title: “Охранная система”,
cells: {
“Target State”: {
type: “text”,
value: “”
},
“Current State”: {
type: “text”,
value: “”
}
}
});

defineRule({
whenChanged: “SecuritySystem/Target State”,
then: function(newValue, devName, cellName) {
log(newValue, devName, cellName);
dev[“SecuritySystem/Current State”] = newValue;
}
});

Почему может не срабатывать правило при изменение текстового значения в ветке /devices/SecuritySystem/controls/Target State

разобрался, надо было добавить readonly: false

1 лайк