Calculations with substitution strings

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
yaccri
HouseBot Special Member
Posts: 304
Joined: Wed May 07, 2003 2:19 pm
Location: Tel-Aviv, Israel
Contact:

Calculations with substitution strings

Post by yaccri »

I would like to have a property change button on a theme that would change one property value to a value which is based on another property value.

I tried to put in the new property value something like:
%%My Dimmer.Reported State%%+5

It seems like HB ignores the calculation.

I should note that both properties are defined as alpha-numeric.


Is there a way to tell HB to calculate the new property value?
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

Why not use a script?

Osler
yaccri
HouseBot Special Member
Posts: 304
Joined: Wed May 07, 2003 2:19 pm
Location: Tel-Aviv, Israel
Contact:

Post by yaccri »

I want to keep things simple.
I also want to use the 'repeat' function of the dimmer.

I can write only one script to handle all the dimmers, using a null device that will pass parameters to the script. However, other issues like being able to 'repeat' an action and to control more than one dimmer at the same time from different SWRemotes will come up.

If possible. I prefer to directly change the property.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

It's a good idea, but won't work currently. In Tasks, there's a little logic for using + or - when comparing times, but nothing for any of the other property values. It would make sense to do it for numeric property types.

Alpha numeric.... well that could be done too. Actually, if you use < or > for alpha numeric properties now, it assumes them to be numeric. I could probably do something similar.

I'll add it to the V3 list.
Scott
yaccri
HouseBot Special Member
Posts: 304
Joined: Wed May 07, 2003 2:19 pm
Location: Tel-Aviv, Israel
Contact:

Post by yaccri »

I'll add it to the V3 list
It's a woderful thing that you're always open to suggestions.
That's why I like HB so much and remain loyal to it.
Thank you Scott!
Post Reply