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

Fix exception for devices who return JSON_ARRAY/JSON.OBJECT as state #388

Merged
merged 5 commits into from
Feb 17, 2021

Conversation

vlebourl
Copy link
Collaborator

No description provided.

@vlebourl vlebourl marked this pull request as draft February 16, 2021 10:22
@github-actions github-actions bot added the bug Something isn't working label Feb 16, 2021
@iMicknl
Copy link
Owner

iMicknl commented Feb 16, 2021

Looks good. I wonder if this would work as well:

TYPES = {
    DataType.NONE: None,
    DataType.INTEGER: int,
    DataType.DATE: int,
    DataType.STRING: str,
    DataType.FLOAT: float,
    DataType.BOOLEAN: bool,
	DataType.JSON_ARRAY: json.loads,
	DataType.JSON_OBJECT: json.loads,
}

@vlebourl
Copy link
Collaborator Author

I don't see why not!

@vlebourl vlebourl marked this pull request as ready for review February 16, 2021 11:21
@iMicknl iMicknl linked an issue Feb 17, 2021 that may be closed by this pull request
@iMicknl iMicknl changed the title fix Datatype errors when get state #387 Fix exception for devices who return JSON_ARRAY/JSON.OBJECT as state Feb 17, 2021
Copy link
Owner

@iMicknl iMicknl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we ask the user to test it, before merging. :-)

@vlebourl vlebourl merged commit 3c43f1f into master Feb 17, 2021
@vlebourl vlebourl deleted the fix/missing_datatype branch February 17, 2021 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Datatype errors when get state
2 participants