mirror of
https://github.com/esphome/esphome.git
synced 2025-10-26 04:33:47 +00:00
[mlx90393] Add verification for register contents (#8279)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -63,6 +63,11 @@ def _validate(config):
|
||||
raise cv.Invalid(
|
||||
f"{axis}: {CONF_RESOLUTION} cannot be {res} with {CONF_TEMPERATURE_COMPENSATION} enabled"
|
||||
)
|
||||
if config[CONF_HALLCONF] == 0xC:
|
||||
if (config[CONF_OVERSAMPLING], config[CONF_FILTER]) in [(0, 0), (1, 0), (0, 1)]:
|
||||
raise cv.Invalid(
|
||||
f"{CONF_OVERSAMPLING}=={config[CONF_OVERSAMPLING]} and {CONF_FILTER}=={config[CONF_FILTER]} not allowed with {CONF_HALLCONF}=={config[CONF_HALLCONF]:#02x}"
|
||||
)
|
||||
return config
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user