diff --git a/custom_components/xiaomi_home/miot/miot_device.py b/custom_components/xiaomi_home/miot/miot_device.py index 353b28f..383167f 100644 --- a/custom_components/xiaomi_home/miot/miot_device.py +++ b/custom_components/xiaomi_home/miot/miot_device.py @@ -573,7 +573,10 @@ class MIoTDevice: # Irregular property will not be transformed. pass elif prop.readable or prop.notifiable: - prop.platform = 'sensor' + if prop.format_ == 'bool': + prop.platform = 'binary_sensor' + else: + prop.platform = 'sensor' if prop.platform: self.append_prop(prop=prop) # STEP 3.2: event conversion