Turn off all Fans when I leave, turn them back on when back

I am not sure how I would do this.

I have a few fans on in the house, when I leave, I want to know what setting they are at when I leave, and then turn them off. When I get back, I want them to return to the way they were.

if the bedroom is set to low, I want it to turn back on to low when I get home. I have the Geofence thing all working, my HSM turns on and off depending. so I need to know how to make a rule for the fans?
Ideas how to record the current settings?

You can use Rule Machine to capture the state when you leave before turning them off and restoring the state when you return.

I don’t know if this works for all fans but in Rule Machine when selecting what type of device I want to control, instead of selecting fan, I use “switch” where the fan shows as an on/off switch. So I’d just set the switch for my fans to “off” when I leave, and then have a separate rule to turn them all back “on” when I return.

Only thing this does not account for is if a few happened to be off when you leave and you wanted them to stay off, just like you left when you return.

Then you’re probably back to capturing and restoring states for everything.

I tie events of arriving and leaving rules to mode changes. I just write the rule to tun things off or on and then tie it to mode changes

1 Like

I do exactly this for one fan in my house.

The gist of it is this handled in two different rules.

  1. Rule that activates when HSM goes to Armed Away. This rule does two things. It sets a hub value to the speed the fan is before any action is taken. Then as last action in the rule it sets the fan to OFF
  2. Then I have another rule that kicks in when HSM Goes from Armed Away to Disarmed. This rule simply looks at that hub variable and sets the fan to the same speed it was before. Below are images of the rules.

The only thing you have to be careful of with this setup is it is possible to write code or actions in RM to set the alarm panel to Armed away back to back. This can cause this rule to essentially overwrite the hub value to off and make it fail. I spent some time a few months ago working HE and the developer of the Keypad i am using to fix such a issue. But since then it has been working flawlessly.

1 Like

This might be a dumb reply, but it is sincere.
When I turn off my fans, regardless of doing it manually, via rule, or voice command, they turn back on in the same state they were when turned off.

The switch/controller should remember the setting.

that would work, but not all the fans are on in the house at the same time., I would still need to know what ones were on. then just turn them back on .

I still stand by:

Trigger: Alarm set
Capture fans
Turn fans off
Wait for event - alarm disarm
Restore devices

1 Like