Advantage-Air integration - add option to set MYZONE

Tags: #<Tag:0x00007f3264d50aa0>

The advanatage air integration has the option to define a “MYZONE”. It appears in the get result as shown below.

{
	"aircons":
	{	
		"ac1":
		{
			"info":{
				"aaAutoFanModeEnabled":true,
				"activationCodeStatus":"noCode",
				"airconErrorCode":"",
				"cbFWRevMajor":9,
				"cbFWRevMinor":42,
				"cbType":1,
				"climateControlModeIsRunning":false,
				"constant1":1,
				"constant2":2,
				"constant3":0,
				"countDownToOff":0,
				"countDownToOn":0,
				"fan":"low",
				"filterCleanStatus":0,
				"freshAirStatus":"none",
				"mode":"cool",
				"myAutoModeCurrentSetMode":"cool",
				"myAutoModeIsRunning":false,
				"myZone":2,
				"name":"AC",
				"noOfConstants":2,
				"noOfZones":4,
				"quietNightModeEnabled":false,
				"quietNightModeIsRunning":false,
				"rfSysID":0,
				"setTemp":16.0,
				"state":"off",
				"uid":"9b707",
				"unitType":17
			},
			"zones":
				{
				"z01":
					{"error":0,"maxDamper":100,"measuredTemp":26.5,"minDamper":0,"motion":0,"motionConfig":1,"name":"Kitchen","number":1,"rssi":43,"SensorUid":"001219","setTemp":25.0,"state":"close","tempSensorClash":false,"type":1,"value":100
					},
				"z02":
					{"error":0,"maxDamper":100,"measuredTemp":25.2,"minDamper":0,"motion":0,"motionConfig":1,"name":"Master Bed","number":2,"rssi":42,"SensorUid":"001224","setTemp":24.0,"state":"open","tempSensorClash":false,"type":1,"value":100
					},
				"z03":
					{"error":0,"maxDamper":100,"measuredTemp":24.9,"minDamper":0,"motion":0,"motionConfig":1,"name":"Ollie\u0027s Room","number":3,"rssi":52,"SensorUid":"0010b0","setTemp":24.0,"state":"open","tempSensorClash":false,"type":1,"value":90
					},
				"z04":
					{"error":0,"maxDamper":100,"measuredTemp":25.0,"minDamper":0,"motion":0,"motionConfig":1,"name":"Jack\u0027s Room","number":4,"rssi":54,"SensorUid":"001223","setTemp":24.0,"state":"open","tempSensorClash":false,"type":1,"value":100
					}
				}
		}
	},
///...////
"system":{"aaServiceRev":"14.116","allTspErrorCodes":{},"country":"Australia","dealerPhoneNumber":"0736xxxxxx","deviceIds":["y2U043xxxxxxxxx"],"deviceIdsV2":{"y2U043wPSzWzTOyzOxxxxxxxxxxx":"ciefDmTDTmaSM8ovk-ZkBR:APA91bEAasmMkKftEtipwxQNSeBMB52kQ7thX9L50DgBLMhf7Lga42NupuTcLFp3m_ejouZHXUKaMT1WOHjuzSABzPC9tLDDfJ2TVtY7T-yAipvlJbxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},"drawLightsTab":false,"drawThingsTab":false,"garageDoorReminderWaitTime":2,"hasAircons":true,"hasLights":false,"hasSensors":false,"hasThings":false,"hasThingsBOG":false,"hasThingsLight":false,"latitude":-27.4230xxxxxxx,"logoPIN":"40xx","longitude":153.034037499xxxxxx,"mid":"9b707","myAppRev":"15.810","name":"MyPlace","needsUpdate":false,"noOfAircons":1,"noOfSnapshots":0,"postCode":"4xxx","rid":"bIXkZI4M2RewYPiQ3jGlzGRLxxxx","showMeasuredTemp":true,"sysType":"MyAir5","tspErrorCode":"noError","tspIp":"192.168.0.78","tspModel":"PIC8GS8","versions":{}
}

This value specifies which zone the AC unit will use as a overall setpoint - and the ac will control its fan / and setpoint based on that zone …interesting I have noted setting it means the AC setTemp stays at 16.

I was actually going to ring advantage air to confirm why this is the case.

This was my idea but I am just not familiar enough with python


    @property
    def my_zone_id(self):
        """Return the current my_zone zone id"""
        return self._ac["myZone"]
    
    async def set_myzone_id(self, my_zone_id):
        """Set the MyZone ID"""
        await self.async_change({self.ac_key:{"info":
                                                  {"myZone":my_zone_id}
                                              }
                                 })

In this case the myzone id is a integer that ranges based on the number of zones for that ac

However it may be better to transalte from the zone names.

Hey @Narimm, as code owner of this integration I wasn’t even notified as far as I can tell about your request. So sorry for the delay.

I would be more than happy to implement this for you. I’ll update my dev environment tomorrow and get a pull request raised.

So I’m adding a service where you can set the zone climate entity as the MyZone. This intentionally will exclude zone cover entities since I believe you must have a temperature sensor for it to be a MyZone.

However, how do you think I should tell the user which zone is currently the MyZone? Options are:

Numeric Attribute on the main climate entity
Boolean Attribute on the zone climate entity
Sensor with the numeric or name of the MyAir zone
Boolean Sensor for each zone climate entity.

I have so far avoided attributes and would set any new sensors as disabled by default, so am leaning towards one of the last two. The Boolean Sensor seems the most consistent.

You are dead right you cant actually use MyZone unless you have Temp sensors. As far as I can tell the MyZone function simply tells the system which zone to use as the set point. The other thing I just realized might be helpful to know is constant zones. They are listed in the main ac config. The reason they are important is that they are auto switched on if the pressure inside the unit builds up. In my case its Zone 1 and Zone 2 as above.

As far as what type on sensor for both the constant and myzone its should be a boolean sensor I agree

So I have a PR raised with the service. I’ll try sneak the Boolean sensors in now.