[RTL] Correct string handling for type key in NAMING_KEYS #1960
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extend class structure RTL_433device and modify code to create correct state topic in discovery message to support sensors, that send type key as well as sensors, that don't. Actually only TPMS sensors use type=TPMS. See issue #1909.
Description:
The key type of the naming_keys array in ZgatewayRTL_433.ino was not used to create the state topic in discovery messages. Thcaused, that for TPMS sensors the state topic was incorrectly created. With this change, both cases are respected, when key is used and when key is not used.
I tested with my sensors TPMS Jansite-Solar (FSK) and AmbientWeather-TX8300-1-65 (OOK). The sensors were correctly discovered and configured in my openHAB instance.
Checklist: