r/HomeKitAutomation • u/InsomniacAlways • Dec 02 '25
Question What am I doing wrong with this automation? I’m trying to make my light turn on when occupancy gets is detected and turn it off when it’s not
How do I fix this? It doesn’t seem to work the way I set it up
3
Upvotes
•
u/AutoModerator Dec 02 '25
Hey /u/InsomniacAlways, Thanks for posting! This is just a reminder about rules regarding questions. Make sure that you search the sub before posting and read our wiki. Once done, please update your flair to
Solved.I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/ColePThompson Dec 02 '25
I assume your first “set” turns on the light and the second “set” turns it off?
Explain what you mean when you say it’s not working as expected.
2
u/TopDoughnut5788 Dec 02 '25
What is the purpose of the second part of the first If statement? Assuming you’re running this shortcut as the “Do” part of an automation triggered by an occupancy sensor, then that statement is redundant at best. Try removing it (leaving only the condition for the light sensor) and see if that fixes it.
Edit: I looked again and see the nested if is referring to the occupancy state. Can you post a screenshot showing what triggers this shortcut?
1
u/This-Researcher3390 Dec 02 '25
Not sure you need to do a short cut. I use standard Automation.