Some problems with MQTT hvac configuration

Hello, I have some problems in mqtt hvac:

  1. When I am pressing the buttons in the UI of the home assistant it sends to the AC but doesn’t update the UI.

  2. When I change the temp in the UI it sends the temp to the AC but the mode is unknown:
    14:31:30 CMD: Group 0, Index 1, Command "IRHVAC", Data "{"Vendor":"GREE","Power":"on","Mode":"unknown","FanSpeed":"Auto","Light":"On","Temp":23.0}"

  3. When I change the mode in the UI it sends the mode to the AC but the temp is none or 0:
    14:31:30 CMD: Group 0, Index 1, Command "IRHVAC", Data "{"Vendor":"GREE","Power":"on","Mode":"heat","FanSpeed":"Auto","Light":"On","Temp":None}"

  4. The problem that when I am using the AC remote control from the receiver and the transmitter, the receiver is receiving the data but it doesn’t transmit it to the AC via the transmitter

That’s the configuration.yaml:

climate:
  - platform: mqtt
    name: AC_Receiver_LivingRoom
    unique_id: '1'
    qos: 1
    precision: 1.0
    retain: true
    modes:
      - "off"
      - "cool"
      - "heat"
    min_temp: 16
    max_temp: 30
    payload_on: 'on'
    payload_off: 'off'
    
    power_state_topic: 'tele/AC_LivingRoom/RESULT'
    power_state_template: '{{ value_json["IrReceived"]["IRHVAC"]["Power"] }}'
    
    mode_command_topic: climate/hvac_mode
    mode_state_topic: 'tele/AC_LivingRoom/RESULT'
    mode_state_template: '{{ value_json["IrReceived"]["IRHVAC"]["Mode"] | lower }}'

    temperature_command_topic: climate/temperature
    temperature_state_topic: 'tele/AC_LivingRoom/RESULT'
    temperature_state_template: '{{ value_json["IrReceived"]["IRHVAC"]["Temp"] }}'

And that’s the automations.yaml:

- id: '1597665196561'
  alias: AC temp
  trigger:
    platform: mqtt
    topic: climate/temperature
  action: 
    - service: mqtt.publish
      data_template:
        topic: cmnd/AC_LivingRoom/IRhvac
        payload: >
          {"Vendor":"GREE","Power":"on","Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Auto","Light":"On","Temp":{{trigger.payload}}}
  mode: single
- id: '1597665221423'
  alias: AC mode
  trigger:
    platform: mqtt
    topic: climate/hvac_mode
  action: 
    - service: mqtt.publish
      data_template:
        topic: cmnd/AC_LivingRoom/IRhvac
        payload: >
          {% if trigger.payload == "off" %}
             {"Vendor":"GREE","Power":"off","Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Auto","Light":"On","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
          {% else %}
             {"Vendor":"GREE","Power":"on","Mode":"{{trigger.payload}}","FanSpeed":"Auto","Light":"On","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}}
          {% endif %}
  mode: single

I tried to change the code of the automations in some ways but it didn’t work.

Thanks for your help!!

Someone can help me?