mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-01-16 23:00:43 +08:00
fix: yeelink.light.ceiling19 and yeelink.light.ceiling20 ambient light
This commit is contained in:
parent
61e9897848
commit
0af19ed960
@ -1409,18 +1409,19 @@ class MIoTSpecParser:
|
||||
urn_service_instance = instance.get('services', [])
|
||||
# set spec instance in spec_add.json as not being filtered.
|
||||
custom_service_instance = self._spec_add.get_service_add()
|
||||
for service in custom_service_instance:
|
||||
service['need_filter'] = False
|
||||
if 'properties' in service:
|
||||
for prop in service['properties']:
|
||||
prop['need_filter'] = False
|
||||
if 'actions' in service:
|
||||
for action in service['actions']:
|
||||
action['need_filter'] = False
|
||||
if 'events' in service:
|
||||
for event in service['events']:
|
||||
event['need_filter'] = False
|
||||
urn_service_instance.append(service)
|
||||
if custom_service_instance:
|
||||
for service in custom_service_instance:
|
||||
service['need_filter'] = False
|
||||
if 'properties' in service:
|
||||
for prop in service['properties']:
|
||||
prop['need_filter'] = False
|
||||
if 'actions' in service:
|
||||
for action in service['actions']:
|
||||
action['need_filter'] = False
|
||||
if 'events' in service:
|
||||
for event in service['events']:
|
||||
event['need_filter'] = False
|
||||
urn_service_instance.append(service)
|
||||
# Parse services
|
||||
for service in urn_service_instance:
|
||||
if ('iid' not in service or 'type' not in service or
|
||||
|
||||
@ -18,5 +18,74 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"urn:miot-spec-v2:device:light:0000A001:yeelink-ceiling19:1": "urn:miot-spec-v2:device:light:0000A001:yeelink-ceiling4:1",
|
||||
"urn:miot-spec-v2:device:light:0000A001:yeelink-ceiling20:1": "urn:miot-spec-v2:device:light:0000A001:yeelink-ceiling4:1",
|
||||
"urn:miot-spec-v2:device:light:0000A001:yeelink-ceiling4:1": [
|
||||
{
|
||||
"iid": 200,
|
||||
"type": "urn:miot-spec-v2:service:ambient-light:0000789D:yeelink-ceiling4:1",
|
||||
"description": "Ambient Light",
|
||||
"properties": [
|
||||
{
|
||||
"iid": 201,
|
||||
"type": "urn:miot-spec-v2:property:on:00000006:yeelink-ceiling4:1",
|
||||
"description": "Switch Status",
|
||||
"format": "bool",
|
||||
"access": [
|
||||
"read",
|
||||
"write"
|
||||
]
|
||||
},
|
||||
{
|
||||
"iid": 202,
|
||||
"type": "urn:miot-spec-v2:property:brightness:0000000D:yeelink-ceiling4:1",
|
||||
"description": "Brightness",
|
||||
"format": "uint8",
|
||||
"access": [
|
||||
"read",
|
||||
"write"
|
||||
],
|
||||
"unit": "percentage",
|
||||
"value-range": [
|
||||
1,
|
||||
100,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"iid": 203,
|
||||
"type": "urn:miot-spec-v2:property:color-temperature:0000000F:yeelink-ceiling4:1",
|
||||
"description": "Color Temperature",
|
||||
"format": "uint32",
|
||||
"access": [
|
||||
"read",
|
||||
"write"
|
||||
],
|
||||
"unit": "kelvin",
|
||||
"value-range": [
|
||||
1700,
|
||||
6500,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"iid": 204,
|
||||
"type": "urn:miot-spec-v2:property:color:0000000E:yeelink-ceiling4:1",
|
||||
"description": "Color",
|
||||
"format": "uint32",
|
||||
"access": [
|
||||
"read",
|
||||
"write"
|
||||
],
|
||||
"unit": "rgb",
|
||||
"value-range": [
|
||||
1,
|
||||
16777215,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -5,6 +5,9 @@ urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-ma4:
|
||||
- 15.*
|
||||
services:
|
||||
- '10'
|
||||
urn:miot-spec-v2:device:airer:0000A00D:hyd-lyjpro:
|
||||
properties:
|
||||
- '3.2'
|
||||
urn:miot-spec-v2:device:curtain:0000A00C:lumi-hmcn01:
|
||||
properties:
|
||||
- '5.1'
|
||||
@ -41,6 +44,3 @@ urn:miot-spec-v2:device:motion-sensor:0000A014:xiaomi-pir1:
|
||||
urn:miot-spec-v2:device:router:0000A036:xiaomi-rd03:
|
||||
services:
|
||||
- '*'
|
||||
urn:miot-spec-v2:device:airer:0000A00D:hyd-lyjpro:
|
||||
properties:
|
||||
- '3.2'
|
||||
|
||||
@ -9,6 +9,13 @@ urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:6:
|
||||
urn:miot-spec-v2:device:air-monitor:0000A008:cgllc-s1:1:
|
||||
prop.2.5:
|
||||
name: voc-density
|
||||
urn:miot-spec-v2:device:airer:0000A00D:hyd-lyjpro:1:
|
||||
prop.2.3:
|
||||
name: current-position-a
|
||||
prop.2.8:
|
||||
name: target-position-a
|
||||
prop.2.9:
|
||||
name: target-position-b
|
||||
urn:miot-spec-v2:device:airer:0000A00D:hyd-znlyj5:1:
|
||||
prop.2.3:
|
||||
value-range:
|
||||
@ -145,10 +152,3 @@ urn:miot-spec-v2:device:water-purifier:0000A013:roswan-lte01:1:0000D05A:
|
||||
unit: ppm
|
||||
prop.4.2:
|
||||
unit: ppm
|
||||
urn:miot-spec-v2:device:airer:0000A00D:hyd-lyjpro:1:
|
||||
prop.2.3:
|
||||
name: current-position-a
|
||||
prop.2.8:
|
||||
name: target-position-a
|
||||
prop.2.9:
|
||||
name: target-position-b
|
||||
|
||||
Loading…
Reference in New Issue
Block a user