Skip to content

Commit

Permalink
fix: error while loading (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
stabbylambda authored Nov 2, 2024
1 parent 606ed0d commit 376cd76
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions custom_components/openei/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@
name="Plan Name",
icon="mdi:tag",
),
"current_rate_structure": SensorEntityDescription(
key="current_rate_structure",
name="Current Rate Structure",
"current_energy_rate_structure": SensorEntityDescription(
key="current_energy_rate_structure",
name="Current Energy Rate Structure",
icon="mdi:tag",
),
"all_rates": SensorEntityDescription(
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def mock_api():
'"Fake Utility Co": [{"name": "Fake Plan Name", "label": "randomstring"}]'
)
mock_api.return_value.all_rates = [0.24477, 0.007]
mock_api.return_value.current_rate_structure = 4
mock_api.return_value.current_energy_rate_structure = 4

yield mock_api

Expand Down
4 changes: 3 additions & 1 deletion tests/test_sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

FAKE_MINCHARGE_SENSOR = "sensor.fake_utility_co_minimum_charge"
FAKE_CURRENT_RATE_SENSOR = "sensor.fake_utility_co_current_energy_rate"
FAKE_CURRENT_RATE_STRUCTURE_SENSOR = "sensor.fake_utility_co_current_rate_structure"
FAKE_CURRENT_RATE_STRUCTURE_SENSOR = (
"sensor.fake_utility_co_current_energy_rate_structure"
)

pytestmark = pytest.mark.asyncio

Expand Down

0 comments on commit 376cd76

Please sign in to comment.