Not sure what I’m doing wrong, as the Automation does trigger and switch on my heating as it should, but the logs warn me about this:
Error evaluating ‘template’ trigger for ‘websocket_api’: ValueError: Template error: as_timestamp got invalid input ‘unavailable’ when rendering template ‘{% set alarm_time = as_timestamp(states(‘sensor.echo_mancave_next_alarm’)) %} {% set current_time = as_timestamp(states(‘sensor.date_time’).replace(’,’, ‘’)) %} {% set pre_time = 1800 %} {{ current_time >= alarm_time - pre_time }}’ but no default was specified
Error evaluating ‘template’ trigger for ‘websocket_api’: AttributeError: ‘NoneType’ object has no attribute ‘tzinfo’
Admittedly, I never really looked into the logs as stuff just works, but trying to get as many things clean as possible, such stuff now makes me wonder where I’m going wrong.
It looks like you have an autofill error that doubled _next_alarm : sensor.bad_next_alarm_next_alarm
You have “fancy quotes” around the sensor’s entity id, you need to use plain quotes. This happens sometimes when copying text from the forum that isn’t in a formatted code block.
Oh my goodness. I really didn’t see my fault with the double thing. The quotes were alright. These were just fancy because of the font in my internet explorer.
I’m a complete beginner at Homeassistant and I’m trying to set up my automation to run 5 minutes before the alarm, but I don’t really understand the example above.
I have created a sensor and can see the Developer Tool / Template that it shows True/False depending on whether the alarm is set 5 minutes before or not.
What I don’t really understand is how to create an automation of it.
This is the Triggers Template
You have a copy/paste error in your trigger configuration that is causing it to fail.
If you already created the template sensor, you do not need to use the template again in your trigger. You have not included the entity ID of your sensor so you will need to correct it (and possibly the to: state as well) before using the following automation:
Hi all, I’ve been using the next.alarm to start my espresso machine 30 minutes before it goes off and it has been going great for a year thanks to a Shelly built inside it…. That s until this week.
Alexa is failing to send the next alarm to Home Assistant this week. It remains Unknown after the alarm is set and on my dashboard it is stuck on Dec 31, 1969 7:00pm (same time it always shows when an alarm isn’t set).
Anyone else having trouble with Alexa sending the alarm time?
I’d like to create template sensors for up to 3 Alexa timers that I can then use on my Sunton 7" OpenHASP display thats in my kitchen. So much easier to glance at it instead of asking Alexa every time, esp w/ multiple timers going on.
this is a very unique approach, but it doesnt do me any good if I cant set an entity to a countdown value.
I had the same issue with every “next alarm” showing unknown when an alarm was set! I just had to update to the newest release of alexa_media_player. I wanted to leave a comment incase anyone else is still running into this issue.
Additionally, for anyone troubleshooting and testing, make sure when you set an “alarm” you say the time. Otherwise if you say “set an alarm for one minute”, it actually sets a timer. You have to say “set an alarm for xx:xx”.
Amazon can only dig up so many alarms from their time mines everyday… they can’t let us peons go around wasting that precious natural resource when a timer will be perfectly sufficient…