Closed jorgror closed 10 months ago
Hmm. That's interesting... What API are you using to create the charger object? (I.e. there are a few different ways you can find a charger, possibly you are using a different method than what we use in the HA component, which would be why it was not noted before).
Easee.get_chargers()
Does using the circuit.get_chargers() as in the example in the readme work any differently for you?
This works:
easee = Easee(easee_username, easee_password)
sites = await easee.get_sites()
circuits = sites[0].get_circuits()
chargers = circuits[0].get_chargers()
This does not work without my fix:
easee = Easee(easee_username, easee_password)
chargers = await easee.get_chargers()
Ok, thanks for clearing that up.
Merging (to be tested before release).
Easee.get_chargers API call does not return userRole (at least on my user). This code will set userRole to -1 if missing in API-call.