forked from HomeAssistant/midea-meiju-codec
feat: refactor code to add more attributes.
This commit is contained in:
@@ -52,18 +52,17 @@ class MideaSensorEntity(MideaEntity, SensorEntity):
|
||||
device.sn,
|
||||
device.sn8,
|
||||
device.model,
|
||||
entity_key
|
||||
entity_key,
|
||||
device=device,
|
||||
manufacturer=manufacturer,
|
||||
rationale=rationale,
|
||||
config=config,
|
||||
)
|
||||
self._device = device
|
||||
self._manufacturer = manufacturer
|
||||
self._rationale = rationale
|
||||
self._config = config
|
||||
|
||||
@property
|
||||
def entity_id_suffix(self) -> str:
|
||||
"""Return the suffix for entity ID."""
|
||||
return f"sensor_{self._entity_key}"
|
||||
|
||||
@property
|
||||
def native_value(self):
|
||||
"""Return the native value of the sensor."""
|
||||
|
Reference in New Issue
Block a user