mirror of
https://github.com/home-assistant/core.git
synced 2025-08-16 11:01:39 +02:00
Fix xiaomi binary_sensor warning (#18280)
* Fix xiaomi binary_sensor warning * Fix xiaomi binary_sensor warning
This commit is contained in:
committed by
Paulus Schoutsen
parent
de37fc90c0
commit
8ab2f669d2
@@ -357,6 +357,9 @@ class XiaomiVibration(XiaomiBinarySensor):
|
||||
def parse_data(self, data, raw_data):
|
||||
"""Parse data sent by gateway."""
|
||||
value = data.get(self._data_key)
|
||||
if value is None:
|
||||
return False
|
||||
|
||||
if value not in ('vibrate', 'tilt', 'free_fall'):
|
||||
_LOGGER.warning("Unsupported movement_type detected: %s",
|
||||
value)
|
||||
|
Reference in New Issue
Block a user