mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
parse UPS data
This commit is contained in:
parent
aac320a0c8
commit
fd2624040c
3 changed files with 53 additions and 5 deletions
20
misc/enums.py
Normal file
20
misc/enums.py
Normal 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"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue