Heating Automation Fine Tuning help

Hoping someone can help me bottom out what the issue is with this automation. I don’t believe that it’s far away from working, but don’t think I have the ‘And / Or’ rules set right?

- id: '1662749121139'
  alias: Raise Tester 2
  description: ''
  trigger:
  - platform: time
    at: 06:00:00
  - platform: time
    at: '16:00:00'
  - platform: state
    entity_id:
    - person.me
    from: not_home
    to: home
  - platform: state
    entity_id:
    - person.wife
    from: not_home
    to: home
  condition:
  - condition: or
    conditions:
    - condition: time
      before: 09:00:00
      after: 06:00:00
    - condition: time
      before: '21:00:00'
      after: '16:00:00'
    - condition: and
      conditions:
      - condition: state
        entity_id: person.me
        state: home
      - condition: or
        conditions:
        - condition: state
          entity_id: person.wife
          state: home
  action:
  - service: climate.set_temperature
    data:
      temperature: 20
    target:
      entity_id: climate.test_stat
  mode: single

- id: '1662749734218'
  alias: Lower Test 2
  description: ''
  trigger:
  - platform: time
    at: 06:00:00
  - platform: time
    at: '16:00:00'
  - platform: state
    entity_id:
    - person.me
    from: home
    to: not_home
  - platform: state
    entity_id:
    - person.wife
    from: home
    to: not_home
  condition:
  - condition: and
    conditions:
    - condition: state
      entity_id: person.me
      state: not_home
    - condition: state
      entity_id: person.wife
      state: not_home
    - condition: or
      conditions:
      - condition: time
        before: 09:00:00
        after: 06:00:00
      - condition: time
        before: '21:00:00'
        after: '16:00:00'
  action:
  - service: climate.set_temperature
    data:
      temperature: 17
    target:
      entity_id: climate.test_stat

The concept is that the heating should set the temperature to 25degC when either me or my Wife is at home within the given time frames. However, should we both leave the house (not_home) the temp should set to a lower temp. If the one of us returns, then the heating should return to the higher temperature.
If, at any of the Trigger times, neither of us are in, the Temperature target should go to the lower temperature.

The automation is not far away. It does as it should when leaving and entering the house. But, for some reason when neither of us are in at any of the Trigger times, the temperature is still set to the higher temp (rather than the lower).
I suspect I have the And / Or Rules wrong…but can’t work out what.

For information, this query is a follow on from my last post that finity kindly assisted me with.
https://community.home-assistant.io/t/heating-automation-improvement-help/457844

Many Thanks in advance

Probably my advanced age, but I’m finding this a little hard to follow.

It doesn’t matter who is home, so I would start with an input-boolean flag which had its own automation to turn it on and off as people come and go. This gives the heating automation a very simple trigger:

someone is home - yes
turn on the heating

someone is home - no
turn off the heating

Times can then be added as conditions.