Skip to content

fix config.supports to match listentities object#18

Open
lyuzashi wants to merge 1 commit into
Nafaya:mainfrom
lyuzashi:main
Open

fix config.supports to match listentities object#18
lyuzashi wants to merge 1 commit into
Nafaya:mainfrom
lyuzashi:main

Conversation

@lyuzashi
Copy link
Copy Markdown

Not sure if you're accepting pull requests, but thanks for taking a look.

I found commands like entity.setBrightness(0.9) were throwing brightness is not supported errors due to a miss-match between the entity config and these setter methods. I've modified the name of each property in the if statements.

supportsBrightness: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
if (!this.config.supports_brightness) throw new Error('brightness is not supported');

@tobiasgraf
Copy link
Copy Markdown

I was running into the same issue today and was about to do the same thing, nice PR.

It would be nice if this PR could be merged.

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