lsiddiquee / com.rexwel.bmwconnected

GNU General Public License v3.0
2 stars 3 forks source link

`Device#setCapabilityOptions` being called a lot #27

Closed robertklep closed 1 year ago

robertklep commented 1 year ago

I noticed in a diagnostics report for my own app HomeKitty that your app is changing devices quite often, which I traced down to calls being made to setCapabilityOptions (for example here).

According to the documentation, this is an expensive operation so should only be called when needed 😊 It looks like you can make those calls to the device's onInit instead of with every status update.

lsiddiquee commented 1 year ago

Thanks @robertklep for pointing this out. I will work on to improve this.

lsiddiquee commented 1 year ago

Fixed with PR #32