Not sure about Apple, but at least on Android there is a Next Alarm that you can enable on the mobile app integration. You can probably create an input_datetime sensor from this using templates and use that as the trigger in the blueprint.
As for the switch, you can use the field for Workday Sensor. This was intended to be used with the Workday integration but it is really just a binary sensor. You could create your own binary_sensor template that is linked to an input_boolean you can manage yourself.
Thanks. Second option is what I ended up doing. Creating a switch helper and making a binary sensor template for it. The script and automation work great!
Iāve modified it so that it runs only when Iām connected to my local wifi.
And I copied it with a second trigger that it also sends the last known wakeup time to HA when I plug the charger in my phone.
Tried this out the other day, with my ikea rgbw bulbs this only uses the white leds which have too bright of a baseline, has anyone made a transition that incorporates the rgb leds to provide a more gradual transition?
Sounds like it could be a nice feature. I wonāt have any time to work on that for a couple weeks though. If youāre keen you can submit a PR to the github repo.
@steriku Hey! So I wanted to contribute and make some improvements and so I have just done my first PR and made a load of improvements. This is mainly to the automation YAML to make it easier, and add some extra functionality.
I added a person filter so that the alarm will only run when a person is home - useful for those who travel and donāt want their alarms going off when unnecessary.
I added some emojis to the descriptions and added some extra information and cleaned up the grammar too just to make it simpler and easier for those to use it.
I can work on Pre/post actions as well but just wanted to make sure my first PR was right, and that Iāve done everything correctly.
Iām not an engineer but work in Customer Support and so this is my first time doing something like this so any additional help would be great
@steriku Iāve just done another PR with pre and post actions, as well as a toggle whether to turn off the light at the end of the automation. Ready for your review.
Thank you for your efforts, however it seems like this integration isnāt working as it should on my end. Specifically it seems to pulsate in brightness and I canāt set rules for the days where I want this automation to apply. EG, monday-friday at 7:30AM and on the weekend at 10AM. This has been the most frustrating automation Iāve dealt with in Home Assistant for YEARS now. Something thatās super simple to setup in something as terrible as the old Ikea Tradfri app, why does it have to be so convoluted here?
Thanks for your feedback. Unfortuantely it is impossible to have a single blueprint cater to everyoneās desires. There is nothing in the blueprint that would cause it to pulse so that may be some artifact that is an issue of how the bulb implements the brightness change or how HA sends the commands. I have heard of people having issues with Ikea bulbs and the transition argument for lights. Iāve been thinking of taking this out.
For your situation described above Iād say do the following:
Split the automation into 2 based on the blueprint.
Automation 1:
Workday intetration for Mon-Fri
Datetime helper for 7:30
Automation 2:
Workday integration for Sat-Sun
Datetime helper for 10:00
Iāve created a branch with a new version of the script that removes the transition argument. When you import this blueprint it should override your currently installed one and you can see if it fixes your pulsing issue. Iāll test it for a few days myself (however I donāt have an Ikea bulb) and if I donāt really notice a difference Iāll merge it into the main branch.
Updated blueprint to include feature from @shbatm.
Extend start time entity filter to also allow datetime sensors
Add (optional) text offset for the time value to be able to start sooner. This also allows you to match a specific end time without having to manually do math to figure out the duration each time you change the Start Time.
Can the workday sensor be made optional? I prefer to wake up at the same time every single day due to adhd making me sensitive to any sleep cycle changes.
Also would be nice to have an option for minimum brightness, my wiz lights have a minor shortcoming where the actual minimum brightness is 10% for some reason (anything below 10% is the same brightness as 10%). Therefore with these lights it would make sense to start at 10% instead of 0%.