You could also try it like this:
This blueprint is excellent and working well for me with version 2021-01-01. So thank you very much for this!
However, I’m having a hard time getting my input.datetime helper to be recognized as a timestamp sensor. I’m using it for other morning automations, and it would be helpful if I could use it here as well. I’m fairly new to Home Assistant and there’s still a lot I don’t understand. From what I’ve gathered, I need to make a sensor template. Is that right? If so, where and how do I make it?
Does your helper have both date and time? If so you can manually input it in the timestamp sensor field and it will work. If it has only time you would need to make a template sensor with something like:
{{states('sensor.date')~' '~states('input_datetime.FOOBAR')}}
and of course sensor.date needs to be enabled.
Right on. I didn’t realize I could manually enter the input. Thank you for your quick response. My helper does currently have both date and time, so that was an easy fix for me haha. I’m planning on eventually having it auto-set with a bed occupancy sensor, but that’s awhile away and that will give me time to learn more about template sensors (still very confusing for me!)
Thanks so much!
I had a issue today with this blueprint.
This morning I snoozed my alarm on my phone (10 min) and the automation turned to 10 min later (7:10), but it din’t trigger the lights of course, because I have set the sunrise duritation for 30 minutes.
Ok no problem you think. But then the sensor of next wake up time kept stuck on that time and date.
This also kept triggering the automation I think, and always disabled my adaptive lighting sleep mode this evening (I guess). As soon as I disabled the pre-sunrise condition to turn the adaptive lighting sleep mode. It din’t turn of the adaptive lighting sleep mode.
And as soon i add it to the automation, adaptive lighting sleep mode is atomatecly disabled.
Can you take a look how this is possible, and if this is fixable? If you need my assistance, let me know.
Edit: I needed to restart my phone to change the next alarm time in HA for next morning. It kept stuck at 7:10 this morning that had passed.
I tested some more, and even after restarting ha, disabling this automation for a while and enabling it afterwards. It keeps disabling the adaptive lighting. Even when the next alarm timer is correct now.
first of all: very nice approach!
This i my first post here so please have mercy with me
I would have rather sophisticated idea: currently I am doing this via a script manually but like the idea of merging this into a blueprint and making this much more intelligent (instead of hard coded) so the approach ist as follows:
setup: I am having lights at floor level (e.g. under the bed), at “normal” level (e.g. in the cupboard) and at ceiling level
process: I start with the floor level lights with brightness 1 and transition from [139,0,0] (dark red) to [255,0,0], then to [255,255,0], then to 255,255,240. then I raise the brightness to 255
then I add the normal level lights also in white and brightness 1 and transition with them also to 255
then I do the same for the ceiling lights
I hope it is somewhat clear
since this is a more special case I understand if you do not want to include something like this but maybe this is interesting for more of us
in general my understand would be to add more light entities (floor/middle/ceiling) and then to add more repeat cycles at the end of the script part in this blueprint. am I correct?
Hi there. Overall a very good sunrise automation and I think it deserves the attention and love it gets in the blueprint exchange.
I have one question though: Why you dont use a target as a selector for the light entity? Sorry if I ask this question twice, I shortly searched the comments and didnt find a coversation about that. It has the advantage that you can easly add a single light entity or device or directly a area where it picks all the light entitys from which you can still filter (see the docs about selectors).
I find this a good solution, because for the most the need for creating light groups or something similiar isnt needed cause they can select the area in the blueprint (usually the bedroom) and its grapping automatically all your lights filtered by your criterea of the selector. The most didnt need more variety than device, entity and areas i think and a target selectors covers them all the at the same time
Already tried it out locally and it looks like this
light_entity:
name: Wake-up light entity
description:
The light to control. Turning it off during the sunrise will keep
it off. Color temperature range is auto-detected.
selector:
target:
entity:
domain: light
and looks like this in the UI:
I guess in principle target could be used but there are some template-functions e.g. detection of color temperature range and checking if lights have been turned off that don’t translate directly to target usage and would need some special logic if multiple lights were involved.
Hi! I’m also getting the type error. Is there a GitHub repo where I can contribute, or is the Gist the only thing we’ve got?
home-assistant | 2021-01-08 20:11:46 ERROR (MainThread) [homeassistant.components.automation.wake_up_light_alarm_with_sunrise_effect] Error rendering variables: TypeError: '>' not supported between instances of 'int' and 'NoneType'
I think the culprit was the | max statement. I added another check there.
Yeah now I see it. Would be hard to implement it because you cant create light groups (group.set isnt working cause it doesnt work with your templates) in automations and you cant convert areas to groups or get the entities of groups to set them in a light group. So target will not work, not with the toosl I know in HA.
A easy solution without modifying the blueprint could be to make a automation and call the service automation.toggle / .turn_on/ .turn_off when the state of the input_boolean changes.
What is the usecase for this boolean so it needs to be implemented? Of course its totally up to sbyx if he wants to implement this, but I dont know the usecase for the most people, cause once a alarm is set, I think the most want to be wake up with this automation
Many thanks.
This allows one or the other person in the house to create their own automations directly via Apple Home for certain days so when the input bolean (switch in home) is switched on (which in turn switches on the sensor).
I found a dirty solution:
- platform: template
sensors:
wakeup:
friendly_name: "Wakeup"
value_template: >
{{ 'on' if is_state('input_boolean.wakeup', 'on')
else 'off' }}
icon_template: >
{% if is_state('input_boolean.wakeup', 'on') %}
mdi:alarm
{% else %}
mdi:alarm-off
{% endif %}
Just for your information: I found a workaround with defining a refrence entity so it works with a target (still my personal prototype though). I Just use the entity with the lowest range of color temperature and everything will work. For me personally its better cause I can create evrything right out of the UI and dont have to mess up my yaml config with light_groups. Of course it’s up to you which way you prefer, I just wanted to give some inspiration. You just said that it would be technical difficoult, not which way you prefer more
@Sbyx I just wanted to create something similar on my own. Guess you saved me a lot of time
Thanks for this!
I updated the blueprint and now added an additional entity input that can be used for a sensor / peron / device_tracker etc. to be checked before the sunrise is triggered. The entity needs to be either ‘on’ or ‘home’ (or not exist / ‘unknown’) otherwise the sunrise is not triggered.
Good work, now you just need a GUI selection of what weekdays to have it active, instead of using the Wait condition. Then I think it covers 95% of everyone’s requirements!
Would it be possible to select an alarm time from an entity? The reason is that I want to enter an alarm time using Apple Shortcuts.
like in input_datetime.alarm_worktime
Thank you for your great work!
Greetings
Maggiifixx
Hi,
I hope all these requests aren’t too much, but I got one myself
When I snooze my alarm, the wake-up light turns on instantly, because the automation is triggered again. Could we change this to only trigger once per day or that it’s not triggered again by snoozing?
Maybe a delay
of 10 minutes at the end of the automation would be enough (as it’s in a “single” mode)
What do you think?