Debian Codegraph @

/

debian rpi-bad-power 0.1.0-2debian python3-rpi-bad-power debianinimakefilemarkdownpythonshelltomlyaml 23 files · 51 symbols
View dependency graph

Depends on

README (full)

rpi-bad-power

A Python library to detect bad power supply on Raspberry Pi. This library is mainly built for the Raspberry Pi Power Supply Checker integration of HomeAssistant. It should also work for other purpose.

Compatibility

This library only works on kernel 4.14+. It supports getting the under voltage bit from different entries.

Related PRs:

Usage

Here is an example on how to use this library.

from rpi_bad_power import new_under_voltage

under_voltage = new_under_voltage()
if under_voltage is None:
    print("System not supported.")
elif under_voltage.get():
    print("Under voltage detected.")
else:
    print("Voltage is normal.")

Credits

Some of the code are based on custom-components/sensor.rpi_power maintained by @swetoast.

dir .github/
dir debian/
dir rpi_bad_power/
file .gitignore
file .pre-commit-config.yaml
file .yamllint
file LICENSE
file README.md
file pyproject.toml
file setup.cfg
file setup.py
file test_rpi_bad_power.py