From da04b300fa420af0a8ae8c0d7479df0e680f4a28 Mon Sep 17 00:00:00 2001 From: apatel859 <48992974+apatel859@users.noreply.github.com> Date: Wed, 20 May 2026 12:58:40 -0400 Subject: [PATCH] RDKEMW-21159: avoid thermal call in deepsleep (#548) * RDKEMW-21159: avoid thermal call in deepsleep Signed-off-by: apatel859 * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: apatel859 Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- lib/rdk/temperature-telemetry.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/rdk/temperature-telemetry.sh b/lib/rdk/temperature-telemetry.sh index f2841cdc..dd6a33d5 100644 --- a/lib/rdk/temperature-telemetry.sh +++ b/lib/rdk/temperature-telemetry.sh @@ -21,7 +21,14 @@ if [ -f /lib/rdk/t2Shared_api.sh ]; then source /lib/rdk/t2Shared_api.sh fi -boardTemp=`/bin/cat /sys/class/thermal/thermal_zone0/temp | sed 's/./&./2'`c + +powerState=$(/usr/bin/QueryPowerState) + +if [ "$powerState" != "DEEPSLEEP" ]; then + boardTemp=`/bin/cat /sys/class/thermal/thermal_zone0/temp | sed 's/./&./2'`c +else + boardTemp="Device in Deepsleep" +fi /bin/echo Temperature:$boardTemp t2ValNotify "Board_temperature_split" "$boardTemp"