Closed Pivens closed 5 months ago
Thx, is the sensor not working or the service or the switch or all of them?
Services is known and fixed.
It is the switch...the sensor seems fine
And is the switch not available or not working? Do you see a HA log entry with something like: setup_services.._get_config_entryid() takes 1 positional argument but 2 were given
I have no access to a car with aux-heat so its hard without test data.
the switch is not available and herefore cannot be actuated
fo sake of completeness...when I reinstall the integration, the aux heat switch does not even show up, as it was seemingly removed as not present in the car
yeah, the car data shows that you have the auxheat. may I ask you to do the following:
Hi, same here, Auxheat Switch not available anymore after most recent MBAPI update. I'm on HA 2024.1.6 at the moment. Car: S206
Guess what, I need to reconfigure the integration, but somehow the mail server providing the PIN does not respond. I assume the json I can currently generate is meaningless. I will continue trying a send the json over as soon as I was able to reconfigure the integration
Got it running and sent the JSON files over to you. Thank you very much for your great work!
Thx, I have added a fake AuxHeat to my cars in the mean time. Can you check the HA error log for an error "AttributeError: 'dict' object has no attribute 'AUXHEAT_START'"
correct:
Error while setting up mbapi2020 platform for switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/mbapi2020/switch.py", line 51, in async_setup_entry getattr(car.features, value[5]), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'dict' object has no attribute 'AUXHEAT_START'
OK, this is fixed in the master branch already and will be part of the next release. Thx for your help getting this solved
OK, this is fixed in the master branch already and will be part of the next release. Thx for your help getting this solved
Awesome @ReneNulschDE! Many thanks. Just out of curiosity, when will the new release be available?
Thx! Stefan
depends on what will come to the table today and over the weekend. Mid next week latest.
In case you need the change now, you can download the switch.py and copy it into the mbapi2020 folder under custom_components. Or take a look on the one-liner change here: https://github.com/ReneNulschDE/mbapi2020/commit/23521928dda5a5277be3a16798b2c119889c50a1
I've downloaded the switch.py from here and have replaced the previous one under /config/custom_components/mbapi2020. After a HA reboot, I get the following log errors:
Logger: homeassistant.setup Source: setup.py:403 First occurred: 12:07:50 (1 occurrences) Last logged: 12:07:50
Unable to prepare setup for platform 'mbapi2020.switch': Platform not found (Exception importing custom_components.mbapi2020.switch).
Logger: homeassistant.loader Source: loader.py:842 First occurred: 12:07:50 (1 occurrences) Last logged: 12:07:50 Unexpected exception importing platform custom_components.mbapi2020.switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "
some github page content
B_tZGyXo0x29ajTvFiuRN5SJd2fcEAO59tP1rFYbejOH9iFNxjikqgcQPB_yPT1KGDhSK8PPA"},"/repos/preferences":{"post":"p2sa162JnHRIgVCbPZ2UCcI7vvaZQa3i6utYgzfZttG8r0TK1vxHUm56TMqBOgagtDV-frKtBGPhO9XWCEzcUA"}}},"title":"mbapi2020/custom_components/mbapi2020/switch.py at 23521928dda5a5277be3a16798b2c119889c50a1 · ReneNulschDE/mbapi2020"} ^^^^^ NameError: name 'false' is not defined
ok, you downloaded not the switch.py...
here is the direct link https://raw.githubusercontent.com/ReneNulschDE/mbapi2020/master/custom_components/mbapi2020/switch.py
ok, sorry. have replaced it now, rebooted HA again. the integration is now working again but same as before, means, no AuxHeat Switch entity available.
"This entity is no longer being provided by the mbapi2020 integration. If the entity is no longer in use, delete it in settings."
Please check the HA error log and the diagnostic log of the component and share it here.
surprisingly, there is no error in HA Log at all after reboot. Pls. find the diagnostics file attached. config_entry-mbapi2020-ab9a858cd55ccb55a06148258ca6285c.json
The switch is not created because the feature configuration of your car stated that "AUXHEAT_START"/"AUXHEAT_STOP" is not available. So you have the Auxheat sensors but not the switch. In case you feel that this wrong, you can disable the capability check in the options of the component. You can then try the switch. The output is available when you enable the debug log of the component or check the attributs of the "car" sensor. This sensor has the output of service calls available.
In prior versions my feature check was wrong and created the switch even that the car has not the feature available.
ahh that one... thanks for the hint! actually I had un-checked the "capabilities check" yesterday just for testing and forgot to re-enable it. I've done so now and the aux heat switch is working again (I have an auxheat for sure ;) )
Hi @ReneNulschDE the switch itself is working again with fixed switch.py, however, my automation and widget to activate or deactivate the auxheat don't work anymore. those are using mbapi2020.auxheat_start and mbapi2020.auxheat_stop services.
related error message (when trigged via automation, but same when using a widget):
2024-02-12 06:45:00.163 ERROR (MainThread) [homeassistant.components.automation.auto_standheizung_morgens_wochentags_automatisch_aktivieren] [Fzg.] Standheizung morgens wochentags aktivieren (6:45 Uhr): Error executing script. Unexpected error for call_service at pos 1: setup_services.
This should be fixed in v0.10.1. Do you have updated already?
actually not, I just had overwritten the switch.py of v0.10.0 with the fixed one in order to make the auxheat work again. so shall I update to 0.10.1 and then overwrite switch.py from this link again?
correct.
correct.
Works like a charm! Thx
I have published a pre release v0.11.0-beta.1.
The AUX heater is not working anymore after the update. And yes, I have an AUX heater and it worked before. My diagnostics output is included.