Epaper - Questions

Bonjour à tous,

Je me suis lancé dans la réalisation d’un epaper pour mon Home Assistant. J’ai une question concernant le choix du modèle à indiquer dans cette partie du code :

display:
  - platform: waveshare_epaper
    id: eink_display
    cs_pin: 15
    dc_pin: 27
    busy_pin: 25
    reset_pin: 26
    reset_duration: 2ms
    model: 7.50in-bV3
    rotation: 270°
    update_interval: 30s #Délai d’actualisation des données

Comment savoir quel modèle indiquer ? J’ai testé avec « 7.50inv2 » mais n’était affiché à l’écran. Ca à l’ai plus stable avec « 7.50in-bV3 » mais je préfère éviter de faire une bêtise dès le départ :slight_smile:

Voici mon écran.

J’en profite aussi pour vous demander pourquoi je n’arrive pas à afficher le « ^ » du mot « août », pourtant il est bien avec une typo qui contient cette lettre ?

esphome:
  name: e-paper
  friendly_name: e-paper
  on_boot:
  - delay: 15s
  - script.execute: update_screen

esp32:
  board: esp32dev

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxxx"

ota:
  - platform: esphome
    password: "xxxxx"

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

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

captive_portal:

script:
  - id: update_screen
    then:
      - component.update: eink_display

spi:
  clk_pin: 13
  mosi_pin: 14
    
font:
  ######### REGULAR #################
  - file: "epaper/GothamRnd-Book.ttf"
    id: book20
    size: 20
    glyphs: &font-glyphs
      ['!', '"', '%', '(', ')', '+', '=', ',', '-', '_', '.', ':', '°', ' ',
      '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
      'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
      'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
      'é', 'à', 'è', 'ç', 'ù', 'É', 'À', 'È', 'Ç', 'Ù']
  - file: "epaper/GothamRnd-Book.ttf"
    id: book25
    size: 25
    glyphs : *font-glyphs 
  ########## BOLD ################## 
  - file: "epaper/GothamRnd-Bold.ttf"
    id: bold15
    size: 15
    glyphs : *font-glyphs 
  - file: "epaper/GothamRnd-Bold.ttf"
    id: bold20
    size: 20
    glyphs : *font-glyphs 
  - file: "epaper/GothamRnd-Bold.ttf"
    id: bold25
    size: 25
    glyphs : *font-glyphs 
  - file: "epaper/GothamRnd-Bold.ttf"
    id: bold30
    size: 30
    glyphs : *font-glyphs 
  - file: "epaper/GothamRnd-Bold.ttf"
    id: bold35
    size: 35
    glyphs : *font-glyphs 
  - file: "epaper/GothamRnd-Bold.ttf"
    id: bold40
    size: 40
    glyphs : *font-glyphs 
  - file: "epaper/GothamRnd-Bold.ttf"
    id: bold55
    size: 55
    glyphs: ['.', '°', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'C', '-']

  - file: 'epaper/materialdesignicons-webfont.ttf'
    id: mdi120
    size: 120
    glyphs: &mdi-weather-glyphs
      - "\U000F0590" # mdi-weather-cloudy
      - "\U000F0F2F" # mdi-weather-cloudy-alert
      - "\U000F0E6E" # mdi-weather-cloudy-arrow-right
      - "\U000F0591" # mdi-weather-fog
      - "\U000F0592" # mdi-weather-hail
      - "\U000F0F30" # mdi-weather-hazy
      - "\U000F0898" # mdi-weather-hurricane
      - "\U000F0593" # mdi-weather-lightning
      - "\U000F067E" # mdi-weather-lightning-rainy
      - "\U000F0594" # mdi-weather-night
      - "\U000F0F31" # mdi-weather-night-partly-cloudy
      - "\U000F0595" # mdi-weather-partly-cloudy
      - "\U000F0F32" # mdi-weather-partly-lightning
      - "\U000F0F33" # mdi-weather-partly-rainy
      - "\U000F0F34" # mdi-weather-partly-snowy
      - "\U000F0F35" # mdi-weather-partly-snowy-rainy
      - "\U000F0596" # mdi-weather-pouring
      - "\U000F0597" # mdi-weather-rainy
      - "\U000F0598" # mdi-weather-snowy
      - "\U000F0F36" # mdi-weather-snowy-heavy
      - "\U000F067F" # mdi-weather-snowy-rainy
      - "\U000F0599" # mdi-weather-sunny
      - "\U000F0F37" # mdi-weather-sunny-alert
      - "\U000F14E4" # mdi-weather-sunny-off
      - "\U000F059A" # mdi-weather-sunset
      - "\U000F059B" # mdi-weather-sunset-down
      - "\U000F059C" # mdi-weather-sunset-up
      - "\U000F0F38" # mdi-weather-tornado
      - "\U000F059D" # mdi-weather-windy
      - "\U000F059E" # mdi-weather-windy-variant

      - "\U000F00E9" # mdi-cake
      - "\U000F0A70" # mdi-silverware-fork-knife

      - "\U000F1A74" # mdi-solar-power-variant-outline
      - "\U000F1904" # mdi-home-lightning-bolt-outline

      - "\U000F05C3" # mdi-youtube

      - "\U000F05D6" # mdi-alert-circle-outline

  - file: 'epaper/materialdesignicons-webfont.ttf'
    id: mdi36
    size: 36
    glyphs: *mdi-weather-glyphs
  - file: 'epaper/materialdesignicons-webfont.ttf'
    id: mdi20
    size: 20
    glyphs: *mdi-weather-glyphs

text_sensor: 
  - platform: homeassistant
    entity_id: sensor.date_fr
    id: date_fr

display:
  - platform: waveshare_epaper
    id: eink_display
    cs_pin: 15
    dc_pin: 27
    busy_pin: 25
    reset_pin: 26
    reset_duration: 2ms
    model: 7.50in-bV3
    rotation: 270°
    update_interval: 30s #Délai d’actualisation des données
    lambda: |
     std::map<std::string, std::string> weather_icon_map
        {
          {"cloudy", "\U000F0590"},
          {"cloudy-alert", "\U000F0F2F"},
          {"cloudy-arrow-right", "\U000F0E6E"},
          {"fog", "\U000F0591"},
          {"hail", "\U000F0592"},
          {"hazy", "\U000F0F30"},
          {"hurricane", "\U000F0898"},
          {"lightning", "\U000F0593"},
          {"lightning-rainy", "\U000F067E"},
          {"night", "\U000F0594"},
          {"night-partly-cloudy", "\U000F0F31"},
          {"partlycloudy", "\U000F0595"},
          {"partly-lightning", "\U000F0F32"},
          {"partly-rainy", "\U000F0F33"},
          {"partly-snowy", "\U000F0F34"},
          {"partly-snowy-rainy", "\U000F0F35"},
          {"pouring", "\U000F0596"},
          {"rainy", "\U000F0597"},
          {"snowy", "\U000F0598"},
          {"snowy-heavy", "\U000F0F36"},
          {"snowy-rainy", "\U000F067F"},
          {"sunny", "\U000F0599"},
          {"sunny-alert", "\U000F0F37"},
          {"sunny-off", "\U000F14E4"},
          {"sunset", "\U000F059A"},
          {"sunset-down", "\U000F059B"},
          {"sunset-up", "\U000F059C"},
          {"tornado", "\U000F0F38"},
          {"windy", "\U000F059D"},
          {"windy-variant", "\U000F059E"},
        };

     std::map<std::string, std::string> weather_traduction
        {
          {"cloudy", "Nuageux"},
          {"cloudy-alert", "Alerte"},
          {"cloudy-arrow-right", "--"},
          {"fog", "Brouillard"},
          {"hail", "Grêle"},
          {"hazy", "Brume"},
          {"hurricane", "Ouragan"},
          {"lightning", "Orage"},
          {"lightning-rainy", "Orageux"},
          {"night", "Nuit"},
          {"night-partly-cloudy", "Nuageux"},
          {"partlycloudy", "Nuageux"},
          {"partly-lightning", "Orageux"},
          {"partly-rainy", "Pluvieux"},
          {"partly-snowy", "Neigeux"},
          {"partly-snowy-rainy", "Neigeux"},
          {"pouring", "À verse"},
          {"rainy", "Pluvieux"},
          {"snowy", "Neigeux"},
          {"snowy-heavy", "Neigeux"},
          {"snowy-rainy", "Neigeux"},
          {"sunny", "Ensoleillé"},
          {"sunny-alert", "Alerte"},
          {"sunny-off", "--"},
          {"sunset", "Crépuscule"},
          {"sunset-down", "Crépuscule"},
          {"sunset-up", "Aube"},
          {"tornado", "Tornade"},
          {"windy", "Venteux"},
          {"windy-variant", "Venteux"},
        };

     it.printf(240, 75, id(bold35), TextAlign::TOP_CENTER, "%s", id(date_fr).state.c_str());

     it.filled_rectangle(50, 120, 380, 2);

Merci d’avance pour votre aide !

Bonjour,

Avec le lien Ali impossible de savoir quel est l’écran. Est-ce qu’au dos de celui-ci il y a une référence ?

Pour l’accent, ça doit être parce qu’il manque le caractère â dans la liste des glyphes. Une question d’ailleurs à quoi servent les *font-glyphs et &font-glyphs ?

C’est des notions en C/C++ qui parlent de pointeur et de référence

Ok mais ça me dit pas à quoi ça sert. Je ne trouve rien dans la doc ESPHome et j’ai jamais vu ça ailleurs

C’est pas forcément dans la Doc esphome de base.
C’est lié au langage C/C++

Regarde 4.2 et 4.4

Merci pour ton retour. Voici les infos que j’ai derrière et sur la languette de l’écran :


salut,
j’ai le même écran que toi, tu as trouvé une solution ?
Il fait du rouge et du noir, tu sais comment on choisit la couleur ?
Merci

Perso je suis resté sur le model: 7.50in-bv3, et je n’ai pas trouvé comment afficher du rouge.
Si tu trouves je suis preneur de la solution :slight_smile:

merci, je viens de tester avec le model que tu indiques , ça maaaaaaaaarche !
dommage pour le rouge, ça pourrait être sympa :frowning: Si je trouve, je le noterai ici

1 « J'aime »

J’ai tenté d’autres variables « model » indiqués ici (Waveshare E-Paper Display — ESPHome)
J’ai testé 7.50inV2alt (OK mais pas de couleur) 7.50in-hd-b(NOK)
Le model 7.50in-bV3 est indiqué comme B/W only, donc c’est mort pour la couleur avec lui.

avec le V2alt , j’ai essayé en ajoutant le paramètre COLOR_ON ou COLOR_OFF à des élèments, ça ne semble pas fonctionner :frowning: (cf Display Component — ESPHome)
voilà l’état de mes tests/recherches

Cool que ça fonctionne également. Perso j’en ai testé pleins également et c’est le seul qui marchait pour moi, mais sans la couleurs. Si jamais tu trouves je suis toujours preneur :slight_smile:

Bonjour à tous, je suis sur le sujet depuis quelques mois. J’ai commencé avec un écran eink B/W 7.5" waveshare et ensuite j’ai tenté avec eink 7.5" B/W/R waveshare. J’arrive à utiliser les couleurs, j’ai compris plus tard que certains écrans faisaient du partiel refresh alors j’ai acheté des écrans 2.9" B/W/R weact pour faire d’autres tests. Je vous mets les photos. Et ensuite je vous mets les codes si ça peut aider. (oui je dois changer les piles de certains thermomètres et oui celui qui ne fait que noir n’est plus branché depuis le 24/08 :slight_smile: )


1 « J'aime »

Voici le code de mon écran 7.5" B/W/R V2 (désolé d’avance si mon code est pas clair, ou pas beau :rofl:) mais pour moi il fonctionne :sweat_smile:
Si vous avez des questions n’hésitez pas ! J’essayerai de vous répondre malgré mes connaissances basiques.

esphome:
  name: epaperbwr
  platform: ESP32
  board: esp32dev
  on_boot:
    then:
      - component.update: eink_display
      - wait_until:
          condition:
            lambda: 'return id(data_updated) == true;'
            # Wait a bit longer so all the items are received
      - delay: 30s
      - logger.log: "Refreshing display..."
      - lambda: "id(initial_data_received) = true;"
      - script.execute: update_screen
      - delay: 10s
      - logger.log: "Checking sleep"
      - lambda: |-
          if (id(defeat).state) {
            ESP_LOGD("main", "Prevent sleep");
            id(deep_sleep_1).prevent_deep_sleep();
          } else {
            ESP_LOGD("main", "Allow sleep");
          }
          if(id(remote_defeat).state) {
            ESP_LOGD("main", "Remote prevent sleep");
            id(deep_sleep_1).prevent_deep_sleep();
          } else {
            ESP_LOGD("main", "Remote allow sleep");
          }
      - logger.log: "Sleep checked"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
external_components:
# twisterss fork of esphome-dev
  - source:
      type: git
      url:  https://github.com/twisterss/esphome-dev.git
      ref: waveshare-red-black
    components: [ waveshare_epaper ]

deep_sleep:
  run_duration: 5min
  sleep_duration: 175min
  id: deep_sleep_1  
captive_portal:
color:
  - id: COLOR_W
    red: 0%
    green: 0%
    blue: 0%
    white: 100%
  - id: COLOR_B
    red: 0%
    green: 0%
    blue: 0%
    white: 0%
  - id: COLOR_R
    red: 100%
    green: 0%
    blue: 0%
    white: 0%
logger:
api:
  encryption:
    key: "XXXXXXXXXXXXXXXXXXXXX"
ota:
  - platform: esphome
    password: "XXXXXXXXXXXXXXXXXXXXXXXXXX"
globals:
  - id: data_updated
    type: bool
    restore_value: no
    initial_value: 'false'
  - id: initial_data_received
    type: bool
    restore_value: no
    initial_value: 'false'
  - id: recorded_display_refresh
    type: int
    restore_value: yes
    initial_value: '0'
script:
  - id: update_screen
    then:
      - component.update: eink_display

time:
  - platform: homeassistant
    id: sntp_time
    on_time:
      # 23:00
      - seconds: 0
        minutes: 0
        hours: 23
        then:
          - delay : 1s
          - deep_sleep.enter:
              id: deep_sleep_1
              until: 08:00:00
              time_id: sntp_time  

spi:
  clk_pin: 13
  mosi_pin: 14
    
font:
  ######### REGULAR #################
  - file: "fonts/GothamRnd-Book.ttf"
    id: book20
    size: 20
    glyphs: &font-glyphs
      ['!', '"', '%', '(', ')', '+', '=', ',', '-', '_', '.', ':', '°', ' ', '€', "'", '/',
      '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
      'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
      'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
      'é', 'à', 'è', 'ë', 'ç', 'ù', 'û', 'ê', 'ô', 'î', 'ï',  'É', 'À', 'È', 'Ç', 'Ù']
  - file: "fonts/GothamRnd-Book.ttf"
    id: book25
    size: 25
    glyphs : *font-glyphs 
  ########## BOLD ################## 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold15
    size: 15
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold20
    size: 20
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold25
    size: 25
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold30
    size: 30
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold35
    size: 35
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold40
    size: 40
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold55
    size: 55
    glyphs: ['.', '°', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'C', '-']

  - file: 'fonts/materialdesignicons-webfont.ttf'
    id: mdi100
    size: 100
    glyphs: &mdi-weather-glyphs
      - "\U000F0590" # mdi-weather-cloudy
      - "\U000F0F2F" # mdi-weather-cloudy-alert
      - "\U000F0E6E" # mdi-weather-cloudy-arrow-right
      - "\U000F0591" # mdi-weather-fog
      - "\U000F0592" # mdi-weather-hail
      - "\U000F0F30" # mdi-weather-hazy
      - "\U000F0898" # mdi-weather-hurricane
      - "\U000F0593" # mdi-weather-lightning
      - "\U000F067E" # mdi-weather-lightning-rainy
      - "\U000F0594" # mdi-weather-night
      - "\U000F0F31" # mdi-weather-night-partly-cloudy
      - "\U000F0595" # mdi-weather-partly-cloudy
      - "\U000F0F32" # mdi-weather-partly-lightning
      - "\U000F0F33" # mdi-weather-partly-rainy
      - "\U000F0F34" # mdi-weather-partly-snowy
      - "\U000F0F35" # mdi-weather-partly-snowy-rainy
      - "\U000F0596" # mdi-weather-pouring
      - "\U000F0597" # mdi-weather-rainy
      - "\U000F0598" # mdi-weather-snowy
      - "\U000F0F36" # mdi-weather-snowy-heavy
      - "\U000F067F" # mdi-weather-snowy-rainy
      - "\U000F0599" # mdi-weather-sunny
      - "\U000F0F37" # mdi-weather-sunny-alert
      - "\U000F14E4" # mdi-weather-sunny-off
      - "\U000F059A" # mdi-weather-sunset
      - "\U000F059B" # mdi-weather-sunset-down
      - "\U000F059C" # mdi-weather-sunset-up
      - "\U000F0F38" # mdi-weather-tornado
      - "\U000F059D" # mdi-weather-windy
      - "\U000F059E" # mdi-weather-windy-variant

      - "\U000F04C5" # mdi-speedometer
      - "\U000F0A70" # mdi-silverware-fork-knife

      - "\U000F1A74" # mdi-solar-power-variant-outline
      - "\U000F1904" # mdi-home-lightning-bolt-outline

      - "\U000F06EE" # mdi-mailbox
      - "\U000F0F54" # mdi-thermometer
      - "\U000F05D6" # mdi-alert-circle-outline
      - "\U000F0298" # mdi-gas-station

      - "\U000F0EB8" # mdi-GAZOIL
      # Wifi
      - "\U000F092B" # mdi-wifi-strength-alert-outline
      - "\U000F091F" # mdi-wifi-strength-1
      - "\U000F0922" # mdi-wifi-strength-2
      - "\U000F0925" # mdi-wifi-strength-3
      - "\U000F0928" # mdi-wifi-strength-4
      # Pollen
      - "\U000F1510" # mdi-Ambroisies, Armoise, 
      - "\U000F0531" # mdi-feuillus
      - "\U000F0405" # mdi-Conifères
      - "\U000F0E66" # mdi-Plantain
      - "\U000F1886" # mdi-flower-pollen-outline
      #Autres
      - "\U000F044C" # mdi-recycle, 
      - "\U000F0819" # mdi-Poubelle-levée

  - file: 'fonts/materialdesignicons-webfont.ttf'
    id: mdi36
    size: 36
    glyphs: *mdi-weather-glyphs
  - file: 'fonts/materialdesignicons-webfont.ttf'
    id: mdi20
    size: 20
    glyphs: *mdi-weather-glyphs
  - file: 'fonts/materialdesignicons-webfont.ttf'
    id: mdi33
    size: 33
    glyphs: *mdi-weather-glyphs

