-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reinstall integration in HA failed #69
Comments
Tried that, but also an error. From the logs: Logger: custom_components.button_plus.config_flow button_plus Exception in login : 2 is not a valid EventType - traceback: Traceback (most recent call last): File "/config/custom_components/button_plus/config_flow.py", line 98, in async_step_manual device_config: DeviceConfiguration = ModelDetection.model_for_json( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/button_plus/button_plus_api/model_detection.py", line 15, in model_for_json return DeviceConfiguration.from_dict(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/button_plus/button_plus_api/model_v1_12.py", line 185, in from_dict MqttButton.from_dict(button) for button in data["mqttbuttons"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/button_plus/button_plus_api/model_v1_07.py", line 212, in from_dict topics=[Topic.from_dict(topic) for topic in data.get("topics", [])], ^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/button_plus/button_plus_api/model_v1_07.py", line 110, in from_dict event_type=EventType(data["eventtype"]), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/enum.py", line 757, in call return cls.new(cls, value) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/enum.py", line 1171, in new raise ve_exc ValueError: 2 is not a valid EventType [...] Logger: homeassistant.util.json json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues |
There is a bit more useful information in this error. There seems to be a Event Type registered in your existing Button+ config that is unknown to the Integration (number 2). Can you show me a screenshot of your config from the web ui which events you have on the button plus? |
I just took a look into the virtual device configuration and it seems the event type that is causing the error is 'Click released'. You should be able to find it under Button configuration -> MQTT topics It seems the integration is out of date with the current Event types that are in the web configuration. For now you can fix this by removing the 'Click released' topics or resetting the configuration entirely. |
That worked, with some hits and misses. I already noticed the click event in the MQTT topics sub menu, and removed it. Also removed the integration from HA and HACS, and started over. That did not solve the issue. Maybe somewhere in HA some configuration info is left? |
I want to reinstall the HACS integration for Button+ in Home Assistant. Downloading the integration in HACS works, but when I want to add the integration in HA it asks for login + password for Button+ (I assume the credentials are for the button.plus website?) OR the auth cookie after logging in to button.plus. When I enter login/password HA reports after hitting 'send' that the configuration failed. The log says the following:
Translated with DeepL.com (free version)
Logger: homeassistant.config_entries
Bron: config_entries.py:604
Eerst voorgekomen: 21:04:41 (3 gebeurtenissen)
Laatst gelogd: 21:20:32
Error setting up entry bplus_wk1 for button_plus
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/button_plus/init.py", line 29, in async_setup_entry
device_configuration: DeviceConfiguration = ModelDetection.model_for_json(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/button_plus/button_plus_api/model_detection.py", line 9, in model_for_json
data = json.loads(json_data)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/json/init.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not NoneType
Am I doing something wrong? Would it work with the auth cookie? I just don't know how to get that ...
The text was updated successfully, but these errors were encountered: