Original issue: Sian-Lee-SA#400
Problem
Auto-discovery doesn't work if the switch/device name includes a forward slash (/), because MQTT uses / as the topic separator. A device named Location on/off generates a topic like zigbee2mqtt/Location on/off/action, which breaks topic.split('/') parsing.
Proposed Fix
Input validation in the frontend: device names containing / should be rejected or escaped. Alternatively, fix the topic parsing to handle this edge case.
Affected Files
custom_components/switch_manager/helpers.py (topic parsing)
frontend/src/dialogs/identifier-auto-discovery.ts
Effort
Low (1-2h)
Migrated from original repo
Original issue: Sian-Lee-SA#400
Problem
Auto-discovery doesn't work if the switch/device name includes a forward slash (
/), because MQTT uses/as the topic separator. A device namedLocation on/offgenerates a topic likezigbee2mqtt/Location on/off/action, which breakstopic.split('/')parsing.Proposed Fix
Input validation in the frontend: device names containing
/should be rejected or escaped. Alternatively, fix the topic parsing to handle this edge case.Affected Files
custom_components/switch_manager/helpers.py(topic parsing)frontend/src/dialogs/identifier-auto-discovery.tsEffort
Low (1-2h)
Migrated from original repo