sensor:
  - platform: homeassistant
    entity_id: weather.ville
    attribute: temperature
    id: weather_temperature
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_temperature_1
    id: weather_temperature_1
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_temperature_2
    id: weather_temperature_2
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_temperature_3
    id: weather_temperature_3
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_temperature_4
    id: weather_temperature_4
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_temperature_5
    id: weather_temperature_5
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_templow_1
    id: weather_templow_1
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_templow_2
    id: weather_templow_2
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_templow_3
    id: weather_templow_3
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_templow_4
    id: weather_templow_4
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_templow_5
    id: weather_templow_5
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
binary_sensor:
  - platform: homeassistant
    name: "Remote Defeat Sleep"
    internal: True
    id: "remote_defeat"
    entity_id: input_boolean.defeat_sleep
    on_press:
      then:
        - logger.log: "remote press defeat"
        - deep_sleep.prevent: deep_sleep_1
    on_state:
      then:
        - delay: 4s
        - logger.log: "Remote state state"

  - platform: gpio
    name: "Defeat"
    id: "defeat"
    internal: True
    pin:
      number: 4
      mode: INPUT_PULLUP
      inverted: True
    on_press:
      then:
        - logger.log: "press defeat"
        - deep_sleep.prevent: deep_sleep_1
text_sensor: 
  - platform: homeassistant
    entity_id: sensor.fete
    id: ephemeride
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.date_fr_complete
    id: date_fr_complete
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: weather.ville
    id: weather_ville
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_day_1
    id: weather_day_1
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_condition_1
    id: weather_condition_1
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_day_2
    id: weather_day_2
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_condition_2
    id: weather_condition_2
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_day_3
    id: weather_day_3
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_condition_3
    id: weather_condition_3
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_day_4
    id: weather_day_4
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_condition_4
    id: weather_condition_4
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_day_5
    id: weather_day_5
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.weather_condition_5
    id: weather_condition_5
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.pollens_35
    id: Pollens
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.compteur_de_vibrations
    id: Courrier
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.station_leclerc_ville_e10
    id: Essence_E10
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.station_leclerc_ville_sp98
    id: Essence_SP98
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.a4c13815ceba_temperature
    id: enfant
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.a4c138d9aa92_temperature
    id: invité
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.a4c1387f2cf2_temperature
    id: parents
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.cout_actuel_tesla
    id: today_actuel_tesla
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.today_hp_meter
    id: today_hp_meter
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.cout_actuel_edf
    id: cout
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.cout_mensuel_tesla
    id: couttesla
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.pollens_35_risklevel
    id: niveau
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.cout_mensuel
    id: mensuel
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.calendrier_evenement
    id: calendrier
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
  - platform: homeassistant
    entity_id: sensor.calendrier_debut
    id: calendrier_debut
    internal: true
    on_value:
      then:
        - lambda: 'id(data_updated) = true;'
