Customizing icons and text on groups

Hello all,
is there a way to customize icons and texts in a group? I have created the following group:
Image%20001
I’m wondering how to change them. They are, respectively:

  • Switch
  • Script
  • Sun state

Is there a common way to change them?
Thank you
Lucas

I don’t believe you can change the top 2, but for the state you can create a template_sensor where you change the state to whatever text you fancy

Thank you, I tried the following in sensor.yaml, but it doesn’t work. Or better, it works only for badge, but not for group :thinking:

- platform: template  
  sensors:  
    sun_state:  
      friendly_name: "Sun State"  
      value_template: >-  
        {% if is_state('sun.sun', 'above_horizon') %}  
          up  
        {% else %}  
          down  
        {% endif %}

Sorry I’m not sure what you mean. A template sensor is not a group, it’s a sensor, though it could take a group’s status as template.
What exactly are you trying to achieve?

image

You can only change what I drew green arrows to.

Anything else requires a custom panel:

Changing the state for Alba e Tramonoto would require a template sensor, like @lolouk44 said.

Changing the Icon for Condizionator is done through the customize section. But it looks like thats a switch template. If that’s the case, switch templates have a icon_template: where you can specify the on/off icon:

I recently saw this custom UI library from another HASS user that allows you to change the “Activate” text to whatever you want. This may be of interest to you.

2 Likes

Yep, that’s using the custom panel (commonly known as Custom UI)

Thank you all, I finally figure out how to use the Template Switch, so I changed several switches/sensors (both icon and text).
But still not able to change the following :thinking:

Image%20001

I understand I have to use the Panel Custom feature, but I don’t know how to do that. Is there any complete example around?

Thank you

Those don’t look like switch templates… if you made them into switch templates, hide those.

Your best examples for the custom panels is to search this forum for ‘custom ui’. That’s how I found all the examples. The document page for custom panel is useless.

also, here is the github example for the panel:

https://github.com/home-assistant/example-custom-config/blob/master/panels/hello_world.html

all of Petros posts are incorrect, this is the correct link https://www.home-assistant.io/developers/frontend_creating_custom_ui/

add in in customize.yaml

switch.office_light:
  friendly_name: Office Main light
  icon: mdi:sofa
  assumed_state: false <==== this make it look like input_boolean instead of toggle on/off

Explains why I had trouble finding everything when I created my custom UI. LOL. Thanks!

@Lucas_Rey sorry for leading you down the wrong path.

@Sunonline

switch.office_light:
  friendly_name: Office Main light
  icon: mdi:sofa
  assumed_state: false &lt;==== this make it look like input_boolean instead of toggle on/off

Thank you, this did the trick in a very easy way:
Image%20001

However, I’m just curious to check how the Custom UI works.

@petro: Don’t worry, we are here to learn :slight_smile:
@eddi89: Thank you for the link