This is a strange phenomenon in MySQL; Oracle and SQL Server won't even run this query. In a Select statement with a Group By clause, all items appearing in the Select list must also appear in the Group By list, except the aggregate functions. Rewrite your query as:
SELECT SensorID, State, NumKey, MAX(DateTimeEvent)
FROM Sensors
GROUP BY SensorID, State, NumKey