WebThingsIO / gateway

WebThings Gateway
http://webthings.io/gateway
Mozilla Public License 2.0
2.61k stars 333 forks source link

Rules Engine - increase/decrease numeric property by a fixed increment #1923

Open Arzachena opened 5 years ago

Arzachena commented 5 years ago

1.I have a Hue bulb and a Hue on/off /dimmer switch. In the Rules screen I have 2 rules so that the on and off buttons control the bulb state. But when I try to set up rules for the “increase/decrease brightness” buttons (event 2 and event 3) the bulb thing only allows me to set the brightness to a certain fixed level. What I need is to be able to set it to its current level + a percentage.

jfrohn commented 4 years ago

This would be also very helpful for me! Are there already plans to implement this?

Additionally I'd like to be able to toggle binary states for a combined on/off button, e.g. what you can find on the Ikea Tradfri remote: https://www.ikea.com/gb/en/p/tradfri-remote-control-30443124/

kgiori commented 3 years ago

Try using the "Followers" add-on. Then you can specify a range from one thing to be applied to a range on another thing. The ranges don't even need to match.

benfrancis commented 3 years ago

This would be also very helpful for me! Are there already plans to implement this?

We're trying to keep the rules engine UI as simple as possible. I'd say that a reasonable goal for the rules engine UI is that 80% of rules can be set with the simple drag and drop UI, and the other 20% require a custom add-on to do something special. My gut feeling is this use case of increasing/decreasing the value of a property by a fixed increment falls into that 20%. But if anyone has ideas for how to incorporate this into the UI without adding too much complexity then I'd be happy to review designs.