New Power Consumption Platform

I am trying to create pawer consumption history sensor based on "History Statistics Sensor"
I have created file based on

I have replaced
track_state_change(hass, entity_id, force_refresh)
by this row
track_time_interval(hass, force_refresh, SCAN_INTERVAL)
Update state every 10 minutes.
It works but Update function culled twice per time. I dont know why???

17-03-30 20:46:58 INFO (Thread-8) [homeassistant.components.sensor.history_total] Update
17-03-30 20:46:59 INFO (Thread-1) [homeassistant.components.sensor.history_total] Update

If any body knows what happend, Let me know. I will appreciate.