Compare commits

...

3 Commits

Author SHA1 Message Date
Shangbin Yang
7940e6714e
Merge cd0f126f92 into 1cdcb785b5 2025-01-14 09:27:10 +08:00
桔子
1cdcb785b5
feat: add power properties trans (#571)
Some checks are pending
Tests / check-rule-format (push) Waiting to run
Validate / validate-hassfest (push) Waiting to run
Validate / validate-hacs (push) Waiting to run
Validate / validate-lint (push) Waiting to run
Validate / validate-setup (push) Waiting to run
2025-01-14 09:19:28 +08:00
Shangbin Yang
cd0f126f92
fix(docs): correct installation script errors in readme 2025-01-12 23:46:54 +08:00
3 changed files with 12 additions and 4 deletions

View File

@ -17,7 +17,7 @@ Xiaomi Home Integration is an integrated component of Home Assistant supported b
cd config
git clone https://github.com/XiaoMi/ha_xiaomi_home.git
cd ha_xiaomi_home
./install.sh /config
./install.sh ..
```
We recommend this installation method, for it is convenient to switch to a tag when updating `xiaomi_home` to a certain version.
@ -28,7 +28,7 @@ For example, update to version v1.0.0
cd config/ha_xiaomi_home
git fetch
git checkout v1.0.0
./install.sh /config
./install.sh ..
```
### Method 2: [HACS](https://hacs.xyz/)

View File

@ -431,6 +431,14 @@ SPEC_PROP_TRANS_MAP: dict[str, dict | str] = {
'unit_of_measurement': UnitOfEnergy.KILO_WATT_HOUR
}
},
'power': {
'device_class': SensorDeviceClass.POWER,
'entity': 'sensor',
'optional': {
'state_class': SensorStateClass.MEASUREMENT,
'unit_of_measurement': UnitOfPower.WATT
}
},
'total-battery': {
'device_class': SensorDeviceClass.ENERGY,
'entity': 'sensor',

View File

@ -17,7 +17,7 @@
cd config
git clone https://github.com/XiaoMi/ha_xiaomi_home.git
cd ha_xiaomi_home
./install.sh /config
./install.sh ..
```
推荐使用此方法安装米家集成。当您想要更新至特定版本时,只需要切换至相应的 Tag 。
@ -28,7 +28,7 @@ cd ha_xiaomi_home
cd config/ha_xiaomi_home
git fetch
git checkout v1.0.0
./install.sh /config
./install.sh ..
```
### 方法 2: [HACS](https://hacs.xyz/)