Use of variables in HA

Several variables are defined in my instance of HA and their use in a history platform sensor does not work.
The sensor in question follows and the variable in question is ‘var.adjyear.’

  - platform: history_stats
    name: HW_Ontime_Month
    
    entity_id: binary_sensor.electric_water_heater_running
    state: "on"
    type: time
    
    start: "{{ now().replace (year = (var.adjyear ) | int, month = (now().month -1) | int, day=1, hour=0, minute=0,second=0) }}"

    end: "{{now().replace(day=1,hour=0,minute=0,second=0) }}" 
 

The variable does in fact exist as evidenced in this screen capture.