home-assistant / architecture

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

Climate Cleanup - state to follow HVAC mode #474

Closed Stendec1 closed 3 years ago

Stendec1 commented 3 years ago

Context

Interfacing with the climate domain from Node Red to set the temperature results changing the state to "heating" when passing on the mode "heat" along with the temperature. Since the state is set by the HVAC unit itself this results in alternating between states: "heating" <-> "idle".

I'm using following in combination with HASSIO:

Proposal

Ability to disconnect HVAC state from HVAC mode. Maybe by means of an additional operation_mode?

Consequences

Having the ability to disconnect HVAC state from HVAC mode with defaulting to the current way of working would enable smart HVAC implementations such as https://github.com/gysmo38/mitsubishi2MQTT in combination with https://github.com/giuseppeg88/node-red-contrib-thermostat-scheduler

elupus commented 3 years ago

This don't seem to be a core arch change. It looks to be a bug in the integration. Mode and (Current) Action is already separated in core.

Stendec1 commented 3 years ago

Strange, in the following post: https://developers.home-assistant.io/blog/2019/07/03/climate-cleanup/

I read: The state of a climate entity is now always equal to the HVAC mode.

Which is exactly what happens in my situation.

elupus commented 3 years ago

The state always follows the configured static setting of the device (think of it as the knob on the device that controls it's behavior). The attribute hvac_action represent what it is curently doing.

So for example state will be statically set to heat_cool, but hvac_action will alternate between heating, cooling, idle.

I hate the "mode" term. It's so ambiguous. And "state" here actually refers to the state of the knob/button on the thermostat control panel.

Stendec1 commented 3 years ago

Ok, thanks for the clarification. From Node Red I'm using a call service to HASS with the following: { "temperature": "{{payload}}", "hvac_mode": "heat" } ...which sets the "state" to "heating". Leaving out the "hvac_mode" results in switching the HVAC to "heat_cool" "mode".

Is there a way I can send the temperature from Node red to HASS without affecting the "mode" and/or "state"?

elupus commented 3 years ago

When you do a service call you control the knob value of whatever the climate entity you are controlling. So it all depends on how that entity behaves. You can't control the hvac_action value. It's internal to the entity. Ie it's read back from the device you are controlling.

But now we are heading into device support which is more forum related discussion.

MartinHjelmare commented 3 years ago

Closing as this is not the correct forum.

Please open an issue in the core repo with info and logs about the integration you're using.

Stendec1 commented 3 years ago

So just for my understanding. Doing a service call to only send the temperature should NOT result in "turning the knob" to "heat_cool". Now that's exactly what it does.

Nevertheless, I will post my issue on the forum. Thank you very much for you swift reply!

emontnemery commented 3 years ago

If you think it's a bug, open an issue here: https://github.com/home-assistant/core/issues , that's what Martin meant.

Stendec1 commented 3 years ago

Hi Erik, I understood.

With the info you gave me I'm just doing some more digging and tracing on the MQTT level to collect as much information as possible before issuing it as a bug.

Thanks again for your support.