Skip to content

Commit

Permalink
chore: release v7.0.0
Browse files Browse the repository at this point in the history
* (bluefox) Breaking change: all usages of `jsonata` must be rewritten to use promises.
* (bluefox) Breaking change: all blockly scripts with `jsonata` blocks must de changed (just move some blocks) and saved anew.
* (bluefox) Extended `createState` command with possibility to create aliases.
* (bluefox) Corrected CRON card in rules
* (bluefox) Added additional options to show the attributes of object in blockly
* (bluefox) Corrected `existsStateAsync` function
* (bluefox) Added `isDaylightSaving` state to indicate day saving time
  • Loading branch information
GermanBluefox committed Feb 21, 2023
1 parent aaa31fe commit 47f2ef5
Show file tree
Hide file tree
Showing 17 changed files with 46 additions and 45 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG_OLD.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
The newest change log is in README.md
## 6.1.0 (2022-11-03)
* (Apollon77) Add a configurable check for number of setStates per Minute to prevent scripts from taking down ioBroker. Default are 1000 setState per minute. Only stops if the number is reached 2 minutes in a row!
* (Apollon77) Add createAlias method to create aliases for states
* (Apollon77) Add setStateDelayed to selector
* (Apollon77) Add options to exec command
* (Apollon77) Fix issues with cancelling schedules when stopping scripts
* (bluefox) Corrected debug mode

## 6.0.3 (2022-09-14)
* (AlCalzone) Downgrade Typescript to prevent errors with global typescript scripts

Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ And then call `npm run build`.
<!--
### **WORK IN PROGRESS**
-->
### **WORK IN PROGRESS**
### 7.0.0 (2023-02-21)
* (bluefox) Breaking change: all usages of `jsonata` must be rewritten to use promises.
* (bluefox) Breaking change: all blockly scripts with `jsonata` blocks must de changed (just move some blocks) and saved anew.
* (bluefox) Extended `createState` command with possibility to create aliases.
Expand All @@ -79,14 +79,6 @@ And then call `npm run build`.
### 6.1.2 (2022-11-03)
* (bluefox) Added ukrainian translation

### 6.1.0 (2022-11-03)
* (Apollon77) Add a configurable check for number of setStates per Minute to prevent scripts from taking down ioBroker. Default are 1000 setState per minute. Only stops if the number is reached 2 minutes in a row!
* (Apollon77) Add createAlias method to create aliases for states
* (Apollon77) Add setStateDelayed to selector
* (Apollon77) Add options to exec command
* (Apollon77) Fix issues with cancelling schedules when stopping scripts
* (bluefox) Corrected debug mode

## License
The MIT License (MIT)

Expand Down
10 changes: 5 additions & 5 deletions admin/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"files": {
"main.js": "/static/js/main.3fa20069.js",
"main.js": "/static/js/main.158bac96.js",
"static/css/62.a2231b9d.chunk.css": "/static/css/62.a2231b9d.chunk.css",
"static/js/62.acb4e2d9.chunk.js": "/static/js/62.acb4e2d9.chunk.js",
"static/js/62.8cad6caf.chunk.js": "/static/js/62.8cad6caf.chunk.js",
"static/js/90.f5ce0179.chunk.js": "/static/js/90.f5ce0179.chunk.js",
"static/js/234.427745bc.chunk.js": "/static/js/234.427745bc.chunk.js",
"static/js/13.6f214f89.chunk.js": "/static/js/13.6f214f89.chunk.js",
Expand Down Expand Up @@ -143,9 +143,9 @@
"static/media/Garage Doors.svg": "/static/media/Garage Doors.0c2a1cfca7ad1ea59625.svg",
"static/media/Outdoor Blinds.svg": "/static/media/Outdoor Blinds.37b85a9c060a4af48da9.svg",
"static/media/Upstairs.svg": "/static/media/Upstairs.441813e54e0daca0882d.svg",
"main.3fa20069.js.map": "/static/js/main.3fa20069.js.map",
"main.158bac96.js.map": "/static/js/main.158bac96.js.map",
"62.a2231b9d.chunk.css.map": "/static/css/62.a2231b9d.chunk.css.map",
"62.acb4e2d9.chunk.js.map": "/static/js/62.acb4e2d9.chunk.js.map",
"62.8cad6caf.chunk.js.map": "/static/js/62.8cad6caf.chunk.js.map",
"90.f5ce0179.chunk.js.map": "/static/js/90.f5ce0179.chunk.js.map",
"234.427745bc.chunk.js.map": "/static/js/234.427745bc.chunk.js.map",
"13.6f214f89.chunk.js.map": "/static/js/13.6f214f89.chunk.js.map",
Expand All @@ -166,6 +166,6 @@
"44.c788402e.chunk.js.map": "/static/js/44.c788402e.chunk.js.map"
},
"entrypoints": [
"static/js/main.3fa20069.js"
"static/js/main.158bac96.js"
]
}
6 changes: 3 additions & 3 deletions admin/google-blockly/own/blocks_convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Blockly.Blocks.convert_toboolean = {
};

