TheLastProject / PyEssent

A wrapper around Essent's API
Apache License 2.0
4 stars 4 forks source link

Issue when having multiple connections #5

Closed mdridder closed 5 years ago

mdridder commented 5 years ago

Hello,

When trying to integrate my essent stats with my home assistant i receive a warning that it couldnt find any meter readings. I do have turned on the option on the essent website.

After some debugging I noticed that the problem might be related to multiple connections. I moved some years ago and both my old connection and new connection are available in the results. In the 'get_EANs' function it uses the first connection but in my case it needs to use the second one. (line 151)

An example of the connection part of my response: `

old
old_one old_ean old_ean old_ean
new
new_ean1 new_ean2

`

So probably the fix is that simple to just also loop over the connections.

Best, Michel

TheLastProject commented 5 years ago

Should be fixed in #6.