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 Support for Xiaomi Vibration Sensor #16422
Conversation
allow UNIT and ID to contain alphanumeric characters
@@ -84,6 +94,9 @@ def parse_data(self, data, raw_data): | |||
value = data.get(self._data_key) | |||
if value is None: | |||
return False | |||
if self._data_key in ['coordination','status']: |
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.
missing whitespace after ','
devices.append(XiaomiSensor(device, 'Tilt Angle', | ||
'final_tilt_angle',gateway)) | ||
devices.append(XiaomiSensor(device, 'Coordination', | ||
'coordination', gateway)) |
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.
trailing whitespace
devices.append(XiaomiSensor(device, 'Bed Activity', | ||
'bed_activity', gateway)) | ||
devices.append(XiaomiSensor(device, 'Tilt Angle', | ||
'final_tilt_angle',gateway)) |
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.
missing whitespace after ','
Travis CI is failing because of the use of _LOGGER.warn(). This code was not modified by me. It must not have been converted to whatever the new method is. |
'coordination', gateway)) | ||
else: | ||
_LOGGER.warn("Unmapped Device Model ") | ||
_LOGGER.warn(device) |
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.
Remove
Documentation PR has been submitted ( home-assistant/home-assistant.io#6207 ). Please note, this requires an updated version of PyXiaomiGateway (PR already submitted Danielhiversen/PyXiaomiGateway#89 ). This will likely result in a verison number increase of that library which means the REQUIREMENTS on this component will also need to increment. |
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.
🎉
@Danielhiversen can this be merged? |
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.
LGTM. Just the documentation isn't ready.
@dlashua I often get a |
@PaulAnnekov please open an issue. |
Description:
Adds support for Xiaomi Vibration Sensor
Example entry for
configuration.yaml
(if applicable):n/a auto discovered
Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices: