2023.4: Custom template macros, and many more new entity dialogs!

Don’t really think I lambasted the developers. Most of what you said doesn’t even seem to refer to my post… I was talking about keeping up with breaking changes, not YAML or HACS or MariaDB

1 Like

Because you need to pass in the entity_id not its value

EDIT: having seen you’re trying to access the old state, has_value will only check against current state. An alternative (if you feel you’re going to reuse this is to make your own jinja macro).

Create the jinja file in the custom_templates path eg. tools.jinja and do something like

{%- macro has_state_value(state) -%}
{{ state not in ['unknown', 'unavailable'] }}
{%- endmacro -%}

Then you can do

  condition:
    - "{% from 'tools.jinja' import has_state_value %}{{ has_state_value(trigger.from_state.state) }}"

Although I must admit having to import the macro/function does make it more cumbersome

3 Likes

Being part of the beta makes sure “your” configuration has been tested and you understand what direction the developers are going on the monthly release and what changes you need to do on “your” system to ensure it works the way you want it to.

I find the interaction between them and the beta testers very enjoyable. As to a .0 release having all the fixes found during beta, I find this depends on what broke, how bad it is and how many testers have the issue.

People forget how complex HA is. With the built-in integrations, Add-ons, HACS, HAOS, Debian, etc, it is close to impossible to test all the combinations.

I find it amazing how fast developers are able to respond to the community and keep HA moving forward.

8 Likes

Just upgraded to 2023.4.2 from 2023.3.6 and cannot restart due to a dark sky error but cannot for the life of me find the sensor the logs are referring to! Appreciate if someone can point me to where I should be looking? Thanks!

Have removed the weather integration from my config.yaml but the issue remains.

The new dialogs are ugly - at least to me.

The usability on the other hand - undeniably is worse compared to the old layout.
You need to include also users (and listen to them) in order to counter the artists (stupid) UI proposals you seem to be accepting unconditionally!

5 Likes

Nice works, only with the latest update (Home Assistant Core 2023.4.2) Lovelace Animated Background stopped working.
I restored a backup and it works again.

gr.
Henk

If you can access your HA installation from another device it is very easy. I use Notepad++ and do a search of my device for darksky* in all my *.yaml files and it found several times.

1 Like

Mission accomplished. I have a considerable reduction in size (from 4.5 to 2.1 Gb). I also reduced my days-to-keep in recorder considerably after watching the video. I have no doubt I will find a performance improvement as well (once I am home).

Many thanks!

@Ih8rain2 How many days did you reduce your db to? I’m currently at 90 day purge, but not sure what to reduce it to.

Seeing your message prompted me to watch the video following my db migration issues. I’m on Mariadb with a big database (my backups are 7-8GB), but am an amateur on sql…only migrated because of performance issues years ago.

@bdraco after watching the video and hearing you say things along the lines of “you should have double the free space for migration” and the other conversation about the number of days to keep, I believe this contributed to the issue I opened in GitHub (if not the cause). Even though I have a 128gb SSD on my box, I had so many days of backups that I did not have enough free space (maybe 20gb). Could we get these items and recommendations added to the release blog for this section? Or did I miss them in the written section?

I never watch the videos as I prefer to read it at my speed, so it seems like the warnings about space, recommended days to keep, and migration back to SQLite would be helpful. I expected the migration to take over 24 hours per the blog, but I did not clear enough space because I didn’t catch this notice from the video before upgrading or rebooting before the migration was complete (after 24 hours) on build 2023.4.0. The net here is that I lost one day’s worth of data (not the end of the world) since I didn’t watch the video and missed the extra notes. Next time…

Also, does anyone know of a written guide for migrating back from mariadb to SQLite? I heard the recommendation in the video to start HA default so it builds the data structure correctly, but I’m not clear on how to migrate back successfully. Given my lack of sql experience, it seems I should move back to the default now with these improvements. It looks like there are others also looking for some guidance for how to migrate back here, but have not yet figured it out.

Flawless update (3.6 → 4.2), thank you all developers and contributors :+1:

I wasn’t specifically calling you out with the “lambast” part.

HA isn’t mature enough as a “mum friendly” product not to have breaking changes. So even though your point is valid it’s not relevant at this time as HA isn’t ready for “mums”.

I honestly can’t remember the last time a “breaking change” mentioned in the release notes impacted the functionality of my HA instance other than custom integrations.

No disrespect intended etc. Just thought it was an odd thing to say in the midst of other conversations relating to breaking changes and custom integrations etc.

I get this:
./minecraft_server/manifest.json: "aiodns==2.0.0",

1 Like

After the update, while HomeKit integration starts, and I can control lights through that, the web socket and Lovelace never start up? I can’t find anything in the logs that indicate a problem. This only has happened after the April 8 update. Docker auto-updates using Watchdog.

FYI, there’s a new built in filter that does this, no need for a macro. New this release

It’ll be in weather section of configuration.yaml

Make sure you’re running all the latest versions of custom cards

Anyone has the same problem?

In the end I would’ve advised not to go the macro route as it turned out to be longer code when it was just as easy to do it his way originally, yet left it there for a macro reference (I wrote that code on the spot, I don’t actually have that macro).

But I’m sure the user in question will benefit from the new filter, I also assume next release? because I can’t find any information on it.

Check in your sensor yaml. I guess you have some DarkSky sensors in there.

1 Like

It’s the new has_value filter