• 23 Posts
  • 76 Comments
Joined 1 year ago
cake
Cake day: July 31st, 2023

help-circle



  • Thanks for the assistance, @iso@lemy.lol.

    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.








  • 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' }}     
    





  • 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 for the explanation and example, @CondorWonder@lemmy.ca.

    I used Studio Code Server to search all files for “Automation: Turn Off” and “automation.turn_off” and “automation” - there were 100s (1000s?) of results. I scanned through them and didn’t see anything that looks like it was enabling these automations. And that’s the only record in my logbook around these automations being disabled.

    So now I’ve renamed some of my automations and re-disabled them. In a few days they’ll either become enabled or I’ll search my logs for errors including their previous names.