Very new to HA and coding in general. I have implemented Tileboard on my HASS.IO install on my pi and am wondering about the possibility of a kitchen timer type function. I would like to be able to choose the duration with a slider, and then see the timer countdown on the screen.
I’ve had a good look around and cant find any info on someone who has previously implemented something like this, so thought I would put it to the floor: do you have any suggestions / could point a beginner like me in the right direction? Many thanks!
You can’t template configurations unless the configuration explicitly says it can. This will not work.
Also, side note. The reason you are getting an error is not related to the fact that templating is not allowed. The error you are getting is because of the miss use of quotations for your template. If duration actually alloud templates, you’d still get an error. Whenever you use quotes inside a string, you need to use the opposite quote type. Just take a look at the color of your template. '00:{{ states(' is red input_number.timertest is black and ')}}:00' is red. That means that the parser is seeing this as 2 strings (the red) and a method (the black). It’s what’s causing the error. When you properly enter the quotes in correctly, you string should be all red.
I’m not sure how a timer looks in the UI so you may need a script (I.E. button) to start the timer.
The only thing I can say for certian is that the text will not be large. It will be the size of all other ui elements, so this may not be what you are looking for. But if tileboard can handle large text, then you could always place the timer there and it may appear the way you want it to.
The input datetime will allow you to set any time. You can omit the date because you wont be needing it. In the UI it will appear as a combination of 2 input number like things where you can change the hours and the minutes (possibly seconds).
If you don’t want the input datetime, you could go with an input number, which is a slider. But keep in mind, you will only be able to handle the slider as 1 unit type. I.E. Minutes OR Hours OR seconds. If you want to control minutes and seconds, you’ll need 2 sliders.
Ah! - Thanks for this very good clearification - I’d known that - but when its coming down to configuring some new enteties I always forget it T_T
But how to go on this? The timer component only takes his “hard coded” minutes and secconds.
With input datetime i could think on "set time{{ now() + (state.inputnumber)*60}} and then a sensor with {{ inputdatetime - now()}} (wich is by the way a horrible idea )
Didnt knew that we can override the duration.
Set it up and try it out The timer itself - But as petro said - Its not too big.
something like “useful markdown card” or tileboard could counter.
cooking:
sequence:
- service: timer.start
data_template:
entity_id: timer.cooking_timer
duration: '00:{{ states.input_number.timer_minutes.state | int }}:{{ states.input_number.timer_seconds.state | int }}'
In automations.yaml
- alias: 'Timer done'
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.cooking_timer
action:
- service: persistent_notification.create
data:
title: "Timer DONE"
message: "THE TIME IS DONE!"
It looks like this in lovelace:
The notification is not idea as it just puts an orange marker on the notification icon in the top right, so I’ll need think of a better solution to that.
Hi yes it does, you can visually see it count down the seconds. The text is the size that you can see in the screenshot so it’s not massive, but I’m sure you could find some custom card to display it larger!
my solution for the timer notification is a conditional card - perhaps that is something you hadn’t in mind… if you thought about that just ignore my post=)
Hey out there, im still fiddling with this timer and countdown sensor solution - till now, i integrated your solution and got a sensor running with the value of the timer. i doesn’t get values out of states.timer.timer.attributes.remaining / states.timer.timer.state and also not trough state_attr('timer.timer', 'remaining') - my solution is dirty as hell but works sometimes, i really would appreciate help, think there must be a way with templating this with input_number1 > 1 and input_number2 > 1 – but i not good enough at this. back to the following, the fiddling part cames in with the integration of hours…
Is it posible to make this cooking timer without the sliders?
I want it to count down from 1h, 20min?
The programe we use most on our washing machine takes 1h, 18min.
And I want the countdown time to show in Lovelace.
Counter starts when I close the door on the washing machine (got a door sensor on it).