neilimixamo / Home-Assistant-Quick-Look-Mobile

127 stars 6 forks source link

Badge icon for entities count #7

Closed hAMMERlized closed 1 year ago

hAMMERlized commented 1 year ago

And me again. How about a badge icon or something similar in the header menu besides the main icons to quickly see how man lights, climates (e.g. air conditioners) are currently on without need to go in the sub menu / light section etc.

neilimixamo commented 1 year ago

Having badges in the Header view could be a great idea. It wouldn't be an issue for me with the Lights view, but I'm unsure about how to proceed with other views like the Air view, where the icon will change based on the active devices. For example, if it's displaying a thermometer icon, the badge could show the number of climates turned on, and if it's a fan icon, it could display the the number of fans turned on. However, the view won't be capable of showing those two badges simultaneously. Would this be ok for you ?

neilimixamo commented 1 year ago

Header badges will be visible by default with a new variable show_badge to disable them with false if needed

badges light badges dark

hAMMERlized commented 1 year ago

Nice one! What about putting the badgets on the corner of the custom card itself? Like this the icon wouldn't be covered. Just an idea.

image

neilimixamo commented 1 year ago

That's true, but it may be challenging to make them overflow outside their respective cards. I will explore what options are available and see what I can do.

neilimixamo commented 1 year ago

You're right, it looks much cleaner at the corner :)

image

Would you change something else in its style ?

neilimixamo commented 1 year ago

badge size increased a little bit

image

hAMMERlized commented 1 year ago

Looks perfect. I think the upper size looks better, cleaner. But it's up to you. I will resize it by myself, all good.

Does the badge disaper when e.g. no lights are turned on or will it display a "0"? I think it would be nice if it disappears?

neilimixamo commented 1 year ago

Badge won't show up when "off"

image