magico13 / PyEmVue

Python Library for the Emporia Vue Energy Monitor
MIT License
185 stars 36 forks source link

Error retrieving device usage #20

Closed ifuchs closed 2 years ago

ifuchs commented 2 years ago

Per the doc, After logging in and getting tokens, I am trying this:

channel_usage_list = vue.get_devices_usage(deviceGids, None, scale=Scale.DAY.value, unit=Unit.KWH.value)

Traceback (most recent call last): File "", line 1, in File "/Users/ihf/opt/anaconda3/lib/python3.7/site-packages/pyemvue/pyemvue.py", line 88, in get_devices_usage if channel: channels.append(VueDeviceChannelUsage().from_json_dictionary(channel)) File "/Users/ihf/opt/anaconda3/lib/python3.7/site-packages/pyemvue/device.py", line 97, in from_json_dictionary if 'value' in js['usage']: TypeError: argument of type 'NoneType' is not iterable

I thought this used to work but has anyone else seen this?

magico13 commented 2 years ago

Make sure you're using 0.12.4, pretty sure I fixed that bug in that version.

ifuchs commented 2 years ago

That was it. Thanks!