display:
  - platform: waveshare_epaper
    id: eink_display
    cs_pin: 15
    dc_pin: 27
    busy_pin:
      number: 25
      inverted: true
    reset_pin: 26
    model: 7.50in-bv2-rb
    rotation: 270°
    update_interval: 14400s
    lambda: |-
     std::map<std::string, std::string> weather_icon_map
        {
          {"cloudy", "\U000F0590"},
          {"cloudy-alert", "\U000F0F2F"},
          {"cloudy-arrow-right", "\U000F0E6E"},
          {"fog", "\U000F0591"},
          {"hail", "\U000F0592"},
          {"hazy", "\U000F0F30"},
          {"hurricane", "\U000F0898"},
          {"lightning", "\U000F0593"},
          {"lightning-rainy", "\U000F067E"},
          {"night", "\U000F0594"},
          {"night-partly-cloudy", "\U000F0F31"},
          {"partlycloudy", "\U000F0595"},
          {"partly-lightning", "\U000F0F32"},
          {"partly-rainy", "\U000F0F33"},
          {"partly-snowy", "\U000F0F34"},
          {"partly-snowy-rainy", "\U000F0F35"},
          {"pouring", "\U000F0596"},
          {"rainy", "\U000F0597"},
          {"snowy", "\U000F0598"},
          {"snowy-heavy", "\U000F0F36"},
          {"snowy-rainy", "\U000F067F"},
          {"sunny", "\U000F0599"},
          {"sunny-alert", "\U000F0F37"},
          {"sunny-off", "\U000F14E4"},
          {"sunset", "\U000F059A"},
          {"sunset-down", "\U000F059B"},
          {"sunset-up", "\U000F059C"},
          {"tornado", "\U000F0F38"},
          {"windy", "\U000F059D"},
          {"windy-variant", "\U000F059E"},
          {"clear-night", "\U000F0594"},
        };

     std::map<std::string, std::string> weather_traduction
        {
          {"cloudy", "Nuageux"},
          {"cloudy-alert", "Alerte"},
          {"cloudy-arrow-right", "--"},
          {"fog", "Brouillard"},
          {"hail", "Grêle"},
          {"hazy", "Brume"},
          {"hurricane", "Ouragan"},
          {"lightning", "Orage"},
          {"lightning-rainy", "Orageux"},
          {"night", "Nuit"},
          {"night-partly-cloudy", "Nuageux"},
          {"partlycloudy", "Nuageux"},
          {"partly-lightning", "Orageux"},
          {"partly-rainy", "Pluvieux"},
          {"partly-snowy", "Neigeux"},
          {"partly-snowy-rainy", "Neigeux"},
          {"pouring", "À verse"},
          {"rainy", "Pluvieux"},
          {"snowy", "Neigeux"},
          {"snowy-heavy", "Neigeux"},
          {"snowy-rainy", "Neigeux"},
          {"sunny", "Ensoleillé"},
          {"sunny-alert", "Alerte"},
          {"sunny-off", "--"},
          {"sunset", "Crépuscule"},
          {"sunset-down", "Crépuscule"},
          {"sunset-up", "Aube"},
          {"tornado", "Tornade"},
          {"windy", "Venteux"},
          {"windy-variant", "Venteux"},
          {"clear-night", "Nuit Dégagée"}
        };
     it.printf(230, 15, id(bold30), COLOR_R, TextAlign::TOP_CENTER, "%s", id(date_fr_complete).state.c_str());
     it.printf(230, 53, id(bold20), TextAlign::TOP_CENTER, "%s ", id(ephemeride).state.c_str());

     it.filled_rectangle(40, 80, 380, 2);


     it.printf(95, 90, id(mdi100), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_ville).state].c_str());
     it.printf(170, 100, id(bold30), TextAlign::TOP_LEFT, "%s", weather_traduction[id(weather_ville).state].c_str());
     it.printf(170, 140, id(bold30), TextAlign::TOP_LEFT, "%2.1f°C", id(weather_temperature).state);

     it.printf(75, 210, id(bold25), TextAlign::TOP_CENTER, "%s", id(weather_day_1).state.c_str());
     it.printf(75, 240, id(mdi36), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_1).state].c_str());
     it.printf(75, 280, id(bold20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_temperature_1).state);
     it.printf(75, 310, id(book20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_templow_1).state);

     it.printf(152, 210, id(bold25), TextAlign::TOP_CENTER, "%s", id(weather_day_2).state.c_str());
     it.printf(152, 240, id(mdi36), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_2).state].c_str());
     it.printf(152, 280, id(bold20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_temperature_2).state);
     it.printf(152, 310, id(book20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_templow_2).state);

     it.printf(230, 210, id(bold25), TextAlign::TOP_CENTER, "%s", id(weather_day_3).state.c_str());
     it.printf(230, 240, id(mdi36), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_3).state].c_str());
     it.printf(230, 280, id(bold20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_temperature_3).state);
     it.printf(230, 310, id(book20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_templow_3).state);

     it.printf(308, 210, id(bold25), TextAlign::TOP_CENTER, "%s", id(weather_day_4).state.c_str());
     it.printf(308, 240, id(mdi36), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_4).state].c_str());
     it.printf(308, 280, id(bold20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_temperature_4).state);
     it.printf(308, 310, id(book20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_templow_4).state);

     it.printf(385, 210, id(bold25), TextAlign::TOP_CENTER, "%s", id(weather_day_5).state.c_str());
     it.printf(385, 240, id(mdi36), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_5).state].c_str());
     it.printf(385, 280, id(bold20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_temperature_5).state);
     it.printf(385, 310, id(book20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_templow_5).state);

     it.filled_rectangle(40, 348, 380, 2);

     it.print(40, 355, id(mdi36), COLOR_R, TextAlign::TOP_LEFT, "\U000F0F54");
     it.print(75, 365, id(bold15), TextAlign::TOP_LEFT, "Ch. enfant");
     it.printf(170, 365, id(bold15), TextAlign::TOP_LEFT, "%s°C", id(enfant).state.c_str());
     it.print(40, 400, id(mdi36), COLOR_R, TextAlign::TOP_LEFT, "\U000F0F54");
     it.print(75, 410, id(bold15), TextAlign::TOP_LEFT, "Ch. invité");        
     it.printf(170, 410, id(bold15), TextAlign::TOP_LEFT, "%s°C", id(invité).state.c_str());
     it.print(40, 440, id(mdi36), COLOR_R, TextAlign::TOP_LEFT, "\U000F0F54");
     it.print(75, 453, id(bold15), TextAlign::TOP_LEFT, "Ch. parents");   
     it.printf(170, 453, id(bold15), TextAlign::TOP_LEFT, "%s°C", id(parents).state.c_str());
     it.filled_rectangle(240, 366, 2, 100);
     it.print(280, 370, id(mdi36), COLOR_R, TextAlign::TOP_CENTER, "\U000F0298");
     it.printf(305, 370, id(bold25), TextAlign::TOP_LEFT, "%s €", id(Essence_E10).state.c_str());
     it.print(305, 392, id(bold15), COLOR_R,TextAlign::TOP_LEFT, "Essence E10");    
     it.print(280, 430, id(mdi36), COLOR_R,TextAlign::TOP_CENTER, "\U000F0EB8");
     it.printf(305, 430, id(bold25), TextAlign::TOP_LEFT, "%s €", id(Essence_SP98).state.c_str());
     it.print(305, 452, id(bold15), COLOR_R, TextAlign::TOP_LEFT, "Essence SP98");
     it.filled_rectangle(40, 480, 380, 2);

     it.print(230, 490, id(bold15), COLOR_R, TextAlign::TOP_CENTER, "Consommation Electrique du jour");
     it.print(40, 520, id(bold15), COLOR_R, TextAlign::TOP_LEFT, "Coût Tesla Jour :");
     it.printf(200, 515, id(bold25), TextAlign::TOP_LEFT, "%s €", id(today_actuel_tesla).state.c_str());
     it.print(40, 550, id(bold15), COLOR_R, TextAlign::TOP_LEFT, "Tesla du mois : ");
     it.printf(200, 550, id(bold25), TextAlign::TOP_LEFT, "%s €", id(couttesla).state.c_str());
     it.filled_rectangle(40, 610, 380, 2);

     it.printf(230, 615, id(bold20), TextAlign::TOP_CENTER, "%s", id(calendrier_debut).state.c_str());
     it.printf(230, 640, id(bold35), COLOR_R, TextAlign::TOP_CENTER, "%s", id(calendrier).state.c_str());

     it.filled_rectangle(40, 720, 380, 2);


     it.print(40, 585, id(bold15), COLOR_R, TextAlign::TOP_LEFT, "Total Jour :");
     it.printf(130, 580, id(bold25), TextAlign::TOP_LEFT, "%s €", id(cout).state.c_str());
     it.print(230, 585, id(bold15), COLOR_R, TextAlign::TOP_LEFT, "Total Mois :");
     it.printf(420, 575, id(bold25), TextAlign::TOP_RIGHT, "%s €", id(mensuel).state.c_str());
     it.print(58, 727, id(mdi36), COLOR_R, TextAlign::TOP_CENTER, "\U000F06EE");
     it.printf(83, 733, id(bold20), TextAlign::TOP_LEFT, "%s", id(Courrier).state.c_str());
     it.print(105, 733, id(bold20), COLOR_R, TextAlign::TOP_LEFT, "Courrier(s)");
     
     it.filled_rectangle(240, 730, 2, 25);
     
     it.print(250, 724, id(mdi36), COLOR_R, TextAlign::TOP_LEFT, "\U000F1886");
     it.printf(290, 733, id(bold20), TextAlign::TOP_LEFT, "%s", id(Pollens).state.c_str());
     it.printf(373, 733, id(bold20), TextAlign::TOP_LEFT, "%s", id(niveau).state.c_str()); 
     it.print(373, 733, id(bold20), COLOR_R, TextAlign::TOP_LEFT, "  /5");     
     it.filled_rectangle(40, 770, 380, 2);
     
     it.print(240, 770, id(bold15), COLOR_R, TextAlign::TOP_RIGHT, "Infos mises à jour :");
     it.strftime(245, 770, id(bold15), TextAlign::TOP_LEFT, "%d-%m-%Y %H:%M", id(sntp_time).now());

Et pour mon écran eink 2.9" Weact (je viens tout juste de trouver la solution pour utiliser le rouge, que ça soit pour le 7.5 ou le 2.9 je ne sais pas encore faire les nuances) :

