homeassistant:
customize:
script.assist_timerstart:
settings: &settings
########################################################
### SET THE VARIABLES HERE TO CUSTOMIZE YOUR ROUTINE ###
########################################################
timer_target: "Kitchen" #Which device or room should play the timer? #NOTE: If you choose a room, ALL media_players in that room will be played.
timer_target_default: "media_player.pi-kitchen" #Which media_player entity should be used if timer_target is none? (Used when dynamic targets are null.)
#You can also assign a sensor.entity_id or input_text to have a dynamic room or media_player assigned.
#This can be usefull if, for example, you have a sensor monitoring where Assist is activated, to use it in that specific room or device.
# Timer settings
timer_tts: true #Set this to true if you want the timer to be a tts message. Default is true.
timer_tts_service: "tts.speak" #Which TTS service to use? Default is "tts.speak".
timer_tts_target: "tts.home_assistant_cloud" #Which TTS target to use, e.g. piper or ha cloud? Default is "tts.home_assistant_cloud".
timer_tts_message: "A set timer has finished." #You can also assign a sensor or input_text entity_id to have a dynamic tts message.
#If timer_tts is set to false, the media_location will automatically be used to play the target media file.
#Use filenamer timer.mp3 to be able to stop the music as well. (For playback recognition).
#Case sensitive (timer.mp3 vs Timer.mp3)
timer_media_location: "/media/local/timer.mp3"
# Timer volume
timer_volume: 0.4 #What volume level do you want the timer to play at? Device volume level will be restored after the timer has finished.
########################################################
Hi @freakshock, I found the error in the script.
Line 512 had a " == ātrueā" in the template which shouldnāt be there. I think a stupid copy and paste error on my end. I updated the package or you can change that line yourself.
many thanks for your great work. Unfortunately, your timer collides with the BuiltIn Intent HassTimer*, as the German sentences I use are more like the BuildIn sentences. I know you can avoid this by using a different sentence structure, but the system should actually adapt to the user and not the other way around. Apart from that, the BuiltIn function only gives me the error message āI didnāt understand itā and the match result is false.
Do you see a possibility to combine the two timer versions? Do you know where the error in the BuiltIn timer could lie, or can the BulitIn timer perhaps even be switched off?
I have a similair issue where i wanted to create a custom intent to create a reminder (mind you, not a timer) but the OpenAI integration still matches it up to the (currently nonfunctional) Timer intents.
Perhaps you could solve your issue by overriding the built in timer intent by renaming Donās intents with the same names and restarting HA. I have not tried this yet.
Pardon my noobie blunderingsā¦Iām trying to get the timer stuff working. As far as I can tell it is setup as it should be, but I keep getting āSomething went wrong: unable to find entity [ātimer.timer_1_minuteā]ā.
If I use the āsentences parserā tool in the developer tools section it shows:
The name and source in those screenshots being different seems indicative of something, but Iām not sure what.
That might not be enough to help anyone point me in the right direction, but Iād appreciate any pointers!
Edit: sorry about the images, fixed!
Second edit: I think I may have solved my own problems. I was also toying with Extended OpenAI Conversation with the voice assist, changing the conversation agent to Home Assistant seems to have allowed the timer functionality to work fine. Bit of a bummer I canāt have both, but the timers are a non-negotiable need for certain people in the houseā¦
Please see the pinned post on the main forum page. Post the code (correctly formatted) rather than screenshots. This will also fix you issue of not being able to post more imagesā¦
Hi all, not sure if itās just me, but I have been using Donās scripts etc to make timers for a few weeks now without issue, until today when I upgraded to the latest patch release of HA. Now, when I ask to set a timer on one of my satellites (ESPHome), I get the response āSorry, timers are not supported on this deviceā. If I do it however on my phone or in the browser, I donāt have any problems.
Sorry, not sure what that could beā¦ I havenāt really looked into the new timer function of the 2024.6 release. Still, I believe custom sentences should overwrite default sentences, so not sure what the issue could beā¦
seems like setting timers via assist in web and mobile clients is broken in 2024.6, even with custom sentences. I think iāve found the proximate cause of the problem & opened a github issue proposing some solutions. If you are also experiencing this issue or are interested in working together on a fix, please feel free to join that conversation. Thx!
I had another ESPhome update today. After that, I can now use the custom scripts / timers made by @DonNL again! Iāve not changed anything in my set up, so a bit strangeā¦
I was searching for timers and found this thread, my intent was to control devices with timers, e.g. switch off light /ac in x minutes. I saw wild scripts in here and just wanted to share my simple working solution, granted, its using gpt4o so maybe thats why my script can be so simple?!
anyhow, I just created a script which takes 3 parameters: delay in seconds, service name, entity name
and In the gpt prompt, I added s sentence to use that script when the user wants to to perform timed service calls. works nicely and super simple.
expose the script to assist.
here is the script:
alias: Delayed Service Execution
fields:
delay_seconds:
description: Delay in seconds before executing the service
example: 60
required: true
service_name:
description: The service to be called (e.g., 'light.turn_on')
example: light.turn_on
required: true
target_entity:
description: The entity ID to apply the service to
example: light.living_room
required: true
sequence:
- delay: "{{ delay_seconds | int }}"
- service: "{{ service_name }}"
target:
entity_id: "{{ target_entity }}"
mode: parallel
max: 10
sorry if this approach is too naive, just wanted to share that here.
Am I doing something wrong or do timers not work with ChatGpt as Conversation Agent?
I get the blunt answer that it canāt set timers.
Is there a way to use the new āassist timersā anyway? Possibly with an exposed script?
If I use assist on my phone I cant get the timer working in Dutch. The timer works on my athom echo but it doesnāt work on my phone using assist. I use microsoft stt and even if I type : āstart een timer voor 2 minutesā it doesnāt work. If I use the chat gpt conversation agent it does work on my phone. What is the correct sentence to start a timer on my phone in Dutch?