hardbyte / hardbyte/python-evnex
Make distributionByTariff data available as totalCost value is not accurate with TimeOfUse
- 主要語言
- Python
- 星號
- 13
- 分支
- 8
- 平均合併
- 5 小時 58 分鐘
- 30 天內合併 PR
- 2
描述
The API totalCost value does not accurately represent the actual cost where time-of-use tarrifs are in use. Evnex describe this as a legacy value, one that appears to use a single tariff where that tariff lacks precision. In Home Assitant time-of-use tariff's can be added in a template as an example and with totalEnergyUsage we can calculate a more accurate cost. Except where there is a mix of solar and grid energy, as we don't know the mix of grid and solar energy. However this is contained in the get session response.
"totalEnergyUsage": {
"total": 1041.0,
"distributionByTariff": { -- If these values could be surfaced we could work out the true cost ourselves
"solar": 88.9, -- either including solar export as a percieved cost or just a zero value.
"flat": 11.1
},
"distributionByEnergySource": {
"cogeneration": 0.1,
"gas": 0.1,
"geothermal": 2.4,
"hydro": 7,
"localSolar": 88.9,
"solar": 0.2,
"wind": 1.3
}
},
"totalCost": {
"currency": "NZD",
"amount": 0.0348, -- This is not a correct value where time of use tariffs are used.
"distribution": {
"flat": 100
}
I am going to attempt this myself, but I am not a Dev so raising it here as a backstop.
Regards
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
先找出 get session response 的處理方式,以及現有的 totalEnergyUsage 和 totalCost 欄位。追蹤回應資料的表示與公開方式,接著讓 totalEnergyUsage.distributionByTariff 與其他使用量值一樣可用。完成的定義是:呼叫端可以從工作階段回應中存取按費率分布的資料,而不必依賴不準確的 totalCost 值。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- api, backend
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 活躍
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100