#UI Template switch, but no option to set an icon template?

1 messages · Page 1 of 1 (latest)

wooden trellis
#

Rummaging my yaml packages, I found several integrations left that I hadnt migrated to the UI yet. Template switch among them. Figured that might not have been added yet, so I went to the Helpers page and. yes, they Are available. Great.

Immediately started to add them, but then I realized why I probably hadnt done before: we can't set an icon template? That feels like a mistake/oversight, it's the beauty of the template switch in yaml we can set that template on the icon.

Fully aware not all of the yaml options are available in the UI, as they are seen to be 'advanced'.... however, templates themselves are already seen as advanced, so in this case that is no argument really?

Wondering if this could be added after at all, so before opening a discussion/FR in the repo, hope to get some response here. I could have asked the same for any other template entity of course, that is not the idea of this question, reallyntrying ti focus on the template switch entity here.

thick mason
#

You can still "show as" different types of entity but no you can't set arbitary icon templates from the ui

south fiber
wooden trellis
#

yes, I remember the discussion about availability_templates. I had hoped that to have been a more advanced topic for the template sensor entities. And the icon_template of the template switch to be more generally used even by the less tech savvy users that want the switch to show nicely in the frontend...

#

I'll check the show_as, maybe that can be an alternative. thanks for that hint

south fiber
#

well good luck with your FR 😉
I'd be happy to see it but I'm not gonna hold my breath heh

wooden trellis
#

hehe, yeah, I know...

#

and the show_as doesnt really help in this case, there's not even a 'connected' or 'humidifier' (which was one of the latest additions as I remember). there are some faintly related ones, eg fan( ventilator), but for:

        unique_id: switch_ha_cloud_remote
        value_template: >
          {{is_state('binary_sensor.remote_ui','on')}}
        icon_template: >
          mdi:cloud-{{'check-variant-outline' if is_state(this.entity_id,'on')
             else 'off-outline'}}``` I cant see an alternative there
#

well, other than Schakelaar (switch) but that is moot ofc

south fiber
#

"Connectivity" is not "connected" ?

wooden trellis
#

uhm, I don't get that in the options.... above is all there is in our language, just double checked again. Note this is not the binary_sensor set of device_class, but switch