Blockly.JavaScript.convert_toboolean = function (a) {
return ["(function (){var val = " + Blockly.JavaScript.valueToCode(a, "VALUE", Blockly.JavaScript.ORDER_ATOMIC) + "; if (val === 'true') return true; if (val === 'false') return false; return !!val;})()", Blockly.JavaScript.ORDER_ATOMIC];
return ["(function (){const val = " + Blockly.JavaScript.valueToCode(a, "VALUE", Blockly.JavaScript.ORDER_ATOMIC) + "; if (val === 'true') return true; if (val === 'false') return false; return !!val;})()", Blockly.JavaScript.ORDER_ATOMIC];
};

// --- to String --------------------------------------------------
Expand Down Expand Up @@ -253,11 +253,11 @@ Blockly.JavaScript.convert_from_date = function (block) {
} else if (option === 's') {
code = 'getDateObject(' + value + ').getSeconds()';
} else if (option === 'sid') {
code = '(function () {var v = getDateObject(' + value + '); return v.getHours() * 3600 + v.getMinutes() * 60 + v.getSeconds();})()';
code = '(function () {const v = getDateObject(' + value + '); return v.getHours() * 3600 + v.getMinutes() * 60 + v.getSeconds();})()';
} else if (option === 'm') {
code = '(getDateObject(' + value + ').getMinutes())';
} else if (option === 'mid') {
code = '(function () {var v = getDateObject(' + value + '); return v.getHours() * 60 + v.getMinutes();})()';
code = '(function () {const v = getDateObject(' + value + '); return v.getHours() * 60 + v.getMinutes();})()';
} else if (option === 'h') {
code = 'getDateObject(' + value + ').getHours()';
} else if (option === 'd') {
Expand Down
4 changes: 2 additions & 2 deletions admin/google-blockly/own/blocks_system.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,9 +811,9 @@ Blockly.JavaScript['get_value_async'] = function(block) {
var attr = block.getFieldValue('ATTR');
var statement = Blockly.JavaScript.statementToCode(block, 'STATEMENT');
if (attr === 'type' || attr.indexOf('.') !== -1) {
return 'getObjectAsync("' + oid + '", async function (err, obj) {\n var value = obj.' + attr + ';\n' + statement + '});\n';
return 'getObjectAsync("' + oid + '", async function (err, obj) {\n let value = obj.' + attr + ';\n' + statement + '});\n';
} else {
return 'getState("' + oid + '", async function (err, state) {\n var value = state.' + attr + ';\n' + statement + '});\n';
return 'getState("' + oid + '", async function (err, state) {\n let value = state.' + attr + ';\n' + statement + '});\n';
}
};

Expand Down
2 changes: 1 addition & 1 deletion admin/google-blockly/own/blocks_time.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ Blockly.JavaScript['time_get'] = function(block) {
} else if (option === 'm') {
code = '(new Date().getMinutes())';
} else if (option === 'mid') {
code = '(function () {var v = new Date(); return v.getHours() * 60 + v.getMinutes();})()';
code = '(function () {const v = new Date(); return v.getHours() * 60 + v.getMinutes();})()';
} else if (option === 'h') {
code = '(new Date().getHours())';
} else if (option === 'd') {
Expand Down
4 changes: 2 additions & 2 deletions admin/google-blockly/own/blocks_trigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ Blockly.JavaScript['on_ext'] = function(block) {
var oid = '[].concat(' + oids.join(').concat(') + ')';

var code = 'on({id: ' + oid + ', ' + val + (ack_condition ? ', ack: ' + ack_condition : '') + '}, async function (obj) {\n ' +
(oids.length === 1 ? 'var value = obj.state.val;\n var oldValue = obj.oldState.val;\n' : '') +
(oids.length === 1 ? 'let value = obj.state.val;\n let oldValue = obj.oldState.val;\n' : '') +
statements_name + '});\n';
return code;
};
Expand Down Expand Up @@ -347,7 +347,7 @@ Blockly.JavaScript['on'] = function(block) {
val = 'change: "' + dropdown_condition + '"';
}

var code = 'on({id: "' + value_objectid + '"' + (objectname ? '/*' + objectname + '*/' : '') + ', ' + val + (ack_condition ? ', ack: ' + ack_condition : '') + '}, async function (obj) {\n var value = obj.state.val;\n var oldValue = obj.oldState.val;\n' + statements_name + '});\n';
var code = 'on({id: "' + value_objectid + '"' + (objectname ? '/*' + objectname + '*/' : '') + ', ' + val + (ack_condition ? ', ack: ' + ack_condition : '') + '}, async function (obj) {\n let value = obj.state.val;\n let oldValue = obj.oldState.val;\n' + statements_name + '});\n';
return code;
};

Expand Down
Loading

0 comments on commit 47f2ef5

Please sign in to comment.