-
Notifications
You must be signed in to change notification settings - Fork 162
Description
- I have read the README.md file and visited the Documentation to see if the information there helps.
Action description
I am trying to add a SHT4x temperature and humidity sensor into Home Assistant via MQTT, using mqtt-io and the config.yml file on a Raspberry Pi 4B.
Using the examples from the SHT4x github examples if I change the I2C address from 0x44 to 0x45, I see the serial number, the temperature and humidity via terminal.
I need a way to change the I2C address in the config.yml file, because mqtt-io looks for 0x44.
Previous attempts
In the config.yml file I have tried "i2c_bus_num: 1" and "i2c_address: 0x45".
I've changed 'i2c_address: 0x45' to just 'address: 0x45'.
I've done away with the 'i2c_bus_num: 1' line too.
I don't know the correct terminology to be able to change the address to 0x45
Error messages and traceback
mqtt_io.exceptions.ConfigValidationFailed: Config did not validate:
chip_addr:
- unknown field
i2c_bus_num:
- unknown field
Config
mqtt:
host: homeassistant.local
user: put_user_here
password: put_password_here
gpio_modules:
- name: rpi
module: raspberrypi
digital_outputs:
- name: fan_gpio_12
module: rpi
pin: 12
on_payload: "ON"
off_payload: "OFF"
sensor_modules:
- name: i2c_sensirion
module: sht4x
i2c_bus_num: 1
chip_addr: 0x45
sensor_inputs:
- name: pi2_temperature
module: i2c_sensirion
mqtt_topic:
state_topic: "/sensor/pi2/temp"
- name: pi2_humidity
module: i2c_sensirion
mqtt_topic:
state_topic: "/sensor/pi2/humidity"Hardware
- Platform: [e.g. Raspberry Pi 4B]
- Connected hardware: [Sensirion SHT4x]
System:
- OS: [e.g. Raspbian]
- Python version: [Python 3.13.5]
- User you're running as: [e.g. root, pi]
- Using a virtualenv?: yes
Additional context
The SHT4x is an acknowledged sensor in the 'Sensors' list on the github page. Cool.
How do I change the default i2c address from 0x44 to 0x45?
Thanks for any help.