Error in log - sending data to Splunk

I’m getting an error in the home-assistant.log regarding Splunk. I am successfully getting data in Splunk, but something is having an issue.

17-04-13 16:28:11 ERROR (Thread-12) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/concurrent/futures/", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/", line 78, in splunk_event_listener, data=json.dumps(payload),
  File "/usr/lib/python3.4/json/", line 230, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python3.4/json/", line 192, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.4/json/", line 250, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python3.4/json/", line 173, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: datetime.datetime(2017, 4, 13, 16, 6, 30) is not JSON serializable

The error is happening sporadically (but happening all the time…) - i.e. sometimes it is 5 seconds apart, sometimes it is 40 seconds apart. My splunk config in configuration.yaml is:

  token: !secret splunk_token
  port: 8088