Compile error in 2024.12.x

Hi,

I have this kind of configuration:

globals:
  - id: g_last_major_maintenance
    type: long int
    restore_value: yes
    initial_value: '1681182000'


text_sensor:
  - platform: template
    name: $devicename last major maintenance
    icon: mdi:calendar-clock
    lambda: |-
      char str[17];
      strftime(str, sizeof(str), "%d.%m.%Y %H:%M", localtime(&id(g_last_major_maintenance)));
      return  {str};

It used to work ok until 2024.12.0. Now I get

/config/esphome/ac-base.yaml:417:62: error: cannot convert 'long int*' to 'const time_t*' {aka 'const long long int*'}
  417 |       strftime(str, sizeof(str), "%d.%m.%Y %H:%M", localtime(&id(g_last_major_maintenance)));
      |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
      |                                                              |
      |                                                              long int*

Looking at breaking changes, I am not really sure what has changed now. Any idea?

The ESP-IDF version changed. You’ll want to change the type of your global to time_t.