Compare commits
2 Commits
d7872ed620
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 13c419353c | |||
| 3d6e77a9e7 |
@@ -9,5 +9,5 @@ sudo cp upsmon.service /etc/systemd/system/upsmon.service
|
|||||||
sudo systemctl daemon-reexec
|
sudo systemctl daemon-reexec
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl enable upsmon.service
|
sudo systemctl enable upsmon.service
|
||||||
sudo systemctl start upsmon.service
|
sudo systemctl restart upsmon.service
|
||||||
|
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ CMD: list[str] = ['apcaccess', '-u']
|
|||||||
T_LONG: float = 15.0
|
T_LONG: float = 15.0
|
||||||
T_SHORT: float = 5.0
|
T_SHORT: float = 5.0
|
||||||
EXPORT_KEYS: list[str] = [
|
EXPORT_KEYS: list[str] = [
|
||||||
'UPSNAME', 'STATUS', 'LINEV', 'LOADPCT', 'BCHARGE', 'TIMELEFT', 'ITEMP', 'BATTV', 'LINEFREQ'
|
'UPSNAME', 'STATUS', 'LINEV', 'LOADPCT', 'BCHARGE', 'TIMELEFT', 'ITEMP', 'BATTV', 'LINEFREQ', 'TONBATT', 'CUMONBATT', 'NUMXFERS'
|
||||||
]
|
]
|
||||||
|
|
||||||
def clean_data(v: str) -> float | str:
|
def clean_data(v: str) -> float | str:
|
||||||
if v.isalpha():
|
if v.replace(" ","").isalpha():
|
||||||
return v
|
return v
|
||||||
return float(v)
|
return float(v)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user