-
-
Notifications
You must be signed in to change notification settings - Fork 563
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 tinymu smart toiletlid #544
Conversation
Add Xiaomi Tinymu toilet seat
key Error
miio/toiletlid.py
Outdated
def status(self) -> ToiletlidStatus: | ||
"""Retrieve properties.""" | ||
properties = AVAILABLE_PROPERTIES[self.model] | ||
_props_per_request = 15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local variable '_props_per_request' is assigned to but never used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind fixing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! I left some comments behind that should be handled before we merge this.
miio/toiletlid.py
Outdated
return self.work | ||
|
||
@property | ||
def work(self) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a need for this property, considering there's already a more generic is_on
?
miio/toiletlid.py
Outdated
def status(self) -> ToiletlidStatus: | ||
"""Retrieve properties.""" | ||
properties = AVAILABLE_PROPERTIES[self.model] | ||
_props_per_request = 15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind fixing this?
Device response error throws an exception
…ising a warning and returning "Unknown" is more friendly.
Looks good to me now, thanks! 👍 One small thing, please add the full name of the device to README.md's list of supported devices. Also, if you have example outputs for those commands, please add them there for future reference (and to allow creating unit tests). @syssi, you are more knowledgeable on props based integrations, ok to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! :-)
Thanks! 🎉 edit: I fixed the conflicts caused by a recent merge, this is now good to go. |
select toiletlid status
set toiletlid ambient light
nozzle clean