Use KNX switch to turn HVAC on/off

I have existing physical KNX switches. They control light switches and on/off for HVAC.
HVAC is Mitsubishi City controlled via CoolMaster and uses the HA Coolmaster integration.

I want to be able to turn the HVAC on/off via the KNX switch. I have two automations (below) that work - but one only works if the other is turned off. I believe that the reason is that I need to be able to tell the KNX switch that the HVAC is on or off it turned on by Lovelace or other.

expose:
    - type: binary
      address: "10/273"
      entity_id: switch.office_hvac
      default: false
 - name: "KNX Office HVAC"
      address: "10/273"
      state_address: "10/273"
alias: ' KNX On Switch Office HVAC v2'
description: ''
trigger:
  - platform: state
    entity_id: switch.office_hvac
    id: 'true'
condition: []
action:
  - device_id: ffbd7cc1d65af4cbbd1f2396bf40ac03
    domain: climate
    entity_id: climate.l1_017
    type: set_hvac_mode
    hvac_mode: cool
mode: single
alias: 'KNX off Switch Office HVAC '
description: ''
trigger:
  - platform: state
    entity_id: switch.office_hvac
    id: 'false'
condition: []
action:
  - service: climate.turn_off
    target:
      entity_id: climate.l1_017
mode: single

This automation does not work. I believe this is the key to other automations working. But I cannot figure it out.

alias: Office HVAC on - Turn on KNX Switch
description: ''
trigger:
  - platform: state
    entity_id: climate.l1_017
    id: 'on'
condition: []
action:
  - service: knx.exposure_register
    data:
      entity_id: switch.office_hvac
      attribute: 'on'
      address: 10/273
mode: single

I guess you’ll need to expose the state of the climate on/off, not the switch.
It depends on how your KNX switch is configured (not in HA, but in ETS). If it sends the same payload you can just call a template turning it on/off based on its current state. Else you’ll have to send the current state to KNX to let the switch know which payload to send next (1 or 0).

this registers new exposures on every state change - it is probably not at all what you want. knx.exposure_register is the same as an expose: in config, but at runtime.

Thanks.

The ETS has not been touched in 12 Years. However, this is the code that AMX used to control the HVAC and update the KNX switch. I believe it’s the correct snippet. Looks like it sends a 1 or a 0. I’m not sure where to put that 1 or 0. In automation or expose?

button_event [tp,buttonsOnOff]
{
  push:
      {
       local_var integer curIndex
       curIndex=currACZone
       if (timeline_active(tlResponse))
       {
         timeline_pause(tlResponse)
       }
       switch (get_last(buttonsOnOff))
       {
	    case 1: 
	    {
		send_command vdvAC,"'POWER=',itoa(curIndex),':1'"
		// also update EIB switch led if this used to control AC unit
		SEND_COMMAND vdvEIBIP, "'SET_SW:9/1/',itoa(curIndex),':1'"	    
	    }
	    case 2: 
	    {
		send_command vdvAC,"'POWER=',itoa(curIndex),':0'"
		// also update EIB switch led if this used to control AC unit
		SEND_COMMAND vdvEIBIP, "'SET_SW:9/1/',itoa(curIndex),':0'"

Also, the HA switch (see below) is able to turn the KNX wall switch on/off (LED on/off). So the switch works - but I cannot get it connected to other pieces correctly.

switch