mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 18:18:21 +00:00
Solve missing automatic update of struct configuration in modbus (#54193)
This commit is contained in:
parent
3a17e22982
commit
94e26df6d3
@ -72,6 +72,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