oyvindwe / connectlife-ha

ConnectLife integration for Home Assistant
GNU General Public License v3.0
62 stars 24 forks source link

Icon translations should be in icons.json not the data dictionary #25

Closed trajano closed 4 months ago

trajano commented 4 months ago

Per https://developers.home-assistant.io/blog/2024/01/19/icon-translations?_highlight=icons

Each integration can now provide an icons.json file, containing a mapping of states to icons.

oyvindwe commented 4 months ago

Interesting. However, as sensor names may be reused across device types in the ConnectLife API, I think we still need to support setting different icons for the same sensor.

We could add some base icons to icons.json though. I need to test what happes if icons are set both ins icons.json and in code.

oyvindwe commented 4 months ago

Some icons, e.g. for custom climat prestes, can only be set in icons.json. I have added this in PR #70

It may make sense to set some common icons in icons.json as well, e.g. for t_eco switches.