Skip to content
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

"enum $datatype expects $format with minimum of 2 comma separated values"; why? #16

Open
JayFoxRox opened this issue Jun 3, 2023 · 0 comments

Comments

@JayFoxRox
Copy link

I'm trying to use homie with valetudo, but it doesn't allow me to use the locate capability, which only allows PERFORM: https://valetudo.cloud/pages/integrations/mqtt.html#locatelocate

However, the current implementation prevents that:

// check of enum $datatype has a comma separated list of minimum 2 items
if (currentProperty.$datatype==='enum') {
if (currentProperty.$format===undefined || currentProperty.$format.length==0) {currentProperty.validationError="enum $datatype need $format specified"; return false;}
if (currentProperty.$format.indexOf(',')<0) {currentProperty.validationError="enum $datatype expects $format with minimum of 2 comma separated values"; return false;}
}

I checked the homie convention and I can't see where it says that an enum must have at least 2 values.

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

No branches or pull requests

1 participant