2022.5: Streamlining settings

Yeah, I just clarified my post as I figured that’s what you meant after a second read of your post.

1 Like

Ok but to be clear, the primary purpose of this integration is to make a backup file that you can use to migrate to a supervised or OS installation (as the doc says). So adding backup options to that integration which don’t exist in supervisor is not going to be accepted. Since then that would mean you could make a backup that supervisor does not understand and defeats the entire purpose of the integration.

Which is why I would suggest starting with supervisor if you intend to make changes to how backup works. If you don’t care about supervisor then I suppose you can skip the frontend and go straight to modifying the backup integration to have this option as well but eventually frontend will also need to be modified.

I’m talking about the designed purpose of the integration. It makes a file that supervisor can then use to restore the working state of your HA system. Sure it is just a tar file (as long as you don’t password protect it) so you’re welcome to extract it and do whatever.

Although I will say if you are on a container or core installation and trying to set up a backup process I would recommend looking OS native alternatives. Like most OS’s have drive cloning options so you can make snapshots that can get you back up and running again quickly and easily if something breaks. Trying to use HA’s backup files instead makes this a really manual process for just one container and I assume you have others running as well.

Well, I really think it’s not usable at all…
You have to enter your SQL statement into a small single line input field that isn’t large enough for even the most simple queries. No line-breaks, no indentation, no comments, no nice formatting possible. Totally unusable for me.

2 Likes

I’m not sure this will work the way you want it to. Seems to me like this will never get to the action. Your trigger will fire at event start and then your condition will check if the current time is 3600 before the event start (which isn’t possible) and then the automation will stop there.

If your goal is to send a notification 1 hour before an event begins on a particular calendar then I think your best option right now is this:

trigger:
  platform: template
  value_template: >-
    {{ state_attr('calendar.werk', 'start_time')  | as_timestamp | as_datetime
        >= now() - timedelta(hours=1) }}
action:
    - service: script.mobile_notify_no_actionable
      data:
        title: "Goto work"
        message: "Within a hour you have to work"
        thread_id: "system_notification"

This will trigger when the start time of the next event on the calendar is less then an hour from now and send your notification.

But you should definitely put in a feature request for an offset option on the new calendar trigger as that would be handy. It would be great if templates weren’t needed here.

Yes you’re right… Won’t work… Saw it also myself…

I dont know your setup and I havent used it myself, but maybe you can try using the Value Template field?

image

Why not write it in yaml?
I’ve only discovered the sql sensor today and didn’t even realize we could do that via the ui. As a matter of fact I followed the docs doing it like in 2022.5: Streamlining settings - #321 by Mariusthvdb

Not sure if you can use the secret in the Ui config, but it surely is very nice in yaml, simply copy the url used in recorder config

Look at the breaking change in 2022.5 for SQL. YAML is no longer supported. The docs have changed https://www.home-assistant.io/integrations/sql/#mariadbmysql

1 Like

I have been around since DOS, and WINDOWS 1.1 … i guess all people get use to the fact that everything changes / develops / evolve … even people and our world is in constant change … it’s basically just bad habits that tends to stick around :slight_smile:

2 Likes

Hmm. How odd. I configured it in yaml as posted just today, in my dev 2022.6 instance…

Seems to do fine.

Buttt…… a restart just now reports this:

Logger: homeassistant.components.sql.sensor
Source: components/sql/sensor.py:61 
Integration: SQL (documentation, issues) 
First occurred: 17:56:14 (1 occurrences) 
Last logged: 17:56:14

Configuration of the SQL sensor platform in YAML is deprecated and will be removed in Home Assistant 2022.6; Your existing configuration has been imported into the UI automatically and can be safely removed from your configuration.yaml file```

The following sensors were disabled by the SABnzbd integration after this release:

daily_total: GB downloaded today
weekly_size: GB downloaded this week
monthly_total: GB downloaded this month

Anyone else having this issue?

Exactly. YAML is no longer supported. Totally crap for a feature that is most likely meant for advanced users and devs like me. I guess the “average” user will not use the feature anyway as they don’t know how to write SQL statements…
Please bring back YAML!

3 Likes

One thing I’m actually curious about is if I make a PR to bring back yaml to something like the SQL integration (interoperable with UI config flow) - is that all fine to be accepted since it does both? Or would that get rejected?

Would I be better making a custom integration then? I’m a core user at the moment, I will be trying out supervisor soon but for my purposes I’d love to just make a backup excluding the sql db and maybe some other things. I don’t care about full system backups etc, I manage that myself but would be nice to have a UI for “custom” backups, either only including certain files, or with exclusions.

Use-case: I decide to rewrite a bunch of automations (happens often) and want a quick snapshot of just certain automation folders

I mean you might want to consider just making your config folder a git repo. Then every change is is a commit and you have history of every change. And you can exclude whatever you want. You can also make it a private git repo if you have PII mixed into your config and don’t want to just make it all public.

There’s an addon that basically does this for people but on a core install its easy enough to just do it yourself.

Thanks for the solution. What was the problem?

This is not just for Poudness, but everyone who is just posting a comment with no reference to what you are commenting about. Since there’s dozens of people on this thread, it would be nice if you quoted what the problem was that your solution applies to. (Yes, I know I could search through 350 posts to find what your issue was.) Even a short quote would provide an up-arrow to go to the quoted post.

1 Like

Yeah true, I’m just talking about a nice easy UI way that I can do this on my phone without SSH

The new entities search in this release is absolutely garbage!

2022.5 has switched the standard entity search to the quick bar search which uses letter sequences instead of strings. So what this means is if I want to search for an entity that begins with CLT, I now get a search result for every single entity in my setup that has the letters C, L and T in it. So instead of 15-20 results, I’m getting 500+ results.

Another example, if I search the word “Trailer” to find entities tagged either with the word trailer in it, or in the trailer area of my config, it brings up all results that has the same letters in it. So the top result is switch.adguard_filtering


This has rendered the search for entities feature absolutely useless. I either need to know the exact entity name (if I did, why would I be searching for it?), or scroll through literally hundreds of results.

If this is some sort of “feature”, there needs to be a way to disable it for those who actually want to search. Imaging searching DOG on google and getting results for every website in existence with the letters D, O or G in it.

7 Likes

Thank god for copy/past, in samba( a little like a cp command automation )

Unless I misunderstand you, I think you might have the problem with the posts.

If you click on the avatar (on the right) that a poster is responding to, it opens the parent post.
Even your post with the quote you are complaining about, has the link to the referenced post and therefore the one before that etc.

Maybe you just chose a bad example?

If there is no link to an earlier post (as in a reply or a link) then I assume the post is a response to the post above.