Method to start and stop a Ceiling Fan based on an event but if the fan is already turned on, I do not want to return on and most importantly turn off automatically

I have installed several of the GE Smart Ceiling Fan switches. They are working perfectly and I can control them with the switch or with Smartthings.

I am trying to do a couple of different automations.

I want to turn on a Ceiling Fan at a specific time and then turn it off 15 to 20 minutes later. I can get this to work with Smart Lighting using “Specific Time of Day” (one time is used to Turn on the Fan and the other is used to Turn off the Fan… in the same Automation). However, if the Ceiling Fan is already turned on before the start time, I do not want it to turn off after the 15-20 minutes. There is a feature called “Only If Light in On/Off”. This feature does not seem to work as I hoped as the automation looks at the position of the Fan switch for both the Turn On and the Turn Off. This means that if I set this to the same switch and tell it to only perform the step if the switch is off, it indeed turns the switch on but never turns it off.

Is there a method to turn on and turn off a switch but if the switch was already on, I do not want it turned on again or for sure turned off?

There is the option of using webCoRE…

Something similar was just discussed in this thread:

Basically, you need something to track the status of the switch when it is manually thrown. Take a look at my post and the one that follows by @lflorack. My solutions proposed using a variable in webCore to track the switch’s status. @lflorack suggest using a virtual switch to do the same. If you are not familiar with webCore, the @lflorack’s solution may be a bit simpler.

That for the input Bry. Is there any method that does not use the WebCore? I was hoping there is a way to set this up just using Smartthings and smart apps.

It seems that it would be really standard to not perform an Automation on a Light or Fan switch if the switch was already on manually and then not turn it off with the same automation (since it was turned on manually and someone probably has a reason).

Yes, I think. @lflorack’s suggestion. It’s described in my post above and in more detail in the linked post.