HomeAssistant-OctopusEnergy
HomeAssistant-OctopusEnergy copied to clipboard
Redemption of Octoplus Points automatically
Describe the feature
Is it possible to redeem Octoplus Points? If not, is it possible to add this feature? I don't see any point in holding them, just redeem them automagically.
Expected behaviour
A service call to redeem some or all Octoplus Points
Use Case
Octoplus Points redeemed automatically.
Confirmation
- [X] By submitting this feature request, you agree that you have read the documentation and confirmed it does not already exist
- [X] I am willing/able to help contribute to the solution of this feature
Hello and sorry for the late response.
This should be possible. There are limitations on number of points that are redeemable (number has to be divisible by 8). Therefore when added it should include the following
- The points sensor should be updated to include an attribute which determines the number of redeemable points.
- A new service (
octopus_energy_redeem_all_redeemable_points
) which takes the applicable points sensor and calls the api endpoint providing the value of the above attribute. 2a. If there are no redeemable points available, an error should occur 2b. Upon success, should remove the number of redeemed points from both the attribute and state. - Unit and integration tests for the above
- Blueprint which calls the service if the redeemable points attribute goes over a configurable threshold.
Example API call
mutation redeem_points($accountNumber: String!) {
redeemLoyaltyPointsForAccountCredit(input: {
accountNumber: $accountNumber,
points: 8
}) {
pointsRedeemed
}
}
This has now been included as part of v10.3.0
Awesome! Thanks!
Hi, how do I go about setting this up, I can see the entity but how do I setup the blueprint.
I tried using the install blueprint option you have but it gives an unknown error.
Sorry there was a slight bug in the docs around the installation of the blueprint, which should now be fixed.
That fixed it, thanks.