Fix ambiguous loading of button maps#3918
Conversation
- The missing break, did load all entries which started with a modelid. So lumi.sensor_switch.aq2 was overwritten by lumi.sensor_switch; - Don't use startsWith() always require exact modelId; - Put manufactuer name of Tuya switch in button map and use it as modelId; - Add helper isTuyaManufacturerName() to detect Tuya devices. Issue: dresden-elektronik#3719
|
You might want to add the deconz-rest-plugin/de_web_plugin.cpp Line 6502 in 1ecda0c to prevent any sensor assuming |
Good point, yes for Tuya we absolutely need to query the actual manufacturer Edit: But at this place a Tuya device should never fall into the if statement since the vendor code isn't used by them irk? |
|
Well, we have exactly that assignment a bit further below in the if-else jungle. The marked passage above was just to illustrate where it should be placed. Apparently, VENDOR_EMBER has already been silenced. Espacially that passage gave me a hard time back in the days changing the manufacturer out of the blue. From my perspective, the function should be applied and put on the very top of the if-else statements for consistency and to retain the original manufacturer name undoubtly. |
|
I'd like to remove the manual manufacturer name setup for all vendor codes which are shared across different manufacturers. |
QString::startsWith()always require exact modelId;isTuyaManufacturerName()to detect Tuya devices.Issue: #3719