Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Fix Mode Change (Arm/Disarm) #49

Merged
merged 2 commits into from
Oct 9, 2017
Merged

Fix Mode Change (Arm/Disarm) #49

merged 2 commits into from
Oct 9, 2017

Conversation

jwillaz
Copy link
Collaborator

@jwillaz jwillaz commented Oct 7, 2017

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.

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.
@coveralls
Copy link

coveralls commented Oct 7, 2017

Coverage Status

Coverage increased (+0.2%) to 81.117% when pulling d323112 on jwillaz:mode_change_fixes into 2d8b535 on tchellomello:master.

@tchellomello
Copy link
Owner

Great idea on caching the data. I think part of the performance problem I had on HA 0.55 was related to that.

@tchellomello tchellomello self-requested a review October 8, 2017 06:56
Copy link
Owner

@tchellomello tchellomello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just address the lint issues and it's ready for merge.

@coveralls
Copy link

coveralls commented Oct 9, 2017

Coverage Status

Coverage increased (+0.2%) to 81.117% when pulling 8cd1fef on jwillaz:mode_change_fixes into 2d8b535 on tchellomello:master.

@tchellomello
Copy link
Owner

Thanks for your contribution @jwillaz

@tchellomello tchellomello merged commit aa6ecdb into tchellomello:master Oct 9, 2017
@broox
Copy link
Collaborator

broox commented Oct 9, 2017

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...

https://github.com/pydanny/cached-property

@jwillaz jwillaz deleted the mode_change_fixes branch October 11, 2017 04:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants