The future of YAML

It’s a totally valid reason and this should not be promoted to people who may not know what they are doing. It’s very easy to break json file and if you do that then your HA won’t start at all.

(I’m not saying I have never done it BTW just that it’s a last resort and I have f**k’ed up HA and it wouldn’t start when I did that until I restored a backup)

You mean like forgetting a space in yaml and having all hell break lose ?

If the devs don’t want us to edit the config files directly, then maybe they should give us advanced users a better way to manage our configurations. Because the current highly inefficient UI doesn’t cut it. Until then, I will absolutely continue to promote the editing of these files, as it has been working very well for me. And there’s no reason it won’t work for others.

And in this specific case, let’s leave the decision to @brunkj, as he’s the one I replied to, in how he wants to manage his config, shall we ?

1 Like

That won’t crash anything you’ll just get an error.

How about you don’t try and control everyone else and control yourself. Last I checked this is a PUBLIC forum and anyone can state their opinion.

For most YAML errors, HA won’t start, often with a cryptic error messge. If the json is incorrect, HA won’t start, possible with a stack trace. I fail to see the difference in practice. We’re talking about usage by advanced users here, I think they can handle this.

Maybe you should take your own advice. Sure you can state your opinion. And so can I. That’s exactly what I did with my reply to brunkj, before you and Nick stormed in with how evil my suggestion was and how the world would end if you edit a config json in .storage… Jesus, why is this such a touchy subject here… :roll_eyes:

2 Likes

They pretty much fixed that a fair while ago but it was an issue prior to that.

Most probably.

Well you are the one trying to shut people up… not me. Any time you try and control other people you can expect a response.

As far as screwing with hidden json files is concerned it’s because it’s not recommended and dangerous if you don’t have the understanding and skills and it’s irresponsible to promote that as a day-to-day operation in the forums.

:man_facepalming: Yeah whatever. I’m out of this.

1 Like

This ship has well and truly sailed.

Arguing is pointless.

But if you must then please keep it civil and follow our code of conduct.

2 Likes

My big concern here is this. Some of us doing homeautomation are treating things like you would a larger project. A dev/test environment, code checks, deployment pipeline, ect so that by the time you are ready to truly integrate it, you are comfortable in doing that. I like using git repos and pull requests to track things. I have a ci/cd pipeline in place currently for my homeassistant install. But all that really goes out the window if i have to log in to the UI to do all the things. A step could be missed here, a wrong thing selected there.

In short, potentially leading to issues that otherwise could be avoided.

Now like I said, this is not everyones method. But I know I am not alone. The shear number of public github repos of users on this forum sharing their configs shows I am not alone. All of those instances are WAY more elaborate than mine but I don’t know in the end how they will be handling the fact things will need to be done via the UI.

5 Likes

That’s what snapshots are for. It’s really easy to make a nightly snapshot automation. It’s really easy to make a snapshot automation that watches files change. It’s really easy to make a snapshot automation that works like github commits. You have a number of options. You can even do what @HeyImAlex does if you feel comfortable doing that. I do it for specific things, just realize you could break your setup. No one is stopping you from doing that, however it is undocumented because it’s not suggested. Yaml and JSON are the same thing basically, it’s just that json has a strict format and it’s easy to serialize and unserialize. Json doesn’t require data validation either because it’s not expected to be hand edited. This is why you can screw up your system. It’s an edit at your own risk scenario.

1 Like

FYI If this deviates into more arguing, the thread will be locked forever.

Understood. Is there a way to get a road map for what the state of the yaml will be? Will there be certain conditions in which yaml won’t be used vs when it will? or will we be looking at no new yaml support and slowly getting rid of it for older stuff?

This is all covered in the ADRs. The TLDR is: Yaml is still supported for utility integrations. All new integrations require config flow (the UI), unless the new integration is a utility integration. Utility integrations are things that perform math, or statistics, with complex configurations. Porting old integrations that are non-utility integrations will happen over time. There is no roadmap for that because it’s all volunteers and it’s up to the code owners to change those.

Ok. May I ask how then existing utilities are having yaml removed? Is it because they have been rewritten or some other factor? Not trying to be a pain, just curious and trying to understand :slight_smile:

What utilities have had yaml removed?

FYI This was a trick question, because the answer is: No utilities have had yaml removed. If yaml was removed, then the integration was not a utility integration.

ok, maybe that is where I am lacking in the knowledge. I need to better understand the definition for the types of integrations. Thank you. :slight_smile:

The best way to identify a utility integration is by the nature of the integration. Does the integration interact with existing entities or does it connect to outside source? If it interacts with existing entities and does not connect to an outside source, it’s a utility integration.

1 Like

Thank you.

I also feel I need to apologize. As I mentioned initially, I am new to home assistant. I have been trying to catch up on all the work that has been done, what it can do and where it’s going. I do not have all the knowledge many here do. I have inadvertently irritated some people with my inquiry on the future of yaml. I do apologize for my lack of knowledge on some of these subjects as home assistant is new to me. I am trying to learn. No ill intent meant, just an enthusiast trying to understand.

My apologies to anyone that I have bothered with this that didn’t say anything and my apologies to those that reached out and flat out told me my inquiries were incorrect and stupid.

I don’t think there was an apology needed. Everyone had good intentions. You just in the end wanted more understanding on home assistant. You will find mostly everyone in the community will help out in the end. Just sometimes things can get out of hand. But Welcome to home asstant!

3 Likes

Whoa, I was out of this community for almost a year now, and I see… nothing changed! :slight_smile:

I guess I have to start editing JSON at this point. It’s ok, I hate yaml more than JSON. But I hate (and won’t work for my use case which is really embedded and source controlled) UI even more. And we now have Node Red, so we can use HA for dumb things as the devs want us to, and Node Red for smarter things in life…

1 Like