Hello! I am trying to make a simple clock and calendar with max7219digit. I got it working but the clock resets to 1:00:00 after 15 minutes and just counts up to 15 minutes and resets again. I can ‘force’ it to right time by accessing the logs in the ESP Home on HA web interface.
How can I make it so it doesn’t do this? I don’t see anything in the documentation about this.
Config looks like:
esphome:
name: esphome-web-5ac3d8
esp8266:
board: d1_mini_lite
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "esphome-web-5ac3d8"
password: "I5lwyk8Zffm0"
captive_portal:
packages: !include_dir_named common
spi:
clk_pin: D5 # D5 is connected to CLK of MAX7219
mosi_pin: D7 # D7 is connected to MOSI of MAX7219
display:
- platform: max7219digit
intensity: 12
cs_pin: D8
num_chips: 8
lambda: |-
it.strftime(0, 0, id(digit_font), "%H:%M:%S", id(hass_time).now());
font:
- file: "pixelmix.ttf"
id: digit_font
size: 8
time:
- platform: homeassistant
id: hass_time
timezone: CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00
Yes and starting at 1:00:00 is equivalent to UTC 0:00:00, you are not connecting to HA correctly. If my devices have no connection to a time server my clock sets to 11:00:00 (AEST).
Try changing to use a time server rather than sourcing the time from HA and see if that makes a difference.
Also makes sense, but it connects to HA fine for the first 15 minutes. According to logs and also it shows the right time. But then after 15 minutes, it just resets to 1:00:00…
So my hypothesis is it is loosing connectivity to wifi after 15 minutes.
Edit: I’ll also try using sntp later today and report back