mirror of
https://github.com/smkrv/ha-text-ai.git
synced 2026-07-25 00:24:00 +08:00
Release v2.0.0
This commit is contained in:
@@ -99,12 +99,8 @@ class HATextAISensor(CoordinatorEntity, SensorEntity):
|
||||
|
||||
@property
|
||||
def icon(self) -> str:
|
||||
"""Return the icon based on the current state."""
|
||||
if self._current_state == STATE_PROCESSING:
|
||||
return ENTITY_ICON_PROCESSING
|
||||
elif self._current_state in [STATE_ERROR, STATE_DISCONNECTED, STATE_RATE_LIMITED]:
|
||||
return ENTITY_ICON_ERROR
|
||||
return ENTITY_ICON
|
||||
"""Always return the custom icon."""
|
||||
return "/local/icons/icon.svg"
|
||||
|
||||
@property
|
||||
def state(self) -> StateType:
|
||||
|
||||
Reference in New Issue
Block a user