mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-04-02 07:45:31 +08:00
format: code style
This commit is contained in:
parent
603594144f
commit
e25a86eee7
@ -550,8 +550,9 @@ class MIoTDevice:
|
||||
# Optional actions
|
||||
# Optional events
|
||||
miot_service.platform = platform
|
||||
# entity_category:
|
||||
if entity_category := SPEC_SERVICE_TRANS_MAP[service_name].get('entity_category'):
|
||||
# entity_category
|
||||
if entity_category := SPEC_SERVICE_TRANS_MAP[service_name].get(
|
||||
'entity_category', None):
|
||||
miot_service.entity_category = entity_category
|
||||
return entity_data
|
||||
|
||||
|
@ -465,7 +465,7 @@ class _MIoTSpecBase:
|
||||
iid: int
|
||||
type_: str
|
||||
description: str
|
||||
description_trans: str
|
||||
description_trans: Optional[str]
|
||||
proprietary: bool
|
||||
need_filter: bool
|
||||
name: str
|
||||
@ -476,7 +476,7 @@ class _MIoTSpecBase:
|
||||
device_class: Any
|
||||
state_class: Any
|
||||
external_unit: Any
|
||||
entity_category: str | None
|
||||
entity_category: Optional[str]
|
||||
|
||||
spec_id: int
|
||||
|
||||
|
@ -332,7 +332,7 @@ SPEC_DEVICE_TRANS_MAP: dict = {
|
||||
'actions': set<action instance name: str>
|
||||
},
|
||||
'entity': str,
|
||||
'entity_category'?: str,
|
||||
'entity_category'?: str
|
||||
}
|
||||
}
|
||||
"""
|
||||
@ -365,7 +365,7 @@ SPEC_SERVICE_TRANS_MAP: dict = {
|
||||
}
|
||||
},
|
||||
'entity': 'light',
|
||||
'entity_category': EntityCategory.CONFIG,
|
||||
'entity_category': EntityCategory.CONFIG
|
||||
},
|
||||
'fan': {
|
||||
'required': {
|
||||
|
Loading…
x
Reference in New Issue
Block a user