Hello, I’m pretty new to Home Assistant and struggling with configuring a custom:button-card, specifically the icon and icon color based on my thermostat’s running state. When actively heating or cooling, the thermostat state reads ‘Heating to XX’ or ‘Cooling to XX’, where XX is the temperature that the HVAC is heating or cooling to. The temperature (XX) varies, based on what the system is programmed to do.The other two states are ‘Fan Running’ and ‘Off’, but these are static values. My problem is that I don’t know how to change the icon, color, etc., based only on the first part of the string, such is Heating or Cooling. I don’t know how to parse the string that the running state value returns. My ultimate goal is to show four different icons and colors based on what the HVAC system is doing at the moment. I hope I’m making sense. I hope someone out there can help me.
Thank you in advance!