* 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
* Initial monzo implementation
* Tests and fixes
* Extracted api to pypi package
* Add app confirmation step
* Corrected data path for accounts
* Removed useless check
* Improved tests
* Exclude partially tested files from coverage check
* Use has_entity_name naming
* Bumped monzopy to 1.0.10
* Remove commented out code
* Remove reauth from initial PR
* Remove useless code
* Correct comment
* Remove reauth tests
* Remove device triggers from intial PR
* Set attr outside constructor
* Remove f-strings where no longer needed in entity.py
* Rename field to make clearer it's a Callable
* Correct native_unit_of_measurement
* Remove pot transfer service from intial PR
* Remove reauth string
* Remove empty fields in manifest.json
* Freeze SensorEntityDescription and remove Mixin
Also use list comprehensions for producing sensor lists
* Use consts in application_credentials.py
* Revert "Remove useless code"
Apparently this wasn't useless
This reverts commit c6b7109e47202f866c766ea4c16ce3eb0588795b.
* Ruff and pylint style fixes
* Bumped monzopy to 1.1.0
Adds support for joint/business/etc account pots
* Update test snapshot
* Rename AsyncConfigEntryAuth
* Use dataclasses instead of dictionaries
* Move OAuth constants to application_credentials.py
* Remove remaining constants and dependencies for services from this PR
* Remove empty manifest entry
* Fix comment
* Set device entry_type to service
* ACC_SENSORS -> ACCOUNT_SENSORS
* Make value_fn of sensors return StateType
* Rename OAuthMonzoAPI again
* Fix tests
* Patch API instead of integration for unavailable test
* Move pot constant to sensor.py
* Improve type safety in async_get_monzo_api_data()
* Update async_oauth_create_entry() docstring
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add support for RR DNS
* 🧪 Update tests for DNS IP round-robin
* 🤖 Configure DNS IP round-robin automatically
* 🐛 Sort IPv6 addresses correctly
* Limit returned IPs and cleanup test class
* 🔟 Change max DNS results to 10
* Rename IPs to ip_addresses
* Bump ondilo to 0.5.0 and handle errors retrieving data
* Bump ondilo to 0.5.0 and handle errors retrieving data
* Updated ruff recommendation
* Refactor
* Refactor
* Added exception log and updated call to update data
* Updated test cases to test through state machine
* Updated test cases
* Updated test cases after comments
* REnamed file
---------
Co-authored-by: Joostlek <joostlek@outlook.com>
* Bump google-generativeai to v0.5.2
* Avoid exceptions when Gemini responses are blocked
* pytest --snapshot-update
* set error response
* add test
* ruff
* Switch out aiohttp-isal for aiohttp-fast-zlib to make isal optional
aiohttp-isal does not work on core installs where the system has 32bit userland and a 64bit kernel because we have no way to detect this configuration or handle it.
fixes#116681
* Update homeassistant/components/isal/manifest.json
* Update homeassistant/components/isal/manifest.json
* hassfest
* isal
* fixes
* Apply suggestions from code review
* make sure isal is updated before http
* fix tests
* late import
We only did discovery for the key at setup time. If it
changed, a reloaded of the integration was needed to
update the key. We now update it every time we update
the lock detail.
* Turn on thread safety checks in async_dispatcher_send
We keep seeing issues where async_dispatcher_send is called from
a thread which means we call the callback function on the other
side in the thread as well which usually leads to a crash
* Turn on thread safety checks in async_dispatcher_send
We keep seeing issues where async_dispatcher_send is called from
a thread which means we call the callback function on the other
side in the thread as well which usually leads to a crash
* adjust
* Refactor entity_platform polling to avoid double time fetch
Replace async_track_time_interval with loop.call_later
to avoid the useless time fetch every time the listener
fired since we always throw it away
* fix test