Page 1 of 1

[ANSWERED]If temperature is less than variable

PostPosted: Fri May 23, 2014 3:55 pm
by howartp
Hi,

I've got four Fibaro motion sensors which report the temperature status to Indigo.

I want a condition that says 'if temperature is less than variable xyz', which I have implemented as follows:

Code: Select all
  "All" "of the following rules are true"
      "If variable" HeatingScheduled "is true"
      "Any" "of the following rules are true"
         "If device" "Temp Lounge" "Sensor Value" "is less than" "%%v:1835835769%%"
         "If device" "Temp Study" "Sensor Value" "is less than" "%%v:1100434226%%"
         "If device" "Temp Landing" "Sensor Value" "is less than" "%%v:1868204994%%"


Those variables are called DesiredTempLounge etc.

Should this work - should the variable substitution work in a comparison text field?

I ask because the UI won't let me move focus away from the textfield when I type the variable substation in - I suspect it is wanting an integer value for the 'less than' comparison; but if I click ok then it doesn't actually throw an error.

On the same topic, you can already create a comparison 'if variable_x is less than variable_y' in the UI - is it possible to add the same UI for 'if device_status is less than variable_x' please?

Peter

Re: If temperature is less than variable

PostPosted: Sat May 24, 2014 9:08 am
by matt (support)
Hi Peter,

Variable substitution doesn't work in that field, and Indigo doesn't currently supporting comparing a device state to a variable value. You can, however, compare a variable value to a variable value. So if you want you can create a few Triggers of type Device State Changed that track the states you need which use the variable action Insert Device State into Variable (to mirror the device states into variable values). You can then use the conditional UI to compare the 2 variable values.

Re: If temperature is less than variable

PostPosted: Sat May 24, 2014 3:58 pm
by howartp
matt (support) wrote:
Hi Peter,

Variable substitution doesn't work in that field, and Indigo doesn't currently supporting comparing a device state to a variable value. You can, however, compare a variable value to a variable value. So if you want you can create a few Triggers of type Device State Changed that track the states you need which use the variable action Insert Device State into Variable (to mirror the device states into variable values). You can then use the conditional UI to compare the 2 variable values.

Thanks Matt.

I'll use triggers for now as you suggest - I presume you'll be looking at comparing device states with variables in future releases, particularly as HVAC management is on the increase in Indigo / HA solutions. Comparing temperature or luminance values with variables will presumably happen in various ways.

Peter

Re: [ANSWERED]If temperature is less than variable

PostPosted: Mon May 26, 2014 9:30 am
by jay (support)
It's already on the request list but no ETA (and no priority assigned yet).

Re: [ANSWERED]If temperature is less than variable

PostPosted: Sat Aug 02, 2014 8:04 pm
by scriptures4life
I think I have a similar issue that would be solvable with similar logic...

I bought some LEDs and they flicker below a certain level. Could you make it so that Indigo shuts off the light when ramping down below a certain brightness, and snaps on to a certain brightness when ramping up? This would prevent flickering and overheating in those LEDs by maintaining a minimum brightness.

Thanks!
Danny

Re: [ANSWERED]If temperature is less than variable

PostPosted: Sun Aug 03, 2014 10:29 am
by matt (support)
Hi Danny,

By "when ramping down below.." do you mean when the user is press holding on the down toggle button physically?

Indigo doesn't get the new brightness value until after you release from a press-and-hold, so if you had a Device State Changed type of Trigger to detect when the brightness drops below a threshold it would execute after the button is released. Indigo could then force the value to a higher brightness. So the LEDs would still be flickering for a bit until Indigo can correct the brightness.

Re: [ANSWERED]If temperature is less than variable

PostPosted: Sun Aug 03, 2014 1:10 pm
by scriptures4life
Got it thanks!