My goal is to get my thermostat to change between home and away settings programmed on the thermostat by using the cell phones in my house as presence sensors. As one or multiple phones join the network, the thermostat changes to home but if all of the phones are off of the network; it changes to away.
I don't use Unifi, but reading up on the Unifi Integration for Hubitat, it looks like you should either already have, or be able to create, devices on the hub for each phone. Those devices should have a "present/not present" attribute. If you need help with that part of the setup, hopefully a Unifi user will chime in here. I am also assuming that you already have the Ecobee 3 Lite connected to the hub and that it has a setting for Away Mode.
I'd create two rules in Rule Machine: One rule would be: When Phone 1, Phone 2, Phone 3, Phone 4 ALL depart: change thermostat to away. The second rule would be: When Phone 1, Phone 2, Phone 3, Phone 4 ANY arrive: change thermostat to home. If you are new to Rule Machine and need guidance on how to create those rules, just ask.
I have taken a bit of a different tack. I use the phones here with Mode Manager to switch mode from home/night to away and back. If all phones leave, mode is set to away. If any returns during the day, mode is set to home. If any return at night, mode is set to night. Night is defines as between 23:00 and 07:30.
Next is to use the mode for triggering another rule to set the thermostat according to mode.
My rule is called Thermosat Setpoint Change.
The trigger is "Mode becomes 'changed'."
Actions are:
IF (Mode is Away(F) [FALSE]) THEN
+
Thermostats: KONOz --> Heat: 55.0
+
Delay 0:00:15
+
Thermostats: KONOz --> Cool: 80.0
+
ELSE-IF (Mode is Home(T) AND Time between 07:30 and 22:59(T) [TRUE]) THEN
+
Thermostats: KONOz --> Heat: 72.0
+
Delay 0:00:15
+
Thermostats: KONOz --> Cool: 76.0
+
ELSE-IF (Mode is Night(F) AND Time between 23:00 and 07:29(F) [FALSE]) THEN
+
Thermostats: KONOz --> Cool: 75.0
+
Delay 0:00:15
+
Thermostats: KONOz --> Heat: 68.0
+
END-IF
This, and I set up separate rules to make sure the changes took and to set to the correct temperatures if for some reason, the setpoint did not take. These are likely no longer needed, but they are not doing any harm, so I have left them in place.
I hope this is helpful. Also, the delay is so that the two setpoint changes are separated by enough time to let one action be completed before the next command happens. It just seems to work better this way, at least for me.
I totally get it and agree. My previous situation had 4 thermostat modes and 4 variables. Managing it by individual rules would have been tedious. I mapped it out as a finite state machine to handle transitions. That work was done in webCoRE, so I am not as helpful with implementation using native tools.