hardbyte / hardbyte/python-evnex

Make distributionByTariff data available as totalCost value is not accurate with TimeOfUse

Aberta
#129 0 comentários 2 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
13
Forks
8
Merge médio
5h 58min
PRs com merge (30d)
2

Descrição

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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Comece localizando o tratamento de get session response e os campos existentes totalEnergyUsage e totalCost. Rastreie como os dados da resposta são representados e expostos e, em seguida, disponibilize totalEnergyUsage.distributionByTariff junto com os outros valores de uso. Está concluído quando os chamadores puderem acessar a distribuição por tarifa a partir de uma resposta de sessão sem depender do valor impreciso de totalCost.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
python
Domínio
api, backend
Tipo de issue
Funcionalidade
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Ativa
Clareza
Razoavelmente clara
Facilidade para iniciantes
68/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.