Green shade in climate history for platforms that don't support hvac_action#3787
Conversation
|
Also, I don't have a platform that supports |
|
The demo climate integration does. Add the demo platform to your climate:
- platform: demo |
|
Thanks @iantrich. I tested with |
| domain === "climate" | ||
| ? (state) => state.attributes.hvac_action === "cooling" | ||
| : (state) => state.state === "cool"; | ||
| const isHeating = (state) => |
There was a problem hiding this comment.
Now we're no longer consistent but could change on a per-state basis. I think that we should go through all the states and see if any has an hvac action. We should calculate similarly to how we calculate hasTargetRange
There was a problem hiding this comment.
I didn't know the presence of hvac_action can change over time, but the code now supports it. It's only accounted for within the given timeframe, but I think that's as good as it gets, unless the platform has some way of signaling that hvac_action might be present.
Following the discussion on green shade for platforms that don't implement
hvac_actionand its conclusion here, this PR implements this.The green shade is picked up by the values in the
name + " heating"andname + " cooling"columns, but I couldn't find where the shade is actually implemented, so not sure on the best way to implement forHVAC_MODE_HEAT_COOLandHVAC_MODE_AUTO. However, I think the implementation forHVAC_MODE_HEATandHVAC_MODE_COOLshould cover most cases.