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.
We plan on matching with _airplay which means we need
to able to limit to specific manufacturers to avoid
generating flows for integrations with the wrong
manufacturer
* raise an exception when event_type exceeds the max length that the recorder supports
* add test
* use max length constant in recorder
* update config entry reloaded service name
* remove exception string function because it's not needed
* increase limit to 64 and revert event name change
* fix test
* assert exception args
* fix test
* add comment about migration
* Solve cast delaying startup when devices are slow to setup
* Update homeassistant/components/cast/media_player.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* New integration for Kostal Plenticore solar inverters.
* Fix errors from github pipeline.
* Fixed test for py37.
* Add more test for test coverage check.
* Try to fix test coverage check.
* Fix import sort order.
* Try fix test code coverage .
* Mock api client for tests.
* Fix typo.
* Fix order of rebased code from dev.
* Add new data point for home power.
* Modifications to review.
Remove service for write access (for first pull request). Refactor
update coordinator to not use the entity API.
* Fixed mock imports.
* Ignore new python module on coverage.
* Changes after review.
* Fixed unit test because of config title.
* Fixes from review.
* Changes from review (unique id and mocking of tests)
* Use async update method. Change unique id. Remove _dict
* Remove _data field.
* Removed login flag from PlenticoreUpdateCoordinator.
* Removed Dynamic SoC sensor because it should be a binary sensor.
* Remove more sensors because they are binary sensors.