Closed bhundven closed 1 year ago
At first glance, this looks very tidy and thorough, so :+1:, but nonetheless I'll have to dedicate some more time to actually read it and think it through. I'll get back on that later... just so you know I'm not ignoring this^^
I was thinking about adding just a new sensordevice that uses hwmon so you could just have a tag:
sensors:
- nvme: <model>
indices: [1]
but this is easier, and may apply to other device types that also provide a model name.
Updated the branch against latest origin/master.
but this is easier, and may apply to other device types that also provide a model name.
Yeah, I think I like it better with the model
keyword. It should work with non-nvme devices... At least HDD have it, too.
On NVME devices a file is available to differentiate them by model.
My thinkpad has one internal NVME slot, but I also use external USB-C and Thunderbolt NVME enclosures.
The internal slot shows up as hwmon3:
/sys/class/hwmon/hwmon3/device/model
Which contains:
WD_BLACK SN770 1TB
and some trailing white-space characters.This change adds an option to allow you to specify the model with or without the hwmon-name.
I have tested both configurations successfully:
and
Signed-off-by: Bryan Hundven bryanhundven@gmail.com