Hello everybody
I have a question about updating 1306 oled dispaly.
I join a very short example showing the problem.
The following program works fine and displays the latest choice of select
esphome:
name: mesure-courant
platform: ESP32
board: esp32dev
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "87b80bae52c81902d4fe308f90fab09b"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# si l'on n'utilise pas l'une des deux lignes suivnates, alors pb pour log par wifi et/ou MAJ par OTA
#domain: ""
use_address: "mesure-courant"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp32-SOS-SSID"
password: "vBAzaeazD5uw"
captive_portal:
switch:
- platform: restart
name: "test-restart-new"
# Définition d'une police
font:
- file: "fonts/LiberationSans-Regular.ttf"
id: my_font
size: 12
# Configuration I2C
i2c:
sda: GPIO22
scl: GPIO23
# Affichage sur un ssd1306 / 128 x 64
display:
- platform: ssd1306_i2c
id: "ssd_jmc"
model: "SSD1306 128x64"
address: 0x3C # adresse i2c
update_interval: never
lambda: |-
it.printf(0, 0, id(my_font),id(volt_select_id).state.c_str());
select:
- platform: template
name: "volt_select"
id: volt_select_id
optimistic: true
options:
- choix 1
- choix 2
- choix 3
initial_option: choix 1
on_value:
then:
- delay: 1ms # without this <delay> there is a problem !
- component.update: ssd_jmc
But if I remove the line < delay: 1ms>, I can’t no more see the card on the wifi !
Any idea ?
Is there a mean for debugging such a thing ?
thanks in advance
Jack-Michel