Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump actions/checkout from 2 to 3.1.0 #57

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/[email protected]
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/[email protected]
id: python
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/[email protected]
id: python
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/[email protected]
id: python
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Register hadolint problem matcher
run: |
echo "::add-matcher::.github/workflows/matchers/hadolint.json"
Expand All @@ -228,7 +228,7 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/[email protected]
id: python
Expand Down Expand Up @@ -276,7 +276,7 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/[email protected]
id: python
Expand Down Expand Up @@ -324,7 +324,7 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/[email protected]
id: python
Expand Down Expand Up @@ -369,7 +369,7 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/[email protected]
id: python
Expand Down Expand Up @@ -417,7 +417,7 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/[email protected]
id: python
Expand Down Expand Up @@ -463,7 +463,7 @@ jobs:
# needs: prepare-base
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v2
# uses: actions/checkout@v3.1.0
# - name: Run ShellCheck
# uses: ludeeus/[email protected]

Expand All @@ -473,7 +473,7 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/[email protected]
id: python
Expand Down Expand Up @@ -525,7 +525,7 @@ jobs:
container: homeassistant/ci-azure:${{ matrix.python-version }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name:
Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
Expand Down Expand Up @@ -553,7 +553,7 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/[email protected]
id: python
Expand Down Expand Up @@ -589,7 +589,7 @@ jobs:
container: homeassistant/ci-azure:${{ matrix.python-version }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
uses: actions/cache@v2
Expand Down Expand Up @@ -624,7 +624,7 @@ jobs:
container: homeassistant/ci-azure:${{ matrix.python-version }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
uses: actions/cache@v2
Expand Down Expand Up @@ -658,7 +658,7 @@ jobs:
container: homeassistant/ci-azure:${{ matrix.python-version }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
uses: actions/cache@v2
Expand Down Expand Up @@ -694,7 +694,7 @@ jobs:
container: homeassistant/ci-azure:${{ matrix.python-version }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
uses: actions/cache@v2
Expand Down Expand Up @@ -754,7 +754,7 @@ jobs:
container: homeassistant/ci-azure:${{ matrix.python-version }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0
- name: Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
uses: actions/cache@v2
Expand Down
7 changes: 3 additions & 4 deletions homeassistant/components/sensehat/sensor.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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):
Expand Down