fix: support of wind_pressure sensor for T0xB6(730007H8)

* also update translation_key
This commit is contained in:
Cyborg2017
2026-01-16 21:43:46 +08:00
parent d19036f0db
commit 9f6cf15763
3 changed files with 19 additions and 1 deletions

View File

@@ -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: {

View File

@@ -1098,6 +1098,12 @@
}
},
"sensor": {
"total_working_time": {
"name": "Total Working Time"
},
"wind_pressure": {
"name": "Wind Pressure"
},
"tips_code": {
"name": "Tips Code"
},

View File

@@ -1334,6 +1334,12 @@
}
},
"sensor": {
"total_working_time": {
"name": "累计工作时间"
},
"wind_pressure": {
"name": "风压"
},
"tips_code": {
"name": "提示代码"
},