This commit is contained in:
Alone 2025-01-10 10:59:11 +08:00 committed by GitHub
commit 972cff4f5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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