HVAC Control error

Hello everyone,

I’ve got an issue with my automation. It works splendidly most of the time, but sometimes it won’t seem to trigger. It keeps hanging in the automation?

It should trigger when the temperature is lower then the target temperature:

The logs say this:

Connection to ThinQ failed. Network connection error - Device: Airco
November 23, 2023 at 09:40:54 – (WARNING) SmartThinQ LGE Sensors (custom integration)

and later this:

HVAC Control: Choose at step 1: choice 1: Error executing script. Unexpected error for call_service at pos 1: 0103 - {'data': ''}
09:05:07 – (ERROR) Automation - message first occurred at November 23, 2023 at 12:32:16 and shows up 4 times 

I guess it has something to do with the connection of my airco, and stops sending the current temperature?

This is my automation:

alias: HVAC Control
description: Automatically control HVAC based on presence and temperature
trigger:
  - platform: state
    entity_id:
      - sensor.temperature_airco
      - group.presence_home
    for:
      minutes: 1
  - platform: time
    at: "07:15:00"
condition:
  - condition: state
    entity_id: group.presence_home
    state: home
  - condition: time
    after: "07:00:00"
    before: "21:00:00"
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: sensor.hvac_mode_based_on_season
            state: heat
          - condition: or
            conditions:
              - condition: state
                entity_id: sensor.temperature_airco
                state: Lower
              - condition: state
                entity_id: sensor.temperature_airco
                state: Equal
                enabled: false
        sequence:
          - service: climate.set_hvac_mode
            target:
              entity_id: climate.airco
            data:
              hvac_mode: heat
          - delay:
              minutes: 10
          - service: automation.trigger
            target:
              entity_id: automation.hvac_auto
            data:
              skip_condition: true
      - conditions:
          - condition: state
            entity_id: sensor.hvac_mode_based_on_season
            state: heat
          - condition: state
            entity_id: sensor.temperature_airco
            state: Higher
        sequence:
          - service: climate.set_hvac_mode
            target:
              entity_id: climate.airco
            data:
              hvac_mode: "off"
          - delay:
              minutes: 5
      - conditions:
          - condition: state
            entity_id: sensor.hvac_mode_based_on_season
            state: cool
          - condition: sun
            before: sunset
            after: sunrise
          - condition: state
            entity_id: sensor.temperature_airco
            state: Higher
        sequence:
          - service: climate.set_hvac_mode
            target:
              entity_id: climate.airco
            data:
              hvac_mode: cool
          - delay:
              minutes: 10
          - service: automation.trigger
            target:
              entity_id: automation.hvac_auto
            data:
              skip_condition: true
      - conditions:
          - condition: state
            entity_id: sensor.hvac_mode_based_on_season
            state: cool
          - condition: state
            entity_id: sensor.temperature_airco
            state: Lower
        sequence:
          - service: climate.set_hvac_mode
            target:
              entity_id: climate.airco
            data:
              hvac_mode: "off"
          - delay:
              minutes: 5
    default: []
mode: single

These are my sensors:

  - platform: template
    sensors:
      temperature_airco:
        friendly_name: "HVAC Current Temperature"
        value_template: >-
          {% set current_temp = state_attr('climate.airco', 'current_temperature') | float(default=0) %}
          {% set target_temp = state_attr('climate.airco', 'temperature') | float(default=0) %}
          {% if current_temp > target_temp %}
            Higher
          {% elif current_temp < target_temp %}
            Lower
          {% else %}
            Equal
          {% endif %}
          
  - platform: template
    sensors:
      target_temperature:
        friendly_name: "HVAC Target Temperature"
        value_template: "{{ state_attr('climate.airco', 'temperature') | float(default=0) }}"
        unit_of_measurement: "°C"

  - platform: template
    sensors:
      hvac_mode_based_on_season:
        friendly_name: "HVAC Mode Based on Season"
        value_template: >-
          {% set current_season = states('sensor.season') %}
          {% if current_season in ['spring', 'winter', 'autumn'] %}
            heat
          {% elif current_season == 'summer' %}
            cool
          {% else %}
            off
          {% endif %}

So i manually have to turn on the machine and start it to fix it. How can i fix this? Do an error check?

I pasted the full log: Logger: homeassistant.components.automation.new_automationSource: helpers/scri - Pastebin.com