Is there a way, in a front-end panel, to show a switch state as text or on/off icon instead of the usual on/off switch which can be used?
I have some sockets that are controlled via node-red but also want them to show current state in my control panel, it could be text as in “on” or “off” or just a plain or solid icon etc.
Had you ever used Node Red before you had ever used it the first time?
Sounds like a smart aleck question but not really. You have to start somewhere the first time to learn anything.
YAML is no different. People make a big deal out of it but it’s literally just learning one more way of organizing words to make HA do what you want. there aren’t even that many rules to follow.
The state will be {{ is_state('switch.your_switch_entity', 'on') }}
You can choose a device class which will affect how the new entity is displayed on your dashboard. You might try either Plug or Power.
Option two requires you to update your Dashboard, and it’s going to depend on which card you are using to display the entities. If you are currently using (or don’t mind changing to) an “entities” card, you will need to:
go into the dashboard editor UI
find the entities card that you want to change
select “edit”.
Press the button in the bottom left for “show code editor”.
Now under each entity that you want to change to read-only, add a new line with this text and the same indentation as the line above it type: simple-entity
For example, if you had this:
What I have learned from this forum is that everyone is born with all knowledge except HA, yaml, templates and HA GUI automations.
So whatever they used before was just natural and something they were born with.
I understand but unfortunately that’s not always possible. It’s best to add as many tools to the tool box as you can to maintain the best flexibility to achieve the goals.