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

Can't handle strings and floats #2

Open
oscgonfer opened this issue Aug 8, 2024 · 0 comments
Open

Can't handle strings and floats #2

oscgonfer opened this issue Aug 8, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@oscgonfer
Copy link
Contributor

When a sensor gives null as a result, we can't handle it if we use pydantic models:

ValidationError: 1 validation error for Device
data.sensors.22.value
  Input should be a valid number, unable to parse string as a number [type=float_parsing, input_value='null', input_type=str]
    For further information visit https://errors.pydantic.dev/2.8/v/float_parsing
@oscgonfer oscgonfer added the bug Something isn't working label Aug 8, 2024
@oscgonfer oscgonfer self-assigned this Aug 8, 2024
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

No branches or pull requests

1 participant