Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Icon Location #27

Closed
PeteCondliffe opened this issue Jan 27, 2019 · 4 comments
Closed

[Enhancement] Icon Location #27

PeteCondliffe opened this issue Jan 27, 2019 · 4 comments
Labels
enhancement Something that can be improved

Comments

@PeteCondliffe
Copy link

Would you consider giving the option of displaying the icon next to the state in a future version?

The reason for this is space saving. For things like temperature & humidity an icon is enough to know what the graph is for. Unfortunately hiding the title doesn't give you the space back but having the option to display the icon next to the state would.

I've created a background with the icons on as a workaround and example of what I mean
capture

Thanks for considering.

@kalkih kalkih added the enhancement Something that can be improved label Jan 27, 2019
@kalkih
Copy link
Owner

kalkih commented Jan 27, 2019

Nice setup!
That's indeed a great idea for saving space.
i'm thinking about what we should name that option,
icon_position maybe? What do you think?

@PeteCondliffe
Copy link
Author

PeteCondliffe commented Jan 27, 2019

Thanks.
Wish I could help with the code but I would have to learn how to first. :(

Yeah I thing icon_position works with string values something like;
title - For the position its in now (Default)
state-left - Positioned before the state
state-right - Aligned right inline with the state. About where I have it on my screenshot

I really don't know how much work is involved so I guess if its a lot just have state instead of state-left and state-right

@kalkih
Copy link
Owner

kalkih commented Jan 30, 2019

Now available with the latest release v0.2.0

Can be achieved by setting name: false under the show option and align_icon: state. See example below

# Example compact
- type: custom:mini-graph-card
  name: COMPACT CARD
  entities: sensor.example_sensor
  align_icon: state
  show:
    name: false

Thanks for the suggestion!

@kalkih kalkih closed this as completed Jan 31, 2019
@PeteCondliffe
Copy link
Author

Thank you so much.
Love the other things you guys have done with it too. Its allowed me to do this;
capture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something that can be improved
Projects
None yet
Development

No branches or pull requests

2 participants