![](https://lemmy.d.thewooskeys.com/pictrs/image/26cdb576-f114-405d-8b11-750907960b4c.png)
![](https://lemmy.ml/pictrs/image/1f910de9-62b5-43a9-8c93-94821c945577.png)
Thanks for explaining that, @[email protected]
Thanks for explaining that, @[email protected]
Thanks for the help, @[email protected].
I do still have my old server (I’m posting this from it). The new Lemmy server is using a different domain.
Thanks for the assistance, @[email protected].
My new server uses a new domain. I do still have the old data (in fact, the old server is still up - that’s where I’m posting this from).
I installed both Lemmy servers via Docker. It would be nice if I could rsync
my account data (including post/comment history) from the old server to the new server, but I’m now wondering if my changing domains would make the old account not work at all in the new server.
I see the import/export settings in my new server (0.19.3) but not in my old server (0.18.3). But it sounds like exported account settings don’t include post/comment history. Thanks, though, @[email protected].
Thanks for that info, @[email protected].
I’m embarassed but very pleased that your example also taught me about set_conversation_response
! I had been using tts.speak, which meant I had to define a specific media player, which wasn’t always I wanted to do. This is great!
That is HUGE! Thank you, @[email protected]! This makes customizing conversations from automations so much more powerful and flexible!
Yes, @[email protected], now knowing that I can use sentence syntax in automations, I have built 1 automation to handle my specific needs. But each trigger is a hardcoded value instead of a “variable”. For example, trigger 1 is “sentence = ‘what is the date of my birthday’” and I trigger an action conditionally to speak the value of input_date.event_1
because I know that’s where I stored the date for “my birthday”.
What would be awesome is your 2nd suggestion: passing the name of the input_date helper through to the response with a wildcard. I can’t figure out how to do that. I’ve tried defining and using slots but I just don’t understand the syntax. Which file do I define the slots in, and what is the syntax?
Thanks, @[email protected]. I didn’t know you could use special sentence syntax in automations. That’s pretty helpful because an action can be conditional, and I think you can even make them conditional based on which specific trigger fired the automation.
It still seems odd that I’d have to make separate automations for each helper I want to address (or separate automation conditions for each), as opposed to having the spoken command have a “variable” and then use that variable to determine which input help to return the value of. But if that’s possible, maybe it’s just beyond my skill level.
Thanks for the references, but at least one example from https://www.home-assistant.io/integrations/intent_script/ seems to be wrong/outdated.
From that page:
Local lists
Sometimes you don’t need a slot list available for all intents and sentences, so you can define one locally, making it usable only in the context of the intent data (like a collection of sentences) where it was defined. For example:
language: en
intents:
AddListItem:
data:
- sentences:
- add {item} to [my] shopping list
lists:
item:
wildcard: true
This is the code in my conversations.yaml
:
intents:
HowManyDaysUntil:
data:
- sentences:
- how many days until {countdownname}
lists:
countdownname:
- "this"
- "that"
Here are the only difference I see between my code and the example above:
language: en
(but when I add it, I get Invalid config for 'conversation' at conversations.yaml, line 1: 'language' is an invalid option for 'conversation', check: conversation->language
)However, this yaml gets Invalid config for 'conversation' at conversations.yaml, line 9: value should be a string 'conversation->intents->HowManyDaysUntil->0', got None
Perhaps I can’t have intents in conversations.yaml? Or maybe not lists? I started this project by editing config/intents/sentences/en/_cmmon.yaml
but that’s a bad idea because an update would wipe my customizations. What’s the appropriate place for me to add custom sentences/intents/responses/lists?
You’re welcome!
From what I understand, a timer’s duration is the amount of time the timer was set to run for when it was started - the total time, not the time remaining.
If you’re wanting to determine the time remaining in an active timer, you need something like:
{% set finish_time = state_attr('timer.timer_entity_id', 'finishes_at') %}
{{ '00:00' if finish_time == None else (as_datetime(finish_time) - now()).total_seconds() | timestamp_custom('%H:%M', false) }}
Or this version, which breaks hours and minutes into speakable parts:
{% set finish_time = state_attr('timer.timer_entity_id', 'finishes_at') %}
{% set hours, minutes = ('00:00' if finish_time == None else (as_datetime(finish_time) - now()).total_seconds() | timestamp_custom('%H:%M', false)).split(':') | map('int') %}
{{ '' if hours == 0 else hours ~ ' hour' if hours == 1 else hours ~ ' hours' }} {{ ' and ' if hours > 0 }} {{ minutes ~ ' minute' if minutes == 1 else minutes ~ ' minutes' }}
Smart Home Junkie’s method worked perfect! And it was quite easy and quick. Thanks for the referemce @[email protected]!
I forgot to mention that I had also renamed one of my automations in the hope that I’d be able to find the original name in my log files when whatever was trying to turn it off could no longer turn it off. But I can’t find anything in the log files containing the original name.
This is really confusing to me. The History list shows when this automation was turned on and turned off (turned on means enabled, turned off means disabled) but the Logbook list doesn’t show anything for this automation at the datetime it was enabled (it does show me manually disabling the automation, though).
I searched for the automation’s name (e.g., automation.my_automation
) in every file in HA’s confg
directory and there are no occurrences. I also searched for the automation’s ID (e.g., 1623421375007
) in every file in HA’s confg
directory the only occurrence is in the Automations.yaml file where the automation is defined. I also searched for automation.turn_on
and automation.turn_off
in every file in HA’s confg
directory and there are no occurrences.
This seems strange: when I click on the “On” or “Off” bar in the History list for this automation and the details for the automation pop-up (screenshots below), and I then click “Related”, the section that says “Part of the following automations” lists about half of my automations, but none of them have anything to do with this automation.
Thanks!
That looks gorgeous!
I’ll try to look into this. Thanks.
This sounds like it wouldn’t help much, and whatever increase in volume might be offest by decrease in quality due to echo. But it’s free to try (and within my skill set :) ).
Thanks, @[email protected].