Change htu21d sensors from required to optional (#5285)

This commit is contained in:
Jesse Hills 2023-08-21 12:16:14 +12:00 committed by GitHub
parent fe7893d1b3
commit da8afd36b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,13 +23,13 @@ CONFIG_SCHEMA = (
cv.Schema(
{
cv.GenerateID(): cv.declare_id(HTU21DComponent),
cv.Required(CONF_TEMPERATURE): sensor.sensor_schema(
cv.Optional(CONF_TEMPERATURE): sensor.sensor_schema(
unit_of_measurement=UNIT_CELSIUS,
accuracy_decimals=1,
device_class=DEVICE_CLASS_TEMPERATURE,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Required(CONF_HUMIDITY): sensor.sensor_schema(
cv.Optional(CONF_HUMIDITY): sensor.sensor_schema(
unit_of_measurement=UNIT_PERCENT,
accuracy_decimals=1,
device_class=DEVICE_CLASS_HUMIDITY,