in my Home Assistant InfluxDB I want to figure out the heating temperatures difference. To get into Flux, I watched @Anaisdg’s introduction video, which let me to my solution approach.
But I keep running in following error, which I can’t make sense of: type error 16:6- 16:81: cannot unify string with semantic.array
Digging a bit into flux and semantic.array, I figured out it’s somehow related to the Go implementation of the Flux language and is way over my head. No idea what the message want’s to tell me.
As CSV data - Well, as new user’s are not allowed to upload data, I have put it in my iCloud… - Values may differ, as they are from different run script button pushes…
Just to clarify, you want to know the difference in temperature every minute between the oil_heating_temp_return_flow_3 and oil_heating_temp_supply_flow_3 ?
Are each of the above recorded into Influx using the same timestamp?
Exactly. The 1 minute interval isn’t mandatory. I just wanted to have a short enough interval to see, what happens, when one of the two sensors doesn’t deliver data in one of the periods and ensure it behaves nicely. I guess I will extend it to something longer like 5 minutes later, but have to play around a bit first.
No, they record independent from each other sadly. Hence, I did the |> aggregateWindow(every: 1m, fn: mean).
The createEmpty is more of a leftover from some tinkering around to test how it works.
The essence is, I want to have the area between the two curves roughly to see how much energy is transferred to the air in the house.
I did a quick mock-up of your data and this query works to calculate the difference between “oil_heating_temp_return_flow_3” and “oil_heating_temp_supply_flow_3”