mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2025-10-16 11:18:28 +00:00
feat: update device control for T0xCC and T0xAC
This commit is contained in:
@@ -61,7 +61,9 @@ class MideaSensorEntity(MideaEntity, SensorEntity):
|
||||
@property
|
||||
def native_value(self):
|
||||
"""Return the native value of the sensor."""
|
||||
value = self.device_attributes.get(self._entity_key)
|
||||
# Use attribute from config if available, otherwise fall back to entity_key
|
||||
attribute = self._config.get("attribute", self._entity_key)
|
||||
value = self._get_nested_value(attribute)
|
||||
|
||||
# Handle invalid string values
|
||||
if isinstance(value, str) and value.lower() in ['invalid', 'none', 'null', '']:
|
||||
|
Reference in New Issue
Block a user