* Restore entity ID and user customizations of deleted entities
* Clear removed areas, categories and labels from deleted entities
* Correct test
* Fix logic for disabled_by and hidden_by
* Improve test coverage
* Fix sorting
* Always restore disabled_by and hidden_by
* Update mqtt test
* Update pglab tests
* Add WS command to help reset custom entity_id
* Calculate suggested object id from entity properties
* Fix logic and add additional tests
* Adjust test
* Update folder_watcher test
* Handle current entity id matches the automatic entity id
* Don't store calculated_object_id
* Update snapshots
* Update snapshots
* Update test
* Tweak logic for reusing current entity_id
* Improve test
* Don't assign same entity_id to several entities
* Prioritize custom entity name
* Update snapshots
* Update snapshots
* Allow disabled selectors in config flows. Show hidden options for history_stats.
* fix tests
* use optional instead of required
* rename flag to readonly
* rename to read_only
* Update to use read_only field as part of selector definition
* lint fix
* Fix test
* All selectors
If the entity is already registered, avoid trying to work
out the suggested_entity_id and suggested_object_id as
async_get_or_create will discard them anyways.
* Add a tool for fetching todo list items
* Simplify the todo list interface by adding an "all" status
* Update prompt to improve performance on smaller models
* Move state length validation to StateMachine async_set method
We call validate_state to make sure we do not allow any states
into the state machine that have a length>255 so we do not break
the recorder. Since async_set_internal already requires callers
to pre-validate the state, we can move the check to async_set
instead of at State object creation time to avoid needing to
check it twice in the hot path (entity write state)
* move check in async_set_internal so it only happens on state change
* no need to check if same_state
* Reduce ref counting in _async_write_ha_state
It no longer makes sense to keep a temp reference
to entity_id and hass since the function was
refactored and there are very few accesses now.
* one more place we can reduce ref counts
async_add_entities would return early if no entities
were passed but its a bit cleaner to not create the
task in the first place. I noticed in py-spy that
tplink was passing empty lists frequently
which made a task and than did nothing.
* Fix a bug parsing a streaming response with no json
* Remove debug lines
* Fix quality loss for LLM conversation agent question answering
* Update tests
* Update ollama to allow selecting mutiple LLM APIs
* Update homeassistant/helpers/llm.py
* Avoid gather since these don't do I/O
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Remove unnecessary imports of http integration
* Check reason for test failures
* Revert "Check reason for test failures"
This reverts commit 5ccf356ab0.
* Update tests
* Improve handling of empty iterable in async_add_entities
We had two checks here because we were doing an empty
iterable check. If its a list we can check it directly
but if its not we need to convert it to a list to know
if its empty.
* tweaks
* tasks never used
* fix: two minor LLM changes to speed up prefill
- moved the current date/time to the end of the prompt
- started sorting all entities by last_changed
* addressed PR comments
* fixed tests
* reduced scope of try/catch in LLM prompt
* addressed more PR comments
* fixed Anthropic test
* addressed another PR comment
* fixed remainder of tests
Remove some calls to internal functions that
are now available directly on the devices
and deleted_devices objects
Remove internal functions that are no
longer used