Quantcast
Viewing all articles
Browse latest Browse all 205

Homeassistant gas calculation daily base

Hi,

i am using a home assitant helper to get daily consumption of my gas.
I try to get it via influxdb 2 in grafana.
My query looks like:

import "timezone"
option location = timezone.location(name: "Europe/Berlin")
from(bucket: "HomeAssistant")

  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["friendly_name"] == "Gaszähler täglich")
  |> filter(fn: (r) => r["_field"] == "value")
  |> set(key: "_field", value: "VerbrauchHa2")
  |> aggregateWindow(every: 24h, fn: max, createEmpty: false)


I have two problems:

  1. i want to hide TODAY → I only want to have “full” days
  2. The date displayed has an offset of one today to much.
    I mean the last tag of the day before is mapped to the actual day.

7 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 205

Trending Articles