Writing Data to External DataBase

The way this person solved it was to add an attribute to their sensor that updated every 5 minutes.