ESPhome and PCF8574 LCD2004A

Hello Everybody

I try to print sensor information on lcd 2004a with pcf 8574 but i have this problem : [E][lcd_pcf8574:028]: Communication with LCD Display failed!

Someone can help me ?

This is my code :

esphome:
  name: station_bureau
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: xxxxxxxxxxxx
  password: xxxxxxxxxxxxx

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

i2c:
  sda: D2
  scl: D1
  scan: True 
  
time:
- platform: sntp
  id: my_time
  
sensor:
  - platform: dht
    pin: D7
    model: dht22
    temperature:
      name: "Sation Bureau Température Ambiante"
    humidity:
      name: "Station Bureau Humidité Ambiante"
    update_interval: 30s 
  - platform: uptime
    name: "Station Bureau Uptime Sensor"
  - platform: wifi_signal
    name: "Station Bureau WiFi Signal"
    update_interval: 30s      

    
binary_sensor:
  - platform: gpio
    pin: D5
    name: "Station Bureau PIR Sensor"
    device_class: motion    
    
display:
  - platform: lcd_pcf8574
    dimensions: 20x4
    address: 0x27
    lambda: |-
      it.print("Hello World!");
#      it.strftime("It is %H:%M on %d.%m.%Y", id(my_time).now());

And This is the log

