diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 2696c1e..68f6e20 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -39,7 +39,7 @@ jobs: - name: Setup Python uses: "actions/setup-python@v1" with: - python-version: "3.8" + python-version: "3.11" - name: Install requirements run: python3 -m pip install -r requirements_tests.txt - name: Run tests diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 49b5f4c..19f1235 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -42,7 +42,7 @@ jobs: - name: Setup Python uses: "actions/setup-python@v1" with: - python-version: "3.8" + python-version: "3.11" - name: Install requirements run: python3 -m pip install -r requirements_tests.txt - name: Run tests diff --git a/custom_components/openei/__init__.py b/custom_components/openei/__init__.py index 487d3d8..7f8134c 100644 --- a/custom_components/openei/__init__.py +++ b/custom_components/openei/__init__.py @@ -160,7 +160,7 @@ def get_sensors(hass, config) -> dict: for sensor in SENSOR_TYPES: _sensor = {} value = getattr(rate, SENSOR_TYPES[sensor].key) - if isinstance(value, tuple): + if isinstance(value, tuple) and sensor is not "all_rates": _sensor[sensor] = value[0] _sensor[f"{sensor}_uom"] = value[1] else: