Time only display when logging

Now this is the weirdest thing I have ever seen…can someone explain it…

I upload the code to a Huzzah (ESP12) with a max7219 8x8 LED matrix. and it compiles and loads. It works fine, it starts with 01:00 on the display but after a few seconds the correct time is displayed, that the logs also show…

Now I go away, and the PC that contains the website with which I acces the HA node (HP Thinclient) goes in standby…a short while later the displays shows 01:00 again and after it reaches 01:15, it goes back to 01:00…

When I wake up the PC and restart logging the right time apears again, when I do not restart logging it keeps displaying 01:xx,…So it is directly related to the logs

Can anyone explain this?

  name: ledpanel
  friendly_name: LEDpanel

esp8266:
  board: huzzah

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "9sx6gK0Pj5Y="

ota:
  - platform: esphome
    password: "5fe0592db5996ddab6018abe8fdb4a5f"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
 
  ap:
    ssid: "Ledpanel Fallback Hotspot"
    password: ""

font:
  - file: "fonts/adf-5x8.ttf"
    id: digit_font
    size: 8

spi:
  clk_pin: GPIO14
  mosi_pin: GPIO13

time:
  - platform: homeassistant
    timezone: Europe/Amsterdam
    id: HA_time


text_sensor:
  - platform: template
    name: "Current Time"
    id: current_time
    update_interval: 10s
    lambda: return  id(HA_time).now().strftime("%H:%M");

display:
  - platform: max7219digit
    id: LEDp
    cs_pin: GPIO15
    num_chips: 4
    intensity: 7
    update_interval: 10s
    scroll_mode: STOP
    lambda:
      it.print(0, 0, id(digit_font), id(current_time).state.c_str());


captive_portal:
    
type or paste code here

It sounds Ike the device is losing connection with home assistant. 01:00 is the default time before HA is connnected as the time source. 15 minutes is the timeout on API (HA) disconnect before the device reboots.

Thanks for pointing that out. The 01:00 default and the 15-minute API timeout explanation make a lot of sense now. I didn’t realize the display fallback behavior was tied that closely to the connection with Home Assistant. I’ll try checking the network connection stability between the ESP and HA, and maybe look into keeping the HA instance more consistently awake or accessible. Appreciate the insight!

Setting reboot_timeout: 0s under api: will stop the reset, which is useful for devices that don’t need a permanent connection to HA.

But Is the time entry not causing that the current time is fetched from HA on regular basis?

You could use SNTP time. That’s what I use for my mobile proof cabinet, just needs an internet connection.