Help with climate off automation

- alias: set_heating_off_when_away
  trigger:
    platform: time
    at: "22:42:00"
  action:
    - service: climate.set_hvac_mode
      data:
        entity_id: climate.thermostat
        hvac_mode: off
   
- alias: set_heating_upon_return 
  trigger:
    platform: time
    at: "08:44:00"
  action:
    - service: climate.set_hvac_mode
      data:
        entity_id: climate.thermostat
        hvac_mode: auto

The automation “set_heating_upon_return” works however the “set_heating_off_when_away” automation never works, why?

Is the answer something like this


service: climate.turn_off
  data:
  entity_id: climate.home

climate.turn_off will definetely turn it off if that’s what you want