Use proper schema for the analog pin shorthand (#2103)

The wrong error message is displayed like:
> GPIO17 (TOUT) is an analog-only pin on the ESP8266.
in case of the analog pin validation because the method `shorthand_analog_pin` uses wrong `GPIO_FULL_INPUT_PIN_SCHEMA` instead of `GPIO_FULL_ANALOG_PIN_SCHEMA`.
This commit is contained in:
Łukasz Śliwiński 2021-07-31 14:37:48 +02:00 committed by Otto winter
parent a6fac2b175
commit bdbd813455
No known key found for this signature in database
GPG key ID: 48ED2DDB96D7682C

View file

@ -1104,7 +1104,7 @@ def shorthand_input_pullup_pin(value):
def shorthand_analog_pin(value): def shorthand_analog_pin(value):
value = analog_pin(value) value = analog_pin(value)
return GPIO_FULL_INPUT_PIN_SCHEMA({CONF_NUMBER: value}) return GPIO_FULL_ANALOG_PIN_SCHEMA({CONF_NUMBER: value})
def validate_has_interrupt(value): def validate_has_interrupt(value):