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
Malformed entity id. Broken get_state
API
#47
Comments
Oh, lol! Time for post version 2 Thanks for informing me about this! |
New release coming in a few minutes. |
Fixed in version 2.4.0.post2! 🎉 |
Thanks for the quick resolution. Working fine now! |
@GrandMoff100 This seems to still be an issue: c02ed22#diff-f0d7153844b6a2b579d596a0a7d65df788a7c318a72a4c206f2f29c8123f3b71R60 |
Interesting |
It's easy to miss something like this in a large diff created by linting/formatting :) |
Oh whoops, this is a valid issue. And seeing as I don't think this function is implemented anywhere that why I think this has gone unnoticed. But luckily I think I know just the spot to implement that function! I should have this fixed in a few minutes. |
Maybe it's better to just |
Good idea. |
Maybe it would also be a good idea to add entity_id structure to the docs. |
Calling
get_state
will always result in a malformed entity_id error.I have pinpointed the problem to be in the
malformed_id
function. https://github.com/GrandMoff100/HomeAssistantAPI/blob/master/homeassistant_api/client.py#L123The 4th check here
entity_id.lower() == entity_id
will always evaluate to True, causing the malformed checker to return True.This should be
entity_id.lower() != entity_id
imo.The bug must be introduced in the latest version as it was working fine for me before.
The text was updated successfully, but these errors were encountered: