فهرست منبع

maint(climate): use new native_ prefixed properties

HA 2026.11 deprecated temperature related properties, and replaced them with
native_ prefixed ones to be consistent with other entities that do unit conversion.

Issue #6473
Jason Rumney 1 روز پیش
والد
کامیت
5d607c9fc2
1فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 5 5
      custom_components/tuya_local/climate.py

+ 5 - 5
custom_components/tuya_local/climate.py

@@ -125,7 +125,7 @@ class TuyaLocalClimate(TuyaLocalEntity, ClimateEntity):
             self._attr_supported_features |= ClimateEntityFeature.TURN_ON
 
     @property
-    def temperature_unit(self):
+    def native_temperature_unit(self):
         """Return the unit of measurement."""
         # If there is a separate DPS that returns the units, use that
         if self._unit_dps:
@@ -170,21 +170,21 @@ class TuyaLocalClimate(TuyaLocalEntity, ClimateEntity):
         return PRECISION_WHOLE
 
     @property
-    def target_temperature(self):
+    def native_target_temperature(self):
         """Return the currently set target temperature."""
         if self._temperature_dps is None:
             raise NotImplementedError()
         return self._temperature_dps.get_value(self._device)
 
     @property
-    def target_temperature_high(self):
+    def native_target_temperature_high(self):
         """Return the currently set high target temperature."""
         if self._temp_high_dps is None:
             raise NotImplementedError()
         return self._temp_high_dps.get_value(self._device)
 
     @property
-    def target_temperature_low(self):
+    def native_target_temperature_low(self):
         """Return the currently set low target temperature."""
         if self._temp_low_dps is None:
             raise NotImplementedError()
@@ -289,7 +289,7 @@ class TuyaLocalClimate(TuyaLocalEntity, ClimateEntity):
             await self._device.async_set_properties(dps_map)
 
     @property
-    def current_temperature(self):
+    def native_current_temperature(self):
         """Return the current measured temperature."""
         if self._current_temperature_dps:
             temp = self._current_temperature_dps.get_value(self._device)