It looks like many of the components in Home Assistant can be configured directly in the Home Assistant GUI but they can also be configured in the YAML.
What is the preferred approach?
Also, what about automations and scripting?
It looks like many of the components in Home Assistant can be configured directly in the Home Assistant GUI but they can also be configured in the YAML.
What is the preferred approach?
Also, what about automations and scripting?
Home Assistant integrations are solwly being moved over to UI configuration. Support for YAML only for new integration configuration has been dropped. New core integrations must be configurable through the UI. Manual YAML support is optional though few developers want his extra work.
The Automation and Script editors have come a long way but are still not capable of doing some of the more advanced configurations. And they have a few quirks still.
They didn’t exist when I started so I began with YAML and have continued to do so. I found it surprisingly easy to learn.
No matter if you use UI or YAML to configure automations, try to avoid device automations. Use state triggers and service calls instead.
Simply because if you ever have to replace a device (failed/stolen etc…) it is easy to change the new entity id to the old in one place. However device ids have no such ability and you will have to edit every single appearance of the device id in all your automations. Search and replace in a text editor doesn’t make this too onerous but still, why make work for yourself?
Also you get a better understanding of how Home Assistant works this way.
Tom what about portability?
I can move an HA installation just coping my yaml configuration. Is there such option configuring integration via UI?
You have to copy the entire /config folder. It contains a hidden .storage directory that has all the UI configured info in it.
You can copy the entire /config directory between any install type.
Hello,
I am currently asking myself which way is better? Should I build my configuration in UI mode only or is YAML mode preferable? I have no problem understanding YAML, as I develop JavaScript myself and have come into contact with YAML several times.
What are the current advantages of YAML mode?