Coding events with variables

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
ReWind
Starting Member
Starting Member
Posts: 8
Joined: Mon Nov 07, 2011 1:59 pm

Coding events with variables

Post by ReWind »

Hi,

I'm trying to make myself a little wakeup script since I've recently installed a remote dimmer in the ridiculously powerful lamp in my bedroom.

My ideal solution rather than use a very long and unwieldy event would be to have an action something like:

FOR i = 7 TO 91 STEP 6
Devices.SetDevice(Dev_26_Value, "Dim " & i)
WAIT 120
NEXT

However, I don't seem to be able to use variables in action scripts. Is there any way to do so, or is there another, better solution to my issue?

I also considered something like making an action that reads the current dimmer setting and increments it. Then if the alarm conditions are present I can run the action every two minutes, but I'm stumbling somewhat here as well.

Any ideas appreciated!
Post Reply

Return to “DomotiGa Forum”