I seem to be getting a problem that has borked this integration:
2022-01-19 09:45:48 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry mbapi2020 for mbapi2020
Traceback (most recent call last):
File "/config/custom_components/mbapi2020/api.py", line 73, in _request
resp.raise_for_status()
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('https://bff-prod.risingstars.daimler.com/v1/vehicle/self/masterdata')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/mbapi2020/__init__.py", line 118, in async_setup_entry
masterdata = await mercedes.client.api.get_user_info()
File "/config/custom_components/mbapi2020/api.py", line 83, in get_user_info
return await self._request("get", "/v1/vehicle/self/masterdata")
File "/config/custom_components/mbapi2020/api.py", line 76, in _request
raise RequestError(f"Error requesting data from {url}: {err}")
custom_components.mbapi2020.errors.RequestError: Error requesting data from https://bff-prod.risingstars.daimler.com/v1/vehicle/self/masterdata: 404, message='Not Found', url=URL('https://bff-prod.risingstars.daimler.com/v1/vehicle/self/masterdata')
2022-01-19 12:17:01 ERROR (MainThread) [homeassistant.components.system_health] Error fetching info
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/system_health/__init__.py", line 68, in get_integration_info
data = await registration.info_callback(hass)
File "/config/custom_components/mbapi2020/system_health.py", line 21, in system_health_info
client = hass.data[DOMAIN]
KeyError: 'mbapi2020'
Hi Richard, please update to the latest version. See the messages from last Friday. MB has changed the API and the new version is available since Friday too.
Hi, I really tried solving this on my own but I can’t for the life of me figure it out. I had everything working then about a month ago I noticed all my entities were overwritten back to default. It doesn’t matter how many times I update them if I restart home assistant they update to the original entity names and my configurations won’t work. I’m just replacing the VIN with C43 as I have always done but for some reason they just keep getting overwritten. Thoughts?
Anyone have any idea why this is happening? I don’t think I changed anything as this was working for several months and suddenly would reset every time I restarted.
What is your HA version?
What is your MBAPI2020 version?
What is your region?
How do you change the entity names?
Is the vin stable or does it change after restart?
I have HA version 2021.12.9
MBAPI V 0.6.0
Region US
I update entities by going into the configuration menu - > Devices and services → clicking on the 17 entities in the MBAPI integration ->click on 1 of the names/entities → then remove the VIN and replace it with c43.
I restarted and noted the VIN, it appears to stay the same.
Looks like I have added a bug/feature that affects the US-region only. There was one feature request to remove old cars from the config and I have implemented this in v0.6. This removal runs potentially to early for the US-region.
Do you see “Removing car from device registry: …” in your log (log level: info)?
sure, I can - but could please simplify it first a little bit and explain what you are trying to achieve. In case you have problems with the switches then please test it without all this custom lovelace stuff first and let us work on one switch only. Please add the code of the related input_helper too.
First of all thanks big time for your help. What I want to achieve is to be able to start my heater in my MB using Home assistant. I have a button that gives me the state of my mercedes (locked versus unlocked) and by pressing the button I get a pop-up with the visuals of the Mercedes Benz state (the one with the car and all the sensors) and also 3 buttons
lock / unlock
start ignition
start heater
Let’s indeed start with one button: the one to start of stop the heater.
First of all, I created an input_boolean as follows: