parse UPS data

This commit is contained in:
saqriphnix 2024-08-16 23:08:28 +03:00
parent aac320a0c8
commit fd2624040c
3 changed files with 53 additions and 5 deletions

20
misc/enums.py Normal file
View file

@ -0,0 +1,20 @@
from enum import StrEnum
class UPSStatus(StrEnum):
"""https://networkupstools.org/docs/developer-guide.chunked/new-drivers.html#_status_data
"""
ON_LINE = "OL"
ON_BATTERY = "OB"
BATTERY_LOW = "LB"
BATTERY_HIGH = "HB"
BATTERY_REPLACE = "RB"
BATTERY_CHARGING = "CHRG"
BATTERY_DISCHARGING = "DISCHRG"
UPS_BYPASS = "BYPASS"
"""Battery and connected devices are not protected from power outage!"""
UPS_OFFLINE = "OFF"
UPS_OVERLOAD = "OVER"
UPS_CALIBRATION = "CAL"