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

If a device has readings with similar names get_device_reading might output unrelated results #14

Closed
domschl opened this issue Jun 6, 2019 · 2 comments

Comments

@domschl
Copy link
Owner

domschl commented Jun 6, 2019

As described by TK67 in Fhem forum, get_device_reading returns inconsistent information, if a device has two readings, with one reading-name being a longer version of another reading, e.g. if readings myReading and myReading2 exist, then asking for myReading2 would wrongly also return results for myReading.

@domschl
Copy link
Owner Author

domschl commented Jun 6, 2019

@Andre0512 : could you have a look at c3dbd44, I've changed your _response_filter function, because if readings: name and name1 existed, then asking for get_device_reading(dev,'name1') would return both readings for name and name1 because of:

'Value' in v and (not len(arg) or (len(arg) and k == arg[0]))} # k in arg[0]))} fixes #14

domschl added a commit that referenced this issue Jul 22, 2019
Fhem 0.6.2, fix for reading parser, #14
Self-tests.
@domschl
Copy link
Owner Author

domschl commented Jul 22, 2019

Fixed in 0.6.2

@domschl domschl closed this as completed Jul 22, 2019
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

No branches or pull requests

1 participant