artem-sedykh / mini-humidifier

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

Unable to create 2 cards for 2 devices zhimi.humidifier.ca4 #98

Open diemon24 opened 1 year ago

diemon24 commented 1 year ago

have a very strange card behavior. I have 2 identical humidifiers via Xiaomi Miio integration (https://www.home-assistant.io/integrations/xiaomi_miio). I connect 1 humidifier and get the states of all sensors and switches. But on the second humidifier I don't get this card configuration. About the humidifier work when you turn on the mini-humidifier card. The sensors of both devices are controlled from a custom card.

type: custom:mini-humidifier entity: humidifier.zhimi_humidifier_ca4_2 model: zhimi.humidifier.ca4 toggle: default: 'on' hide: 'on'

Снимок экрана 2022-07-09 в 16 15 15 Снимок экрана 2022-07-09 в 16 15 30

HUCS: 1.25.5 Home Assistant Core 2022.6.6

regevbr commented 1 year ago

if you have just a single card with the entity that doers work, it suddenly works?

regevbr commented 1 year ago

the model expects to have sensors in the format of sensor.{entity_id}_{sensor} are you sure you have those for the 2nd humidifier?

diemon24 commented 1 year ago

the model expects to have sensors in the format of sensor.{entity_id}_{sensor} are you sure you have those for the 2nd humidifier?

Yes. I have all working sensors.

diemon24 commented 1 year ago

14B3A8D4-5D2A-491E-A8F7-832BB8709AD4

if you have just a single card with the entity that doers work, it suddenly works?

In custom card all sensors and switch working. Only mini-card humidifier.zhimi_humidifier_ca4_2 not working.

5BA33A64-ED2A-410C-9BF5-1FE2E75DC7FA

regevbr commented 1 year ago

sorry but none of that answers my questions... Do you have an entity with id humidifier.zhimi_humidifier_ca4_2_motor_speed?

diemon24 commented 1 year ago

sorry but none of that answers my questions... Do you have an entity with id humidifier.zhimi_humidifier_ca4_2_motor_speed?

yes. I have the same set of sensors and switches for two humidifiers. In the message above, i attached the entire list of sensors and switches for the humidifier, which is not displayed well on the card mini-humidufier.

This strange behavior and makes me smile. Because I have two identical sets of sensors and switches for two humidifiers. All this works in custom card, but does not work in mini-humidufier card.

Снимок экрана 2022-07-09 в 22 51 32 Снимок экрана 2022-07-09 в 22 52 21 Снимок экрана 2022-07-09 в 22 54 25
regevbr commented 1 year ago

what you posted is a list of sensor names, not sensor entity ids... So if you delete the card that works and just have a single card with the _2 entity, it works?

diemon24 commented 1 year ago

what you posted is a list of sensor names, not sensor entity ids... So if you delete the card that works and just have a single card with the _2 entity, it works?

If I delete work card and create card for _2 entity, is not work anyway I tried to remove device "_2" from the integration Xiaomi Miio and reconnect it, but nothing changes.

regevbr commented 1 year ago

Good, we are getting somewhere. Now please send me the entity ids of all the sensors of the nonworking humidifier

diemon24 commented 1 year ago

ood, we are getting somewhere. Now please send me the entity ids of all the sensors of the nonworking humidifier

sensor.zhimi_humidifier_ca4_humidity_2 sensor.zhimi_humidifier_ca4_temperature_2 switch.zhimi_humidifier_ca4_buzzer_2 switch.zhimi_humidifier_ca4_child_lock_2 switch.zhimi_humidifier_ca4_clean_mode_2 switch.zhimi_humidifier_ca4_dry_mode_2 number.zhimi_humidifier_ca4_motor_speed_2 sensor.zhimi_humidifier_ca4_actual_speed_2 sensor.zhimi_humidifier_ca4_water_level_2 binary_sensor.zhimi_humidifier_ca4_water_tank_2

regevbr commented 1 year ago

Great so that is the reason, please refer to my first comment on how entity ids should be for the card to work

diemon24 commented 1 year ago

Great so that is the reason, please refer to my first comment on how entity ids should be for the card to work

yes, but Xiaomi Miio does not allow changing the device name when adding...

regevbr commented 1 year ago

You can change the entity ids yourself i believe

diemon24 commented 1 year ago

You can change the entity ids yourself i believe

Ok. I changed all sensors to name sensor.{entityid}2{sensor} and create a new card. This working. Thx you very much. I suggest updating this issue.