* 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
* Improve recorder and worker thread matching in RecorderPool
Previously we would look at the name of the threads. This
was a brittle if because other integrations may name their
thread Recorder or DbWorker. Instead we now use explict thread
ids which ensures there will never be a conflict
* fix
* fixes
* fixes
* Use parametrize in drop connect sensor tests
* Use parametrize in drop connect sensor tests
* Make common helper
* Assert the whole entity state
* fix
---------
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: jbouwh <jan@jbsoft.nl>
* Move Totalconnect coordinator to separate module
* Move Totalconnect coordinator to separate module
* Move Totalconnect coordinator to separate module
* store runtime data inside the config entry
* remove unsued constants
* add test for InvalidDeviceAutomationConfig exception
* assert entry
* add more specific type hint
* Convert sensor recorder tests to use async API
* Fix accidentally renamed test
* Avoid unnecessary calls to async_wait_recording_done
* Avoid auto-commits for every state change
* Make sure recorder patches are set up before hass fixture
* Add title feature to notify entity platform
* Add overload variants
* Remove overloads, update signatures
* Improve test coverage
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Do not use const
* fix typo
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Convert history tests to use async API
* Add new fixture to help patch recorder
* Modify
* Modify
* Update tests/conftest.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Rename fixture
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* add 20 min timer Ecobee
* modify local value with estimated time
* add ecobee test switch
* removed manual setting of data
* Add no throttle updates
* add more test cases
* move timezone calculation in update function
* update attribute based on feedback
* use timezone for time comparaison
* add location data to tests
* remove is_on function
* update python-ecobee-api lib
* remove uncessary checks
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Refactor group state logic
* Fix
* Add helper and tests for groups with entity platforms multiple ON states
* Adress comments
* Do not store object and avoid linear search
* User dataclass, cleanup multiline ternary
* Add test cases for grouped groups
* Remove dead code
* typo in comment
* Update metjod and module docstr
* Add binary_sensor platform
* Add tests
* Remove state attributes
* Remove attrs from strings.json
* Use base entity class
---------
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
* Use websocket client to test device removal from registry
* Rename client to ws_client to avoid confusion with Unifi clients
* Use remove_device helper
* add work_area cutting_height
* add
* add default work_area
* ruff/mypy
* better names
* fit to api bump
* tweaks
* more tweaks
* layout
* address review
* change entity name
* tweak test
* cleanup entities
* fix for mowers with no workareas
* assure not other entities get deleted
* sort & remove one callback
* remove typing callbacks
* rename entity to entity_entry
* support for webos media player state
* add test coverage and don't use assumed state if media player state is available
* fallback to assumed state if media state isn't available
Co-authored-by: Shay Levy <levyshay1@gmail.com>
---------
Co-authored-by: Shay Levy <levyshay1@gmail.com>
* raise proper HomeAssistantError on command timeout
* raise proper HomeAssistantError on non-utf8 command output
* add error translation and test it
* Update homeassistant/components/shell_command/strings.json
* Update tests/components/shell_command/test_init.py
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add service to log all the current asyncio Tasks to the profiler
I have been helping users look for a task leaks, and need a
way to examine tasks at run time as trying to get someone to
run Home Assistant and attach aiomonitor is too difficult in
many cases.
* cover
* Small cleanups to climate entity feature compat
Fix some duplicate property fetches, avoid generating a new
enum every time supported_features was fetched if there was
no modifier
* param
* param
* Add matter during onboarding
* test_zeroconf_not_onboarded_running
* test_zeroconf_not_onboarded_installed
* test_zeroconf_not_onboarded_not_installed
* test_zeroconf_discovery_not_onboarded_not_supervisor
* Clean up
* Add udp address
* Test zeroconf udp info too
* test_addon_installed_failures_zeroconf
* test_addon_running_failures_zeroconf
* test_addon_not_installed_failures_zeroconf
* Clean up stale changes
* Set unique id for discovery step
* Fix tests for background flow
* Fix flow running in background
* Test already discovered zeroconf
* Mock unload entry
* Add thread safety checks to async_create_task
Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here
* Add thread safety checks to async_create_task
Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here
* missed one
* Update homeassistant/core.py
* fix mocks
* one more internal
* more places where internal can be used
* more places where internal can be used
* more places where internal can be used
* internal one more place since this is high volume and was already eager_start
It turns out we have custom components that are writing to the area registry using the async APIs from threads. We now catch it at the point async_fire is called. Instead we should check sooner and use async_fire_internal so we catch the unsafe operation before it can corrupt the registry.
* Move thread safety check in entity_registry sooner
It turns out we have a lot of custom components that are writing
to the entity registry using the async APIs from threads. We now
catch it at the point async_fire is called. Instread we should check
sooner and use async_fire_internal so we catch the unsafe operation
before it can corrupt the registry.
* coverage
* Apply suggestions from code review
It turns out we have custom components that are writing to the device registry using the async APIs from threads. We now catch it at the point async_fire is called. Instead we should check sooner and use async_fire_internal so we catch the unsafe operation before it can corrupt the registry.
* sensor: added radiation dose sensor type and units
* Add support for Aranet Radiation devices
* Fix Aranet Radiation CI issues
* Revert "sensor: added radiation dose sensor type and units"
This reverts commit 28736a7da7.
* aranet4: bump version to 2.3.3
* aranet radiation: remove removed sesnor consts
* aranet radiation: use radioactive icon by default
---------
Co-authored-by: Shay Levy <levyshay1@gmail.com>
* Fix climate entity creation when Shelly WallDisplay uses external relay as actuator
* More comments
* Wrap condition into function
---------
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
* Fix lying docstring for relative_time template function
* Update homeassistant/helpers/template.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add play/pause functionality to vizio integration
Leverages existing pyvizio functionality. My impression is that it also
works for soundbars based on https://github.com/exiva/Vizio_SmartCast_API/issues/19.
* Set vizio assumed_state to True
The Vizio API is only capable of indicating whether the device is on
or off and not whether it's playing/paused/idle. Setting assumed_state
to True gives us separate Play and Pause buttons versus the (useless)
merged Play/Pause button we would get otherwise.
* Always reload after a succesfull reauth-flow
* Add test, fix CI failures
* Add kwarg to prevent reloading and tests
* Do not reload entry for bond if it exists
* Remove mocks on internals
* Rename kwarg to always_reload
* Update tests/components/weatherflow_cloud/test_config_flow.py
* Update tests/components/homeworks/test_config_flow.py
* Update tests/components/homeworks/test_config_flow.py
* Rename to option to reload_even_if_entry_is_unchanged
* Return specific group state if there is one
* Refactor
* Additional test cases
* Refactor
* Break out if more than one on state
* tweaks
* Remove log, add comment
* add comment
* Apply suggestions from code review
Co-authored-by: J. Nick Koston <nick@koston.org>
* Refactor and improve comments
* Refactor to class method
* More filtering
* Apply suggestions from code review
* Only active if not excluded
* Do not use a set
* Apply suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add service to 17track
* Add service to 17track
change to select selector
add snapshot test
* Add service to 17track
use strings for the selector
* Add service to 17track
fix test
* add debug info to zeroconf for enphase_envoy
* Implement review feedback, lost space
Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
* review feedback textual changes.
* implement review feedbackw.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add some more zeroconf tests and valid jwt
* review feedback assert abort reason and keyerror for serialnumber
* Review feedback config flow test ends with abort or create_entry
* Review feedback optimize resource usage
* Cover new code in test.
* Use caplog for debug COV
---------
Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add number platform to Husqvarna Automower
* use fixture to enable by default
* replace state test with snapshot test
* make property in entity description
* send value as integer
* give the exists functions something to do
* Add Epic Games Store integration
Squashed commit of the following PR: #81167
* Bump epicstore-api to 0.1.7 as it handle better error 1004
Thanks to d7469f7c99
* Use extra_state_attributes instead of overriding state_attributes
* Review: change how config_flow.validate_input is handled
* Use LanguageSelector and rename locale to language
* Review: init-better use of hass.data.setdefault
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Review: don't need to update at init
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Revert "Review: don't need to update at init" --> not working otherwise
This reverts commit 1445a87c8e9b7247f1c9835bf2e2d7297dd02586.
* Review: fix config_flow.validate_input/retactor following lib bump
* review: merge async_update function with event property
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* hassfest
* Fix duplicates data from applied comment review 5035055
* review: thanks to 5035055 async_add_entities update_before_add param is not required anymore
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Fix Christmas special "Holiday sale" case
* gen_requirements_all
* Use CONF_LANGUAGE from HA const
* Move CalendarType to const
* manifest: integration_type -> service
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
* calendar: remove date start/end assert
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* const: rename SUPPORTED_LANGUAGES
* hassfest
* config: Move to ConfigFlowResult
* coordinator: main file comment
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* ruff & hassfest
* review: do not guess country
* Add @hacf-fr as codeowner
* review: remove games extra_attrs
Was dropped somehow:
- 73c20f34803b0a0ec242bf0740494f17a68f6f59 review: move games extra_attrs to data service
- other commit that removed the service part
* review: remove unused error class
was removed:
- 040cf945bb5346b6d42b3782b5061a13fb7b1f6b
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add device tracker option
* Update const name to be more understandable
* Clean up sensor code
* Clean up init and coordinator
* Add tests and update util function and it's usage
* Switch to using the registry entry and add tests
* Clean up code
* Consolidate duplicate code and adjust tests
* Fix runtime error
* Fix blocking of the event loop
* Adjust API object handling
* Update homeassistant/components/dwd_weather_warnings/exceptions.py
* Optimize coordinator data update
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Small improvement to service validation exception test and translation key
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Refactor string assertion
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Make release channel a hardcoded enum rather than a free form string
* Update enum comparison to remove equality and us identity comparison
* Fix comparison condition to match the previous implementation
* Update tests to use Enum instead of string
* Use snapshot testing in NAM diagnostics
* Use snapshot testing in NAM sensor
* Add NAM data fixture
---------
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
* Use snapshot testing in NextDNS sensor
* Use snapshot testing in NextDNS switch
* Use snapshot testing in NextDNS binary sensor
* Use snapshot testing in NextDNS button
---------
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
* Default names for visible profiles
* Increase number of devices in test
* remove unnecessary check
* Add testcase and split another into two
* Add type annotations and docstring
* Remove code which not belongs to the PR
* Add myself to codeowners
* Upgrade QBittorrent integration to show torrents
This brings the QBittorrent integration to be more in line with the Transmission integration. It updates how the integration is written, along with adding sensors for Active Torrents, Inactive Torrents, Paused Torrents, Total Torrents, Seeding Torrents, Started Torrents.
* Remove unused stuff
* Correct name in comments
* Make get torrents a service with a response
* Add new sensors
* remove service
* Add service with response to get torrents list
This adds a service with a response to be able to get the list of torrents within qBittorrent
* update
* update from rebase
* Update strings.json
* Update helpers.py
* Update to satisfy lint
* add func comment
* fix lint issues
* another update attempt
* Fix helpers
* Remove unneccesary part in services.yaml and add translations
* Fix return
* Add tests
* Fix test
* Improve tests
* Fix issue from rebase
* Add icon for get_torrents service
* Make get torrents a service with a response
* remove service
* Add service with response to get torrents list
This adds a service with a response to be able to get the list of torrents within qBittorrent
* Update to satisfy lint
* Handle multiple installed integrations
* fix lint issue
* Set return types for helper methods
* Create the service method in async_setup
* Add CONFIG_SCHEMA
* Add get_all_torrents service
* fix lint issues
* Add return types and ServiceValidationError(s)
* Fix naming
* Update translations
* Fix tests
* Migrate device_sun_light_trigger to use async_track_state_change_event
async_track_state_change is legacy and will eventually be deprecated after
all core usage is removed. There are only two places left
* coverage
* Skip processing websocket_api schema if has no arguments
About 40% of the websocket commands on first connection have
no arguments. We can skip processing the schema for these cases
* cover
* fixes
* allow extra
* Revert "allow extra"
This reverts commit 85d9ec36b3.
* match behavior
* Show bluetooth adapter model and manufacturer in config flow
If there are multiple adapters, it could be a bit difficult
to figure out which one is which
* Show bluetooth adapter model and manufacturer in config flow
If there are multiple adapters, it could be a bit difficult
to figure out which one is which
* reorder
* reorder
* names
* remove
* fix incomplete mocking
* more missing mocks
* Add support for payload_template in rest component
* Update homeassistant/components/rest/schema.py
* Update homeassistant/components/rest/data.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>