NFO Successfully connected to station_bureau.local
[12:35:47][I][app:100]: ESPHome version 1.14.2 compiled on Nov 13 2019, 12:35:06
[12:35:47][C][wifi:409]: WiFi:
[12:35:47][C][wifi:277]: SSID: xxxxxxxxxxxxxxx
[12:35:47][C][wifi:278]: IP Address: xxxxxxxxxxx
[12:35:47][C][wifi:280]: BSSID: xxxxxxxxxxxxxx
[12:35:47][C][wifi:281]: Hostname: 'station_bureau'
[12:35:47][C][wifi:285]: Signal strength: -41 dB ▂▄▆█
[12:35:47][C][wifi:289]: Channel: 8
[12:35:47][C][wifi:290]: Subnet: [255.255.255.0](https://l.facebook.com/l.php?u=http%3A%2F%2F255.255.255.0%2F%3Ffbclid%3DIwAR2sqTUmEgMfDQ5d0eT-7-WHiPrxmkHXb1zU0useUV-VRhIzGa5bWJUIN0s&h=AT0xiOx820JwhJQV-dRzNaRzY5IQUB2A9Ybz4qOQlQlOmK8DeGaZRiz-Df5hHPip-9bTqNLLBYMCT5bkh70tdPKktfAIiUyhnZoyzkezsrBZ7kCY6tM7SXzakN7AnB618LXjWCNACwUDj67LyeE)
[12:35:47][C][wifi:291]: Gateway: [10.0.0.1](https://l.facebook.com/l.php?u=http%3A%2F%2F10.0.0.1%2F&h=AT2NY8BIlcKE9YGny0F3WvLIyQcShkYYpzLs-HsGg9emIOIPymf6_WSN3YKBwY90SpSQ68vKCqof93SkDLfF62hWOmGNCYHiAOTSAnpDBAFObGOtknxpQpDg8ZkY-n0rZX08U4U3CVaFuqeOQi8)
[12:35:47][C][wifi:292]: DNS1: [10.0.0.1](https://l.facebook.com/l.php?u=http%3A%2F%2F10.0.0.1%2F&h=AT3oI83s55nX3gIlAX0I1ic2F4VwWt8mw6nIK1ZQ7iHBpu09zwOAExyPt2rt5mQDb8nLCBgU5nsacd2UW2JtznFkuAWMPla_SdvTMyr3oWhDI9iCp70aUdSyFskOnCruL-WyofRieZQrwhYdVQI)
[12:35:47][C][wifi:293]: DNS2: (IP unset)
[12:35:47][C][i2c:028]: I2C Bus:
[12:35:47][C][i2c:029]: SDA Pin: GPIO4
[12:35:47][C][i2c:030]: SCL Pin: GPIO5
[12:35:47][C][i2c:031]: Frequency: 50000 Hz
[12:35:47][I][i2c:033]: Scanning i2c bus for active devices...
[12:35:47][I][i2c:040]: Found i2c device at address 0x27
[12:35:47][C][uptime.sensor:030]: Uptime Sensor 'Station Bureau Uptime Sensor'
[12:35:47][C][uptime.sensor:030]: Unit of Measurement: 's'
[12:35:47][C][uptime.sensor:030]: Accuracy Decimals: 0
[12:35:47][C][uptime.sensor:030]: Icon: 'mdi:timer'
[12:35:47][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Station Bureau PIR Sensor'
[12:35:47][C][gpio.binary_sensor:015]: Device Class: 'motion'
[12:35:47][C][gpio.binary_sensor:016]: Pin: GPIO14 (Mode: INPUT)
[12:35:47][C][logger:175]: Logger:
[12:35:47][C][logger:176]: Level: DEBUG
[12:35:47][C][logger:177]: Log Baud Rate: 115200
[12:35:47][C][logger:178]: Hardware UART: UART0
[12:35:47][C][dht:017]: DHT:
[12:35:47][C][dht:018]: Pin: GPIO13 (Mode: INPUT)
[12:35:47][C][dht:024]: Model: DHT22 (or equivalent)
[12:35:47][C][dht:027]: Update Interval: 30.0s
[12:35:47][C][dht:029]: Temperature 'Sation Bureau Température Ambiante'
[12:35:47][C][dht:029]: Unit of Measurement: '°C'
[12:35:47][C][dht:029]: Accuracy Decimals: 1
[12:35:47][C][dht:029]: Icon: 'mdi:thermometer'
[12:35:47][C][dht:030]: Humidity 'Station Bureau Humidité Ambiante'
[12:35:47][C][dht:030]: Unit of Measurement: '%'
[12:35:47][C][dht:030]: Accuracy Decimals: 0
[12:35:47][C][dht:030]: Icon: 'mdi:water-percent'
[12:35:47][C][lcd_pcf8574:023]: PCF8574 LCD Display:
[12:35:47][C][lcd_pcf8574:024]: Columns: 20, Rows: 4
[12:35:47][C][lcd_pcf8574:025]: Address: 0x3F
[12:35:47][C][lcd_pcf8574:026]: Update Interval: 1.0s
[12:35:47][E][lcd_pcf8574:028]: Communication with LCD Display failed!
[12:35:47][C][ota:029]: Over-The-Air Updates:
[12:35:47][C][ota:030]: Address: station_bureau.local:8266
[12:35:47][C][api:095]: API Server:
[12:35:47][C][api:096]: Address: station_bureau.local:6053
[12:35:47][C][sntp:043]: SNTP Time:
[12:35:47][C][sntp:044]: Server 1: '0.pool.ntp.org'
[12:35:47][C][sntp:045]: Server 2: '1.pool.ntp.org'
[12:35:47][C][sntp:046]: Server 3: '2.pool.ntp.org'
[12:35:47][C][sntp:047]: Timezone: 'CET-1CEST-2,M3.5.0/2,M10.4.0/3'
[12:35:47][C][wifi_signal.sensor:009]: WiFi Signal 'Station Bureau WiFi Signal'
[12:35:47][C][wifi_signal.sensor:009]: Unit of Measurement: 'dB'
[12:35:47][C][wifi_signal.sensor:009]: Accuracy Decimals: 0
[12:35:47][C][wifi_signal.sensor:009]: Icon: 'mdi:wifi'
[12:35:51][D][dht:048]: Got Temperature=20.5°C Humidity=51.6%

If you look through the log i2c is reporting device at address 0x27 but lcd_pcf8574 is reporting an address of 0x3F even though your yaml is indicating an address of 0x27 for the display. Is that a problem?

I don’t know Why but today it’s working and i keep the adress 0x27
Thanks