From 8407cf772d557124fe3bfd396bd324d0e07fd73d Mon Sep 17 00:00:00 2001 From: onkelandy Date: Wed, 1 Apr 2020 05:09:56 +0200 Subject: [PATCH 1/7] small fixes to avoid template checker problems --- pages/docu/device/widget_device.smallshut.html | 12 ++++++------ pages/docu/quad/widget_quad.dimmer.html | 4 ++-- widgets/basic.html | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pages/docu/device/widget_device.smallshut.html b/pages/docu/device/widget_device.smallshut.html index e70e0d70f..6b5208c8a 100755 --- a/pages/docu/device/widget_device.smallshut.html +++ b/pages/docu/device/widget_device.smallshut.html @@ -44,12 +44,12 @@
Example
Shutter Table
- {{ device.smallshut('SmS1', 'Wohnzimmer', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', 'bath.blind.adjust') }} + {{ device.smallshut('SmS2', 'Wohnzimmer', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', 'bath.blind.adjust') }}
- {{ device.smallshut('SmS1', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '') }} - {{ device.uzsuicon('uzsu1', 'uzsuitem') }} + {{ device.smallshut('SmS2', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '') }} + {{ device.uzsuicon('uzsu2', 'uzsuitem') }}
@@ -64,10 +64,10 @@
Example
Shutter Table with type = midi
- {{ device.smallshut('SmS2', 'Wohnzimmer', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', 'bath.blind.adjust', 'mini') }} + {{ device.smallshut('SmS3', 'Wohnzimmer', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', 'bath.blind.adjust', 'mini') }} - {{ device.smallshut('SmS2', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '', 'mini') }} - {{ device.uzsuicon('uzsu1', 'uzsuitem') }} + {{ device.smallshut('SmS3', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '', 'mini') }} + {{ device.uzsuicon('uzsu3', 'uzsuitem') }}
diff --git a/pages/docu/quad/widget_quad.dimmer.html b/pages/docu/quad/widget_quad.dimmer.html index 3cf303f71..74779bd60 100755 --- a/pages/docu/quad/widget_quad.dimmer.html +++ b/pages/docu/quad/widget_quad.dimmer.html @@ -71,12 +71,12 @@
Example
['uzsu', 'stateengine', 'plot', 'value_popup', 'switch', 'locks', ' '] stateengine with popup (have to long tap to open popup!)
{% filter trim|escape|nl2br %}{% raw %} - {{ quad.dimmer('dimmer1', 'Dimmer Example 1', 'licht.SA', 'licht.dimmen', 0, 255, 1, icon.light('','','licht.dimmen'), icon.light('','','licht.dimmen'), 'icon1', 'icon0', '', '', '100', 'right', 'blink', '', 'licht.dimmen.zeitschalter', ['', '', 'bool'], '%', 'licht.dimmen', '', 'licht.automatik', (stateengine['item1']), ['', 'bwm.sperren', 'licht.zwangvalue'], '', '', ['uzsu', 'stateengine', 'plot', 'value_popup', 'switch', 'locks', ' ']) }} + {{ quad.dimmer('dimmer1', 'Dimmer Example 1', 'licht.SA', 'licht.dimmen', 0, 255, 1, icon.light('','','licht.dimmen','','','blue'), icon.light('','','licht.dimmen'), 'blue', 'icon0', '', '', '100', 'right', 'blink', '', 'licht.dimmen.zeitschalter', ['', '', 'bool'], '%', 'licht.dimmen', '', 'licht.automatik', (stateengine['item1']), ['', 'bwm.sperren', 'licht.zwangvalue'], '', '', ['uzsu', 'stateengine', 'plot', 'value_popup', 'switch', 'locks', ' ']) }} {% endraw %}{% endfilter %}
['switch', 'value_slider'] diff --git a/widgets/basic.html b/widgets/basic.html index fbfd1db9c..6dde5c411 100755 --- a/widgets/basic.html +++ b/widgets/basic.html @@ -302,8 +302,9 @@ * * @param {id=} unique id for this widget (optional) * @param {item[?]} one or more item(s). Multiple items in array-form: [item1, item2] -* @param {format(text,html,script,text2br)=} either a unit of the language file, an individual format string (PHP sprintf like) or a simple string as suffix. +* @param {format=} either a unit of the language file, an individual format string (PHP sprintf like) or a simple string as suffix. Use 'text' to display result as unformatted string, 'html' to render it as unescaped html, 'text2br' to convert line endings like '\r', '\n' or '\r\n' to HTML breaks or 'script' to just execute as JavaScript w/o displaying anything. +* @ add {format(text,html,script,text2br)=} * @param {formula=VAR} any valid JavaScript expression with following variables and aggregate functions (optional, default: VAR) - VAR1, VAR2, ... represent the corresponding item's value, VAR is an array of all item values - SUM(VAR), AVG(VAR), SUB(VAR), MIN(VAR) and MAX(VAR) aggregate the values From dc0569f9765162614beb4d76649b04d041ae7c6c Mon Sep 17 00:00:00 2001 From: onkelandy Date: Wed, 1 Apr 2020 05:14:32 +0200 Subject: [PATCH 2/7] fix smallshut id --- pages/docu/device/widget_device.smallshut.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/docu/device/widget_device.smallshut.html b/pages/docu/device/widget_device.smallshut.html index 6b5208c8a..ddfb2256b 100755 --- a/pages/docu/device/widget_device.smallshut.html +++ b/pages/docu/device/widget_device.smallshut.html @@ -33,7 +33,7 @@
Example
- {{ device.smallshut('SmS1', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '') }} + {{ device.smallshut('SmS2', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '') }} {{ device.uzsuicon('uzsu1', 'uzsuitem') }}
@@ -44,12 +44,12 @@
Example
Shutter Table
- {{ device.smallshut('SmS2', 'Wohnzimmer', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', 'bath.blind.adjust') }} + {{ device.smallshut('SmS1', 'Wohnzimmer', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', 'bath.blind.adjust') }}
{{ device.smallshut('SmS2', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '') }} - {{ device.uzsuicon('uzsu2', 'uzsuitem') }} + {{ device.uzsuicon('uzsu1', 'uzsuitem') }}
@@ -66,8 +66,8 @@
Example
{{ device.smallshut('SmS3', 'Wohnzimmer', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', 'bath.blind.adjust', 'mini') }} - {{ device.smallshut('SmS3', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '', 'mini') }} - {{ device.uzsuicon('uzsu3', 'uzsuitem') }} + {{ device.smallshut('SmS4', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '', 'mini') }} + {{ device.uzsuicon('uzsu2', 'uzsuitem') }}
From 2afa7f5a002bb07038f034e5b485abd5bdbc4c4f Mon Sep 17 00:00:00 2001 From: onkelandy Date: Wed, 1 Apr 2020 05:44:14 +0200 Subject: [PATCH 3/7] script on quad dimmer docu to auto turn on/off switch when slider value is changed --- pages/docu/quad/widget_quad.dimmer.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pages/docu/quad/widget_quad.dimmer.html b/pages/docu/quad/widget_quad.dimmer.html index 74779bd60..a667e4ef6 100755 --- a/pages/docu/quad/widget_quad.dimmer.html +++ b/pages/docu/quad/widget_quad.dimmer.html @@ -21,7 +21,14 @@ io.write('licht.automatik.lock', '0'); io.write('bwm.sperren', '0'); io.write('licht.zwangvalue', '0'); - }); + + $( "#widget_quad_dimmer-dimmer1dimmerpopup_slider, #widget_quad_dimmer-dimmer2_slider_inline, #widget_quad_dimmer-dimmer3dimmerpopup_slider" ).change(function(){ + if (this.value > 0) + io.write('licht.SA', '1' ); + else + io.write('licht.SA', '0' ); + }); + }); {% set stateengine = {} %} From 35abe0a95f6d9bba705449c0cac7ef99462c21bd Mon Sep 17 00:00:00 2001 From: wvhn <17801971+wvhn@users.noreply.github.com> Date: Fri, 3 Apr 2020 14:26:44 +0200 Subject: [PATCH 4/7] mark version as unreleased / maybe unstable --- version-info.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version-info.php b/version-info.php index 01ddf3534..bee177d9e 100644 --- a/version-info.php +++ b/version-info.php @@ -1,4 +1,4 @@ From 57c0f481f7461c7b04a52c46be7f9e4697ac79cc Mon Sep 17 00:00:00 2001 From: wvhn <17801971+wvhn@users.noreply.github.com> Date: Fri, 3 Apr 2020 21:06:43 +0200 Subject: [PATCH 5/7] revert '2.9a' since it causes errors --- version-info.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version-info.php b/version-info.php index bee177d9e..01ddf3534 100644 --- a/version-info.php +++ b/version-info.php @@ -1,4 +1,4 @@ From edd6e26d3e934b9c5883c4b30c9a06dcf9f7b50a Mon Sep 17 00:00:00 2001 From: onkelandy Date: Mon, 6 Apr 2020 21:22:41 +0200 Subject: [PATCH 6/7] fix status widget docu --- pages/docu/status/widget_status.message.html | 7 ++++--- pages/docu/status/widget_status.notify.html | 7 ++++--- widgets/status.html | 10 +++++----- 3 files changed, 13 insertions(+), 11 deletions(-) mode change 100644 => 100755 pages/docu/status/widget_status.message.html mode change 100644 => 100755 pages/docu/status/widget_status.notify.html mode change 100644 => 100755 widgets/status.html diff --git a/pages/docu/status/widget_status.message.html b/pages/docu/status/widget_status.message.html old mode 100644 new mode 100755 index b01797083..ee1cc644b --- a/pages/docu/status/widget_status.message.html +++ b/pages/docu/status/widget_status.message.html @@ -11,7 +11,10 @@ {% extends "widget_status.html" %} {% block example %} - +
Examples
If you flip the switch to 'on' a popup will be shown. @@ -36,5 +39,3 @@
Examples
{% endblock %} - - diff --git a/pages/docu/status/widget_status.notify.html b/pages/docu/status/widget_status.notify.html old mode 100644 new mode 100755 index 5da3262c6..55621bf53 --- a/pages/docu/status/widget_status.notify.html +++ b/pages/docu/status/widget_status.notify.html @@ -11,7 +11,10 @@ {% extends "widget_status.html" %} {% block example %} - +
Examples
If you flip the switch to 'on' the alert is been triggerd and the notification will be shown. @@ -32,5 +35,3 @@
Examples
{% endblock %} - - diff --git a/widgets/status.html b/widgets/status.html old mode 100644 new mode 100755 index c0bbd25d1..87ce73333 --- a/widgets/status.html +++ b/widgets/status.html @@ -39,7 +39,7 @@ {% endmacro %} - + /** * Displays a list of logging-information * @@ -91,14 +91,14 @@ {% endmacro %} - + /** * Displays a notification popup window with a message * * @param {id} unique id for this widget * @param {item} an item witch triggers the popup: NOT 0 open it, 0 close it * @param {item=} an item with the dynamic message -* @param {item=} an item with the a timestamp +* @param {item=} an item with a timestamp (day.month.year hour:minute) * @param {text} a title of the messagebox * @param {text=} an additional static text * @param {text(info,error)=info} the mode: 'info', 'error' (optional, default 'info') @@ -110,11 +110,11 @@

{{ title }}

{{ text }}

- +
OK
-{% endmacro %} \ No newline at end of file +{% endmacro %} From 71ca4d963ff9bb68e3d45305ebee0bf0f25c3a5d Mon Sep 17 00:00:00 2001 From: onkelandy Date: Mon, 6 Apr 2020 21:29:13 +0200 Subject: [PATCH 7/7] update status timestamp info --- widgets/status.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/status.html b/widgets/status.html index 87ce73333..849d4f04d 100755 --- a/widgets/status.html +++ b/widgets/status.html @@ -98,7 +98,7 @@ * @param {id} unique id for this widget * @param {item} an item witch triggers the popup: NOT 0 open it, 0 close it * @param {item=} an item with the dynamic message -* @param {item=} an item with a timestamp (day.month.year hour:minute) +* @param {item=} an item with a timestamp (e.g. 1974-01-01T12:00:00.000000+01:00 or 01.01.20 12:01) * @param {text} a title of the messagebox * @param {text=} an additional static text * @param {text(info,error)=info} the mode: 'info', 'error' (optional, default 'info')