1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-22 05:02:23 +01:00

Fix some configs after #5181 (#5209)

This commit is contained in:
Jesse Hills
2023-08-07 11:48:23 +12:00
committed by GitHub
parent 0ae3fcb0b7
commit 00f9af70a9
9 changed files with 27 additions and 22 deletions

View File

@@ -17,11 +17,11 @@ CONF_ON_FRAME = "on_frame"
def validate_id(config):
if can_id := config.get(CONF_CAN_ID):
id_ext = config[CONF_USE_EXTENDED_ID]
if not id_ext:
if can_id > 0x7FF:
raise cv.Invalid("Standard IDs must be 11 Bit (0x000-0x7ff / 0-2047)")
can_id = config[CONF_CAN_ID]
id_ext = config[CONF_USE_EXTENDED_ID]
if not id_ext:
if can_id > 0x7FF:
raise cv.Invalid("Standard IDs must be 11 Bit (0x000-0x7ff / 0-2047)")
return config