PiotrMachowski / Home-Assistant-custom-components-Tauron-AMIplus

This sensor uses unofficial API to get energy usage and generation data from https://elicznik.tauron-dystrybucja.pl.
MIT License
138 stars 34 forks source link

Panel Energia #42

Closed barii86 closed 2 years ago

barii86 commented 2 years ago

Cześć, Mam problem z dodaniem Twojej integracji do panelu Energia w HA.

Dodaję Tauron AMIPlus consumption_daily do Użycia Energii w sekcji "Sieć Elektryczna" natomiast otrzymuję informację o błędzie:

Brak danych o ostatnim resecie Następujące encje mają klasę stanu "measurement", ale brakuje danych o "last_reset": sensor.tauron_amiplus_consumption_daily

Encje Tauron AMIPlus consumption_monthly oraz Tauron AMIPlus consumption_yearly nie powoduję błędu.

PiotrMachowski commented 2 years ago

Dane z sensora daily nie nadają się do panelu energia, bo dotyczą poprzedniego dnia

Jordan87 commented 1 year ago

Nie da sie w zaden sposob tego tak skonfigurowac aby nastepnego dnia dodawal informacje o zuzycie dnia poprzedniego np o godzinie 24 (dnia poprzedniego, czyli uzupelnianie wczesniejszych luk)?

Wiem że panel energia normalnie bazuje na odczytach z danej godziny.

PiotrMachowski commented 1 year ago

Nie, nie da się aktualnie

Feature request w HA

Edit: dobra, da się, ale trochę dookoła i bokiem. Nie wiem, czy tak bym chciał robić, postaram się zgłębić bardziej temat https://github.com/home-assistant/core/blob/6a89b3a135ebaff1f3c8f6dbc8e32974241b5e8f/homeassistant/components/recorder/statistics.py#L1990

barii86 commented 1 year ago

Jak by Ci się udało, nie byłoby konieczności integracji dodatkowych narzędzi w Home Assistancie.

PiotrMachowski commented 1 year ago

image

PiotrMachowski commented 1 year ago

I have changed approach and added importing data directly to statistics. Since v2.3.0 hourly readings are visible in Energy dashboard

mmarcines commented 1 year ago

@PiotrMachowski Do I understand correctly that in the Energy dashboard I should use those two: tauron_importer: consumption and tauron_importer: generation? If I choose anything else I'm getting a warning about "last_reset". If those two are correct - I've configured them yesterday in the energy dashboard and till now nothing is displayed.

PiotrMachowski commented 1 year ago

Do I understand correctly that in the Energy dashboard I should use those two: tauron_importer: consumption and tauron_importer: generation?

@mmarcines exactly. You can check logs for any errors

mmarcines commented 1 year ago

Only such warning appears in system - logs Logger: homeassistant.components.sensor Source: runner.py:120 Integration: Sensor (documentation, issues) First occurred: 12:26:32 (1 occurrences) Last logged: 12:26:32 Setup of sensor platform tauron_amiplus is taking over 10 seconds.

PiotrMachowski commented 1 year ago

Which HA version do you have?

mmarcines commented 1 year ago

Home Assistant 2023.1.5 Supervisor 2023.01.dev1301 Interfejs użytkownika: 20230110.0 - latest

PiotrMachowski commented 1 year ago

Do sensors have correct values? Have you checked data from several days ago? Importer should import data starting from 01.01.2022

mmarcines commented 1 year ago

image those displayed on the screenshot do have values but don't see import sensors on the list.

PiotrMachowski commented 1 year ago

They are not visible here, they are visible just in energy panel

mmarcines commented 1 year ago

image so daily consumption do have some values (last 2 weeks). does it means that importer should work and energy dashoard should display something? any other suggestions what to check? image

PiotrMachowski commented 1 year ago

does it means that importer should work and energy dashoard should display something? any other suggestions what to check?

Yes, importer is updated before sensors

You won't have data for today here, please check if it is available for e.g. 1 week ago

mmarcines commented 1 year ago

@PiotrMachowski right. My bad tauron is uploading data once a day (so have to look for periods in past). Like last week / month /year.

image image