Hello everybody.
This is fixed already but as I spent almost one hour trying to figure it out I thought I could share my experience.
So I bought some Wemos D1 modules and SHT30 shields. When I tried to put them to work using esphome I kept getting the message “Communication with SHT3xD failed!”
I tried everything, changing the way the SCL and SDA pins are named, specifying diferent frequencies, changing boards, reading the datasheet, etc.
Then I tried to use Arduino IDE and an example from Wemos to check the “health” of the D1 board and shield.
In arduino everything worked flawlessely.
I then reprogramed the D1 board with the esphome and suddendly everything started to work. I do not know what happened but it now works. :S
My code below:
# Define I2C bus
i2c:
sda: GPIO4
scl: GPIO5
scan: true
id: bus_a
#frequency: 100000
# Sensors
sensor:
- platform: sht3xd
i2c_id: bus_a
temperature:
name: "Temperatura"
id: t67uyghu
on_value:
- switch.toggle: builtinled
- delay: 50ms
- switch.toggle: builtinled
humidity:
name: "Humidade"
id: o73894yuhr
on_value:
- switch.toggle: builtinled
- delay: 50ms
- switch.toggle: builtinled
address: 0x45
update_interval: 10s
- platform: bh1750
i2c_id: bus_a
id: hfhye736
name: "Iluminância"
address: 0x23
measurement_duration: 69
update_interval: 60s
on_value:
- switch.toggle: builtinled
- delay: 50ms
- switch.toggle: builtinled
#Outputs
switch:
- platform: gpio
pin: D4
inverted: true
id: builtinled
name: "Estado LED"
restore_mode: ALWAYS_OFF # Starts OFF
Thank you.