-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zone selection config for Time-of-Use-Tariff Awattar
Time-of-use-Tariff Awattar currently only offers price information for Germany. However, for users in Austria, a separate URL needs to be incorporated. In this implementation the system is updated by introducing a country selection option in the configuration. Users can now choose between Germany and Austria, and the system will provide country-specific prices accordingly. Co-authored-by: Sagar Venu <[email protected]> Co-authored-by: Hueseyin Sahutoglu <[email protected]>
- Loading branch information
1 parent
da53816
commit ca1f4a7
Showing
8 changed files
with
107 additions
and
11 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
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
29 changes: 29 additions & 0 deletions
29
...penems.edge.timeofusetariff.awattar/src/io/openems/edge/timeofusetariff/awattar/Zone.java
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,29 @@ | ||
package io.openems.edge.timeofusetariff.awattar; | ||
|
||
/** | ||
* Represents different energy market zones. | ||
*/ | ||
public enum Zone { | ||
|
||
/** | ||
* The energy market zone for Germany. | ||
*/ | ||
GERMANY, // | ||
|
||
/** | ||
* The energy market zone for Austria. | ||
*/ | ||
AUSTRIA; | ||
|
||
/** | ||
* Returns the API URL specific to the {@link Zone}. | ||
* | ||
* @return The {@link Zone} specific API URL. | ||
*/ | ||
public String toUrl() { | ||
return switch (this) { | ||
case GERMANY -> "https://api.awattar.de/v1/marketdata"; | ||
case AUSTRIA -> "https://api.awattar.at/v1/marketdata"; | ||
}; | ||
} | ||
} |
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