diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3d65df477e7605..64507fd40107a9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -771,7 +771,7 @@ jobs: echo "Failed to restore Python virtual environment from cache" exit 1 - name: Download all coverage artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 - name: Combine coverage results run: | . venv/bin/activate diff --git a/homeassistant/components/sensehat/sensor.py b/homeassistant/components/sensehat/sensor.py index 3966e52f1a8508..67beb021d899bb 100644 --- a/homeassistant/components/sensehat/sensor.py +++ b/homeassistant/components/sensehat/sensor.py @@ -1,7 +1,7 @@ """Support for Sense HAT sensors.""" from datetime import timedelta import logging -import os +from pathlib import Path from sense_hat import SenseHat import voluptuous as vol @@ -43,9 +43,8 @@ def get_cpu_temp(): """Get CPU temperature.""" - res = os.popen("vcgencmd measure_temp").readline() - t_cpu = float(res.replace("temp=", "").replace("'C\n", "")) - return t_cpu + t_cpu = Path("/sys/class/thermal/thermal_zone0/temp").read_text().strip() + return float(t_cpu) * 0.001 def get_average(temp_base):