esphome:
  name: epaper29
  friendly_name: epaper29
  on_boot:
    then:
      - component.update: eink_display
      - wait_until:
          condition:
            lambda: 'return id(data_updated) == true;'
      - delay: 30s
      - logger.log: "Refreshing display..."
      - lambda: "id(initial_data_received) = true;"
      - script.execute: update_screen
      - delay: 300s
external_components:
 - source: github://pr#6226
   components: [waveshare_epaper]
esp32:
  board: esp32dev
  framework:
    type: arduino

logger:

script:
  - id: update_screen
    then:
      - component.update: eink_display
  - id: show_sensor_page
    then:
      - lambda: |-
          if (id(current_page) == 0) {
            id(eink_display).show_page(id(page0));
          } else if (id(current_page) == 1) {
            id(eink_display).show_page(id(page1));
          } else if (id(current_page) == 2) {
            id(eink_display).show_page(id(page2));
          } else if (id(current_page) == 3) {
            id(eink_display).show_page(id(page3));
          }
      - delay: 180s
      - component.update: eink_display
      - lambda: 'id(sensor_updated) = false;'
  - id: enable_frequent_updates
    then:
      - lambda: 'id(update_enabled) = true;'
      - delay: 120s
      - lambda: 'id(update_enabled) = false;'
  - id: perform_update
    then:
      - if:
          condition:
            lambda: 'return id(update_enabled);'
          then:
            - component.update: eink_display
api:
  encryption:
    key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

ota:
  - platform: esphome
    password: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"

wifi:
  networks:
    - ssid: !secret wifi_ssid
      password: !secret wifi_password
  ap:
    ssid: "Epaper29 Fallback Hotspot"
    password: "XXXXXXXXXXXXXX"

interval:
  - interval: 120s
    then:
      - lambda: |-
          if (!id(sensor_updated)) {
            if (id(current_page) == 0) {
              id(eink_display).show_page(id(page0));
              id(current_page) = 1;
            } else if (id(current_page) == 1) {
              id(eink_display).show_page(id(page1));
              id(current_page) = 2;
            } else if (id(current_page) == 2) {
              id(eink_display).show_page(id(page2));
            } else if (id(current_page) == 3) {
              id(current_page) = 3;
              id(eink_display).show_page(id(page3));
              id(current_page) = 0;
            }
            id(eink_display).update();
          }
      - script.execute: enable_frequent_updates
  - interval: 120s
    then:
      - script.execute: perform_update

globals:
  - id: data_updated
    type: bool
    restore_value: no
    initial_value: 'false'
  - id: initial_data_received
    type: bool
    restore_value: no
    initial_value: 'false'
  - id: recorded_display_refresh
    type: int
    restore_value: yes
    initial_value: '0'
  - id: sensor_updated
    type: bool
    restore_value: no
    initial_value: 'false'
  - id: current_page
    type: int
    restore_value: no
    initial_value: '0'
  - id: last_weather_temperature
    type: float
    restore_value: no
    initial_value: '0.0'
  - id: update_enabled
    type: bool
    restore_value: no
    initial_value: 'false'
color:
  - id: color_w
    red: 100%
    green: 100%
    blue: 100%
    white: 0%
  - id: color_b
    red: 0%
    green: 0%
    blue: 0%
    white: 50%
  - id: color_r
    red: 100%
    green: 0%
    blue: 0%
    white: 0%

time:
  - platform: homeassistant
    id: sntp_time

spi:
  clk_pin: 18
  mosi_pin: 23

font:
  - file: "fonts/GothamRnd-Book.ttf"
    id: book20
    size: 20
    glyphs: &font-glyphs
      ['!', '"', '%', '(', ')', '+', '=', ',', '-', '_', '.', ':', '°', ' ', '€', "'", '/', '?', '“', '”',
      '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
      'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
      'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
      'é', 'à', 'è', 'ë', 'ç', 'ù', 'û', 'ê', 'ô', 'î', 'ï', 'É', 'À', 'È', 'Ç', 'Ù']
  - file: "fonts/GothamRnd-Book.ttf"
    id: book25
    size: 25
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold15
    size: 15
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold20
    size: 20
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold25
    size: 25
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold30
    size: 30
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold35
    size: 35
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold40
    size: 40
    glyphs : *font-glyphs 
  - file: "fonts/GothamRnd-Bold.ttf"
    id: bold55
    size: 55
    glyphs: ['.', '°', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'C', '-']

  - file: 'fonts/materialdesignicons-webfont.ttf'
    id: mdi100
    size: 100
    glyphs: &mdi-weather-glyphs
      - "\U000F0590" # mdi-weather-cloudy
      - "\U000F0F2F" # mdi-weather-cloudy-alert
      - "\U000F0E6E" # mdi-weather-cloudy-arrow-right
      - "\U000F0591" # mdi-weather-fog
      - "\U000F0592" # mdi-weather-hail
      - "\U000F0F30" # mdi-weather-hazy
      - "\U000F0898" # mdi-weather-hurricane
      - "\U000F0593" # mdi-weather-lightning
      - "\U000F067E" # mdi-weather-lightning-rainy
      - "\U000F0594" # mdi-weather-night
      - "\U000F0F31" # mdi-weather-night-partly-cloudy
      - "\U000F0595" # mdi-weather-partly-cloudy
      - "\U000F0F32" # mdi-weather-partly-lightning
      - "\U000F0F33" # mdi-weather-partly-rainy
      - "\U000F0F34" # mdi-weather-partly-snowy
      - "\U000F0F35" # mdi-weather-partly-snowy-rainy
      - "\U000F0596" # mdi-weather-pouring
      - "\U000F0597" # mdi-weather-rainy
      - "\U000F0598" # mdi-weather-snowy
      - "\U000F0F36" # mdi-weather-snowy-heavy
      - "\U000F067F" # mdi-weather-snowy-rainy
      - "\U000F0599" # mdi-weather-sunny
      - "\U000F0F37" # mdi-weather-sunny-alert
      - "\U000F14E4" # mdi-weather-sunny-off
      - "\U000F059A" # mdi-weather-sunset
      - "\U000F059B" # mdi-weather-sunset-down
      - "\U000F059C" # mdi-weather-sunset-up
      - "\U000F0F38" # mdi-weather-tornado
      - "\U000F059D" # mdi-weather-windy
      - "\U000F059E" # mdi-weather-windy-variant

      - "\U000F04C5" # mdi-speedometer
      - "\U000F0A70" # mdi-silverware-fork-knife

      - "\U000F1A74" # mdi-solar-power-variant-outline
      - "\U000F1904" # mdi-home-lightning-bolt-outline

      - "\U000F06EE" # mdi-mailbox
      - "\U000F0F54" # mdi-thermometer
      - "\U000F05D6" # mdi-alert-circle-outline
      - "\U000F0298" # mdi-gas-station
      - "\U000F0EB8" # mdi-GAZOIL
      # Wifi
      - "\U000F092B" # mdi-wifi-strength-alert-outline
      - "\U000F091F" # mdi-wifi-strength-1
      - "\U000F0922" # mdi-wifi-strength-2
      - "\U000F0925" # mdi-wifi-strength-3
      - "\U000F0928" # mdi-wifi-strength-4
      # Pollen
      - "\U000F1510" # mdi-Ambroisies, Armoise, 
      - "\U000F0531" # mdi-feuillus
      - "\U000F0405" # mdi-Conifères
      - "\U000F0E66" # mdi-Plantain
      - "\U000F1886" # mdi-flower-pollen-outline
      - "\U000F024A" # mdi-flower
      #Autres
      - "\U000F044C" # mdi-recycle, 
      - "\U000F0819" # mdi-Poubelle-levée     
  - file: 'fonts/materialdesignicons-webfont.ttf'
    id: mdi36
    size: 36
    glyphs: *mdi-weather-glyphs
  - file: 'fonts/materialdesignicons-webfont.ttf'
    id: mdi20
    size: 20
    glyphs: *mdi-weather-glyphs
  - file: 'fonts/materialdesignicons-webfont.ttf'
    id: mdi33
    size: 33
    glyphs: *mdi-weather-glyphs

