Open DanielNagy opened 6 months ago
I assume that each zone entities could just simply reference the main controllers mode topic?
I think Zone entities should reference this main controllers action.
Ok, Just done some testing. I've add "action_topic" referencing a new topic in theatre zone 2
IE - my homeassistant/climate/actronque/zone2 / config now looks like this,
Since doing that with mine, the History graph is now correctly shading the Theatre zone Blue (indicating cooling action)
However, we can't just mirror the main controller actronqueXXXXXXX/compressor topic. When you turn the Zone off, the action needs to also be turned off, or else the graph will still continue to "shade" the blue for cooling.
So each zone will need new topic for action_topic, if a zone is turned on, it should mirror the actronqueXXXXXXX/compressor value. If a zone is turned off, the zones new action_topic should be set to "off"
FYI - playing with the actions, "cooling" "heating" "off" and seeing how the history graph responds.
cooling shades blue, heating shades red, off removed shading, idle also removes shading
The "idle" action, doesn't get shown on the Sensor view when the zone is turned off. It only shows "heating" "cooling" and "off" (yes, "Off (Auto)" which is weird) when the zone is switched on) When the zone is turned off, it removes the action from the text and just shows Off.
The only use case I see fit for a zone to use the "idle" action, is when the zone is turned on, and the damper "position" is 0%. That way the graph Shading will only show blue when the zone actively cooling or shaded red, if the zone is actively heating (ie, the zone damper position > 0%).
Hey Mike.
Gave it an attempt myself. My code here - https://github.com/DanielNagy/hass-actronque
Learnings. The Que CompressorMode API, only appears to show HEAT or COOL. (Whilst in AUTO climate mode) The QUE Master screen will show Heating /Cooling / Standby. When the Master screen is showing Standby, the compressor state reverts to COOL. As a result, I was seeing this in my AC graph when the Que went to standby. (this is based on your code - compressor action)
Ie, Unit hit Heating set point, went to standby, but because it was reporting COOL, the Graph shaded Blue.
So I added logic to determine idle/standby state to incorporate the Compressor Capacity to see if it is 0% to determine Standby. This value is saved as a new action topic for the main unit.
// HVAC Action based on Compressor State and Capacity (Que doesnt appear to show "IDLE" whilst in AUTO mode)
if (unit.Data.CompressorCapacity != 0)
{
// Que Compressor State only shows Heating / Cooling
switch (unit.Data.CompressorState)
{
case "HEAT":
MQTT.SendMessage(string.Format("actronque{0}/action", unit.Serial), "heating");
break;
case "COOL":
MQTT.SendMessage(string.Format("actronque{0}/action", unit.Serial), "cooling");
break;
case "IDLE": // Never actually seen IDLE whilst in AUTO state. Leaving this code just incase for now.
if (unit.Data.On)
MQTT.SendMessage(string.Format("actronque{0}/action", unit.Serial), "idle");
else
MQTT.SendMessage(string.Format("actronque{0}/action", unit.Serial), "off");
break;
}
}
else
{ // Standby on que master screen. api compressorstate does not show standby.
if (unit.Data.On)
MQTT.SendMessage(string.Format("actronque{0}/action", unit.Serial), "idle");
else
MQTT.SendMessage(string.Format("actronque{0}/action", unit.Serial), "off");
}
For the individual zones i'm looking at the Zone damper "position" to determine if a zone is heating/cooling/idle, and created a new action topic
if (unit.Zones[iIndex].Position != 0)
{
MQTT.SendMessage(string.Format("actronque{0}/zone{1}/action", unit.Serial, iIndex), unit.Data.CompressorState);
switch (unit.Data.CompressorState)
{
case "HEAT":
MQTT.SendMessage(string.Format("actronque{0}/zone{1}/action", unit.Serial, iIndex), "heating");
break;
case "COOL":
MQTT.SendMessage(string.Format("actronque{0}/zone{1}/action", unit.Serial, iIndex), "cooling");
break;
}
}
else
{
if (unit.Zones[iIndex].State)
MQTT.SendMessage(string.Format("actronque{0}/zone{1}/action", unit.Serial, iIndex), "idle");
else
MQTT.SendMessage(string.Format("actronque{0}/zone{1}/action", unit.Serial, iIndex), "off");
}
So now you can see the states of the main control unit, as well as the individual zones.
And more importantly, the colour shading for each zone is now functional, and will only shade when the Zone Damper position is open. (2.14pm is when i added the per zone action). So at a glance at that graph, you can see when the unit is actively heating/cooling. specifically at 2:22pm, the zone went to idle for a short period.
Cooling blue shade working as expected :D
Since adding the heat cool points in #13, I've only just noticed that in the history view of each zone, it no longer "shades" based on the current operating mode.
Ie. highlighted, the main controller is (cooling)
Ie, the main control unit shows blue shading for (cooling)
But a zone, because HA doesn't know the current mode isn't shading.