* 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
* 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.