Ok, I’m kinda getting stuck here and after searching this community as well as the internet as a while I’m not finding any real answers, so…
I have a few Automations which will notify us over Alexa via speech and await a reply. This is all working great, but it’s rather monotone to have the same question asked every single day so I’m using AI to generate the messages, this is also working fine, but since I’m trying to run as much off the cloud as possible (Yeah, yeah, I know, quite the oxymoron considering the notifications themselves are cloud dependent).
Anyway, to make a long story short, what I’ve done is to get “AI” (or rather LLMs) to create a bunch of suitable sentences for various scenarios and save these out as separate files and, after a LOT of trouble, inserting these dynamically into my automations using !include phrases/gymbag.yaml or similar.
Problem is, using !include inside the automations webui isn’t working, and while editing the yaml files by hand works well and they will then show up perfectly fine in the webui I keep getting server 500 errors when adding new automations or editing an existing one.
Is there a way around this at all? Thinking out loud, would breaking up the automations.yaml file into several fixes and using !include_dir or similar work, or am I stuck editing by hand until the team decides to “fix” the “bug”? I guess I could also break out the offending automations into a separate file and simply removing the !include offending_automations.yaml reference whenever I am actively editing or working on other automations, but it adds one more step that I kinda dont want.
I could also copy the entirety of phrases/gymbag.yaml into the automation in question, but since I’m using other files accross the board for yes/no/norespone replies etc they are re-used among a bunch of different automations, so if I ever wanted to update the possible responses I would have to update umpteen automations…
Am I making any sense? Are any of you able to help?
Example (should work, but not what I’m actually using as I have several triggers for Yes/No/NoResponse etc)
initial automation
alias: Fed Dogs
description: ""
trigger:
- platform: time
at: "17:05:00"
condition: []
action:
- service: script.actionable_notification
data:
text: !include phrases/fed_dogs.yaml
event_id: actionable_notification_fed_dogs
alexa_device: media_player.offfice
mode: single
offending reply automation
trigger:
- platform: event
event_type: alexa_actionable_notification
event_data:
event_id: actionable_notification_fed_dogs
event_response_type: ResponseNo
action:
- service: notify.alexa_media
data:
message: !include phrases_dislike.yaml
target: media_player.office
data:
type: tts
phrases_dislike.yaml
>
{{ [
"<voice name='Brian'><prosody rate='fast'>Well, I see you've maintained the status quo – as expected!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>Your unique talent for avoiding work is truly remarkable!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>Who needs a superhero when we have you to avoid responsibilities?</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>I'm genuinely impressed by your commitment to procrastination!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>Another day, another opportunity to embrace inaction.</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>Did you decide to take a vacation from productivity today?</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>You're like an artist who's chosen to leave the canvas blank – quite a statement!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>Your secret recipe for evading responsibility must be legendary!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>I bet the other obligations are throwing a party in your honor!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>The commitment to dodging must be exhausting, or is it effortless?</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>Efficiency may not be your strong suit, but avoidance certainly is!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>Neglect executed with such flair, it's almost impressive!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>I'd pay to watch you perfect the art of procrastination – a true spectacle!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>Your once-sharp productivity sword now gathers dust – along with the to-dos!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>Obligations breathe a sigh of relief when you're around!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>Stealthily avoiding responsibilities – you're the ninja of idleness!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>Let's hold a ceremony to remember the things you didn't do!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>The champion of procrastination has arrived – and it's you!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>An abundance of obligations magically appears in your presence!</prosody></voice>",
"<voice name='Brian'><prosody rate='fast'>Thank you, oh great avoider of responsibilities – our hero of inactivity!</prosody></voice>"
] | random }}