[Release] Fan Thermostat with manual override

The Rule Machine rules I was using to control my ceiling fans were getting unwieldy, so I put together an app that creates virtual thermostat devices to control fan speed based on temperature sensors.

This is similar in its goals to this 3-speed fan thermostat app for SmartThings, but has some features that I found lacking in that app:

  • Creates virtual devices that can be used in other automations
  • Support for multiple temperature sensors
  • Support for any number of fan speed settings
  • Support for binary on/off switches
  • Manual override timer

See the README for more info:

Let me know what you think. If you come across any bugs or missing features either let me know here or open an issue on the GitHub repo.

3 Likes

This app works great!
Would it be possible to enable the "Off" mode? I would like to be able to switch between "Cool" mode and "Off" mode with a pico remote.

Update: Add support for the "off" thermostat mode and the SwitchLevel capability

I added support for the "off" thermostat mode. When in the "off" mode, there will be no thermostat control of linked fans; control will be fully manual.

This also adds support fot the SwitchLevel capability. The setLevel command can be used to control the fan speed just like setSpeed. The range is split into a number of equal-sized ranges that each set the fan to a given speed. For example, for a 3-speed fan, level 1-33 will set the fan to low, 34-66 to medium and 67-99 high. When the thermostat sets the fan speed it will set the level to the bottom of the corresponding range.

Done. Sadly the Switch and ThermostatMode capabilities conflict in their meaning of the off. The fan thermostat device uses off as the switch command, meaning it will turn the fan off but won't change the mode. Use the setThermostatMode command to set the mode.

After updating you'll need to open the settings for each fan thermostat app and click save.

I was hoping that putting it in "Off" mode would allow me to control everything manually as usual, until I set it back to "cool" mode when the thermostat would take back over. Without timeouts etc...does that make sense, or is that possible?

Makes sense. I changed it to make the "off" mode disable thermostat control of the fan entirely.

1 Like

Working perfectly! Thank you!

Great app. Thanks for writing and sharing this. Quick question...is there a threshold for the set point like a real thermostat? i.e. if I set it to 80 it will cool to 78 before shutting off the fan. That way it doesn’t go on/off when it is 80, 79, 80 etc. I think this is called a “swing” in thermostat terms?

No, the fan will turn off as soon as the temperature drops below the set-point. There is a retrigger time setting though. That prevents the app from turning the fan back on for a given time after it's turned off. You can set that to prevent it from bouncing on/off more often than the configured time.

Okay great. The retrigger option sounds perfect. Thanks again.

This is a great app and exactly what I was looking for. Any chance you can add it to the Hubitat Package Manager?

EDIT: Nevermind I see it's in there already

I ran into an issue where after I rebooted my hub the thermostatSetpoint was set to 78 even though I had previously set it to 70. In the initialize() function of the driver the values for currentThermostatMode and currentThermostatSetpoint will always be null after a hub restart/reboot. In order to fix the issue I initialized the values as follows:

currentThermostatMode = device.currentValue("thermostatMode")
currentThermostatSetpoint = device.currentValue("thermostatSetpoint")

After I rebooted my hub the thermostatSetpoint value was set to 70.

1 Like

New Version: 1.3

This contains fixes for the issue @bujvary reported above (which I fixed a little while ago, but forgot to post about) and also another issue with manual override not working that was reported over on GitHub. Get the updated device driver here (the apps did not chang in this release) or update via Hubitat Package Manager.

1 Like

I'm having some trouble with the manual override. I'm probably overlooking or overthinking something, but I can't get it to work. I have a switch selected in the thermostat device, but when I turn that switch on or off, it's not turning the override on. Is that how it's supposed to function?

New Version: 1.4

This version fixes the issue reported above by @bbuckles76 when using this app to control switches instead of multi-speed fan controllers. This version contains changes to both the child app and the device driver.

After updating, you'll need to open the settings for any affected child app instances and click done to get it to re-initialize.

I'm a recent convert from ST and was glad to find an app similar to the popular 3 speed fan thermostat. Unfortunately, it seems my use case has a small problem or I haven't set something up correctly. I'd like to run it based on motion during the day and then just on at night at a lower setpoint. In the ST app, there was a way to restrict it to modes. So I simply created two child devices and it was golden. So for your app, I planned to the same but just use a rule to toggle them on and off when mode changes. Unfortunately, Rule Machine is not recognizing the child devices as thermostats so I can't create the rule. Setting it up via the switch function just turns them both off via the override function.

Side note when I hit initialize I get the supportedThermostatModes : [off, cool] but when I refresh the page it disappears. I feel like this may be my issue.

I think the reason it doesn't appear in RuleMachine is that I didn't implement the full "Thermostat" capability; just the "ThermostatCoolingSetpoint", "ThermostatSetpoint", and "ThermostatMode" capabilities. You could work around that issue by using a custom action in RuleMachine. Something like this:

Another option is to do what I did and create a virtual motion sensor and have a rule that sets it to active when mode switches to Night and inactive when mode switches off of Night. That can hold the fan on and you could also use a custom action to adjust the setpoint.

The custom action seems to be working fine. Thanks again for the awesome app!

New Version: 1.5

This version fixes some errors that arise if you use this app to control only switches and no fan controllers. Thanks to @samstreak for the report and the contribution. This version only changes the child app.

Has anyone using the Fan Thermostat app/driver upgraded to v2.8.8? The fan thermostat has been working well for me up until v2.8.8, now the fan won't turn on/off/change speed when the temperature changes.