I think something broken in recent updates, though I am a bit unsure which. I THINK it was HA Core.
I have grafana queries that look like this:
select mean(Watts) from "Watts" WHERE "ct" !~ /Total/ AND $timeFilter GROUP BY time($__interval), "ct" fill(linear) tz('America/New_York')
InfluxDB returned error: error parsing query: found \, expected identifier, string, number, bool at line 1, char 126
This used to work. [**** Update see 2nd response below ****] To save you the trouble character 126 is between the ‘r’ and ‘i’ in America. And there’s no backslash in the query, nor in any of the data values.
If I take this into influxdb, removing $timeFilter and changing the interval as follows:
use HA; select mean(Watts) from "Watts" WHERE "ct" !~ /Total/ GROUP BY time(1h), "ct" fill(linear) tz('America/New_York')
It works just fine, so it’s not influxdb that is unhappy. My GUESS is that some aspect of grafana passing the query to influxdb is breaking the format. I don’t know how to see the query passed, and influxdb has nothing interesting in the log, at least that I know how to find.
Interestingly if I remove the forward slash ('AmericaNew_York") I get the expected error that it is unable to find “AmericaNew_York” as a time zone, but the backslash error is gone. So I THINK this is related to an attempt to escape the forwardslash. If I attempt to escape the forward slash with an explicit backslash I still get the error finding the backslash.
Things I’ve done recently were updating core from 2024.9.3 to 2024.11.1 and grafana from 10.0.2 to 10.1.3. I rolled the latter back without change. I’m always afraid about rolling HA back so have not tried that. I am not 100% sure when it last worked, but almost certain those are the only things involved, which is why I am saying I think this is HA related not Grafana related, though emphasis on “think”.
Is this just me?
Did an HA update break escaping of strings somehow?
Linwood
PS. I put this in configuration as I do not know where to put “did the latest HA break this”, apologies if it’s the wrong place.