diff --git a/custom_components/xiaomi_home/miot/miot_device.py b/custom_components/xiaomi_home/miot/miot_device.py index fa48345..66f7c3c 100644 --- a/custom_components/xiaomi_home/miot/miot_device.py +++ b/custom_components/xiaomi_home/miot/miot_device.py @@ -560,7 +560,10 @@ def spec_transform(self) -> None: # 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