Esp32 saving global variables

I have a global like:

globals:
   - id: target_temp
     type: int
     restore_value: yes
switch:
  - platform: template
    name: 'Temp +'
    id: temp_up
    turn_on_action:
      - lambda: |-
          id(target_temp_sensor).publish_state(++id(target_temp));

This causes me to have a virtual switch that can change the global target_temp value. However, it doesn’t persist on powerloss :(. Does esp32 not support saving data from powerloss, docs only mention esp8266.

Or do I need to do something other than publish_state to ensure state is saved to flash?