Skip to content

Commit 0f411f7

Browse files
committed
Minor corrections in dzVents wiki Mark Down (MD) and dzVents wiki
modified: dzVents/documentation/README.md modified: dzVents/documentation/README.wiki
1 parent 48d0fc1 commit 0f411f7

File tree

2 files changed

+85
-65
lines changed

2 files changed

+85
-65
lines changed

dzVents/documentation/README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -544,19 +544,23 @@ The domoticz object holds all information about your Domoticz system. It has glo
544544
- **civTwilightEndInMinutes**: *Number*. <sup>2.4.7</sup> Number of minutes since midnight when the civil twilight will end.
545545
- **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).
546546
- **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+
551552
- _: 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.
552553
- **rPad(string, length [, character])**: *Function*: <sup>2.4.27</sup> Succeed string with given character(s) (default = space) to given length.
553554
- **lPad(string, length [, character])**: *Function*: <sup>2.4.27</sup> Precede string with given character(s) (default = space) to given length.
554555
- **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.
555556
- **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
557-
Examples: domoticz.utils.numDecimals(12.23, 4, 4) => 12.2300,
558-
domoticz.utils.numDecimals (12.23,1,1) => 12.2,
559-
domoticz.utils.zPpad(domoticz.utils.numDecimals (12.23,4,4),9) => 0012.2300
557+
- **numDecimals(number [, integer [, decimals ]])**: *Function*: <sup>2.4.27</sup> Format number to float representation
558+
Examples:
559+
```Lua
560+
domoticz.utils.numDecimals(12.23, 4, 4) -- => 12.2300,
561+
domoticz.utils.numDecimals (12.23,1,1) -- => 12.2,
562+
domoticz.utils.zPpad(domoticz.utils.numDecimals (12.23,4,4),9) -- => 0012.2300
563+
```
560564
- **dumpTable(table,[levelIndicator])**: *Function*: <sup>2.4.19</sup> print table structure and contents to log
561565
- **fileExists(path)**: *Function*: <sup>2.4.0</sup> Returns `true` if the file (with full path) exists.
562566
- **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
20332037
##[2.4.27]
20342038
- Add attribute protected for devices / scenes and groups
20352039
- 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.
20372041

20382042
##[2.4.26]
20392043
- Add Smoke Detector device (activate and reset functions )

0 commit comments

Comments
 (0)