* Add attachments
* Fix looking for attachment keywords in values
* Improve attachment input format
* Implement better approach to attachment parsing
* Make ruff happy
* Adjust attachment format and implementation according to comment from emontnemery
* Show muted snapcast groups as idle and use playing/idle state instead of on state for clients
* New module constant STREAM_STATUS
* Fix return type hint in snapcast
---------
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Add select for EV charging to bmw_connected_drive
* Use snapshot for select tests, split select_option tests
* Apply suggestions from code review
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Further adjustments from code review
---------
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Migrate old ZHA IasZone sensor state to zigpy cache
* Use correct type for ZoneStatus
* Test that migration happens
* Test that migration only happens once
* Fix parametrize
* Use metric units internally
* Remove unnecessary code
* Simplify sensor classes
* Remove AccuWeatherForecastSensor class
* Update wind speed value in test
* Return suggested_unit_of_measurement for wind entities
* Clean test
* Use _attr_suggested_unit_of_measurement
* Remove _get_suggested_unit()
* Remove unnecessarey code
* Add new helper function to retrieve device variables and update light platform
* seperate try catch from helper function and fix typing
* Change helper function name
* Remove unnecessary forced type changes
* More type changes
* Use mwh values from ultraheat api when available
Remove manifest cleanup from PR
Remove added device class from this PR
Restore entity registry fixture
Replace filter by attr_entity_registry_enabled_default
* Catchup with #90182 and #90183
* Add comment explaining disabling some entities
* Add parameterisation of test cases
* Initial commit
* Revert "Initial commit"
This reverts commit 452027f1a3c1be186cedd4115cea6928917c9467.
* Change ezviz to token auth
* Bump API version.
* Add fix for token expired. Fix options update and unload.
* Fix tests (PLATFORM to PLATFORM_BY_TYPE)
* Uses and stores token only, added reauth step when token expires.
* Add tests MFA code exceptions.
* Fix tests.
* Remove redundant try/except blocks.
* Rebase fixes.
* Fix errors in reauth config flow
* Implement recommendations
* Fix typing error in config_flow
* Fix tests after rebase, readd camera check on init
* Change to platform setup
* Cleanup init.
* Test for MFA required under user form
* Remove useless if block.
* Fix formating after rebase
* Fix formating.
* No longer stored in the repository
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Make abort_entries_match available in options flow
* Add tests
* Exclude ignore entries and add test
* Move to OptionsFlow
* Adjust tests
* Use mock_config_flow
* Use AbortFlow
* Remove duplicate code
* Fix export limit unit on single phase DT inverters
* Update homeassistant/components/goodwe/number.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* fetch data only for 70 minutes
* Use timezone aware now
* Type hint
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
---------
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Isolate the sql integration with a seperate query cache
If there were a lot of sql integrations they could affect
the performance of the recorder/logbook/history since they
were sharing the same LRU and since the sql sensor updates
frequently it would evict the recorder queries from the
LRU.
* generate in stmt
* avoid double gen
* Revert "avoid double gen"
This reverts commit 6a5aa65268.
Traceback (most recent call last):
File "/Users/bdraco/home-assistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
await asyncio.shield(task)
File "/Users/bdraco/home-assistant/homeassistant/components/sql/sensor.py", line 75, in async_setup_platform
await async_setup_sensor(
File "/Users/bdraco/home-assistant/homeassistant/components/sql/sensor.py", line 150, in async_setup_sensor
sessmaker := await hass.async_add_executor_job(
File "/opt/homebrew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/bdraco/home-assistant/homeassistant/components/sql/sensor.py", line 205, in _validate_and_get_session_maker_for_db_url
if sess:
UnboundLocalError: local variable 'sess' referenced before assignment
* Reduce cache key size for queries that only need single columns
These queries only cared about a single row but would select
the whole set of columns from the orm object
* wrap it
* Adding binding of IKEA Matter Switch cluster
IKEA Symfonisk Gen 2 is using Matter ZCL Switch command but on manufacture cluster then its not supported in ZVL R8 that need being bond for sending the commands to the coordinator.
* Update manufacturerspecific.py
* Update manufacturerspecific.py
Delete not needed function `@registries.BINDABLE_CLUSTERS.register(0xFC80)`
* Construct binary sensor state from zigpy cache (WIP)
* Workaround zha-quirks issue where "MotionWithReset" quirks don't update attribute cache (WIP)
zha-quirks currently has an issue where the ZONE_STATE attribute is updated (when the zone_STATUS changes).
https://github.com/zigpy/zha-device-handlers/pull/2231 is a proper fix for this.
For now, we just update the attribute cache when we get the "zone status update notification" command.
This wasn't noticed before, as the "attribute report signal" was sent from the `cluster_command()` method and the used the provided attribute (in the signal) to update the `_state` value in the binary sensor class.
As we just tell HA to write state again when we get an attribute report now, the ZONE_STATUS attribute is read now (and needs to be correct).
* Use parse() method of main class for IasZone entity (with stripped bits)
* Change wording in comment, remove explicitly sending attr signal
(This comment should be removed/changed later anyway)
* Remove note
* Get zone_status attribute id with zigpy
* Remove `security.` prefix for `IasZone` import
`AceCluster` was already directly imported and `IasZone` is too now for getting the attribute id
* Store full zone status attribute in cache
* Check that non-alarm bits are ignored in IasZone sensor test
* Re-enable occupancy binary sensor test
This test seems to work fine and I don't see any reason why it was commented out for a while
* Fix cached read mix-up for `zone_status`/`zone_state`
This allows cached reads for `zone_state` (enrolled or not), but forces a new read for `zone_status` (alarm or not).
* Use last valid state if meter is not periodically resetting
* Fix unload of entry, used during options flow submit
* Adjustments based on code review
* Move DecimalException handling to validation method
* Add test for invalid new state in calculate_adjustment method
catch LoginException directly in QBittorrentSensor init
Since the `exception` arg in QBittorrentSensor `__init__` is always
LoginException, we catch LoginException directly in `__init__` instead
of passing LoginException as an argument.
* Add tests to Lidarr
* fix js files
* take out the trash
* fix 3.9
* uno mas
* fix fixture
* ruff
* Update const.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Make "CoverEntityFeature.STOP" conditional
* Check APIVersion before checking false by default flag
* sort
---------
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* add device_info
* use entry_id as identifier + device name
* use shorthand attributes
* remove model from device info
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
---------
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Create new config parameter for default character encoding if no character encoding is declared
* Changes suggested by gjohansson-ST
* Added config flow for scape
* Removed "character"
* Change to create_async_httpx_client
* Remove CONF_ENCODING from Scrape SENSOR_SCHEMA
* Debug scrape test
* Check if changing TO a color mode
Changing brightness alone does not change work mode, but changing brightness with a color value will keep the light in white mode.
By verifying the new state has color or not, rather than the existing state being in color work mode, the light will change to color correctly.
Tuya interprets HSV as including the brightness in the (v) value (which is generally what that's used for when setting HSV values). The brightness value given by Home Assistant is still used in this case.
* Fix brightness-only turning colour mode to white
This will take into account the case where brightness is the only parameter for both the case of colour mode and white mode.
Tests passed after this change:
* Brightness only (colour mode) ✅
* Brightness only (white mode) ✅
* Colour only (colour mode) ✅
* Colour only (white mode) ✅
* Colour temp only (colour mode) ✅
* Colour temp only (white mode) ✅
* Colour + brightness (colour mode) ✅
* Colour + brightness (white mode) ✅
* Colour temp + brightness (colour mode) ✅
* Colour temp + brightness (white mode) ✅
* Fix code formatting
* display unit of elevation in met config flow
Co-authored-by: lijake8 <lijake8@users.noreply.github.com>
Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>
* use NumberSelector for met config flow
* met remove unused is_metric param
---------
Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>
Co-authored-by: lijake8 <lijake8@users.noreply.github.com>
* typings to make linter happy
* Moving device_class and native_value to init
* remove is_on and use attr_is_on
* Use try_parse_enum for sensor type
* Remove not needed sensor_type
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Update homeassistant/components/ihc/sensor.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
---------
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Remove async_setup from mqtt integration
* Final update common tests
* Related tests init
* Related tests diagnostics
* Related tests config_flow
* Cleanup and correct test
* Keep websockets_api commands in async_setup
* Look up collaborators only when adding new task.
Also fixed a few api call arguments that were incorrect. The `labels`
key should have been a list of strings and the `assignee` key should
have been `assignee_id`.
* Add missing type in test.
* Remove print
* SharkIQ Dep & Codeowner Update
* Update code owners
* Add EU Region Support
* Update Config Flow Tests
* Standardize Region Comparison Strings
* Add Translation Support to Region Selector
* Fix Validation Tests
* Reduce data sharing between ConfigFlow and DataUpdateCoordinator
Instead of fetching device information from the device once in
`ConfigFlow` and then piping it through in `ConfigEntry.data`,
only use as much as needed in `ConfigFlow.async_step_user`, then fetch
again in `AirQCoordinator._async_update_data` if a key is missing.
Additionally, factor `AirQCoordinator` out into a sumbodule.
Add a simple test for `AirQCoordinator.device_info` update.
Positive side effect: `AirQCoordinator.device_info` is
updated explicitly, instead of dumping the entire content of (a fully
compatible) `TypedDict`, retrieved from `aioairq`.
* Remove tests ill-suited to this PR
`test_config_flow.test_duplicate_error` slipped through by mistake,
while `test_coordinator.test_fetch_device_info_on_first_update` may need
a more thoroughly suite of accompanying tests
* Ignore airq/coordinator.py
...newly separated from airq/__init__.py, that's already in this list
* Reorder files alphabetically
Update Python holidays module to 0.21.13
python-holidays 0.19-0.21.13 adds support for new countries and enhances
support for many currently supported countries.
* Clean up voice assistant
* Reinstate auto-removed imports
* Resample STT audio from 44.1Khz to 16Khz
* Energy based VAD for prototyping
---------
Co-authored-by: Michael Hansen <mike@rhasspy.org>
* Fix sql doing I/O in the event loop
* Fix sql doing I/O in the event loop
* no test query on main db
* fix mocking because it was targeting the recorder
* Sun sensor
* remove extra attr
* Add tests
* Add back attributes
* position sensors disabled default
* entity id
* unique id
* test init to attributes
* Fix test init
* Fix test sensor
* test unique id
* uom
* remove rising
* Remove not needed uom property
* Fix reload issue
* degree
* Allow passing an optional name to async_track_time_interval
This is the same idea as passing a name to asyncio.create_task which
makes it easier to track down bugs
* more
* short
* still cannot find it
* add a few more
* test
* Use the json load helper in a few more incoming web requests
* drop hassio change as there is no coverage there
* Remove everything except emulated_hue since its has its own site/web
* Subclass aiohttp requests to use json helper
* Subclass aiohttp requests to use json helper
* remove unneeded
* revert for new pr
* override loads is never used so drop it
* override loads is never used so drop it
* Add a faster query for get_last_state_changes when the number of states is 1
related issue #90113
* Add a faster query for get_last_state_changes when the number of states is 1
related issue #90113
* coverage
* Apply suggestions from code review
* Allow passing binary to the WS connection
* Expand test coverage
* Test non-existing handler
* Add text to speech and stages to pipeline
* Default to "cloud" TTS when engine is None
* Refactor pipeline request to split text/audio
* Refactor with PipelineRun
* Generate pipeline from language
* Clean up
* Restore TTS code
* Add audio pipeline test
* Clean TTS cache in test
* Clean up tests and pipeline base class
* Stop pylint and pytest magics from fighting
* Include mock_get_cache_files
* Working on STT
* Preparing to test
* First successful test
* Send handler_id
* Allow signaling end of stream using empty payloads
* Store handlers in a list
* Handle binary handlers raising exceptions
* Add stt/tts dependencies to voice_assistant
* Include STT audio in pipeline test
* Working on tests
* Refactoring with stages
* Fix tests
* Add more tests
* Add method docs
* Change stt demo/cloud to AsyncIterable
* Add pipeline error events
* Move handler id to separate message before pipeline
* Add test for invalid stage order
* Change "finish" to "end"
* Use enum
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Repeated warning messages on unavailable manually specified hosts
Sonos logs warning messages every 1 minute 12 seconds for hosts that are not on-line. This fixes the issue and the warning will be logged the first time, and subsequent logs messages will be at DEBUG level
* Update homeassistant/components/sonos/__init__.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Log info message when reconnect succeeds
* Use pop to simplify code
* Add additional test, fix key error with pop
* Use pop with default return value
* Update tests/components/sonos/test_init.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Update tests/components/sonos/test_init.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Update tests/components/sonos/test_init.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Update tests/components/sonos/test_init.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Update tests/components/sonos/test_init.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Update comment, remove unneeded line of code
---------
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Add auto repairs for events schema
* Add auto repairs for events schema
* Add auto repairs for events schema
* Add auto repairs for events schema
* Add auto repairs for events schema
* fix bug - wrong table
* Fix index not being dropped on postgresql databases with a schema prefix
Added logging in case index drops fail so we can tell
why in the future
* coverage
* Rename `zha.api` to `zha.websocket_api`
* Implement a ZHA network settings API
* Use the enum name as the radio type
* Don't filter out ignored config entries
* [WIP] Start unit tests
* Add unit tests
* Rename ZHA websocket API module in `.coveragerc`
* Rename `api` to `websocket_api`
* Increase test coverage to 100%