Use case:
change brightness of a group of dimmers based on a virtual device (ref 3858 here) that ranges from -100 to 100
(all dimmers have a 0-100 range)
The individual changes for each dimmer must be relative to the existing values and can't go below 0 or above 100.
The intent is to change multiple dimmers brightness up/down relative to existing values.
Pretty sure I'm on the right track but I need to assess the 0-100 resulting value and only apply if within range.
where below it checks the current value and applies the change if within range.
if ($DEVICEVALUE <= 100 and $DEVICEVALUE >= 0, $DEVICEVALUE + $$DVR:3858:, $DEVICEVALUE )

Example of expected behavior for 3 dimmers
Dimmer 1= 25
Dimmer 2 = 90
Dimmer 3= 100
If virtual device is set to 25:
Dimmer 1= 50
Dimmer 2 = 100
Dimmer 3= 100
then If virtual device is set to -25:
Dimmer 1= 25
Dimmer 2 = 75
Dimmer 3= 75
then If virtual device is set to -80:
Dimmer 1= 0
Dimmer 2 = 0
Dimmer 3= 0
change brightness of a group of dimmers based on a virtual device (ref 3858 here) that ranges from -100 to 100
(all dimmers have a 0-100 range)
The individual changes for each dimmer must be relative to the existing values and can't go below 0 or above 100.
The intent is to change multiple dimmers brightness up/down relative to existing values.
Pretty sure I'm on the right track but I need to assess the 0-100 resulting value and only apply if within range.
where below it checks the current value and applies the change if within range.
if ($DEVICEVALUE <= 100 and $DEVICEVALUE >= 0, $DEVICEVALUE + $$DVR:3858:, $DEVICEVALUE )
Example of expected behavior for 3 dimmers
Dimmer 1= 25
Dimmer 2 = 90
Dimmer 3= 100
If virtual device is set to 25:
Dimmer 1= 50
Dimmer 2 = 100
Dimmer 3= 100
then If virtual device is set to -25:
Dimmer 1= 25
Dimmer 2 = 75
Dimmer 3= 75
then If virtual device is set to -80:
Dimmer 1= 0
Dimmer 2 = 0
Dimmer 3= 0
Comment