mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2026-02-11 06:13:49 +00:00
fix: support of wind_pressure sensor for T0xB6(730007H8)
* also update translation_key
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass
|
||||
from homeassistant.const import Platform, PERCENTAGE, UnitOfTime, UnitOfElectricPotential
|
||||
from homeassistant.const import Platform, PERCENTAGE, UnitOfPressure, UnitOfTime, UnitOfElectricPotential
|
||||
from homeassistant.components.switch import SwitchDeviceClass
|
||||
|
||||
DEVICE_MAPPING = {
|
||||
@@ -137,6 +137,12 @@ DEVICE_MAPPING = {
|
||||
"device_class": SensorDeviceClass.ENERGY,
|
||||
"unit_of_measurement": "kWh",
|
||||
"state_class": SensorStateClass.TOTAL_INCREASING,
|
||||
"translation_key": "total_elec_value"
|
||||
},
|
||||
"wind_pressure": {
|
||||
"device_class": SensorDeviceClass.PRESSURE,
|
||||
"unit_of_measurement": UnitOfPressure.PA,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
}
|
||||
},
|
||||
Platform.BUTTON: {
|
||||
|
||||
@@ -1098,6 +1098,12 @@
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"total_working_time": {
|
||||
"name": "Total Working Time"
|
||||
},
|
||||
"wind_pressure": {
|
||||
"name": "Wind Pressure"
|
||||
},
|
||||
"tips_code": {
|
||||
"name": "Tips Code"
|
||||
},
|
||||
|
||||
@@ -1334,6 +1334,12 @@
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"total_working_time": {
|
||||
"name": "累计工作时间"
|
||||
},
|
||||
"wind_pressure": {
|
||||
"name": "风压"
|
||||
},
|
||||
"tips_code": {
|
||||
"name": "提示代码"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user