mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Solve missing automatic update of struct configuration in modbus (#54193)
This commit is contained in:
parent
a001fd5000
commit
8a4674c086
@ -86,6 +86,7 @@ def struct_validator(config):
|
|||||||
_LOGGER.warning(error)
|
_LOGGER.warning(error)
|
||||||
try:
|
try:
|
||||||
data_type = OLD_DATA_TYPES[data_type][config.get(CONF_COUNT, 1)]
|
data_type = OLD_DATA_TYPES[data_type][config.get(CONF_COUNT, 1)]
|
||||||
|
config[CONF_DATA_TYPE] = data_type
|
||||||
except KeyError as exp:
|
except KeyError as exp:
|
||||||
error = f"{name} cannot convert automatically {data_type}"
|
error = f"{name} cannot convert automatically {data_type}"
|
||||||
raise vol.Invalid(error) from exp
|
raise vol.Invalid(error) from exp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user