We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4e3100 commit c5d99b9Copy full SHA for c5d99b9
mqtt_io/modules/sensor/sht4x.py
@@ -10,6 +10,9 @@
10
11
REQUIREMENTS = ("adafruit-circuitpython-sht4x",)
12
13
+CONFIG_SCHEMA = {
14
+ "chip_addr": {"type": "integer", "required": False, "empty": False, "default": 0x44}
15
+}
16
17
class Sensor(GenericSensor):
18
"""
@@ -34,7 +37,7 @@ def setup_module(self) -> None:
34
37
import busio # type: ignore
35
38
36
39
i2c = busio.I2C(board.SCL, board.SDA)
- self.sensor = adafruit_sht4x.SHT4x(i2c)
40
+ self.sensor = adafruit_sht4x.SHT4x(i2c, address=self.config["chip_addr"])
41
42
@property
43
def _temperature(self) -> SensorValueType:
0 commit comments