artem-sedykh / mini-humidifier

Minimalistic humidifier card for Home Assistant Lovelace UI
MIT License
155 stars 26 forks source link

Card does not display data #82

Closed pankrusheff closed 2 years ago

pankrusheff commented 2 years ago

First of all Thank you for your work. Help me to understand. I am setting up a card for the zhimi.humidifier.ca4 humidifier. The configuration looks like this type: custom:mini-humidifier entity: humidifier.zhimi_humidifier_ca4 model: xiaomi_miio_airpurifier:zhimi.humidifier.ca4 But on the card it is displayed like this https://ibb.co/N6dkW3x All data is NaN% NaN С NaN rpm. etc.

What am I doing wrong?

regevbr commented 2 years ago

This card is highly customizable and it is very verbose to do it :-) In order to make life easier, the maintainer created a preset of configurations that can be used more easily.

When you set a model, you actually choose to fill the configuration with a premade ad-hoc configuration. You can control the same configuration entirely on your own, without the need of the model if you choose to, in case it doesn't work for you, or just override certain parts of it.

In your case, the model you loaded uses the indicators configuration as shown here:

https://github.com/artem-sedykh/mini-humidifier/blob/9e40d0b9247a5b1915136e92ce7f21f0ad75692c/src/configurations/xiaomi_miio_airpurifier/zhimi_humidifier_ca4.js#L28-L61

All it does is look at certain attributes of your defined entity (humidifier.zhimi_humidifier_ca4 in your case). If that entity doesn't have those attributes, then the behavior you are experiencing is as expected. If you know where to get those values from, just create the indicators config yourself to override it (refer to the readme on how to do that).

The same goes for the target humidity configuration.

Please let me know if that addresses your issues :-)