Restructure render functions
Some improvements on how render functions are structured, auto-changed and named:
- Calculate constant
NUM_MODES
- Rename
state
tocurrent_animation
- Automatic animation change can be stopped via MQTT
Taken from the home-assistant branch.