Only allow internal pins for dht sensor (#2940)

This commit is contained in:
Jesse Hills 2021-12-23 08:31:56 +13:00
parent ffd4280d6c
commit fc0a6546a2
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -33,7 +33,7 @@ DHT = dht_ns.class_("DHT", cg.PollingComponent)
CONFIG_SCHEMA = cv.Schema(
{
cv.GenerateID(): cv.declare_id(DHT),
cv.Required(CONF_PIN): pins.gpio_input_pin_schema,
cv.Required(CONF_PIN): pins.internal_gpio_input_pin_schema,
cv.Optional(CONF_TEMPERATURE): sensor.sensor_schema(
unit_of_measurement=UNIT_CELSIUS,
accuracy_decimals=1,