Homey Community Forum

Getting Started - Logic variables

Thanks. I’ll just wait if my variable gets a nice text to show it works and the I can expand

Thanks guys! icalCalendar is my solution!

Rgds,

Gergely.

2 Likes

Hi @Morgan. I recently stumbled upon Javascript Logic.
But I don’t know how to start. There aren’t cards for it. So, is it an add-on to Logics, and/or Better Logics?

What I’d like to accomplish is:
pick one name out of an array with names. (Example: let Homey decide who feeds the cat)
Just like the num version: {{round(random(1,10))}}
wich returns a random number.

The funny part is, Homey can do this, but solely with the speech app.
Add a card with Jim;John;Mandy and if run, it will tell randomly one of these names.

Maybe someone can point me to the right direction
Tia, Peter

JavaScript Logic just support some simple AND-conditions and what you need is not one of them. I think it would be able to accomplish in HomeyScript but I have no example for you.

Okay Morgan, I’ll give HS a try. Thanks!