Skip to content

Migration from Water Heater to Climate entities #25

@aweddell

Description

@aweddell

Hey folks,

I have a heatpump and noticed that the home assistant water heater entity is severely limited.

  1. It doesn't support or display heat and cool modes - simply heat.
  2. It doesn't work with the native thermostat card

I also noted that it is not enumerating heater modes correctly, some heaters have sub-modes that are not discoverable by the api, but instead are based on the heaters sub-type. This breaks things like the hybrid heater, that has a handful of additional modes.

I've written a fix for these, and it involves creating climate entities per body instead, and using the MODE attribute (as the pentair app does), rather than setting the heater objnam on the body.

Seems to work well testing it here, but anyone who has automations specifically against the water_heater entity will break.

Unfortunately, HA doesn't allow for custom HVAC modes. In order to work around this, I have used the "Presets" feature, which lists the available heaters in the exact same way the webapp does. In terms of HVAC modes, I've provided "Off" and "Auto".

If you select a heater (preset) that has COOL: ON, as an attribute, we dynamically update the climate entity to support a temperature range, which will update the UI accordingly to provide heat and cooling setpoints.

Let me know if you have any concerns with this approach. Feel free to test my branch in my fork.

Big question is do we want to leave in the legacy water_heater entities, which will not break, but will be messy. Or just a clean cutover, which is disruptive but clean?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions