Closed V3L closed 5 months ago
I think you need to set the source attribute otherwise it doesn't know which icon to set
You also need to provide active and disabled so it can know its state
Thanks for the quick response, would you be able to update my yaml to explain what you mean?
Thanks for the link. I’ve read through that and the examples a bunch of times, but I can’t quite figure out the syntax for my scenario, are you able to update my yaml to help me visualise it better?
I can't don't know the values you have. You have examples in the docs
What values can I provide you to pin this down, I’m confident that if I can get it working then the rest of the docs will make more sense
type: custom:mini-climate
name: YYYY's Office
entity: climate.office
swap_temperatures: true
icon: mdi:radiator
group: true
secondary_info:
hide: true
toggle:
hide: true
hvac_mode:
state:
entity: climate.office
attribute: hvac_action
source:
'off':
icon: mdi:power
name: 'off'
heat:
icon: mdi:weather-sunny
name: heat
auto:
icon: mdi:cached
name: auto
cool:
icon: mdi:snowflake
name: cool
dry:
icon: mdi:water
name: dry
fan_only:
icon: mdi:fan
name: fan
That worked great, thanks!
How do I set the colour now, as looks to be getting from the main hvac_mode still. Can I set that against each of my sources, or do I have to do it at the top with logic, if off then x if heat then y etc?
in example you have the style function
Does the below logic make sense, it doesn’t seem to update the colour as I would expect, current hvac_action value is heat, and the colour is showing as orange.
hvac_mode:
style: >-
(value, entity) => ({ color: entity.attributes.hvac_action !== 'idle' ?
'orange !important' : 'grey' })
sure
So I am trying to replace the standard hvac_mode status/icon with the value store in hvac_action (attribute), as my heating always shows as on, but hvac_action will show whether it is actually heating or not based on current temperature and set temperature.
I think I found the part in the docs, but I can't seem to get it to display anything and adding the extra parts for hvac_mode removes the icon: Example mini-climate card config:
I will also want to vary the yellow icon at the start to change based on this value, so if you can advise on that as well that would be great!
Thanks, Vel