2020.12: Automate with Blueprints!

This used to work. After the 2020.12 upgrade, it kept complaining. I had to comment out the automation (and lovelace_gen integration) to get past safe mode.

   action:
     - service: switch.turn_off
       data: {}
       entity_id: {{ trigger.entity_id }}

You may want to review the description of blueprints because that’s not what they do. Automations continue to exist. A blueprint separates data from logic. In other words, you can create a blueprint to generate an easily configurable automation (among other things).

@123 whoops. What I meant was replace automation templates with blueprints. I’m with ya’ blueprints are not automations on their own.

It’s not that either.

Maybe, maybe not. But telling me what they’re not isn’t changing my mind.

I understand blueprints don’t work the exact same way as templates but, for my purposes, they may solve the same problem.

If you have a different perspective feel free to share. But telling me what they’re not doesn’t make either of us smarter.

It does make one of you much better informed though :wink:

5 Likes

I also explained what they are but I guess it was overlooked or failed to make an impression. That’s why I also suggested to review the documentation.

Regardless, my automation with a template no longer works. I assumed posting that here might get some of the developers’ attention.

Is there a work around to get it working?

Edit:
Nevermind. I just reloaded the integration and manually created a number of days until expiration sensor using the timestamp sensor for cert expiry.

- platform: template
    sensors:
      certexpiration:
        value_template: '{{ ((as_timestamp(states("sensor.cert_expiry_timestamp_hostname_dyndns_org"))-as_timestamp(now())) | int /60/1440) | round(0) }}'
        unit_of_measurement: 'Days'
        friendly_name: 'Days Until Cert Expiration'
2 Likes

If the syntax you’ve posted is exactly what you have in your configuration, I can tell you categorically that it has never worked, because you have a single line template that is not enclosed in quotes. This is not something that has happened in this version, it has always been the case.

2 Likes

Wait while I get my popcorn

7 Likes

I suggest you speak to the dev of the custom component integration for that issue

dammit, you’re right where it matters most. Quotes fixed it and re-enabled lovelace_gen, which I thought would be unrelated. I know it worked before because
 well, it was working for a while. Thank you!

2 Likes

This ought to fix it:

   action:
     - service: switch.turn_off
       data:
         entity_id: '{{ trigger.entity_id }}'

I agree with mf_social. An unquoted template is invalid in all releases, not just the most recent one.

You would have to use a line-continuation character to permit the use of an unquoted template.

   action:
     - service: switch.turn_off
       data:
         entity_id: >
           {{ trigger.entity_id }}
1 Like

I cannot upgrade. When I try it fron Supervisor, I get “Supervisor error: unknown error. See Supervisor”

My installation is docker-based and I’m currently in 0.118.4.

Any ideas?

Thank in advance

Same here,

Running HA on Proxmox
System log shows :

20-12-14 06:09:29 ERROR (SyncWorker_4) [supervisor.docker.interface] Can’t install homeassistant/qemux86-64-homeassistant:2020.12.0 → 500 Server Error for http+docker://localhost/v1.40/images/create?tag=2020.12.0&fromImage=homeassistant%2Fqemux86-64-homeassistant: Internal Server Error (“Get “https://registry-1.docker.io/v2/”: context deadline exceeded”).
20-12-14 06:09:29 WARNING (MainThread) [supervisor.homeassistant.core] Updating Home Assistant image failed

1 Like

After the upgrade I have 2 issues:

  • HACS is not loaded
  • Cert Expiry is not working.
    I’m running HA Core in Docker on Ubuntu

update error:
20-12-14 05:17:25 INFO (SyncWorker_2) [supervisor.docker.interface] Updating image homeassistant/raspberrypi3-homeassistant:0.118.5 to homeassistant/raspberrypi3-homeassistant:2020.12.0
20-12-14 05:17:25 INFO (SyncWorker_2) [supervisor.docker.interface] Downloading docker image homeassistant/raspberrypi3-homeassistant with tag 2020.12.0.
20-12-14 05:17:35 ERROR (SyncWorker_2) [supervisor.docker.interface] Can’t install homeassistant/raspberrypi3-homeassistant:2020.12.0 -> 500 Server Error for http+docker://localhost/v1.40/images/create?tag=2020.12.0&fromImage=homeassistant%2Fraspberrypi3-homeassistant: Internal Server Error (“Get “https://registry-1.docker.io/v2/”: dial tcp: lookup registry-1.docker.io: no such host”).
20-12-14 05:17:35 WARNING (MainThread) [supervisor.homeassistant.core] Updating Home Assistant image failed

perhaps server down?

EDIT:

I just checked in supervisor/system and it says:
Version
2020.12.6
Newest Version
2020.12.6

so it seems it has been updated, i’m confused


but Supervisor/dashboard says:
Update Available :tada:
Home Assistant Core 2020.12.0
You are currently running version 0.118.5

Doesn’t it work, or is the icon not showing?
If it’s the icon, press CTRL-F5

Cert Expiry is a breaking change. Just delete the current one and add it back through Integrations.

I also updated my Pi4 and HACS is working fine. Will reboot my Pi3B+ later to see if that clears it.

**** Rebooted my Pi3B+ and HACS is back ****