Hi there, influxDB noob here.
iPhones reset the daily step count by writing a negative value of the sum of all steps from the last 24h every day at midnight . This is expected.
How can I automatically delete this negative measurement, let’s say every night at 00:01?
Goal is to create history views of my step counts in Grafana grouped by day. Which is currently not possible due to this daily reset.
I found “Continuous Queries”, e.g.:
CREATE CONTINUOUS QUERY "cq_steps" ON "your_database"
BEGIN
DELETE FROM "steps" WHERE "value" < 0
END
But I’m not able to apply this in InfluxDB UI in Home Assistant. All I get is a variety of errors, depending on how I alter the syntax.
Anyone out here willing to help a noob?
edit: alternativeley it would be even better to tell InfluxDB to ignore to record negative values before having them to delete afterwards. Is that possible?