emonHP duplicate inputs from Home Assistant

There is an issue open on that, I presume it is the same problem

https://github.com/home-assistant/core/issues/151959#issuecomment-3276215771

The previous version of the integration was sending a false json payload

So maybe replacing line 67 by this could solve the problem

```
if conf.get("legacy_mode", False):
    payload = ",".join(f"{key}:{val}" for key, val in payload_dict.items())
    await client.async_input_post(f"{{{payload}}}", node=node)
else:
    await client.async_input_post(payload_dict, node=node)
```

But as I cannot test, I am not sure. If I could reproduce and test this I could submit a PR

I add just a pair of inputs concerned, with short names and when i started using the new implementation, i add no problem with the processes.

@LeiChat : the input/post API path is in the external lib, using an external lib is required by the HA team.

1 Like