* Add MAC cleanup to samsungtv
* Simplify
* Adjust
* leftover
* Appl
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update diagnostics tests
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* initial commit
* Add tests
* Move tests to the correct file
* Fix exception type
* Undo change to default prompt
* Add intent dependency
* Move format_tool out of the class
* Fix tests
* coverage
* Adjust to new API
* Update strings
* Update tests
* Remove unrelated change
* Test referencing non-existing API
* Add test to verify no exception on tool conversion for Assist tools
* Bump voluptuous-openapi==0.0.4
* Add device_id to tool input
* Fix tests
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Borrows the same design from homeassistant.helpers.storage to avoid
rescheduling the timer every time async_schedule is called if a timer
is already running.
Instead of the timer fires too early it gets rescheduled for the time
we wanted it. This avoids 1000s of timer add/cancel during startup
* Add data point type (dpt) option to `knx.telegram` trigger
* Rename from `dpt` to `type` to match services
* Add test for GroupValueRead telegrams
* Fix device trigger schema inheritance
* Typesafe dispatcher signal
* readability
* Avoid re-decoding with same transcoder
* Speed up async_get_loaded_integrations
Use a setcomp and difference to find the components to split
to avoid the loop. A setcomp is inlined in python3.12 so its
much faster
* Speed up async_get_loaded_integrations
Use a setcomp and difference to find the components to split
to avoid the loop. A setcomp is inlined in python3.12 so its
much faster
* simplify
* fix compat
* bootstrap
* fix tests
* Detect incorrect exception in forwarded platforms
If an integration raises ConfigEntryError/ConfigEntryAuthFailed/ConfigEntryAuthFailed
in a forwarded platform it would affect the state of the config entry and cause it to
process unloads and setup retries in while the other platforms continued to setup
* Detect incorrect exception in forwarded platforms
If an integration raises ConfigEntryError/ConfigEntryAuthFailed/ConfigEntryAuthFailed
in a forwarded platform it would affect the state of the config entry and cause it to
process unloads and setup retries in while the other platforms continued to setup
* Update homeassistant/config_entries.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* adjust
* fix
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Unpause media players that were paused outside voice
* Use time.time()
* Update last paused as media players change state
* Add sleep to test
* Use context
* Implement suggestions
* initial commit
* Undo prompt chenges
* Move format_tool out of the class
* Only catch HomeAssistantError and vol.Invalid
* Add config flow option
* Fix type
* Add translation
* Allow changing API access from options flow
* Allow model picking
* Remove allowing HASS Access in main flow
* Move model to the top in options flow
* Make prompt conditional based on API access
* convert only once to dict
* Reduce debug logging
* Update title
* re-order models
* Address comments
* Move things
* Update labels
* Add tool call tests
* coverage
* Use LLM APIs
* Fixes
* Address comments
* Reinstate the title to not break entity name
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add Google Gen AI Conversation Agent Entity
* Rename agent to entity
* Revert ollama changes
* Don't copy service tests to conversation_test.py
* Move logger and cleanup snapshots
* Move property after init
* Set logger to use package
* Cleanup hass from constructor
* Fix merges
* Revert ollama change
* Add llm helper
* break out Tool.specification as class members
* Format state output
* Fix intent tests
* Removed auto initialization of intents - let conversation platforms do that
* Handle DynamicServiceIntentHandler.extra_slots
* Add optional description to IntentTool init
* Add device_id and conversation_id parameters
* intent tests
* Add LLM tools tests
* coverage
* add agent_id parameter
* Apply suggestions from code review
* Apply suggestions from code review
* Apply suggestions from code review
* Apply suggestions from code review
* Apply suggestions from code review
* Fix tests
* Fix intent schema
* Allow a Python function to be registered as am LLM tool
* Add IntentHandler.effective_slot_schema
* Ensure IntentHandler.slot_schema to be vol.Schema
* Raise meaningful error on tool not found
* Move this change to a separate PR
* Update todo integration intent
* Remove Tool constructor
* Move IntentTool to intent helper
* Convert custom serializer into class method
* Remove tool_input from FunctionTool auto arguments to avoid recursion
* Remove conversion into Open API format
* Apply suggestions from code review
* Fix tests
* Use HassKey for helpers (see #117012)
* Add support for functions with typed lists, dicts, and sets as type hints
* Remove FunctionTool
* Added API to get registered intents
* Move IntentTool to the llm library
* Return only handlers in intents.async.get
* Removed llm tool registration from intent library
* Removed tool registration
* Add bind_hass back for now
* removed area and floor resolving
* fix test
* Apply suggestions from code review
* Improve coverage
* Fix intent_type type
* Temporary disable HassClimateGetTemperature intent
* Remove bind_hass
* Fix usage of slot schema
* Fix test
* Revert some test changes
* Don't mutate tool_input
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add light platform
* Fix light test
* Suggestions by CFenner
* Fix tests
* More fixes
* Revert test changes
* Undo base entity
* Rebase
* Fix to use base entity
* Fix name
* More fixes
* Fix tests
* Add translation key
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Cleanup for apsystems and fix for strings
* Migrate to typed ConfigEntry Data for apsystems
* Improve strings for apsystems
* Improve config flow tests for apsystems by cleaning up fixtures
* Do not use Dataclass for Config Entry Typing
* Improve translations for apsystems by using sentence case and removing an apostrophe
* Rename test fixture and remove unnecessary comment in tests from apsystems
* Remove default override with default in coordinator from apsystems
* Add alarm and connectivity binary_sensors
* Get is_on for correct system
* Make coverage 100% in binary_sensor
* Address review comments
* Revert dict comprehension for now
* Fix#92419; Add Jellyfin audio_codec optionflow
* Use CONF_AUDIO_CODEC constant, clean up code based on suggestions
* Fixed typos
* Parameterize Tests
* Use parameterized test for jellyfin test media resolve
* Apply suggestions from code review
* Update homeassistant/components/jellyfin/config_flow.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fixed a bug that prevented setting Fully Kiosk config values using a template
* Added test to cover change
* Fixed issue identified by Ruff
* Update services.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add support for options to airq integration
Expose to the user the following configuration:
1. A choice between fetching from the device either:
a. the averaged (previous and the new default behaviour) or
b. noisy momentary sensor reading
2. A toggle to clip (spuriously) negative sensor values (default
functionality, previously unexposed)
To those ends:
- Introduce an `OptionsFlowHandler` alongside with a listener
`AirQCoordinator.async_set_options`
- Introduce constants to handle represent options
- Add tests and strings
* Drop OptionsFlowHandler in favour of SchemaOptionsFlowHandler
Modify `AirQCoordinator.__init__` to accommodate the change in option
handling, and drop `async_set_options` which slipped through the
previous commit.
* Ruff formatting
* Add API to get list of recorded entities
* update for latest codebase
* ruff
* Update homeassistant/components/recorder/websocket_api.py
* Update homeassistant/components/recorder/websocket_api.py
* Update homeassistant/components/recorder/websocket_api.py
* add suggested test
* Add APsystems local API integration
* Fix session usage in config_flow in apsystems local api
* Remove skip check option for apsystems_loca api
* Update APsystems API dependency and increased test coverage to 100%
* Utilize EntityDescriptions for APsystems Local integration
* Ensure coverage entries are sorted (#114424)
* Ensure coverage entries are sorted
* Use autofix
* Adjust
* Add comment to coverage file
* test CI
* revert CI test
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Use patch instead of Http Mocks for APsystems API tests
* Fix linter waring for apsystemsapi
* Fix apsystemsapi test
* Fix CODEOWNERS for apsystemsapi
* Address small PR review changes for apsystems_local
* Remove wrong lines in coveragerc
* Add serial number for apsystems_local
* Remove option of custom refresh interval fro apsystems_local
* Remove function override and fix stale comments
* Use native device id and name storage instead of custom one for apsystems_local
* Use runtime_data for apsystems_local
* Don't store entry data in runtime data
* Move from apsystems_local to apsystems domain
---------
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* First pass at timers
* Move to separate file
* Refactor to using events
* Add pause/unpause/status
* Add ordinal
* Add test for timed Assist command
* Fix name matching
* Fix IntentHandleError
* Fix again
* Refactor to callbacks
* is_paused -> is_active
* Rename "set timer" to "start timer"
* Move tasks to timer manager
* More fixes
* Remove assist command
* Remove cancel by ordinal
* More tests
* Remove async on callbacks
* Export async_register_timer_handler
* Add `knx.telegram` integration specific trigger
* Move implementation to trigger.py, use it from device_trigger
* test device_trigger
* test trigger.py
* Add "incoming" and "outgoing" and handle legacy device triggers
* work with mixed group address styles
* improve coverage
* Add no-op option
* apply changed linting rules
* Don't distinguish legacy device triggers from new ones
that's now supported since frontend has fixed default values of extra_fields
* review suggestion: reuse trigger schema for device trigger extra fields
* cleanup for readability
* Remove no-op option
* Allow templates for enabling automation triggers
* Test exception for non-limited template
* Use `cv.template` instead of `cv.template_complex`
* skip trigger with invalid enable template
instead of returning and thus not evaluating other triggers
* Import and cache supported feature enum flags only when needed
* Add comment aboud being loaded from executor.
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add repair for wrong token scope to Husqvarna Automower
* avoid new installations with missing scope
* tweaks
* just reauth
* texts
* Add link to correct account
* Update homeassistant/components/husqvarna_automower/strings.json
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/husqvarna_automower/strings.json
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/husqvarna_automower/strings.json
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add comment
* directly assert mock_missing_scope_config_entry.state is loaded
* assert that a flow is started
* pass complete url to strings and simplify texts
* shorten long line
* address review
* simplify tests
* grammar
* remove obsolete fixture
* fix test
* Update tests/components/husqvarna_automower/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* test if reauth flow has started
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Migrate File notify entity platform
* Do not load legacy notify service for new config entries
* Follow up comment
* mypy
* Correct typing
* Only use the name when importing notify services
* Make sure a name is set on new entires
* Migrate tibber notify service
* Tests and repair flow
* Use notify repair flow helper
* Cleanup strings after using helper, use HomeAssistantError
* Add entry state assertions to unload test
* Update comment
* Update comment
* Increase MQTT broker socket buffer size
* Revert unrelated change
* Try to increase buffer size
* Set INITIAL_SUBSCRIBE_COOLDOWN back to 0.5 sec
* Sinplify and add test
* comments
* comments
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Small speed up to setting up integration and config entries
When profiling tests, I noticed many calls to get_running_loop. In the places
where we are already in a coro, pass the existing loop so it does not have to
be looked up. I did not do this for places were we are not in a coro since there
is risk that an integration could be doing a non-thread-safe call and its better
that the code raises when trying to fetch the running loop vs the performance
improvement for these cases.
* fix merge
* missed some
Since every flow now has to check for single config entry, change
the check to see if a config entry exists first before calling
the _support_single_config_entry_only since _support_single_config_entry_only
has to load the integration which adds up quite a bit in test runs
* File integration entry setup
* Import to entry and tests
* Add config flow
* Exception handling and tests
* Add config flow tests
* Add issue for micration and deprecation
* Check whole entry data for uniqueness
* Revert changes change new notify entity
* Follow up on code review
* Keep name service option
* Also keep sensor name
* Make name unique
* Follow up comment
* No default timestamp needed
* Remove default name as it is already set
* Use links
* Add better testing to vacuum platform
* remove state strings
* some of the MR comments
* move MockVacuum
* remove manifest extra
* fix linting
* fix other linting
* Fix create entity calls
* Format
* remove create_entity
* change to match notify
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* fix nibe_heatpump climate for models without cooling support
* add test for set temperature with no cooling support
* fixup use self._coil_setpoint_cool None
* fixup add new test to explicitly test unsupported cooling
* Addition of add filter
This change adds an `add` filter, the addition equivalent of the existing `multiply` filter.
* Test for add filter
* Update test_template.py
* Update tests/helpers/test_template.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Add service waze_travel_time.get_travel_times
* Align strings with home-assistant.io
* Remove not needed service args
* Use SelectSelectorConfig.sort
* Move vehicle_type mangling to async_get_travel_times