This commit is contained in:
Alone 2024-12-26 09:15:29 +08:00 committed by GitHub
commit 8018d39e69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -560,7 +560,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