sensor:
  - platform: homeassistant
    entity_id: weather.ville
    attribute: temperature
    id: weather_temperature
    internal: true
    on_value:
      then:
        - lambda: |-
            if (abs(id(weather_temperature).state - id(last_weather_temperature)) > 2.0) {
              id(last_weather_temperature) = id(weather_temperature).state;
              id(current_page) = 0;
              id(sensor_updated) = true;
              id(data_updated) = true;
              id(eink_display).show_page(id(page0));
              id(eink_display).update();
            }
        - script.execute: enable_frequent_updates
  - platform: homeassistant
    id: "ambroisies"
    entity_id: sensor.pollens_35_ambroisies
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "armoise"
    entity_id: sensor.pollens_35_armoise
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "aulne"
    entity_id: sensor.pollens_35_aulne
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "bouleau"
    entity_id: sensor.pollens_35_bouleau
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "charme"
    entity_id: sensor.pollens_35_charme
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "chataignier"
    entity_id: sensor.pollens_35_chataignier
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "chene"
    entity_id: sensor.pollens_35_chene
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "cupressacees"
    entity_id: sensor.pollens_35_cupressacees
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "frene"
    entity_id: sensor.pollens_35_frene
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "graminees"
    entity_id: sensor.pollens_35_graminees
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "noisetier"
    entity_id: sensor.pollens_35_noisetier
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "olivier"
    entity_id: sensor.pollens_35_olivier
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "oseille"
    entity_id: sensor.pollens_35_oseille
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "peuplier"
    entity_id: sensor.pollens_35_peuplier
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "plantain"
    entity_id: sensor.pollens_35_plantain
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "platane"
    entity_id: sensor.pollens_35_platane
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    id: "urticacees"
    entity_id: sensor.pollens_35_urticacees
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page

binary_sensor:
  - platform: homeassistant
    name: "Remote Defeat Sleep"
    internal: True
    id: "remote_defeat"
    entity_id: input_boolean.defeat_sleep
    on_state:
      then:
        - delay: 4s
        - logger.log: "Remote state state"

text_sensor: 
  - platform: homeassistant
    entity_id: sensor.fete
    id: ephemeride
    on_value:
      then:
        - lambda: |-
            id(current_page) = 0;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    entity_id: sensor.date_fr_complete
    id: date_fr_complete
    on_value:
      then:
        - lambda: |-
            id(current_page) = 0;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    entity_id: weather.ville
    id: weather_forecast
    on_value:
      then:
        - lambda: |-
            id(current_page) = 0;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    entity_id: sensor.calendrier_evenement
    id: calendrier
    internal: true
    on_value:
      then:
        - lambda: |-
            id(current_page) = 1;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    entity_id: sensor.calendrier_debut
    id: calendrier_debut
    internal: true
    on_value:
      then:
        - lambda: |-
            id(current_page) = 1;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    entity_id: sensor.pollens_35
    id: "lepollen"
    internal: true
    on_value:
      then:
        - lambda: |-
            id(current_page) = 2;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
  - platform: homeassistant
    entity_id: sensor.cout_mensuel_tesla
    id: couttesla
    on_value:
      then:
        - lambda: |-
            id(current_page) = 3;
            id(sensor_updated) = true;
        - script.execute: show_sensor_page
