Skip to content

USAGE_MAP indexation does not match for get_usage_data() #3

@Tekill91

Description

@Tekill91

In client.py,

USAGE_MAP = {"before_offpeak_download": 0,
             "before_offpeak_upload": 1,
             "before_offpeak_total": 2,
             "offpeak_download": 3,
             "offpeak_upload": 4,
             "offpeak_total": 5,
             "download": 6,
             "upload": 7,
             "total": 8}

I need to retrieve the total (down + up), but really the total is in fact "before_offpeak_total". I think it comes from line 141 which parse all "span", {"class": "switchDisplay" and the total is the span switcgDisplay index 2 and not 8.

Or if it is intended, maybe clarify that total is yesterday total.

By the way, I am using pyebox through homeassistant. And I don't have offpeak option activated.

Thanks, keep up the awesome work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions