Fix bug in switch template.
Initial commit with monitor.
Update monitor to use an object.

This improves hiding of the code, also is a step towards being able to create more of these graphs.
This also incorporates fkaspars changes.
Ensure emit UTC timestamp, ensure parsing of float
Fix bug in push_to_db

Check if "id" actually exists, which means the document was found.