Rules engine switch not activating

Hi all,
I a single switch which I want to come on at sunset and turn off at 10pm. The switch is a TP Link Kasa.
As a secondary condition, I get a sms everytime it turns on/off.
The switch works when I trigger it with ST.
The problem is that at sunset I dont get the switch turning on, but i get a sms saying its on/off.

Not sure where to go from here.

@David_Fernando thanks for posting and welcome to the community.

Would you mind sharing some screenshot(s) of your rule(s) so we can better understand how they are setup?

Here is screenshots:

https://drive.google.com/drive/folders/1Yf2v_xe9fRUXCHRWHStSowjdWTG045-H?usp=sharing

It looks like there is no “Light turn on/off” action in the Flow section in both rules from the screenshots. See below for the rule example screenshots for your scenario, and let me know if you have any questions.

Rule 1: turn the light on/off using the time trigger (sunset and 10pm) and if_condition
Rule 2: send a SMS notification whenever the light is turned on/off

Thanks for the screenshots! Looks like @James has you taken care of with a suggested alternative approach!

It looks like your current rules are basically saying:

Rule 1
“At 10PM or if the light gets switched off, then send an SMS saying the light is off”

Rule 2
“At Sunset or if the light gets turns on, then send an SMS saying the light is on”

The key part here is that the Triggers section are the events that start the rule Flow running. If any of these triggers individually occur, then the rule flow starts running.

So all of your actions, like turning lights on/off, would need to be in flow.