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

How to change color of lines in new lovelace editor? #43

Closed
FranciscoTrigo opened this issue Feb 10, 2019 · 4 comments
Closed

How to change color of lines in new lovelace editor? #43

FranciscoTrigo opened this issue Feb 10, 2019 · 4 comments
Labels
question Further information is requested

Comments

@FranciscoTrigo
Copy link

FranciscoTrigo commented Feb 10, 2019

cards:
  - entities:
      - entity: light.luz_bano
      - entity: binary_sensor.movimiento_bano
      - entity: binary_sensor.0x00158d0002d43d30_occupancy_3
      - entity: binary_sensor.presencia_bano
    type: entities
  - entities:
      - entity: sensor.0x00158d0002726443_temperature_2
      - entity: sensor.0x00158d0002726443_humidity_2
    type: 'custom:mini-graph-card'
    line_color: purple
    name: Temperatura / Humedad
    points: hover
    location_state: center
    hours_to_show: 72
type: vertical-stack

Hello, this is the code that I have for a part of my lovelace config..
As it is right now it will make the temperature graph in a purple color, but if I add more line_color: lines under the one I already have it doesnt work. How can I change the colors of all of my sensors?
Thanks

@kalkih kalkih added the question Further information is requested label Feb 10, 2019
@kalkih
Copy link
Owner

kalkih commented Feb 10, 2019

Hi, the line_color option takes either a string or a list of strings, similar to the entities option. You can't define several line_color as they will overwrite each other.

Also, the points option should be under the show option, and the parameter hover is default so you could skip it if you'd like.

location_state should actually be align_state, I had a typo in the readme for a short time.

Try this:

  - entities:
      - entity: sensor.0x00158d0002726443_temperature_2
      - entity: sensor.0x00158d0002726443_humidity_2
    type: 'custom:mini-graph-card'
    line_color:
      - purple
      - teal
      - pink
    name: Temperatura / Humedad
    show:
      points: hover
    align_state: center
    hours_to_show: 72

@kalkih
Copy link
Owner

kalkih commented Feb 13, 2019

@YamiFrankc Did you get it to work?

With the latest version you can also do:

  ...
  entities:
    - entity: sensor.0x00158d0002726443_temperature_2
      color: purple
    - entity: sensor.0x00158d0002726443_humidity_2
      color: teal
  ...

@FranciscoTrigo
Copy link
Author

Yes it worked.
Sorry I've been busy and forgot to answer.
I think I will be going with the second example you gave because it make it easier to know what color is what whwn looking at the config :)
Cool!

@kalkih
Copy link
Owner

kalkih commented Feb 13, 2019

Great, closing this issue then, thanks!

@kalkih kalkih closed this as completed Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants