fix: Display only last Q&A in sensor state to prevent data truncation

- Show only the latest question and answer in sensor state
- Keep full conversation history in attributes
- Fix truncation issues in Home Assistant UI
- Maintain backwards compatibility
- No configuration changes required
This commit is contained in:
SMKRV
2024-12-10 17:02:48 +03:00
parent be06fddce1
commit 15c717fcb0
+1 -1
View File
@@ -56,7 +56,7 @@ DEFAULT_NAME: Final = "HA Text AI"
DEFAULT_NAME_PREFIX = "ha_text_ai"
DEFAULT_CONTEXT_MESSAGES: Final = 5
TRUNCATION_INDICATOR = " "
TRUNCATION_INDICATOR = " ... "
# Parameter constraints
MIN_TEMPERATURE: Final = 0.0