mirror of
https://github.com/esphome/esphome.git
synced 2025-04-16 07:40:29 +01:00
Correction of error Option 'crc' is not supported for this reference for DS2413
This commit is contained in:
parent
a15cccba35
commit
15c1c42d46
@ -17,7 +17,7 @@ CONF_CRC = "crc"
|
|||||||
def validate_crc_option(config_list):
|
def validate_crc_option(config_list):
|
||||||
for conf in config_list:
|
for conf in config_list:
|
||||||
reference = conf.get("reference", "").upper()
|
reference = conf.get("reference", "").upper()
|
||||||
if not reference: # Si 'reference' n'est pas défini, on passe
|
if not reference or reference == "DS2413":
|
||||||
continue
|
continue
|
||||||
if reference == "DS2406" and "crc" not in conf:
|
if reference == "DS2406" and "crc" not in conf:
|
||||||
raise cv.Invalid("Option 'crc' is required when 'reference' is DS2406.")
|
raise cv.Invalid("Option 'crc' is required when 'reference' is DS2406.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user