mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-06-21 15:20:00 +08:00
feat:add missing parameter state_class (#101)
* feat: add state_class for sensor * feat: add optional state_class and unit_of_measurement for properties * feat:add support for state_class and unit process * style: fix pylint format * style: fix pylint format * sytle: change logic to suit conversation --------- Co-authored-by: LiShuzhen <SusanPhevos@gmail.com>
This commit is contained in:
@ -79,6 +79,7 @@ class MIoTSpecBase:
|
||||
# External params
|
||||
platform: str
|
||||
device_class: Any
|
||||
state_class: Any
|
||||
icon: str
|
||||
external_unit: Any
|
||||
|
||||
@ -96,6 +97,7 @@ class MIoTSpecBase:
|
||||
|
||||
self.platform = None
|
||||
self.device_class = None
|
||||
self.state_class = None
|
||||
self.icon = None
|
||||
self.external_unit = None
|
||||
|
||||
|
Reference in New Issue
Block a user