iantrich / config-template-card

πŸ“ Templatable Lovelace Configurations
MIT License
441 stars 56 forks source link

Gauge graph without needle incorrectly displayed #143

Closed Haluska77 closed 1 month ago

Haluska77 commented 1 month ago

Checklist:

Release with the issue: 1.3.6 Last working release (if known): none Browser and Operating System: win - Chrome win - Edge

Description of problem: Having gauge graph displaying solar production distributed to home or grid

type: custom:config-template-card entities:

After removing needle from graph (needle:false), it does incorrectly display graph and displays whole graph as a grid part. solar_graph_correct solar_graph_incorrect

Javascript errors shown in the web inspector (if applicable):

Additional information:

ildar170975 commented 1 month ago

Suggest you to post a FORMATTED code - currently your code cannot be analysed. Check other issues for examples.

Haluska77 commented 1 month ago

Here it is:

type: custom:config-template-card
entities:
  - sensor.solar_production
  - sensor.grid_import
card:
  type: gauge
  entity: sensor.solar_production
  name: Solar production to home / grid
  unit: W
  min: 0
  needle: true
  max: ${states["sensor.solar_production"].state}
  segments:
    - from: 0
      color: '#ffa600'
    - from: >-
        ${states["sensor.solar_production"].state -
        states["sensor.grid_import"].state}
      color: '#8353d1'
ildar170975 commented 1 month ago

Have you tried testing your Gauge card w/o pasting it into config-template-card? Segments are only shown if a needle is shown. Check Docs for the Gauge card. ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