marq24 / ha-waterkotte-the-fork

HACS integration for Waterkotte Heatpumps [build since 2018] - # This version is deprecated - and no further updates will be provided! Please migrate to the new version of the Integration that have been published - TIA - see the 'Migration Guide' for details
MIT License
7 stars 1 forks source link

Dont use translated name for Entities #2

Closed der-berni closed 1 year ago

der-berni commented 1 year ago

Please do not use translations as name for the entities. This is not recommended here either: https://developers.home-assistant.io/docs/core/entity#generic-properties

After installing the plugin, I have different sensors and cannot understand their value. Example: sensor.waterkotte_heatpump_2020_current_temperature sensor.waterkotte_heatpump_2020_current_temperature_2 sensor.waterkotte_heatpump_2020_current_temperature_3 sensor.waterkotte_heatpump_2020_current_temperature_4 sensor.waterkotte_heatpump_2020_current_temperature_5 sensor.waterkotte_heatpump_2020_current_temperature_6 sensor.waterkotte_heatpump_2020_current_temperature_7

sensor.waterkotte_heatpump_2020_y sensor.waterkotte_heatpump_2020_y_2 sensor.waterkotte_heatpump_2020_y_3

Here it would be better to use the variable name: TEMPERATURE_OUTSIDE TEMPERATURE_OUTSIDE_1H TEMPERATURE_OUTSIDE_24H TEMPERATURE_SOURCE_ENTRY

Thanks Berni

marq24 commented 1 year ago

Hi Berni,

mhh - might be I am not getting this right - for sure entityID should not be be localized - but according to the documentation you just linked, the name should not be hard-coded (and that's what's currently implemented)...

Name of the entity. Avoid hard coding a natural language name, use a translated name instead.

The chances are very high, that I messed up the translations - or used a total false approach to archive localized entity names... but my understanding is, that names can/should be localized?!

marq24 commented 1 year ago

... for what ever reason the uniqueIDs will get the localized names - I have no clue why (yet) - but for sure this need to be fixed - stay tuned

marq24 commented 1 year ago

So finally - I haven't checked the latest changes to HASS - but looks like that someone decided to create the entity-id based on the entity name - this was not the case when I initially created this fork (OR I just was to stupid - who knows) - nevertheless with the new 1.0.3 the entityIDs will be created based on the internal names (how they are defined in the (my) waterkotte python lib)... This implies that most (if not all) entityIDs going to be changed with this release - sorry.

Please note that when you make an update that you probably will receive a mixture of old and new IDs. I completely removed the integration from HASS and HAC and then reinstalled everything from the scratch [and then manually adjusted the entityIDs for which I want to keep the historic data in my InfluxDB.