Correct sensor selector so that available selectors match selected device
Autoload first chart
Use currying to avoid copy/paste for triggered functions
Prevent thrown error when there is no data
Clean up debug messages