1
0
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:
Thierry DUVERNOY 2025-01-17 14:21:52 +01:00
parent a15cccba35
commit 15c1c42d46

View File

@ -17,7 +17,7 @@ CONF_CRC = "crc"
def validate_crc_option(config_list):
for conf in config_list:
reference = conf.get("reference", "").upper()
if not reference: # Si 'reference' n'est pas défini, on passe
if not reference or reference == "DS2413":
continue
if reference == "DS2406" and "crc" not in conf:
raise cv.Invalid("Option 'crc' is required when 'reference' is DS2406.")