AC Automation does not work

Hey guys, i’ve got this automation for my AC and for some reason it does not work. So far i can’t seem to find a way of making it work. Can one of you please take a look for me.

  - id: thermostat_turn_on
    alias: 'House AC night on'
    hide_entity: false
    initial_state: 'on'
      - platform: numeric_state
        entity_id: sensor.house_temp
        above: 78
      condition: and
        - condition: state
          entity_id: group.ha_presence
          state: 'home'
        - condition: state
          entity_id: group.doors_sensors
          state: 'off'
        - condition: state
          entity_id: group.windows_sensors
          state: 'off'
      - service: climate.turn_on
        entity_id: climate.family_room_thermostat
      - service: climate.set_hvac_mode
          entity_id: climate.family_room_thermostat
          hvac_mode: cool
      - service: climate.set_temperature
          entity_id: climate.family_room_thermostat
          temperature: 78
          hvac_action: cool
  - platform: template
        friendly_name: 'House temperature'
        unit_of_measurement: '°F'
        entity_id: climate.family_room_thermostat
        device_class: temperature
        value_template: "{{ state_attr('climate.family_room_thermostat', 'current_temperature') }}"

What do you mean it isn’t working? Also, if your house temp sensor already reads higher than 78 the automation won’t trigger. It has to go from below to above 78 to trigger (the docs also state this)

thank you for your reply; but i thought the threshold to trigger the automation is 78. What I mean by that is, if the house temp is above 78, to trigger that automation based on those conditions. Please correct me, if I’m wrong?

You’re thinking right, but if the temperature is already above the threshold when you create the automation, it won’t trigger.

So, for the automation to trigger, I should raise that value.

No, the automation will trigger the next time the temperature goes below 78 and then again above 78.

ok thank you very much

From this page:

…triggers once if value is changing from above to below or from below to above the given threshold.