You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dzVents/documentation/README.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -544,19 +544,23 @@ The domoticz object holds all information about your Domoticz system. It has glo
544
544
-**civTwilightEndInMinutes**: *Number*. <sup>2.4.7</sup> Number of minutes since midnight when the civil twilight will end.
545
545
-**triggerIFTTT(makerName [,sValue1, sValue2, sValue3])**: *Function*. <sup>2.4.18</sup> Have Domoticz 'call' an IFTTT maker event. makerName is required, 0-3 sValue's are optional. Supports [command options](#Command_options_.28delay.2C_duration.2C_event_triggering.29).
546
546
-**utils**: <sup>2.4.0</sup>. A subset of handy utilities:
547
-
Note that these functions must be preceded by domoticz.utils. If you use more then a few declare something like local _u = domoticz.utils at the beginning of your script and use _u.functionName in the remainder. Example:
548
-
_u = domoticz.utils
549
-
print(_u.rPad(test,10) .. '|||') => test |||
550
-
547
+
Note that these functions must be preceded by domoticz.utils. If you use more then a few declare something like local _u = domoticz.utils at the beginning of your script and use _u.functionName in the remainder.
548
+
Example:
549
+
_u = domoticz.utils
550
+
print(_u.rPad('test',8) .. '|') => test||||
551
+
551
552
- _: Lodash. This is an entire collection with very handy Lua functions. Read more about [Lodash](#Lodash_for_Lua). E.g.: `domoticz.utils._.size({'abc', 'def'}))` Returns 2.
552
553
- **rPad(string, length [, character])**: *Function*: <sup>2.4.27</sup> Succeed string with given character(s) (default = space) to given length.
553
554
- **lPad(string, length [, character])**: *Function*: <sup>2.4.27</sup> Precede string with given character(s) (default = space) to given length.
554
555
- **mPad(string, length [, character])**: *Function*: <sup>2.4.27</sup> Center string by preceding and succeeding with given character(s) (default = space) to given length.
555
556
- **zPad(number, length)**: *Function*: <sup>2.4.27</sup> Precede number with given zeros to given length.
556
-
**numDecimals(number [, integer [, decimals ]])**: *Function*: <sup>2.4.27</sup> Format number to float representation
- **dumpTable(table,[levelIndicator])**: *Function*: <sup>2.4.19</sup> print table structure and contents to log
561
565
- **fileExists(path)**: *Function*: <sup>2.4.0</sup> Returns `true` if the file (with full path) exists.
562
566
- **fromJSON(json, fallback <sup>2.4.16</sup>)**: *Function*. Turns a json string to a Lua table. Example: `local t = domoticz.utils.fromJSON('{ "a": 1 }')`. Followed by: `print( t.a )` will print 1. Optional 2nd param fallback will be returned if json is nil or invalid.
@@ -2033,7 +2037,7 @@ On the other hand, you have to make sure that dzVents can access the json withou
2033
2037
##[2.4.27]
2034
2038
- Add attribute protected for devices / scenes and groups
2035
2039
- Add methods protectionOn and protectionOff for devices / scenes and groups
2036
-
- Add functions rpad, lpad, mpad, zpad, numDecimals in utils
2040
+
- Add functions rPad, lPad, mPad, zPad, numDecimals in utils.
2037
2041
2038
2042
##[2.4.26]
2039
2043
- Add Smoke Detector device (activate and reset functions )
0 commit comments