Skip to content

Commit

Permalink
fix: make sure all_rates doesn't have a unit of measure
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 committed Nov 4, 2023
1 parent c7ce04e commit 072214b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion custom_components/openei/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 072214b

Please sign in to comment.