bar-card icon indicating copy to clipboard operation
bar-card copied to clipboard

Negative temperature

Open poudenes opened this issue 4 years ago • 2 comments

Hello All,

I have this card:

entities:
  - entity: sensor.node_11_temperature
    title: Frontdoor
  - entity: sensor.node_13_temperature
    title: Door iMac
  - entity: sensor.node_14_temperature
    title: Bedroom
  - entity: sensor.node_15_temperature
    title: Bathroom
  - entity: sensor.node_16_temperature
    title: Kitchen
  - entity: sensor.node_17_temperature
    title: Hallway
  - entity: sensor.node_18_temperature
    title: Diningroom
  - entity: sensor.node_19_temperature
    title: Livingroom
  - entity: sensor.node_20_temperature
    title: Toilet
severity:
  - value: -23
    color: '#bd006b'
  - value: -18
    color: '#b000bd'
  - value: -12
    color: '#7918c4'
  - value: -7
    color: '#0000ff'
  - value: -1
    color: '#00aad9'
  - value: 4
    color: '#04b504'
  - value: 10
    color: '#00ff00'
  - value: 16
    color: '#ffcc00'
  - value: 21
    color: '#ff9600'
  - value: 27
    color: '#ff1100'
  - value: 32
    color: '#d61204'
  - value: 38
    color: '#b50e02'
title_position: inside
type: 'custom:bar-card'

But when I have a negative temperature I see this:

Screen Shot 2020-02-03 at 16 47 20

I did a test, the minus temp is not shown correct. How can I solve this?

poudenes avatar Feb 03 '20 15:02 poudenes

To be honest I haven't tried negative values at all, so if this doesn't work let me know. You will have to set the min value see any negative values. The default min and max value is set to 0 - 100.

Try:

min: -30
max: 30

Gluwc avatar Feb 03 '20 16:02 Gluwc

This solved the problem. Thanks

Would be nicer if the bar goes to left and before the positive temps will be a gap in same length. Something like this:

0 -Initial-Viz

poudenes avatar Feb 03 '20 19:02 poudenes

Is this feature added already?

poudenes avatar Oct 24 '22 06:10 poudenes