-
Notifications
You must be signed in to change notification settings - Fork 59
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
new Datatype map? (Or use different formats for enum)? #72
Comments
@timpur @ThomDietrich @Thalhammer Can we close this? A map structure is not easily possible via MQTT means and because we decided not to allow external data type standards, this issue is not solvable. |
@euphi The convention is open for extension by the user, so if you feel like you need more topics in your application you're free to add them (as long as they don't conflict with any homie topics). |
I agree that this can't easily and with clear benefits be part of the convention. |
Alright. Closing this. |
In case you have a node property of type enumeration, but this enumeration has many elements, it can be useful to still use integer values for MQTT communication. However, also in these cases you want to announce the possible values with their meaning.
The current 3.0 convention allows to announce enumerations with their possible allowed values, but no mapping of integer values to a meaning.
As an example, in my ESP_Homie_WS2812FX Node there is a "mode" property that allows all modes from the WS2812FX lib. However, when setting a new mode, I still want to receive the new mode as integer, because it is much easier to parse.
So, for the announcement there should be a way to announce the mapping of the integer to it's corresponding mode name, e.g
46: Fire Flicker, 47: Fire Flicker (soft)
etc.What is your opinion about this?
map
that maps allowed integer values to a string.The text was updated successfully, but these errors were encountered: