Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
1.44k stars 39 forks source link

State Icon Not Always Pulling Through #543

Closed townsmcp closed 3 weeks ago

townsmcp commented 1 month ago

Describe the bug
I am using Bubble Card for many different entities however the majority of entities icons are not pulling through. For example, a lot of Batteries entities show an eye icon rather than the entity state icon: Yale keypad icon:

image

Device state, including correct icon:

image

I can manually set an icon on Bubble card however it is not then reflective of battery SOC.

To Reproduce
Steps to reproduce the behavior:

  1. Add entity to Bubble Card
  2. Ensure 'Show icon' is selected
  3. Observe icon

Expected behavior
Icon to be reflective of the current state, eg 70% battery will show a battery icon partially filled

Informations (please complete the following information):

Additional context
Some devices have worked however the majority of devices have not. At first I thought it might have been due to specific device integration however it appears to be random eg Hue devices for battery and lux also are not reflective, devices via MQTT are not reflective of entity icon etc

Thank you! 🍻

Clooos commented 1 month ago

Hi and thank you for the feedback, I have to manually add every types of icons into my code to mimic the default HA icons and I'm aware that some are still not supported (because there are so many different cases).

But I will add more supported icons in the future, in the meantime you can also change the icons with the templates. They're a lot of examples on the HA forum.

townsmcp commented 1 month ago

@Clooos ah ok. Thank you. I didnt realise you had to add the icons to your code, I thought it would pull through from the entity state. Although there are a lot of template examples in HA forums, do you have any suggested links for battery icon state? No worries if not. Oh, and thanks for the Bubble Cards - they are amazing, really takes dashboards up a notch :)

Clooos commented 1 month ago

I will add this case in my code it will be much easier, could you just send me the attributes of this entity? You can find it in "Developer tools" > "States". I don't have any sensors for my batteries.

image
townsmcp commented 1 month ago

Thank you. Below is a Hue motion sensor (which I’m sure will be more useful than a niche Yale device) - these are the entities that make up a Hue motion sensor:

Battery sensor (sensor.dining_room_sensor_battery):

state_class: measurement
battery_state: normal
unit_of_measurement: "%"
device_class: battery
friendly_name: Dining Room Motion Battery

Temperature sensor (sensor.dining_room_sensor_temperature):

state_class: measurement
unit_of_measurement: °C
device_class: temperature
friendly_name: Dining Room Motion Temperature

Occupancy sensor (binary_sensor.dining_room_sensor_motion):

device_class: motion
friendly_name: Dining Room Motion Occupancy

Illumination sensor (sensor.dining_room_sensor_light):

state_class: measurement
light_level: 0
unit_of_measurement: lx
device_class: illuminance
friendly_name: Dining Room Motion Light

This is the Yale sensor from the op (sensor.front_door_keypad_battery):

state_class: measurement
unit_of_measurement: "%"
device_class: battery
friendly_name: Front Door Keypad Battery
Clooos commented 1 month ago

Thank you, this is perfect! I will try to add all these in the next release, or the one after.

Edit: The motion one should already works, why did you add it?

townsmcp commented 1 month ago

I think the Motion one does work, I just added it for completeness so you have a record of all entities exposed by Hue motion sensor. That would be amazing to add them in a future release. should I close this ticket or would you rather it kept open?

Clooos commented 1 month ago

Can you tell me exactly which icons are missing or different to what you expect?

And keep this issue open untill I've added the new icons, this allows me to keep a trace of what I have to work on 🙂

townsmcp commented 1 month ago

Sure, here is what I get and what I would expect:

Clooos commented 1 month ago

I've added all of them, I will release a new version soon. Thank you again for your feedback!

townsmcp commented 1 month ago

Thank you for picking it up. I will leave the ticket open until I have tested the new release when it comes

Clooos commented 4 weeks ago

The new version is here, tell me if everything is working as expected now 🙂

https://github.com/Clooos/Bubble-Card/releases/tag/v2.0.0-rc.1

townsmcp commented 4 weeks ago

Thank you @Clooos. I have updated to the RC. All seems ok apart from one niggle - 100% battery isn’t showing the expected icon of battery being full - it is showing approx 90% battery status:

IMG_8093

Apart from that, everything else is working as expected so thank you for the update

Clooos commented 4 weeks ago

I will check that, thank you!

Clooos commented 3 weeks ago

Hi, this is fixed in the v2.0.1! 🍻

townsmcp commented 3 weeks ago

Thank you - just downloaded and can confirm it is working :) Many thanks for resolving this

Clooos commented 3 weeks ago

You're welcome!