mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
[Modbus Controller] Fix code generation that was using incorrect int type and failing in some tests.
This commit is contained in:
parent
3350bafcb9
commit
06e65a0747
1 changed files with 3 additions and 3 deletions
|
@ -302,17 +302,17 @@ async def to_code(config):
|
|||
for conf in config.get(CONF_ON_COMMAND_SENT, []):
|
||||
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
||||
await automation.build_automation(
|
||||
trigger, [(int, "function_code"), (int, "address")], conf
|
||||
trigger, [(cg.int_, "function_code"), (cg.int_, "address")], conf
|
||||
)
|
||||
for conf in config.get(CONF_ON_ONLINE, []):
|
||||
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
||||
await automation.build_automation(
|
||||
trigger, [(int, "function_code"), (int, "address")], conf
|
||||
trigger, [(cg.int_, "function_code"), (cg.int_, "address")], conf
|
||||
)
|
||||
for conf in config.get(CONF_ON_OFFLINE, []):
|
||||
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
||||
await automation.build_automation(
|
||||
trigger, [(int, "function_code"), (int, "address")], conf
|
||||
trigger, [(cg.int_, "function_code"), (cg.int_, "address")], conf
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue