I’m a volunteer firefighter. I want to create an automation that turns on a smart lightbulb in my house when I open another app. This part I’ve figured out simply enough.
What I’d ideally like is for it to only happen during certain hours (9p-5a). Any help with that?
Presumably you are using Shortcuts automations for the logic and trigger you have working. If so, also check the time and choose whether to do something or not.
Something like this.
Struggling with the ‘if’ condition, I don’t have an option for ‘is between.’ Guess I’m doing something wrong there.
You have to change the Formatted Date to a Number.
Tap on Formatted Date and change the Type from Text to Number. Then you can choose “is between” as condition.
Thanks! Fixed that but it doesn’t seem to be working. Not sure what’s wrong with the setup.
I don’t have HomeKit, so I can’t test it. For me this is working as expected.
If you substitute your Home Kit steps for something else, like the “Show Result”, does that work?
I don’t use Home Kit either, but if the issue is with those steps, do they run if placed in their own single step shortcuts?
We need to understand what is failing where for you.
It’s not HomeKit, it’s the phillipshue app and the automation worked before I added the time periods. I’ll check to see if something else works with the rest of the conditions the same.
Something is wrong with the if portion because I’m not getting any action to happen. And if I remove the conditions, the Hue app runs and does what it’s supposed to.
Sorry I missed the icon being Hue.
This works for me with the automation below, when I open the assigned app.
It sounds like your condition isn’t set quite right. Try amending my shortcut above, the hours and light. Hopefully, it will then work for you.
This seems to have worked. I created a new automation such that when I open a specific app, it runs the shortcut you sent me (modified to my times and lights). I’ll check it tonight after 9pm to confirm.