Generic thermostat doesn't switch aircon on

Hello!
I have got a problem with the generic thermostat, he doesn’t switch my aircon on.
When i use the switch entitiy manual, it switch my aircon on and off but when i select cooling in my thermostat is doesn’t do anything.

My config:

climate:
  - platform: generic_thermostat
    name: Aircon Woonkamer
    heater: switch.aircon_woonkamer
    target_sensor: sensor.temperatuur_airco
    min_temp: 18
    max_temp: 30
    ac_mode: true
    target_temp: 23
    cold_tolerance: 0.3
switch:
  - platform: template
    switches:
      aircon_woonkamer:
        value_template: >
          {{ is_state('input_boolean.aircon_status', 'on') }}
        turn_on:
          - service: input_boolean.turn_on
            entity_id: input_boolean.aircon_status
          - service: script.airco_aan
        turn_off:
          - service: input_boolean.turn_off
            entity_id: input_boolean.aircon_status
          - service: script.airco_uit
input_boolean:
  aircon_status:
    name: Aircon status

i have also tried another switch:

- platform: command_line
    switches:
      aircon_woonkamer:
        command_on: 'bash /config/scripts/airco-script.sh set power on'
        command_off: 'bash /config/scripts/airco-script.sh set power off'

It doesn’t make any difference.

What is the current state of

sensor.temperatuur_airco

(look in dev tools / states menu).

22.0
unit_of_measurement: °C

That is lower than your target temperature. Therefore the AC won’t switch on. It can only cool in AC mode.

Life could be easy haha! Thx a lot!! When i set the target temp to 20 degrees it switch on! :wink:
I feel stupid :wink:
I have another question, when i check the webinterface off my aircon it shows target temp of 23 degrees (it was set a couple of days a go set by remote control , how can i push the set temp of HA to my aircon?
I have got a script who can push a temp to the aircon.

Write an automation to change it whenever the target temperature is adjusted in HA.

automation:

trigger:
  platform: template
  value_template: "{{ state_attr('climate.aircon_woonkamer', 'target_temp') }}"
action:
  service: script.your_script
    data_template: "{{ trigger.to_state.state }}" ### passes the current value of target_temp to your script.

Your script will of course have to be capable of accepting this value.

this gives an error in home-assistant:

Invalid config for [automation]: expected a dictionary for dictionary value @ data[‘action’][0][‘data_template’]. Got None. (See /config/configuration.yaml, line 145). Please check the docs at Automation - Home Assistant

That’s because it was an example only. I know nothing about your script.

This is my automation now:

automation:
  - alias: Push set-temp to aircon
    trigger:
      - platform: template
        value_template: "{{ (state_attr('climate.aircon_woonkamer', 'temperature') | float * 10) | round }}"
    action:
      - service: script.push_setpoint_to_aircon
        data_template: '{{ trigger.to_state.state }}'

This is my script:

  push_setpoint_to_aircon:
    alias: Setpoint to airco
    sequence:
      - service: shell_command.airco_set_temp

my shell_command.airco_set_temp:
airco_set_temp: 'bash /config/scripts/airco-script.sh set setpoint'