telegraf_to_vu1/dial_configs/GPULoad.py
2024-12-02 18:28:01 +01:00

14 lines
440 B
Python

from dial_configs.dial_config import DialConfig
class GPULoad(DialConfig):
def __init__(self, target_dial, asset_path):
super().__init__(target_dial, asset_path, "gpu-load.png")
def transform_color(self, value):
return super().Colors.get_threshold_color(self, value)
def __eq__(self, other):
try:
return (other.get("name", "") == "gpu_busy_percent")
except Exception:
return False