2020.12: Automate with Blueprints!

I had to look that up. Nice looking router.

If you are running stable debian, why not run HA in docker? (Having said that I am not 100% sure what architecture that machine has).

LXC is already a container and is directly supported by OpenWrt.

Updated to 2020.12.0 with no issues.

1 Like

It’s just not supported by HA.

Trying out the area configuration for entities. I have 3 template entities (one sensor, one binary_sensor and one cover) and for each I have a unique_id. I edited each of these entites in the UI to change the area to an appropriate value. Opened up the Overview (default Lovelace page) and the UI didn’t consider the area in the grouping of elements on the screen.

Could it be that some things (UI) that use area were not upgraded to look at the entity for area first then look at the device for area if entity area is not defined?

@KennethLavrsen you can exclude entities in the recorder settings. Personally though I’m going to try out template-entity-row. Either option should alleviate your concern regarding logging unwanted data.

I personally prefer to show cert expiry as a gauge card

image

Marius and @Holdestmade,
The reason it won’t update is that states.sensor.uptime.last_changed never changes
It is set once when the system reloads and gives the UTC time of that event
The template with now() in it uses the token gesture to Taras about getting template sensors to update on a time basis.

What I’m using is : -

{% set secs = as_timestamp(states.sensor.time.last_updated) - as_timestamp(states('sensor.uptime')) %}
{% set days = (secs / (24 * 60 * 60)) | int %}
{% set plural = ' days ' if days > 1 else ' day ' %}
{% set hrmn = secs | timestamp_custom('%H:%M', false) %}
{{ days ~ plural ~ hrmn if days > 0 else hrmn }}

Which also makes the result human readable (and doesn’t use a ‘workaround’ )

1 Like

Had to tweak my uptime sensor but so far so good, I’m liking this update.

I’m glad that absolute times are being used instead of releative, just be sure timezones + time is correct and all should be good.

And? Installation of HA Core in virtual env is easier and safer than installation of docker that could break any time.

Suit yourself. Upgrade python then.

1 Like

Working on it.

Enjoy OpenHAB. Goodbye.

3 Likes

Downgrade? Troubleshooting? Backup?
Good luck with openHAB

Hi Mutt,

Of course I understand the sensor now is a timestamp, and doesn’t change, nor does its last_changed change. But, last_changed is necessary for the relative() function to work using a

datetime object to its human-friendly “age” string

and it is odd the relative_time doesn’t auto update in the template editor, since it is, well, exactly that, relative to now.

same goes for the template using now(), which should always be updated each minute, on the minute.

as for your template, because my instance hasnt reached a day yet, it shows a bit odd. Using a somewhat changed version of the sensor we created sometime ago:

      ha_uptime_phrase:
        friendly_name: Ha uptime phrase
        value_template: >-
          {% set up_time = as_timestamp(now())-as_timestamp(states('sensor.uptime')) %}
            {% if up_time == 0 %}
              Just restarted...
            {% else %}
              {% set seconds = up_time|int %}
              {% set minutes = (up_time // 60)|int %}
              {% set hours = minutes // 60 %}
              {% set days = hours // 24 %}
              {% set weeks = days // 7 %}

              {% set seconds = seconds % 60 %}
              {% set minutes = minutes % 60 %}
              {% set hours =  hours % 24 %}
              {% set days = days % 7 %}

              {% macro phrase(value,name) %}
                {%- set value = value %}
                {%- set end = 's' if value > 1 else '' %}
                {{- '{} {}{}'.format(value,name,end) if value|int > 0 else '' }}
              {%- endmacro %}

              {% set text = [phrase(weeks,'week'),phrase(days,'day'),phrase(hours,'hr'),
                             phrase(minutes,'min'),phrase(seconds,'sec')]
                             |select('!=','')|list|join(', ') %}
              {% set last_comma = text.rfind(',') %}
              {% if last_comma != -1 %}
                {% set text = text[:last_comma] + ' and' + text[last_comma + 1:] %}
              {% endif %}

            {{text}}

            {% endif %}

but, my issue is with the auto-updating in the template editor… not so much with the above calculation

Does this work for you ?

I’m having some problems with HA since this release. I updated both core and hass.io around 2pm yesterday (AU time). All was all good until around 8pm when the HA front-end became unresponsive - no access via internet or local IP. I restarted the box a few times but nothing. however, Samba still worked and I could access the logs, I was getting this message:

WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder

repeated every minute. I couldn’t figure it out, however this morning HA was back up and running. happy days.

This evening though… it happened again! full log below:

2020-12-15 19:02:53 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for bureau_of_meteorology which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-12-15 19:02:54 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for scheduler which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-12-15 19:02:54 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-12-15 19:03:07 WARNING (MainThread) [homeassistant.setup] Setup of recorder is taking over 10 seconds.
2020-12-15 19:03:54 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:04:54 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:05:54 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:06:54 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:07:54 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:08:54 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:09:54 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:10:54 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:11:54 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:12:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:13:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:14:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:15:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:16:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:17:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:18:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:19:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:20:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:21:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:22:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:23:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:24:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:25:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-12-15 19:26:55 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder

I’m ignoring the HACS, BOM and scheduler warnings - these have been running for weeks with no problems.

anyone else seen anything like this?

I seam to recall the recorder error when my database got corrupted

Marius,
But relative_time() is a function just like now() so the same rules would apply (except Teras (and others)) petitioned for a) a cleaner (well less longwinded) transition step for some templates AND b) an easier way to re-establish the 1 minute update lost by not having an entity id of sensor time.
I know you know all this, so I don’t understand why you think this is a problem ?

I figured that might be the case, but when it started working again this morning (and ran just fine all day) I thought the database might be ok (or at least automagically repaired?) …I’m hoping the magic returns tonight. Is there a way of repairing a corrupted database? or should I just restore from snapshot?