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 sensor setting type converter #2494

Merged

Conversation

jpelgrom
Copy link
Member

Summary

#2469 introduced a bug which resulted in sensor settings always being considered of the type STRING when read from the database because === was used in the type converter. It looks like there is some magic in the database that breaks this comparison for strings, so only compare the contents instead.

Screenshots

n/a

Link to pull request in Documentation repository

n/a

Any other notes

 - "a === b evaluates to true if and only if a and b point to the same object", which will never be true for a String, so change it to a == b instead https://kotlinlang.org/docs/equality.html#referential-equality
@JBassett JBassett merged commit b78d83e into home-assistant:master Apr 30, 2022
@jpelgrom jpelgrom deleted the fix-sensor-setting-typeconverter branch April 30, 2022 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants