HASS.Agent icon indicating copy to clipboard operation
HASS.Agent copied to clipboard

Misc: Any way to change sensor class for WMI queries ?

Open Karmak23 opened this issue 1 year ago • 2 comments

Hello,

I use custom queries for radeon load/temperature for example ; using default "gpu temperature" leads to "unavailable" results.

Having created custom sensors with WMI queries, they all appear as "state" sensors on the HA side (perhaps the word is wrong, sorry).

This makes temperatures and load sensors not display as graphs and barely readable / usable. I can just show the current state which gives me the current value, but history is unusable. It shows, but not as a graph.

Note that the default CPU temperature/load sensors show up as expected (but they are not WMI queries). Thus their class seems OK.

Perhaps we need a supplemental dropdown when creating WMI queries to set the sensor class ? (eg "measurement" ? I'm not at ease with HA terminology).

If you need more information, just ask, I can do screenshots or whatever needed.

Meanwhile, is there a way to change the sensor class / type class directly in a configuration file on the hass.agent side ?

I didn't search in hass.agent folders for now.

But i’m comfortable editing yaml files, so if there is a manual way, that would satisfy me.

  • and I will be happy to submit PR’s for the related documentation ;
  • even if reopening the sensors GUI makes loosing these custom attributes, I would understand.

Thanks a lot for your work.

Karmak23 avatar Jun 08 '23 20:06 Karmak23

Hello,

Could you please provide:

  • the custom WMI query that you've created
  • output of the mentioned WMI query

amadeo-alex avatar Jul 03 '23 16:07 amadeo-alex

Hello, I have the same question.

  • My query - SELECT value FROM Sensor WHERE Name LIKE "%CPU Core%" AND SensorType = "Temperature" - i think it's pretty standard
  • output looks like number: image

I use LibreHardwareMonitor as a source

Kirmas avatar Mar 10 '24 06:03 Kirmas