Closed Santanachia closed 2 years ago
Value - Wear
; kWh = Value * 11.249
Hi @Santanachia I will take a look a look over after shortly. Really appreciate your contribution ;)
1.) That's a good idea to allow to see the previous measurement, however, I would like to avoid any calculations on the sensor side. It should just convert the data from PGNIG to the entity. For the rest you will be able to write your custom templates quite easily with just a wear value. Regarding consumption in Kwh is it required for the gas sensor in HA to show on the energy dashboard correctly or m3 are just fine?
2.) I am not sure why you can see the previous measurement - however, it can be due to quite a dummy algorithm implemented. I will gather more data points and sort them to find the highest value.
1.) The value of the conversion is not available through API. It is rather hard to read and parse from PDF files. However, there is a wearKWH value available on the invoices endpoint, but there is also cost. In that way, you could easily correlate the cost from the invoice with usage in m3. Do you think that would be helpful? I am asking as personally I don't have any need to track this cost.
@Santanachia In this pull request I am going to add wear value to the state attributes. https://github.com/pawelhulek/pgnig-sensor/pull/5 Will that be enough or would you like to add some more details?
@pawelhulek, if you think there should be no computation on the integration side (which I personally disagree with), this will have to do, although I don't know what is available beyond what is in https://ebok.pgnig.pl/crm/get-all-ppg-readings-for-meter
@Santanachia Please take a look at https://github.com/pawelhulek/pgnig-sensor/blob/0.1.4/custom_components/pgnig_gas_sensor/Invoices.py#L54 maybe this will give you some idea on what is available through endpoints
@Santanachia Take a look at the new entity. I hope it will be helpful
Hi,