Moved animation logic to sensor update callback