- Posted on
Sat Nov 17, 2018 5:03 am
-
mat
offline
-
- Posts: 769
- Joined: Nov 25, 2010
- Location: Cambridgeshire - UK
I'm presuming you can control the unit from indigo aleady, as questioned above?
A simple script as an action group would be the simplest, actioned each time the button is pressed.
Or if you are not happy with python, you could just use triggers .... but its a little more in depth...
Create a variable for heating_mode and set its value to 1
On your control page, in the server action for the button, add an action to increase the variable by 1 when the button is pressed.
Then create 4 new triggers.
Set the first trigger type to variable change, select the variable you created and select the becomes greater than option - insert "3" into the box. Then in the action tab, do a variable type action and set the variable you created to a value of 1 - this trigger will stop your variable becoming greater than 3.
Now create three more triggers one of each of the modes.
so the first would be a variable change trigger, where the variable becomes equal to 1. The action would be to switch both of your switches off.
The second would be as above, but equal to 2, and would switch the appropriate switch on - say switch 1.
The third would be as above, but for 3, and would switch off switch 1 and switch the second on.
You could then set the image of the button, based on the variable value using the method in the link above.
Late 2018 mini 10.14