* Consequently ignore empty MQTT state payloads and set state to `unknown` on "None" payload
* Do not change preset mode behavior
* Add device tracker ignoring empty state
* Ignore empty state for lock
* Resolve merge errors
* Require device id when registering timer handlers
* Require device id for timer intents
* Raise errors for unregistered device ids
* Add callback
* Add types for callback to __all__
* Clean up
* More clean up
* Add types to event tracker data
* fixes
* do not test event internals in other tests
* fixes
* Update homeassistant/helpers/event.py
* cleanup
* cleanup
* Initial commit
* add basic tests (will probably fail)
* Set basic UID for now
* Various improvements
* use new naming convention?
* bit by bit, still not working tho
* Add tz selection
* Remove failing tests
* update unique_id
* add the tests again
* revert to previous binary_sensor test
* remove translations
* apply suggestions
* remove const.py
* Address review
* revert changes
* Initial fixes for tests
* Initial commit
* add basic tests (will probably fail)
* Set basic UID for now
* Various improvements
* use new naming convention?
* bit by bit, still not working tho
* Add tz selection
* Remove failing tests
* update unique_id
* add the tests again
* revert to previous binary_sensor test
* remove translations
* apply suggestions
* remove const.py
* Address review
* revert changes
* Fix bad merges in rebase
* Get tests to run again
* Fixes due to fails in ruff/pylint
* Fix binary sensor tests
* Fix config flow tests
* Fix sensor tests
* Apply review
* Adjust candle lights
* Apply suggestion
* revert unrelated change
* Address some of the comments
* We should only allow a single jewish calendar config entry
* Make data schema easier to read
* Add test and confirm only single entry is allowed
* Move OPTIONS_SCHEMA to top of file
* Add options test
* Simplify import tests
* Test import end2end
* Use a single async_forward_entry_setups statement
* Revert schema updates for YAML schema
* Remove unneeded brackets
* Remove CONF_NAME from config_flow
* Assign hass.data[DOMAIN][config_entry.entry_id] to a local variable before creating the sensors
* Data doesn't have a name remove slugifying of it
* Test that the entry has been created correctly
* Simplify setup_entry
* Use suggested values helper and flatten location dictionary
* Remove the string for name exists as this error doesn't exist
* Remove name from config entry
* Remove _attr_has_entity_name - will be added in a subsequent PR
* Don't override entity id's - we'll fixup the naming later
* Make location optional - will by default revert to the user's home location
* Update homeassistant/components/jewish_calendar/strings.json
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* No need for local lat/long variable
* Return name attribute, will deal with it in another PR
* Revert unique_id changes, will deal with this in a subsequent PR
* Add time zone data description
* Don't break the YAML config until the user has removed it.
* Cleanup initial config flow test
---------
Co-authored-by: Tsvi Mostovicz <ttmost@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Improve error logging on invalid MQTT entity state
* Explain not hanlding TpeError and ValueError
* Move length check closer to source
* use _LOGGER.exception
Tests using `setup_comp_4` and `setup_comp_6` have been replaced by a parameterized tests in #105643. Tests using `setup_comp_5` are therefore still duplicates and are removed.
* Add cover
* Test coverage
* Json lint
* Apply suggestions from code review
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests
* Fix features
* Update snapshot from fixture
* Apply suggestions from code review
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add lock platform
* Tests and fixes
* Fix json
* Review Feedback
* Apply suggestions from code review
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* wording
* Fix rebase
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add a recommended model for Google Gen AI
* Add recommended settings to Google Gen AI
* Revert no API msg
* Use correct default settings
* Make sure options are cleared when using recommended
* Update snapshots
* address comments
* Cache serialize of manifest for loaded integrations
The manifest/list and manifest/get websocket apis
are called frequently when moving around in the UI.
Since the manifest does not change we can make
the the serialized version a cached property
* reduce
* reduce
* Refactor state_reported listener setup to avoid merge in async_fire_internal
Instead of merging the listeners in async_fire_internal, setup the listener for
state_changed at the same time so async_fire_internal can avoid having to copy
another list
* Refactor state_reported listener setup to avoid merge in async_fire_internal
Instead of merging the listeners in async_fire_internal, setup the listener for
state_changed at the same time so async_fire_internal can avoid having to copy
another list
* tweak
* tweak
* tweak
* tweak
* tweak
* Delay firmware probing until after the user picks the firmware type
* Remove confirmation step
* Fix unit tests
* Simplify unit test patching logic
Further simplify unit tests
* Bump Zigbee firmware up to the first choice
* Reuse `async_step_pick_firmware` during options flow
* Proactively validate all ZHA entries, not just the first
There can only be one (for now) so this changes nothing functionally
* Add unit test for bad firmware when configuring Thread
* 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