Fix raising vol.Invalid during mqtt config validation instead of ValueError (#103764)

pull/104348/head
Jan Bouwhuis 2023-11-13 22:59:03 +01:00 committed by Franck Nijhof
parent df3e49b24f
commit 8a152a68d8
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ def valid_humidity_state_configuration(config: ConfigType) -> ConfigType:
CONF_HUMIDITY_STATE_TOPIC in config
and CONF_HUMIDITY_COMMAND_TOPIC not in config
):
raise ValueError(
raise vol.Invalid(
f"{CONF_HUMIDITY_STATE_TOPIC} cannot be used without"
f" {CONF_HUMIDITY_COMMAND_TOPIC}"
)