Bugfix: Fixed absurd percentage values in hardware recommendations (e.g. "Memory pressure is impacting score (5698.1%)") when a
manually configured CPU or RAM sensor reports absolute values (MB, MHz) instead of percent.
Root cause: On systems without PSI support, HAGHS falls back to the user-configured sensors. If a sensor like sensor.memory_use
(reporting MB) was selected instead of sensor.memory_use_percent, the raw value was passed directly into both the penalty calculation
and the recommendation display, resulting in wildly inflated percentages and maximum penalties.
What changed:
- CPU and RAM classic sensor values are now clamped to a 0–100 range
- A WARNING log entry is written when an out-of-range value is detected, guiding the user to select the correct sensor
User action: If you see the warning in your HA logs, go to Settings → Integrations → HAGHS → Configure and ensure your RAM/CPU sensors report percent (e.g. sensor.memory_use_percent, not sensor.memory_use).