mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-01-19 16:59:36 +08:00
Compare commits
3 Commits
9af59e28bd
...
7654e5e518
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7654e5e518 | ||
|
|
0f5da18108 | ||
|
|
ea9aa082b7 |
@ -32,7 +32,7 @@ git checkout v1.0.0
|
|||||||
|
|
||||||
### Method 2: [HACS](https://hacs.xyz/)
|
### Method 2: [HACS](https://hacs.xyz/)
|
||||||
|
|
||||||
HACS > Overflow Menu > Custom repositories > Repository: https://github.com/XiaoMi/ha_xiaomi_home.git & Category: Integration > ADD > Xiaomi Home in New or Available for download section of HACS > DOWNLOAD
|
HACS > Overflow Menu > Custom repositories > Repository: https://github.com/XiaoMi/ha_xiaomi_home.git & Category or Type: Integration > ADD > Xiaomi Home in New or Available for download section of HACS > DOWNLOAD
|
||||||
|
|
||||||
> Xiaomi Home has not been added to the HACS store as a default yet. It's coming soon.
|
> Xiaomi Home has not been added to the HACS store as a default yet. It's coming soon.
|
||||||
|
|
||||||
|
|||||||
@ -628,7 +628,7 @@ class MIoTDevice:
|
|||||||
# pylint: disable=import-outside-toplevel
|
# pylint: disable=import-outside-toplevel
|
||||||
from homeassistant.const import UnitOfConductivity
|
from homeassistant.const import UnitOfConductivity
|
||||||
unit_map['μS/cm'] = UnitOfConductivity.MICROSIEMENS_PER_CM
|
unit_map['μS/cm'] = UnitOfConductivity.MICROSIEMENS_PER_CM
|
||||||
except ImportError:
|
except Exception: # pylint: disable=broad-except
|
||||||
unit_map['μS/cm'] = 'μS/cm'
|
unit_map['μS/cm'] = 'μS/cm'
|
||||||
|
|
||||||
return unit_map.get(spec_unit, None)
|
return unit_map.get(spec_unit, None)
|
||||||
@ -1198,8 +1198,8 @@ class MIoTEventEntity(Entity):
|
|||||||
def __on_event_occurred(self, params: dict, ctx: Any) -> None:
|
def __on_event_occurred(self, params: dict, ctx: Any) -> None:
|
||||||
_LOGGER.debug('event occurred, %s', params)
|
_LOGGER.debug('event occurred, %s', params)
|
||||||
trans_arg = {}
|
trans_arg = {}
|
||||||
try:
|
for item in params['arguments']:
|
||||||
for item in params['arguments']:
|
try:
|
||||||
if 'value' not in item:
|
if 'value' not in item:
|
||||||
continue
|
continue
|
||||||
if 'piid' in item:
|
if 'piid' in item:
|
||||||
@ -1215,10 +1215,10 @@ class MIoTEventEntity(Entity):
|
|||||||
for index, prop in enumerate(self.spec.argument)
|
for index, prop in enumerate(self.spec.argument)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
except KeyError as error:
|
except KeyError as error:
|
||||||
_LOGGER.error(
|
_LOGGER.debug(
|
||||||
'on event msg, invalid args, %s, %s, %s',
|
'on event msg, invalid args, %s, %s, %s',
|
||||||
self.entity_id, params, error)
|
self.entity_id, params, error)
|
||||||
self.on_event_occurred(
|
self.on_event_occurred(
|
||||||
name=self.spec.description_trans, arguments=trans_arg)
|
name=self.spec.description_trans, arguments=trans_arg)
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|||||||
@ -32,7 +32,7 @@ git checkout v1.0.0
|
|||||||
|
|
||||||
### 方法 2: [HACS](https://hacs.xyz/)
|
### 方法 2: [HACS](https://hacs.xyz/)
|
||||||
|
|
||||||
HACS > 右上角三个点 > Custom repositories > Repository: https://github.com/XiaoMi/ha_xiaomi_home.git & Category: Integration > ADD > 点击 HACS 的 New 或 Available for download 分类下的 Xiaomi Home ,进入集成详情页 > DOWNLOAD
|
HACS > 右上角三个点 > Custom repositories > Repository: https://github.com/XiaoMi/ha_xiaomi_home.git & Category or Type: Integration > ADD > 点击 HACS 的 New 或 Available for download 分类下的 Xiaomi Home ,进入集成详情页 > DOWNLOAD
|
||||||
|
|
||||||
> 米家集成暂未添加到 HACS 商店,敬请期待。
|
> 米家集成暂未添加到 HACS 商店,敬请期待。
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user