mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-01-15 22:10:43 +08:00
Merge f852934f29 into 152933a223
This commit is contained in:
commit
972cff4f5e
@ -573,7 +573,10 @@ class MIoTDevice:
|
|||||||
# Irregular property will not be transformed.
|
# Irregular property will not be transformed.
|
||||||
pass
|
pass
|
||||||
elif prop.readable or prop.notifiable:
|
elif prop.readable or prop.notifiable:
|
||||||
prop.platform = 'sensor'
|
if prop.format_ == 'bool':
|
||||||
|
prop.platform = 'binary_sensor'
|
||||||
|
else:
|
||||||
|
prop.platform = 'sensor'
|
||||||
if prop.platform:
|
if prop.platform:
|
||||||
self.append_prop(prop=prop)
|
self.append_prop(prop=prop)
|
||||||
# STEP 3.2: event conversion
|
# STEP 3.2: event conversion
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user