Add Support for Xiaomi Vibration Sensor#16422
Conversation
allow UNIT and ID to contain alphanumeric characters
| value = data.get(self._data_key) | ||
| if value is None: | ||
| return False | ||
| if self._data_key in ['coordination','status']: |
| devices.append(XiaomiSensor(device, 'Tilt Angle', | ||
| 'final_tilt_angle',gateway)) | ||
| devices.append(XiaomiSensor(device, 'Coordination', | ||
| 'coordination', gateway)) |
| devices.append(XiaomiSensor(device, 'Bed Activity', | ||
| 'bed_activity', gateway)) | ||
| devices.append(XiaomiSensor(device, 'Tilt Angle', | ||
| 'final_tilt_angle',gateway)) |
|
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) |
|
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. |
|
@Danielhiversen can this be merged? |
syssi
left a comment
There was a problem hiding this comment.
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 discoveredChecklist:
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:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices: