piitaya / lovelace-mushroom

Build a beautiful Home Assistant dashboard easily
Apache License 2.0
3.32k stars 313 forks source link

[Feature]: Climate card should show HVAC action in text instead of only the mode. #629

Open envy opened 1 year ago

envy commented 1 year ago

Current Behavior

The climate card does not care if a climate entity is idle or actually heating.

Here is example:

grafik

The default card shows Leerlauf which is German for Idle. The entity cannot be turned off, it only has the heating mode but it knows when it is heating and when not.

Expected Behavior

The climate card should show Idle instead of Heating when the climate entity is idle.

Also, I think the icon color should probably also be adjusted when idle.

Steps To Reproduce

No response

Environment

- OS: HomeAssistant OS
- Version: 2.1.1
- Hassio: 2022.7.5

Anything else?

No response

piitaya commented 1 year ago

HVAC mode and HVAC action are two different things. The HVAC mode is the mode of your thermostat : heat, cool, auto, etc… The icon is colored according to this mode. The HVAC action is what your thermostat currently do. And it can be idle. The badge is displayed according to this action : heating = red, cooling = blue, idle = no badge.

For example :

if your thermostat is in heat mode and the target temperature is below current temperature, the heater will be on, so the HVAC action will be heating. if your thermostat is in heat mode and the target temperature is above current temperature, the heater will be on, so the HVAC action will be idle.

Try setting 23°C as target temperature. If your thermostat integration handle HVAC action properly you should see a badge.

envy commented 1 year ago

I see.

I did not know about the badge and thought the text + icon color would indicate that it's currently heating even though it's not.

Would it be possible to add an option to at least change the text to also show the current action like HA does in the detail view:

grafik

piitaya commented 1 year ago

I chose to add the HVAC mode in the state but maybe it makes more sense to display HVAC action 🙂 I will look at the users feedbacks in the next days to see what users prefer 🙂

cxy7722 commented 1 year ago

I would second this opinion. Having the badge/icon display the mode and the state/text display action would be what I prefer. Is it possible to have the user choose what is being displayed?

Appreciate your work on this @piitaya!

tkreeftmeijer commented 1 year ago

Really nice work, @piitaya.

I would prefer the current action visible as the mode is unclear about the current situation (is it on or off). A choice or combined label (both shown as in the default card) is maybe the best for everyone.

totalitarian commented 1 year ago

Really not sure the current setup makes sense.

This is my spare bedroom

image

As you can see for the states below, it is actually switched off but you wouldn't know what from the card

image

mcqtom commented 1 year ago

Strong +1 for having text/icon colour to display the action and using the mini icon to show the mode. For many climate devices the mode is quite irrelevant. I have a bunch of radiator valves which have 'heat' as the only mode, not even 'off' is available, so it continually looks at a glance like all the radiators are on, when really I need to look closer for the mini icon to find out the true situation

piitaya commented 1 year ago

For many devices the action is not available, the mode is always available.

I have a bunch of radiator valves which have 'heat' as the only mode

What integration do you use for that ?

envy commented 1 year ago

I think they misspoke and meant that "heat" is the only action available.

For many devices the action is not available, the mode is always available.

yes, thats why the thing that can change (the mode) should, IMHO, be the one used for prominent information (text and big icon).

grafik

Here you can see that both show "Heizen" even though the left one is actually heating while the right one is idle.

What integration do you use for that ?

KNX can create such climate entities. The KNX config does support actuators that have different actions (in KNX called controller mode) but many simply don't.

My heating actuator is always on in heating action and decides based on the temperature if it should heat or not. It does not have a way to switch to any other action. So heating is the only action I have (but that's kinda wrong, it really is auto but whatever, still only one mode).

The mode in KNX is called operation mode (comfort, night, etc.)

piitaya commented 1 year ago

For climate entity, the state is the mode. For all mushroom cards the icon/color reflect the state to be consistent. Climate is not a easy thing because there is many variation between integrations...

The mode in KNX is called operation mode (comfort, night, etc.)

Yes, this is preset_mode.

SamJongenelen commented 1 year ago

Another vote here for using hvac_action for the text, but also for the icon. E.g. If the hvac_action is 'idle' the icon would be green, if the hvac_action is 'heating' then the icon would be red.

'Cooling' is never relevant for my electric floor heater in the bathroom :) Unfortunately no way (yet) to limit hvac_mode of a device.

LordShadowen commented 1 year ago

Another strong +1 from me to make the "HVAC Action" more visible.

I too have only radiators with TRV valves that are always on the mode "Heat" - there is no other mode.

It took me ages to find out that there is a little badge by the symbol to represent the actual HVAC action ("idle" vs "heat"). A quick glance at my dashboard made it look like every single radiator was Heating, because the symbol is Red, and the state says "Heat" :)

IMHO, the easiest solution without changing the existing card too much would be simply to combine the strings like the default lovelace thermostat does. e.g. Idle (Heat). I think this would be the minimum to make everyone happy...

Alternative ideas: 1) User chooses on the UI which of the two is used for the state text (Mode or Action) 2) Forget about all that, and just support templates for the state field - then the user can go nuts and do whatever ;P

crafty35a commented 1 year ago
  1. Forget about all that, and just support templates for the state field - then the user can go nuts and do whatever ;P

This is definitely the ideal result (imo). Personally, I want to include the current preset_mode here

LordShadowen commented 1 year ago
  1. Forget about all that, and just support templates for the state field - then the user can go nuts and do whatever ;P

This is definitely the ideal result (imo). Personally, I want to include the current preset_mode here

Yeah - on further thought, this would be best solution indeed - I'm also in need of additional info I would like to show in this line....