Closed the-metalgamer closed 7 years ago
I'd actually remove that enum. Let's simply make it a string and ask people to use ISO 4217 format. An API update should not be necessary just because there's a new (crypto?)currency.
I wonder how this field is actually being used. Right now there seem to be 2 spaces publishing an account balance:
+ Checking space Edinburgh Hacklab
Account balance: [{'value': 1.03163697, 'unit': 'BTC', 'location': 'Bitcoin'}]
+ Checking space FabLab Nürnberg
Account balance: [{'value': 844.3, 'unit': 'EUR', 'name': 'Matomat Balance', 'description': 'Summarized balance of all Matomat2 users'}]
I'd actually remove that enum. Let's simply make it a string and ask people to use ISO 4217 format. An API update should not be necessary just because there's a new (crypto?)currency
Right, I do a pull request!
All currency related properties should allow all ISO codes from ISO 4217 Official Spreadsheet
It only requires adding all the ISO codes to the enum.
This does currently only affect
sensors.account_balance
.