ReneNulschDE / mbapi2020

Custom Component to integrate MercedesME devices into Home-Assistant
Other
149 stars 29 forks source link

Some range_electric attributes have disappeared in release 0.9.5 #144

Closed DragonNZ closed 10 months ago

DragonNZ commented 11 months ago

Hi,

I don't appear to have the attributes chargingPower and endOfChargeTime in range_electric any more. You were adding the day of week in the latest release. Have these attributes moved to another entity?

Thanks John

ReneNulschDE commented 11 months ago

Hi John,

is your car connected to a charging station? The attribute will popup when it gets connected.

Was not moved...

BR Rene

DragonNZ commented 11 months ago

Hi Rene,

My sincere apologies, I didn't realise that the attributes could appear and disappear dependent on state. So yes, plugged in and charging the attributes are there.

Where do I find the day of week attribute that you added?

This is what I see under range_electric (cut off VIN)

range_electric

Thanks John

ReneNulschDE commented 11 months ago

Hi John,

no problem at all and no reason to apologize.

The other attribute will only appear when the charging will not be finished on the current day. (Assumption based on my tests - and could be that your car does not support this)

DragonNZ commented 11 months ago

HI Rene,

In the screenshot you will see that the end charge time is 6:00am, which is on the 12th Oct and the timestamp shows today 11th Oct. So definitely not finishing on the current day but still not showing, so I wonder if it applicable only when the charging time is longer than 24 hours. Maybe it will appear then,

I will check again next time the car is lower on charge and will exceed 24 hours charging time.

I also think that the car will support it as on the MB Android app, it shows the end charge date and time.

Thanks, John

ReneNulschDE commented 11 months ago

mmmhhh, could you share some more details? Lets take a view on the messages between your HA and the MB Servers.

Then I can check if the "endOfChargeTimeWeekday" is present and filled.

Otherwise, we can calculate the correct value with a template sensor. (Pseudocode: IF endofchargetime < currentime THEN Today+1+endofchargetime ELSE Today+endofchargetime)