mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-01-16 23:00:43 +08:00
Merge f852934f29 into 310029d8ed
This commit is contained in:
commit
8018d39e69
@ -560,7 +560,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