Set counter via Berry Script with a variable #22512
Replies: 2 comments
-
What you are doing wrong is not reading the syntax of What could be used in your case is However, both ways are not the most direct approach to setting a counter from Berry, as the
In addition to being faster, this also works in places where you can't use |
Beta Was this translation helpful? Give feedback.
-
Hello sfromis, Yes I had read the Tasmota docs too, but overlooked the one with the string.
is of course much better and I have also used it in my script. Thank you very much! |
Beta Was this translation helpful? Give feedback.
-
Hello dear community,
I would like to set a counter via Berry Script, where the value of the counter is in a variable.
So if I enter the following:
tasmota.cmd(‘counter1 50’)
it works fine and the counter is set to 50.
But if I want something like this:
var number = 50
tasmota.cmd(‘counter1’, number)
then it doesn't work and the counter is set to 4294967197.
What am I doing wrong? How can I include a variable in the command?
Unfortunately, I haven't found anything on the Internet about this.
I hope someone can help me please.
Thank you very much
Beta Was this translation helpful? Give feedback.
All reactions