Bug report (?) : inconsistent results when doing a sum

Oh you are right, i assumed your values would be positive. You can have grafana display the number of values per time slot like so:

SELECT count(value), time
FROM teleinformation
WHERE code_device IN ('device_1_P', 'device_2_P', 'device_3_P', 'device_4_P', 'device_5_P', 'device_6_P', 'device_7_P', 'device_8_P', 'device_9_P', 'device_10.1_P', 'device_11.1_P', 'device_12.1_P')
GROUP BY time
ORDER BY time