Skip to content

Commit 86acfd2

Browse files
authored
Berry add 'tasmota.add_rule_once()'
1 parent 910868c commit 86acfd2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/Berry.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,8 @@ tasmota.publish\_result<a class="cmnd" id="tasmota_publish_result"></a>|`(payloa
501501
tasmota.publish\_rule<a class="cmnd" id="tasmota_publish_rule"></a>|`(payload:string) -> handled:bool`<br>sends a JSON stringified message to the rule engine, without actually publishing a message to MQTT. Returns `true` if the message was handled by a rule.
502502
tasmota.cmd<a class="cmnd" id="tasmota_cmd"></a>|`(command:string [, mute:bool]) -> map`<br>Sends any command to Tasmota, like it was type in the console. It returns the result of the command if any, as a map parsed from the command output JSON. Takes an optional `mute` attribute. If `mute` is `true`, logging (serial, web, mqtt) is reduced to level `1` (only severe errors) to avoid polluting the logs.
503503
tasmota.memory<a class="cmnd" id="tasmota_memory"></a>|`() -> map` or `(key:string) -> any`<br>Returns memory stats similar to the Information page.<br>Example: `{'iram_free': 41, 'frag': 51, 'program_free': 1856, 'flash': 4096, 'heap_free': 226, 'program': 1679}`<br>or when PSRAM `{'psram_free': 3703, 'flash': 16384, 'program_free': 3008, 'program': 1854, 'psram': 4086, 'frag': 27, 'heap_free': 150}`<br>If a `key` is passed, the value is returned without allocating a new `map`, or `nil` if no value matches the `key`.
504-
tasmota.add\_rule<a class="cmnd" id="tasmota_add_rule"></a>|`(trigger:string, f:function [, id:any]) ->nil`<br>`(triggers:list_of_string, f:function [, id:any]) ->nil`<br>Adds a rule to the rule engine. See above for rule triggers.<br>Optional `id` allows to remove selectively rules with `tasmota.remove_rule()`.
504+
tasmota.add\_rule<a class="cmnd" id="tasmota_add_rule"></a>|`(trigger:string, f:function [, id:any]) ->nil`<br>`(triggers:list_of_string, f:function [, id:any]) ->nil`<br>Adds a rule to the rule engine. See above for rule triggers.<br>Optional `id` allows to remove selectively rules with `tasmota.remove_rule()`.<br>If you add a new rule with the same `trigger` and the same non-`nil` `id`, the previous rule is removed and the new one replaces it (this is handy when developing new code)
505+
tasmota.add\_rule\_once<a class="cmnd" id="tasmota_add_rule_once"></a>|`(trigger:string, f:function [, id:any]) ->nil`<br>`(triggers:list_of_string, f:function [, id:any]) ->nil`<br>Same as `add_rule` except the rule is fired only once and then removed from rules
505506
tasmota.remove\_rule<a class="cmnd" id="tasmota_remove_rule"></a>|`(trigger:string [, id:any]) ->nil`<br>`(triggers:list_of_string [, id:any]) ->nil`<br>Removes a rule from the rule engine. Silently ignores the trigger(s) if no rule matches. Optional `id` to remove selectively some rules.
506507
tasmota.add\_driver<a class="cmnd" id="tasmota_add_driver"></a>|`(instance) ->nil`<br>Registers an instance as a driver
507508
tasmota.remove\_driver<a class="cmnd" id="tasmota_remove_driver"></a>|`(instance) ->nil`<br>Removes a driver

0 commit comments

Comments
 (0)