Move hailo_platform import to get_hailo_temps

This commit is contained in:
tigattack 2025-12-01 19:21:35 +00:00
parent 7d5317959d
commit 513bede475

View File

@ -18,7 +18,6 @@ import cv2
import psutil import psutil
import py3nvml.py3nvml as nvml import py3nvml.py3nvml as nvml
import requests import requests
from hailo_platform import Device
from frigate.const import ( from frigate.const import (
DRIVER_AMD, DRIVER_AMD,
@ -552,6 +551,11 @@ def get_jetson_stats() -> Optional[dict[int, dict]]:
def get_hailo_temps() -> dict[str, float]: def get_hailo_temps() -> dict[str, float]:
"""Get temperatures for Hailo devices.""" """Get temperatures for Hailo devices."""
try:
from hailo_platform import Device
except ModuleNotFoundError:
return {}
temps = {} temps = {}
try: try: