artem-sedykh / mini-climate-card

Minimalistic climate card for Home Assistant Lovelace UI
MIT License
262 stars 19 forks source link

target_temperature unit not working. #151

Closed skavan closed 3 months ago

skavan commented 3 months ago

Hi, First of all - great card. I'm a bit of pixel-perfect guy so spent 280 lines of yaml to fine tune it! Here's what it looks like:

image

The one thing I can't figure out how to get 67°C to read 67°F. I thought it was:

- type: custom:mini-climate
  entity: climate.porch_ac_windfree_3_0e
  icon: blank
  scale: 1
  hide_current_temperature: true
  target_temperature:
    icons:
      up: mdi:chevron-up
      down: mdi:chevron-down
    unit: '°F'

But it doesn't work. Am I missing a trick, or is it a bug?

p.s. Here's the off display (a few posts have asked about hiding stuff, and greying out stuff -- card_mod is your friend!). If anyone cares I can post all 280 lines of yaml!

image
regevbr commented 3 months ago

You need to set the unit also on temperature and not just target_temperature

skavan commented 3 months ago

Success. Thank you. You might want to note that in the readme unless I missed it. It's not entirely logical! Very cool card. When I have time, I'll comment and send over my huge card_mod block; perhaps you would consider putting some of the functionality in the core.

regevbr commented 3 months ago

image If you feel it requires a change a PR is more than welcome

regevbr commented 3 months ago

Actually it is confusing, I see what is the issue in the code I will fix

regevbr commented 3 months ago

released in 2.7.2 @skavan can you please verify it is fixed by removing the unit in the temperature entry?

skavan commented 3 months ago

Looks like it's fixed!