oischinger / ha_vicare

Inofficial Home Assistant custom component for Viessmann ViCare API
61 stars 34 forks source link

Power consumption sensors missing #83

Closed weedpump closed 2 years ago

weedpump commented 2 years ago

With the commit c281ee49a135648d2dafeeefff50414695d83a0e I got the sensor.vicare_power_consumption... sensors for the first time and got correct values (checked against ViCare App):

power consumption 1

But unfortunately with the latest commit 883bdf4165fbfd2653bbcf423703c891c77615ca, they are missing again.

power consumption 2

Also the gas consumption entities seems to be created duplicated in the first mentioned commit and are now also missing;

gas consumption1

oischinger commented 2 years ago

Hi, the latest change doesn't touch the sensors at all. that behavior is very strange. Are you sure it is reproduceable?

oischinger commented 2 years ago

concerning consumption: these sensors are not duplicated I believe. They either start with gas_ or hot_water... that's different data. Or am I missing sth?

weedpump commented 2 years ago

Hi, the latest change doesn't touch the sensors at all. that behavior is very strange. Are you sure it is reproduceable?

Yes, I just switched multiple times between the two commits: With latest commit 883bdf4 (Handle systems w/o circuits), the power consumption sensors are missing. If I go back to commit c281ee4 (Integrate PyVicare 2.16.1), the power consumption sensors are working.

Edit NOTE: Before the commit c281ee4 or rather with the integrated component, the power consumption sensors never showed up for me.

concerning consumption: these sensors are not duplicated I believe. They either start with gas_ or hot_water... that's different data. Or am I missing sth?

With commit c281ee4 additional gas consumption sensors were created: sensor.vicare_heating_gas_consumption_current_day additional for sensor.vicare_heating_gas_consumption_today sensor.vicare_heating_gas_consumption_current_week additional for sensor.vicare_heating_gas_consumption_this_week sensor.vicare_heating_gas_consumption_current_month additional for sensor.vicare_heating_gas_consumption_this_month sensor.vicare_heating_gas_consumption_current_year additional for sensor.vicare_heating_gas_consumption_this_year

The matching sensors got same values (checked with history)

With latest commit 883bdf4 the additional created gas consumption sensors with suffix CURRENT (sensor.vicare_heating_gas_consumption_current_week, sensor.vicare_heating_gas_consumption_current_month etc.) are missing and only the initially sensory with suffix THIS (sensor.vicare_heating_gas_consumption_this_week, sensor.vicare_heating_gas_consumption_this_month etc.) are left. (as it was until commit c281ee4 or with the integrated component)

I hope I was able to explain it understandable 😅

oischinger commented 2 years ago

concerning the duplicate sensors there was a bit of confusion on my side: Those were contributed to this custom component but I didn't manage to contribute them timely to HA Core and accidentally removed them from the custom component as well. Those are the ones with "current". Those should be "stale" entities for you now. I guess I will add them again but I was so far not aware that there are devices where both sensors could be available. This will be very confusing for the user. See the discussion here: https://github.com/oischinger/ha_vicare/issues/84

Concerning the power consumption sensors I'm still lost how that last commit could have affected it. Did you already update to HA 2022.2? How does that behave for you?

Also are there any errors in the logs?

weedpump commented 2 years ago

I just updated to HA 2022.2.1 and afterwards I tried multiple commits.

Because you said, you removed the sensors with the "current" at the end:

Starting with commit e5d211612269e2f4fa815a4a8f182ddd07ce5e7c both the duplicate gas consumption sensors (with "current") and the power consumption are missing/stale.

What I noticed: the power consumption sensors also have a "current" at the end of their name:

sensor.vicare_power_consumption_of_gas_heating_current_day sensor.vicare_power_consumption_of_gas_heating_current_month sensor.vicare_power_consumption_of_gas_heating_current_year sensor.vicare_power_consumption_of_gas_heating_last_seven_days

I never had power consumption sensors with "this_week", "this_month" and so on (in contrast to the gas consumption sensors).

Edit: I didn't see any errors in the log concerning the vicare integration.

damianbro commented 2 years ago

Hi, I'm not sure if I understand correctly your problems with those sensors. Viessmann API was changed last month, I didn't checked which proper data were changed. Sensors with "summary" and "currentday" etc. were added here and in PyViCare by me because API was not providing data for my heating system (Vitodens-100W) using old sensors (this week, this month etc. etc.). There was only data provided as summary and it was described in November 2021 in changelog in Viessmann API https://developer.viessmann.com/en/doc/changelog. Now I see that there are many data deleted from API so I'm not sure what also were changed.

Maybe they connected old API methods (this.month, this.year) with the new one (current.month, current.year). I think it should be verify and checked firstly in the PyViCare before delete that from here.

Regards, Damian.

numanx11 commented 2 years ago

I am having the same issue. Since the last update I have no consumption data.

oischinger commented 2 years ago

I'll close this issue. Let's move the discussion to https://github.com/oischinger/ha_vicare/issues/84