Compare commits

..

3 Commits

Author SHA1 Message Date
Feng Wang
00ab822873
Merge e840f38bb2 into 1cdcb785b5 2025-01-14 09:28:21 +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
topsworld
e840f38bb2 docs: update zh-Hant translate content 2025-01-14 09:11:26 +08:00
2 changed files with 10 additions and 2 deletions

View File

@ -76,8 +76,8 @@
"button": "關閉"
},
"error_msg": {
"-10100": "無效的響應參數('code'或者'state'字段為空)",
"-10101": "傳入的'state'字段不一致"
"-10100": "無效的響應參數(“code”或者“state”字段為空)",
"-10101": "傳入的“state”字段不一致"
}
},
"miot": {

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',