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

Add get_property and get_value to MiotDevice #803

Closed
wants to merge 3 commits into from

Conversation

BenjaminFaal
Copy link

Instead of always getting all properties now you can just get one and also get the value directly

@coveralls
Copy link

coveralls commented Aug 19, 2020

Coverage Status

Coverage increased (+0.02%) to 73.995% when pulling bc2835d on BenjaminFaal:patch-1 into db2cb9c on rytilahti:master.

@@ -29,6 +29,18 @@ def get_properties_for_mapping(self) -> list:
return self.get_properties(
properties, property_getter="get_properties", max_properties=15
)

def get_property(self, property_key: str) -> dict:
Copy link
Owner

Choose a reason for hiding this comment

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

The return type should be Dict (import from typing is necessary) until python 3.9, iirc.

miio/miot_device.py Show resolved Hide resolved
@rytilahti
Copy link
Owner

Obsoleted by #905

@rytilahti rytilahti closed this Mar 8, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants