diff --git a/custom_components/tuya_local/devices/jiahong_et72w_thermostat.yaml b/custom_components/tuya_local/devices/jiahong_et72w_thermostat.yaml index 34218e3156..d3a1ab460b 100644 --- a/custom_components/tuya_local/devices/jiahong_et72w_thermostat.yaml +++ b/custom_components/tuya_local/devices/jiahong_et72w_thermostat.yaml @@ -139,14 +139,12 @@ secondary_entities: - dps_val: true value: F - entity: sensor - name: Energy + name: Runtime dps: - id: 117 type: integer name: sensor - unit: kWh - mapping: - - scale: 10 + unit: min - id: 116 type: integer name: calibration diff --git a/tests/devices/test_jiahong_et72w_thermostat.py b/tests/devices/test_jiahong_et72w_thermostat.py index 5e7b9c4aae..0500d72f36 100644 --- a/tests/devices/test_jiahong_et72w_thermostat.py +++ b/tests/devices/test_jiahong_et72w_thermostat.py @@ -1,7 +1,7 @@ from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode from homeassistant.components.number.const import NumberDeviceClass from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT, SensorDeviceClass -from homeassistant.const import UnitOfEnergy, UnitOfTemperature +from homeassistant.const import UnitOfTemperature, UnitOfTime from ..const import JIAHONG_ET72W_PAYLOAD from ..mixins.climate import TargetTemperatureTests @@ -25,7 +25,7 @@ UNKNOWN112_DPS = "112" UNKNOWN113_DPS = "113" CALIB_DPS = "116" -ENERGY_DPS = "117" +RUNTIME_DPS = "117" HVACACTION_DPS = "118" TEMPLIMIT_DPS = "121" @@ -115,10 +115,10 @@ def setUp(self): "testdata": (214, 21.4), }, { - "dps": ENERGY_DPS, - "name": "sensor_energy", - "unit": UnitOfEnergy.KILO_WATT_HOUR, - "testdata": (1234, 123.4), + "dps": RUNTIME_DPS, + "name": "sensor_runtime", + "unit": UnitOfTime.MINUTES, + "testdata": (1234, 1234), }, ] ) @@ -228,7 +228,7 @@ def test_extra_state_attributes(self): def test_multi_sensor_extra_state_attributes(self): self.dps[CALIB_DPS] = 321 self.assertEqual( - self.multiSensor["sensor_energy"].extra_state_attributes, + self.multiSensor["sensor_runtime"].extra_state_attributes, {"calibration": 321}, )