Min/Max Temp over Day/Week/Year with Time Stamp

Hi,

i try to figure out what is the best way to display my min/max values of my outside temperature sensors over a day/week/month year with time stamp

i store my data to influxdb

i dont know how to get the data out to do something like

todays min temp:

2°C at 01:00

todays max temp:

10° at 08:00

and so on

what would be the best solution?

thank you

Hi
Influx Data can be queried as a sensor in homeassistant. So your sensor for the highest temperature from the last 24h could look as follows:

sensor:
    - platform: influxdb
      api_version: 2
      ssl: false
      host: <your ip>
      port: <your port>
      token: <your token>
      organization: <your organization>
      bucket: <your bucket name>
      queries_flux:
        - bucket: home_assistant/autogen
          name: "daily_max"
          query: >
              filter(fn: (r) => r["domain"] == "sensor")
              |> filter(fn: (r) => r["_field"] == "value")
              |> filter(fn: (r) => r["entity_id"] == "my_temp_sensor")
          range_start: "-1d"
          group_function: max

This is for a Influx 2.x instance, you will need to adapt it to your configuration (see link above). It will give you a sensor obtaining the max value of the temperature of the last 24h. Unfortunately i also don’t know how to get the timestamp so i would also be courious if anyone has some info on that…