Skip to content

Comments

Only get client_id when GUI presents option#15

Open
AStoker wants to merge 1 commit intoSeeed-Solution:mainfrom
AStoker:bug/client-id
Open

Only get client_id when GUI presents option#15
AStoker wants to merge 1 commit intoSeeed-Solution:mainfrom
AStoker:bug/client-id

Conversation

@AStoker
Copy link

@AStoker AStoker commented Dec 2, 2025

When setting up the ESP32 Sense from the "Discovered" integration, it doesn't ask for the client id. However, the code is trying to access that entered client id, resulting in an error like this

2025-12-02 08:23:15.303 ERROR (MainThread) [custom_components.sensecraft.config_flow] Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/sensecraft/config_flow.py", line 258, in async_step_mqtt
client_id = user_input[CLIENT_ID]
~~~~~~~~~~^^^^^^^^^^^
KeyError: 'client_id'

Instead, move the client_id setting down into the has_mqtt_topic which is when we know we'll actually need the client id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant