LAB02-Research / HASS.Agent

Windows-based client for Home Assistant. Provides notifications, quick actions, commands, sensors and more.
https://hassagent.lab02-research.org
MIT License
1.6k stars 74 forks source link

Bug: #331

Open kulnis182 opened 1 year ago

kulnis182 commented 1 year ago

CPU usage is completely off while reporting For example. CPU usage is 12% or even higher but HASS ussually report as 1 or 2 % Processor I7 10700K Windows 11 image

All other metric are correct

amadeo-alex commented 1 year ago

Hello, please use the bug report template and update the issue title to reflect "one sentence" issue description. HASS.Agent uses performance counter for the CPU Load, for me it also gives "strange value" (value not matching what can be seen in the task manager. This'll need more investigation/tests.

amadeo-alex commented 1 year ago

Yeah, looks like the PerformanceCounterSensor class is doing some rounding-shenanigans which cause the value to be off by a "bit": obraz obraz

Edit: scratch above, NextValue() is called two times right after another, will create PR to fix this in a sec.