Closed jwillaz closed 7 years ago
Great idea on caching the data. I think part of the performance problem I had on HA 0.55
was related to that.
Thanks for your contribution @jwillaz
Another way to do this may be to simply use the cached_property
decorator. This may be useful for several other properties here as well...
Add caching of modes so they are not retrieved each time a change is called (reduces mode change from ~10 seconds to 3-4 seconds). Add checks for 'None' instances and make mode change generally more resilient.