display:
  - platform: waveshare_epaper
    id: eink_display
    cs_pin: 5
    dc_pin: 17
    reset_pin: 16
    busy_pin: 4
    model: 2.90in3c
    rotation: 270
    update_interval: 600s
    reset_duration: 2ms
    pages:
      - id: page0
        lambda: |-
         std::map<std::string, std::string> weather_icon_map
            {
              {"cloudy", "\U000F0590"},
              {"cloudy-alert", "\U000F0F2F"},
              {"cloudy-arrow-right", "\U000F0E6E"},
              {"fog", "\U000F0591"},
              {"hail", "\U000F0592"},
              {"hazy", "\U000F0F30"},
              {"hurricane", "\U000F0898"},
              {"lightning", "\U000F0593"},
              {"lightning-rainy", "\U000F067E"},
              {"night", "\U000F0594"},
              {"night-partly-cloudy", "\U000F0F31"},
              {"partlycloudy", "\U000F0595"},
              {"partly-lightning", "\U000F0F32"},
              {"partly-rainy", "\U000F0F33"},
              {"partly-snowy", "\U000F0F34"},
              {"partly-snowy-rainy", "\U000F0F35"},
              {"pouring", "\U000F0596"},
              {"rainy", "\U000F0597"},
              {"snowy", "\U000F0598"},
              {"snowy-heavy", "\U000F0F36"},
              {"snowy-rainy", "\U000F067F"},
              {"sunny", "\U000F0599"},
              {"sunny-alert", "\U000F0F37"},
              {"sunny-off", "\U000F14E4"},
              {"sunset", "\U000F059A"},
              {"sunset-down", "\U000F059B"},
              {"sunset-up", "\U000F059C"},
              {"tornado", "\U000F0F38"},
              {"windy", "\U000F059D"},
              {"windy-variant", "\U000F059E"},
              {"clear-night", "\U000F0594"},
            };

         std::map<std::string, std::string> weather_traduction
            {
              {"cloudy", "Nuageux"},
              {"cloudy-alert", "Alerte"},
              {"cloudy-arrow-right", "--"},
              {"fog", "Brouillard"},
              {"hail", "Grêle"},
              {"hazy", "Brume"},
              {"hurricane", "Ouragan"},
              {"lightning", "Orage"},
              {"lightning-rainy", "Orageux"},
              {"night", "Nuit"},
              {"night-partly-cloudy", "Nuageux"},
              {"partlycloudy", "Nuageux"},
              {"partly-lightning", "Orageux"},
              {"partly-rainy", "Pluvieux"},
              {"partly-snowy", "Neigeux"},
              {"partly-snowy-rainy", "Neigeux"},
              {"pouring", "À verse"},
              {"rainy", "Pluvieux"},
              {"snowy", "Neigeux"},
              {"snowy-heavy", "Neigeux"},
              {"snowy-rainy", "Neigeux"},
              {"sunny", "Ensoleillé"},
              {"sunny-alert", "Alerte"},
              {"sunny-off", "--"},
              {"sunset", "Crépuscule"},
              {"sunset-down", "Crépuscule"},
              {"sunset-up", "Aube"},
              {"tornado", "Tornade"},
              {"windy", "Venteux"},
              {"windy-variant", "Venteux"},
              {"clear-night", "Nuit Dégagée"}
            };
         it.printf(145, 0, id(bold15), color_r, TextAlign::TOP_CENTER, "%s", id(date_fr_complete).state.c_str());     
         it.printf(40, 25, id(mdi33), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_forecast).state].c_str());
         it.printf(80, 25, id(bold20), TextAlign::TOP_LEFT, "%s", weather_traduction[id(weather_forecast).state].c_str());
         it.printf(190, 25, id(bold20), TextAlign::TOP_LEFT, "%2.1f°C", id(weather_temperature).state);

         it.print(45, 55, id(mdi20), TextAlign::TOP_LEFT, "\U000F1886");
         it.print(70, 55, id(bold15), TextAlign::TOP_LEFT, "Risque Pollens : ");
         it.printf(200, 55, id(bold15), TextAlign::TOP_LEFT, "%s", id(lepollen).state.c_str()); 

         it.printf(150, 80, id(bold15), TextAlign::TOP_CENTER, "%s ", id(ephemeride).state.c_str());
      - id: page1
        lambda: |-        
         it.printf(150, 0, id(bold15), TextAlign::TOP_CENTER, "%s", id(calendrier_debut).state.c_str());
         it.printf(80, 40, id(bold20), TextAlign::TOP_LEFT, "%s", id(calendrier).state.c_str());
      - id: page2
        lambda: |-

         it.print(35, 3, id(mdi20), TextAlign::TOP_LEFT, "\U000F1886");
         it.print(55, 7, id(bold15), color_r, TextAlign::TOP_LEFT, "Risque Pollens : ");
         it.printf(185, 7, id(bold15), TextAlign::TOP_LEFT, "%s", id(lepollen).state.c_str()); 
         it.print(15, 30, id(mdi20), TextAlign::TOP_LEFT, "\U000F1510");
         it.print(75, 30, id(mdi20), TextAlign::TOP_LEFT, "\U000F0531");
         it.print(135, 30, id(mdi20), TextAlign::TOP_LEFT, "\U000F0405");
         it.print(195, 30, id(mdi20), TextAlign::TOP_LEFT, "\U000F0E66");
         it.print(255, 30, id(mdi20), TextAlign::TOP_LEFT, "\U000F024A");
          int y = 50;  // Initial y position for the first item in the first column
          int column_width = 0;  // Adjust based on your display dimensions
          int items_in_column = 0;  // Counter to keep track of the number of items in the current column
          
          auto add_pollen_to_display = [&](const char* name, float value) {
            if (value > 0) {
              if (items_in_column == 4) {
                y = 50;  // Reset y position for the next column
                column_width += 125;  // Move to the next column
                items_in_column = 0;  // Reset item counter for new column
              }
              it.printf(column_width, y, id(bold15), "%s: %.0f", name, value);
              y += 20;  // Move y position for the next item
              items_in_column++;  // Increment the counter
            }
          };
          
          // Call the function for each pollen sensor
          add_pollen_to_display("Ambroisies", id(ambroisies).state);
          add_pollen_to_display("Aulne", id(aulne).state);
          add_pollen_to_display("Bouleau", id(bouleau).state);
          add_pollen_to_display("Charme", id(charme).state);
          add_pollen_to_display("Chataignier", id(chataignier).state);
          add_pollen_to_display("Chêne", id(chene).state);
          add_pollen_to_display("Cupressacées", id(cupressacees).state);
          add_pollen_to_display("Frêne", id(frene).state);
          add_pollen_to_display("Graminées", id(graminees).state);
          add_pollen_to_display("Noisetier", id(noisetier).state);
          add_pollen_to_display("Olivier", id(olivier).state);
          add_pollen_to_display("Oseille", id(oseille).state);
          add_pollen_to_display("Peuplier", id(peuplier).state);
          add_pollen_to_display("Plantain", id(plantain).state);
          add_pollen_to_display("Platane", id(platane).state);
          add_pollen_to_display("Urticacées", id(urticacees).state);
      - id: page3
        lambda: |-

         it.printf(90, 20, id(bold15), color_w, TextAlign::TOP_LEFT, "Tesla du mois : ");
         it.printf(110, 40, id(bold20), color_r, TextAlign::TOP_LEFT, "%s €", id(couttesla).state.c_str());
         it.printf(110, 60, id(bold20), color_b, TextAlign::TOP_LEFT, "%s €", id(couttesla).state.c_str());
1 « J'aime »

Merci beaucoup pour le partage ! Ils sont super ! Je vais devoir te mp pour 2/3 questions si c’est ok pour toi :grin:

1 « J'aime »

Volontiers ! N’hésite pas. :+1:

Super ! Merci pour le partage. Par contre, as-tu des délais de rafraichissement qui sont très long sur le weact en W/R/B ?

Bonjour,
Excuse-moi, j’avais pas vu ton message :cry:.
Afficher une page noir et rouge prend environ 20 sc.