I am already only using yaml files for all my Home Assistant configuration. I meant I want to also convert the toggle to a button using yaml, and not lovelace.
Currently I have a clean Home Assistant installation that I never touched the UI interface. Every configuration I did so far was by editing yaml files. But I never had a lovelace.yaml file, I never needed it so far.
OK? So you are using the automatically generated interface? And you want to change something that you literally only see in the UI? The Lovelace UI? So you want to change the Lovelace?
You do realize that literally any change I make has an effect on the Lovelace UI, right? And they are all done through yaml files, not the Lovelace UI.
No need to have an attitude here. The forums are for helping, correct?
This is not correct. When you add a new script to your scripts.yaml file for example, the lovelace UI will not change, what makes you think it changes the lovelace UI? The only thing it will do, is add a new entity to the default lovelace view, because this contains all the entities in your system.
Yes, this is what I mean. Every time I add a light/switch/outlet or whatever, it appears in the Lovelace UI. That’s a change. Lovelace changes without me having a separate lovelace.yaml. We are not disagreeing here.
My question was how to convert a toggle to a button without messing around in the UI, only with yaml. If a lovelace.yaml is required this is what I’ll do. This is why I said your link is helpful.
I agree that this is a change, but this is only the default view of lovelace, you can not change an input boolean to a button in the default view. It is meant that you create your own views, containing only the information you want for this view in the style you want it, the intention is not to use the default lovelace view, this is just the standard view that is created for every new setup.
This is a view from my lovelace UI that I configured myself, here the lights are buttons instead of a toggle:
Now there are two different ways to create your own views, either through the UI or through YAML. If you want to change it through YAML, you need to add the following to your configuration.yaml
lovelace:
mode: yaml
Then create a file ui-lovelace.yaml in the same directory as configuration.yaml and in this file you create the views like you want them.
Not true. This shows you don’t understand what Lovelace is.
configuration.yaml is for CONFIGURING components/entities/devices/groups.
In the default “lovelace mode” every device/entity/component you add gets added to the lovelace view. You have no control of how anything looks. At all.
You need to switch to lovelace yaml mode or what they call “storage” mode (click on three dot menu in upper right, configure UI, and take control) in order to change what you see in Lovelace.
So again, you are changing how something LOOKS not how something functions. Changing how it is viewed is done in lovelace.