Generic_thermostat away mode set via hue binary sensor

Hi,

I’ve got a working acurite 433mhz temp sensor feeding a generic_thermostat controlling a window ac on a wemo:

I’m trying to use a Hue motion sensor to set the away mode of this generic_thermostat and not sure what path to follow. I’ve started creating an automation but …

configuration.yaml
# office ac control
climate:
  - platform: generic_thermostat
    name: OfficeAC
    heater: switch.office_ac
    ac_mode: true
    target_sensor: sensor.office_temp
    min_temp: 75
    max_temp: 82
    target_temp: 78
    away_temp: 84
    min_cycle_duration:
      minutes: 5

automations.yaml
- id: office_motion
  alias: "alan office motion"
  initial_state: 'on'
  trigger:
  - platform: state
    entity_id: binary_sensor.alan_sensor_motion
    from: 'off'
    to: 'on'
  action:
    - service: notify.ios_alan
      data_template:
        title: "{{now().strftime('%H:%M:%S')}}"
        message: "alan office motion"
    - service: climate.set_away_mode
      data:
        entity_id: climate.officeac
        away_mode: off

- id: office_motion_away
  alias: "alan office away"
  initial_state: 'on'
  trigger:
  - platform: state
    entity_id: binary_sensor.alan_sensor_motion
    from: 'on'
    to: 'off'
    for: '00:10:00'
  action:
    - service: climate.set_away_mode
      data:
        entity_id: climate.officeac
        away_mode: on

I’ve noticed that my lovelace card for my nest thermostat has an away toggle but the card for the generic_thermostat does not.

Update: added away_temp per @Villhellm’s suggestion. Also added an automation to set away mode.

Updated to use the ‘00:10:00’ time format. Seems to be working well.