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

Improve state presentation symbol extract logic #267

Merged
merged 1 commit into from
Aug 29, 2019

Conversation

jsetton
Copy link
Collaborator

@jsetton jsetton commented Aug 29, 2019

This also fixes the below exception error, introduced with #265, caused by users who have invalid state presentation format defined on some of their Alexa-linked items.

SyntaxError: [sprintf] unexpected placeholder
    at sprintf_parse (/var/task/node_modules/sprintf-js/src/sprintf.js:202:23)
    at sprintf (/var/task/node_modules/sprintf-js/src/sprintf.js:26:31)
    at Object.temperature (/var/task/alexa/propertyMap.js:214:17)
    at item.metadata.alexa.value.split.forEach (/var/task/alexa/propertyMap.js:431:52)
    at Array.forEach (<anonymous>)
    at AlexaPropertyMap.addItem (/var/task/alexa/propertyMap.js:362:42)
    at items.filter.forEach (/var/task/alexa/v3/discovery.js:81:29)
    at Array.forEach (<anonymous>)
    at item.metadata.alexa.value.split.some (/var/task/alexa/v3/discovery.js:77:77)
    at Array.some (<anonymous>)

Signed-off-by: jsetton <jeremy.setton@gmail.com>
@jsetton jsetton merged commit ac1a452 into openhab:master Aug 29, 2019
@jsetton jsetton deleted the symbol-extract-imp branch August 29, 2019 18:14
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

Successfully merging this pull request may close these issues.

2 participants