home-assistant / architecture

Repo to discuss Home Assistant architecture
317 stars 100 forks source link

Add new CURRENT_HVAC constants #709

Closed ribbal closed 2 years ago

ribbal commented 2 years ago

Context

I am working on the Heatmiser climate integration. The Heatmiser devices can be put into a 'standby' mode, and they automatically active a 'preheat' mode to bring the home up to temperature for a scheduled daily time (e.g. the thermostat maybe scheduled to come on at 4pm, but the heating comes on prior to this time to ensure that the home is up to temperate by 4pm - this is the 'preheat' mode)

Proposal

Add the following constants to homeassistant/components/climate/const.py

CURRENT_HVAC_STANDBY = "standby" CURRENT_HVAC_PREHEAT = "preheat"

Consequences

It would be better to use the above common constants in the Heatmiser integration, rather than creating bespoke Heatmiser values. I've already created a PR: https://github.com/home-assistant/core/pull/64194 (Sorry, didn't realise this needed architectural approval beforehand).

frenck commented 2 years ago

I think we don't need CURRENT_HVAC_STANDBY, as this can be represented by the existing CURRENT_HVAC_OFF already.

CURRENT_HVAC_PREHEAT is kinda interesting maybe; although, in general, this is comparable to CURRENT_HVAC_HEAT in most cases for most heaters. Do we need this distinction even? If, so, why? Which other integrations make a difference between heating and preheating that could benefit from such a distinction?