denysdovhan / purifier-card

Air Purifier card for Home Assistant Lovelace UI
MIT License
288 stars 92 forks source link

UI translations of preset modes from fan entity not observed #428

Open kongo09 opened 3 days ago

kongo09 commented 3 days ago

Before submitting a bug

[X] I updated to the latest version available [X] I cleared the cache of my browser

Describe the bug

The preset mode drop down doesn't make use of the UI translations provided with the referred fan entity.

Steps to reproduce

  1. Setup card with a fan entity that provides text translations, like those from https://github.com/kongo09/philips-airpurifier-coap
  2. Observe preset mode text

Expected behavior I would expect the translation text to be shown, instead the text keys for the strings.json file are shown.

Screenshots

https://github.com/user-attachments/assets/b03f0f3c-7e53-4735-9243-47bbff8234c1

Compare to the preset modes in the built-in view:

image

Versions:

Side Note:

Thank you for this wonderful card. It otherwise works very will with the very long list of Philips AirPurifiers that my custom integration supports. If you don't mind, I'll put a reference to your card into my README.