Skip to content

States Wert in common #846

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

Closed
duczz opened this issue May 27, 2021 · 4 comments · Fixed by #878
Closed

States Wert in common #846

duczz opened this issue May 27, 2021 · 4 comments · Fixed by #878

Comments

@duczz
Copy link

duczz commented May 27, 2021

Typen Überprüfung prüfen

image

@GermanBluefox
Copy link
Contributor

@AlCalzone Do you know how to fix it?

@AlCalzone
Copy link
Collaborator

This is a limitation between how TypeScript works and how ioBroker is structured. Basically, the typechecker doesn't/cannot know which type of object getObject returns, but common.states only exists on the StateObject.

If this is a TypeScript script, you can work around it with

FanSpeed: (getObject(idFanSpeed) as iobJS.StateObject).common.states[...]

If this is a JavaScript, ignore the error.

@duczzz
Copy link

duczzz commented Sep 2, 2021

Okay thanks, its a Javascript

@AlCalzone
Copy link
Collaborator

FYI this should work without warnings when #878 is merged and released.

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 a pull request may close this issue.

4 participants