-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added support for business tariffs (5 hours dev time)
- Loading branch information
1 parent
efa8d98
commit 804cd9d
Showing
54 changed files
with
497 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Repairs - Unknown product | ||
|
||
If you receive this error around one or more of your tariffs, it's because the Octopus Energy API can not find the product associated with your tariff. This usually occurs if you're on a tariff which is currently internal and has not been exposed. In this scenario, you should [raise an issue](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues) with the tariff code and your meter information, which can be obtained by following the [FAQ](../faq.md#ive-been-asked-for-my-meter-information-in-a-bug-request-how-do-i-obtain-this). |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
from ..utils import get_active_tariff_code | ||
from ..utils import Tariff, get_active_tariff | ||
|
||
def get_meter_tariffs(account_info, now): | ||
def get_meter_tariffs(account_info, now) -> "dict[str, Tariff]": | ||
meters = {} | ||
if account_info is not None and len(account_info["electricity_meter_points"]) > 0: | ||
for point in account_info["electricity_meter_points"]: | ||
active_tariff_code = get_active_tariff_code(now, point["agreements"]) | ||
if active_tariff_code is not None: | ||
meters[point["mpan"]] = active_tariff_code | ||
active_tariff = get_active_tariff(now, point["agreements"]) | ||
if active_tariff is not None: | ||
meters[point["mpan"]] = active_tariff | ||
|
||
return meters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.