crismc / homeassistant_addons

Add-ons for Home Assistant, allow you to extend the functionality around your Home Assistant setup.
MIT License
14 stars 6 forks source link

[Bug]: CPU load data does not populate. It's showing 0.000.00% #4

Closed crismc closed 1 year ago

crismc commented 1 year ago

Requirements

Current Behavior

CPU load data does not populate. It's showing 0.000.00%

Expected Behavior

CPU load is expected to show the current CPU load, which isnt 0.000.00%

Steps To Reproduce

  1. Run the CPU screen on any distribution
  2. CPU screen shows 0.000.00%

Context

YAML state

Environment

- Browser:
- HA Version:
- I2C_OLED: 1.0.3

Anything else?

No response

crismc commented 1 year ago

Command being run to obtain CPU load is: top -bn1 | grep load | awk '{printf "%.2f", $(NF-2)}'

This is a typo, and should be: top -bn1 | grep Load | awk '{printf "%.2f", $(NF-2)}'