mirror of
https://github.com/smkrv/ha-text-ai.git
synced 2026-07-22 07:03:58 +08:00
Release v2.0.0
This commit is contained in:
@@ -61,9 +61,6 @@ async def async_setup_entry(
|
||||
|
||||
class HATextAISensor(CoordinatorEntity, SensorEntity):
|
||||
"""HA text AI Sensor."""
|
||||
#
|
||||
# _attr_has_entity_name = True
|
||||
# _attr_translation_key = "ha_text_ai"
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -74,9 +71,8 @@ class HATextAISensor(CoordinatorEntity, SensorEntity):
|
||||
super().__init__(coordinator)
|
||||
self._config_entry = config_entry
|
||||
|
||||
self._attr_unique_id = config_entry.entry_id
|
||||
|
||||
self.entity_id = f"sensor.ha_text_ai"
|
||||
self._attr_unique_id = f"{config_entry.entry_id}_sensor"
|
||||
self.entity_id = "sensor.ha_text_ai"
|
||||
self._attr_name = "HA Text AI"
|
||||
|
||||
self._current_state = STATE_INITIALIZING
|
||||
@@ -92,11 +88,6 @@ class HATextAISensor(CoordinatorEntity, SensorEntity):
|
||||
"sw_version": coordinator.api_version,
|
||||
}
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
"""Return the name of the sensor."""
|
||||
return "HA Text AI"
|
||||
|
||||
@property
|
||||
def icon(self) -> str:
|
||||
"""Return the icon based on the current state."""
|
||||
|
||||
Reference in New Issue
Block a user