* change processor_temperature icon
to indicate the temperature, using "mdi:thermometer"
* add DEVICE_CLASS_TEMPERATURE,
* add None for icon
* remove Icon from Last boot
since it uses the device_class already
Some systems expose cpu temperatures differently in
psutil. Specifically, running armbian on the Odroid xu4 sbc gives the
following temerature output:
>>> pp.pprint(psutil.sensors_temperatures())
{ 'cpu0-thermal':
[ shwtemp(label='', current=54.0, high=115.0, critical=115.0)],
'cpu1-thermal':
[ shwtemp(label='', current=56.0, high=115.0, critical=115.0)],
'cpu2-thermal':
[ shwtemp(label='', current=58.0, high=115.0, critical=115.0)],
'cpu3-thermal':
[ shwtemp(label='', current=56.0, high=115.0, critical=115.0)],
}
Since the cpu number is embedded inside the name, the current code
can't find it.
To fix this, check both the name and the constructed label for matches
against CPU_SENSOR_PREFIXES, and add the appropriate label
cpu0-thermal in the prefix list.
While this is slightly less efficient that just generating the label
and checking it, it results in easier to understand code.
- Remove unneeded excinfo to _LOGGER.exception
- Use f-strings
- Switch last_boot to utc
- Cache psutil/os calls used by multiple attributes in the same update cycle
* Remove unit from garmin connect
* Remove unit from hvv departures
* Remove device class timestamp from device condition and trigger
* Remove unit from systemmonitor
* Use device class constant for timestamp in ring
* Added check for mandatory "arg" of sensors
* Make pylint happy
* Moved to vol validator function for "arg" checks
* Make pylint happy once again
* Adjustments from code review
* Improvements for systemmonitor
* Use MDI CPU icon (bit architecture determined at runtime)
* Consistent usages of "percent" (ensured backwards compatibility by explicity setting the entity_id)
* Default value "/" (root) for disk_* sensors to prevent runtime issues if not specified in configuration
* Added CPU temperature sensor to systemmonitor
* Code streamlining of CPU temperature retrieval
* Corrected sensor state handling and added "available" logic
* Corrected ENTITY_ID to include argument
* Optimized "available" handling & CPU temperature detection
* Corrected tuple for CPU temperature determination
* - Do not create CPU temperature entity if no sensor data can be read
- Re-use temperature sensor labels from "glances" integration
* Array fix
* Corrected sensor array access
* Handle empty temperature sensor labels (same logic as used by "glances")
* PR comments: Setting unique_ID and f-strings
* Removed unused constants
* Revert entity rename (wait until next release)