* 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>
* Remove forecast option
* Update strings
* Use separate DataUpdateCoordinator for observation and forecast
* Fix tests
* Remove unneeded variable
* Separate data coordinator classes
* Use list comprehension
* Separate coordinator clasess to add type annotations
* Test the availability of the forecast sensor entity
* Add DataUpdateCoordinator types
* Use snapshot for test_sensor()
---------
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
* Fix check for missing parts on incoming SMS
* Add tests for get_and_delete_all_sms function
* Fix CI issues
* Install libgammu-dev in CI
* Bust the venv cache
* Include python-gammu in requirements-all.txt
* Adjust install of dependencies
---------
Co-authored-by: Erik <erik@montnemery.com>
* Fixed home hold and added select hold
* Fixed home hold and added select hold
* Removed select_hold for now
* Fixed wrong import block sorting
* Fixed unit tests for AppleTV
* Added select hold command to AppleTV integration
* Removed home_hold and added hold_secs option for remote commands
* Added DEFAULT_HOLD_SECS
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Exclude manifest files from youtube media extraction
* Add media_extractor service to extract media
* Fix snapshot
* Run ytdlp async
* Add icon
* Fix
* Fix
* Adding a new "Ambient Weather Network" integration.
* Rebase and update code coverage.
* Addressed some reviewer comments.
* Remove mnemonics and replace with station names.
* Remove climate-utils
* Remove support for virtual stations.
* Rebase
* Address feedback
* Remove redundant errors
* Reviewer feedback
* Add icons.json
* More icons
* Reviewer feedback
* Fix test
* Make sensor tests more robust
* Make coordinator more robust
* Change update coordinator to raise UpdateFailed
* Recover from no station found error
* Dynamically set device name
* Address feedback
* Disable some sensors by default
* Reviewer feedback
* Change from hub to service
* Rebase
* Address reviewer feedback
* Reviewer feedback
* Manually rerun ruff on all files
* Add Config Flow to lg_netcast
* Add YAML import to Lg Netcast ConfigFlow
Deprecates YAML config support
* Add LG Netcast Device triggers for turn_on action
* Add myself to LG Netcast codeowners
* Remove unnecessary user_input validation check.
* Move netcast discovery logic to the backend
* Use FlowResultType Enum for tests
* Mock pylgnetcast.query_device_info instead of _send_to_tv
* Refactor lg_netcast client discovery, simplify YAML import
* Simplify CONF_NAME to use friendly name
Fix: Use Friendly name for Name
* Expose model to DeviceInfo
* Add test for testing YAML import when not TV not online
* Switch to entity_name for LGTVDevice
* Add data_description to host field in user step
* Wrap try only around _get_session_id
* Send regular request for access_token to ensure it display on the TV
* Stop displaying access token when flow is aborted
* Remove config_flow only consts and minor fixups
* Simplify media_player logic & raise new migration issue
* Add async_unload_entry
* Create issues when import config flow fails, and raise only a single yaml deprecation issue type
* Remove single use trigger helpers
* Bump issue deprecation breakage version
* Lint
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* add sensor with climate activity status
* Update strings.json
* use icon translation and is_available for sensor
* use enum with translations
* Return None if value is UNKNOWN
* fix getting the value: x.value
* fix getting the value: x instead of x.value
* Fix tests and pre-commit
---------
Co-authored-by: Richard <rikroe@users.noreply.github.com>
The test assumed the node updates would happen in a specific order
but they can switch order based on timing.
Adjust to check to make sure all the nodes are called but make it
order independent
* Update Shelly to use initialize from aioshelly
* Save indentation in _async_device_connect
* Use firmware_supported property from aioshelly
* Review comments
* Bump aioshelly
* Fix lint errors
* Test RPC initialized update
* Add temperature range switch (high/low) to Balboa spa integration.
* Change Balboa spa integration temperature range control from switch to select
* Balboa spa integration: Fix ruff formatting
* Balboa spa integration: increase test coverage
* Balboa spa integration review fixes: Move instance attributes as class attributes. Fix code comments.
The patch was still too late in #115442
There is no good candidate to patch here since the late operation
is the error log that is being tested.
Patching the logger did not seem like a good idea so I went with
patching to wait for the error to be emitted since emit is the public
API of the log handler and was less likely to change
* add re-auth-flow to fyta integration
* add strings for reauth-flow
* resolve typing error
* update based on review comments
* Update homeassistant/components/fyta/config_flow.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* add async_auth
* adjustment based on review commet
* Update test_config_flow.py
* remove credentials
* Update homeassistant/components/fyta/config_flow.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/fyta/test_config_flow.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/fyta/test_config_flow.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update conftest.py
* Update test_config_flow.py
* Aktualisieren von conftest.py
* Update test_config_flow.py
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Use enum device class in Netatmo wind direction
* Use enum device class in Netatmo wind direction
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Bump aiohttp to 3.9.4
This is rc0 for now but will be updated when the full release it out
* cleanup cruft
* regen
* fix tests (these changes are fine)
* chunk size is too small to read since boundry is now enforced
* chunk size is too small to read since boundry is now enforced
* Add notify entity component
* Device classes, restore state, icons
* Add icons file
* Add tests for kitchen_sink
* Remove notify from no_entity_platforms in hassfest icons, translation link
* ruff
* Remove `data` feature
* Only message support
* Complete initial device classes
* mypy pylint
* Remove device_class implementation
* format
* Follow up comments
* Remove _attr_supported_features
* Use setup_test_component_platform
* User helper at other places
* last comment
* Add entry unload test and non async test
* Avoid default mutable object in constructor
* Protobuf audio test
* Remove extraneous code
* Rework voice assistant pipeline
* Move variables
* Fix reading flags
* Dont directly put to queue
* Bump aioesphomeapi to 24.0.0
* Update tests
- Add more tests for API pipeline
- Convert some udp tests to use api pipeline
- Update fixtures for new device info flags
* Fix bad merge
---------
Co-authored-by: Michael Hansen <mike@rhasspy.org>
* add Arve integration
* Update homeassistant/components/arve/config_flow.py
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Various fixes, changed scan interval to one minute
* coordinator implementation
* Code cleanup
* Moved device info to the entity.py, ArveDeviceEntityDescription to sensor.py
* delete refresh before adding entities
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Update tests/components/arve/test_config_flow.py
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Update tests/components/arve/conftest.py
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Changed value_fn in sensors.py, added typing to description
* Code cleanups, platfrom test implementation
* New code cleanups, first two working tests
* Created platform test, generated snapshots
* Reworked integration to get all of the customer devices
* new fixes
* Added customer id, small cleanups
* Logic of setting unique_id to the config flow
* Added test of abortion on duplicate config_flow id
* Added "available" and "device" properties fro ArveDeviceEntity
* small _attr_unique_id fix
* Added new test, improved mocking, various fixes
* Various cleanups and fixes
* microfix
* Update homeassistant/components/arve/strings.json
* ruff fix
---------
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* airzone_cloud: add Water Heater support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* run CI
---------
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* Remove aux heat
* Add switch entity for emheat
* Optimized async_setup_entry
* Fix errors in comments
* Fix new ruff failuer
* Use constant for EM
* Protect EM mode - must be in heat to turn on/off
* Restore aux_heat
* Add repair issue
* Add missing place holder to issue
* Better placeholder "option"
* When quoting placeholders, always use double quotes so Lokalise recognizes the placeholder.
* Ensure that strings does not contain placeholders in single quotes.
* Avoid redefining value
* Moved string_with_no_placeholders_in_single_quotes
* Define regex once
* Fix tests
* DNM: Make run_immediately the default for listeners
This is a test to see how much progress we have made twords this goal
https://github.com/home-assistant/core/pull/113727#issuecomment-2004587947
* fix shutdown
* Revert "fix shutdown"
This reverts commit a8969d7db9.
* set false since it break utility meter tests
* one more
* fix rfxtrx test
* test needs to be explict now
* fix matrix
* fail sooner
* Ecobee: add current_humidity to humidifier
* Ecobee: Add test for current_humidity property
* Update current_humidity handling in climate and
humidifier entity to support the ecobee API
not returning actualHumidity, which is an optional
value.
Also updated tests to add a thermostat which
covers a non-populated humidity. In passing,
set up the new test thermostat to cover a missing
condition where the code doens't recognize the
ecobee model number. This gets ecobee humidifier
test coverage to 100%
* Create right import issues in Downloader
* Create right import issues in Downloader
* Create right import issues in Downloader
* Create right import issues in Downloader
* Fix
* Fix
* Fix
* Fix
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fix
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Speed up logger setup
Preload core.logger and avoid saving it
until after startup
* add comment about 180s
* Adjust grammar
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Default agent as entity
* Migrate constant to point at new value
* Fix tests
* Fix more tests
* Move assist pipeline back to cloud after dependenceis
* Add uptime sensor to Glances
* Merge upstream
* Merge upstream
* Fix coverage
* Add uptime sensor to Glances
* Merge upstream
* Merge upstream
* Fix coverage
* Move most uptime specific code to DataUpdateCoordinator
* Add last_reported after merge with upstream
* Add unit tests for uptime sensor
* Add unit tests for uptime sensor
* Add unit tests for uptime sensor
* Add unit tests for uptime sensor
* Move update code out of getter native_value()
* Add unit tests for uptime sensor
* Update uptime method signatures
* Set uptime icon in icons.json
* Use freezer.tick for uptime tests
* Frozen time test fails on github
* Add MIN_UPTIME_VARIATION const value
* Only update uptime on startup or when remote server restarts
* Fix for 0 values
* Set value to None to set state to Unknown if key is not found
* Add unit test for uptime change
* Code reduction
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Re-organize conversation integration
* Clean up 2 more imports
* Re-export models
* Fix imports
* Uno mas
* Rename agents to models
* Fix cast test that i broke?
* Just blocking till I'm done
* Wrong place
* Mark executor jobs as background unless created from a tracked task
If the current task is not tracked the executor job should not
be a background task to avoid delaying startup and shutdown.
Currently any executor job created in a untracked task or
background task would end up being tracked and delaying
startup/shutdown
* import exec has the same issue
* Avoid tracking import executor jobs
There is no reason to track these jobs as they are always awaited
and we do not want to support fire and forget import executor jobs
* fix xiaomi_miio
* lots of fire time changed without background await
* revert changes moved to other PR
* more
* more
* more
* m
* m
* p
* fix fire and forget tests
* scrape
* sonos
* system
* more
* capture callback before block
* coverage
* more
* more races
* more races
* more
* missed some
* more fixes
* missed some more
* fix
* remove unneeded
* one more race
* two
* Use `setup_test_component_platform` helper for select entity component tests instead of `hass.components`
* Use _values instead of _attr_current_option
* Clean up
* Set default current_option for second mock entity
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Integration for Energenie Power-Strips (EGPS)
* cleanups reocommended by reviewer
* Adds missing exception handling when trying to send a command to an unreachable device.
* fix: incorrect handling of already opened devices in pyegps api. bump to pyegps=0.2.4
* Add blank line after file docstring, and other cosmetics
* change asyncio.to_thread to async_add_executer_job
* raises HomeAssistantError EgpsException in switch services.
* switch test parameterized by entity name
* reoved unused device registry
* add translation_key and update_before_add
* bump pyegps dependency to version to 0.2.5
* combined get_device patches and put into conftest.py
* changed switch entity to use _attr_is_on and cleanups
* further cleanup
* Apply suggestions from code review
* refactor: rename egps to energenie_power_sockets
* updated test snapshot
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Address late review comments for fan entity component test
* Update tests/components/fan/common.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* SharkIQ Dep & Codeowner Update
* Update code owners
* SharkIQ Room-Targeting Support
* Add Tests for New Service
* Remove unreachable code
* Refine tests to reflect unreachable code changes
* Updates based on PR comments
* Updates based on PR review comments
* Address issues found in PR Review
* Update Exception type, add excption message to strings. Do not save room list in state history.
* Update message to be more clear that only one faild room is listed
* couple more updates based on comments
---------
Co-authored-by: jrlambs <jrlambs@gmail.com>
Co-authored-by: Robert Resch <robert@resch.dev>
* Use `setup_test_component_platform` helper for switch entity component tests instead of `hass.components`
* Do not import fixtures
* Re-add switch.py to testing_config as stub
* Rename to mock_toggle_entities
* Remove deprecated forecast attribute from WeatherEntity
* Fix some
* Ruff
* ipma
* buienradar
* some more
* Some more
* More and more
* strings
* attr_forecast
* Fix nws
* Fix
* remove from coverage
* Remove recorder test
* Review comments
* Record state.last_reported
* Include last_reported in parts of the history API
* Use a bulk update
* fix refactoring error
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Use `mock_platform` for cover entity component tests instead of `hass.components`
* Remove setup fixture and use helper function
* Remove is_on from MockCover
* Run ruff
* Do not override state in `MockCover` in cover tests
* Remove is_on from MockCover
* Refactor Integration sensor.
* Use local simple function to verify the State is numeric.
* Merge two methods to one.
* Method renaming: _handle_state_change
* Move async_write_ha_state to the caller.
* Add comment on why attr_icon is set to None
* Remove possible None type of State in validation methods.
* Use a dict to map method name to method class.
* Explain derived unit after integration.
* Renaming to _multiply_unit_with_time and elaborate in docstring.
* Set integral unit_of_measurement explicitly to None if source unit_of_measurement is None
* One function for unit of measurement related steps.
* Improve docstring of _multiply_unit_with_time
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Apply f-string suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Be more clear in comment about removing the sensors icon default.
* Apply suggestions from code review
Co-authored-by: Diogo Gomes <diogogomes@gmail.com>
* Update homeassistant/components/integration/sensor.py
* Update homeassistant/components/integration/sensor.py
* Update homeassistant/components/integration/sensor.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Diogo Gomes <diogogomes@gmail.com>
* initial fork
* intial tests
* Initial test coverage
* extra coverage
* complete config flow tests
* fix generated
* Update CODEOWNERS
* Move logic to PyPi library and update to pass config_flow test and pre-commit
* Remove Button, Select and Sensor platform for initial PR
* Update manifest.json
* Change info logs to debug in cover
* Use _abort_if_unique_id_configured instead of custom loop checking existing entries
* Change platforms list to PLATFORMS global
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Remove VERSION from ConfigFlow
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Replace all info logs by debug
* Use instance attributes in ConfigFlow
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Add return type and docstring to init in ConfigFlow
* Add recovery to tests containing errors
* Make NoBluetoothAdapter and NoDevicesFound abort instead of show error
* Change info logs to debug
* Add and change integration type from hub to device
* Use CONF_ADDRESS from homeassistant.const
* Move cover attributes initialization out of constructor
* Change CONF_ADDRESS in tests from const to homeassistant.const
* Remove unused part of tests
* Change 'not motion_device' to 'motion_device is None'
* Change _attr_connection_type to _connection_type
* Add connections to DeviceInfo
* Add model to DeviceInfo and change MotionBlindType values
* Remove identifiers from DeviceInfo
* Move constants from const to library
* Move calibration and running to library, re-add all platforms
* Remove platforms from init
* Remove button platform
* Remove select platform
* Remove sensor platform
* Bump motionblindsble to 0.0.4
* Remove closed, opening and closing attribute default values
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Remove CONFIG_SCHEMA from init
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Remove unused platform attributes and icons
* Re-add _attr_is_closed to GenericBlind to fix error
* Use entry.async_create_background_task for library instead of entry.async_create_task
* Move updating of position on disconnect to library
* Remove type hints, keep for _attr_is_closed
* Use DISPLAY_NAME constant from library for display name
* Add TYPE_CHECKING condition to assert in config_flow
* Re-add CONFIG_SCHEMA to __init__ to pass hassfest
* Change FlowResult type to ConfigFlowResult
* Fix import in tests
* Fix ruff import
* Fix tests by using value of enum
* Use lowercase name of MotionBlindType enum for data schema selector and translation
* Fix using name instead of value for MotionBlindType
* Improve position None handling
Co-authored-by: starkillerOG <starkiller.og@gmail.com>
* Improve tilt None handling
Co-authored-by: starkillerOG <starkiller.og@gmail.com>
* Change BLIND_TO_ENTITY_TYPE name
* Set entity name of cover to None and use DeviceInfo name
* Add base entity
* Move async_update to base entity
* Move unique ID with suffix to base class
* Add entity.py to .coveragerc
* Remove extra state attribute connection type
* Remove separate line hass.data.setdefault(DOMAIN, {})
* Remove use of field for key and translation_key in MotionCoverEntityDescription
* Remove entity translation with extra state_attributes from strings.json
* Use super().__init__(device, entry)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Change if block in async_update_running
* Use if blocks in async_update_position
* Add additional scanner check before show_form
* Remove default value of device_class in MotionCoverEntityDescription
* Fix entry.data[CONF_BLIND_TYPE] uppercase
* Fix device info model name
* Bump motionblindsble to 0.0.5
* Fix tests
* Move entity_description to MotionblindsBLEEntity
* Change double roller blind name
* Bump motionblindsble to 0.0.6
* Fix ruff
* Use status_query for async_update
* Bump motionblindsble to 0.0.7
* Change bluetooth local name
* Set kw_only=True for dataclass
* Change name of GenericBlind
* Change scanner_count conditional
* Wrap async_register_callback in entry.async_on_unload
* Bump motionblindsble to 0.0.8
* Use set_create_task_factory and set_call_later_factory
* Update bluetooth.py generated
* Simplify COVER_TYPES dictionary
* Move registering callbacks to async_added_to_hass
* Remove check for ATTR_POSITION and ATTR_TILT_POSITION in kwargs
* Add naming consistency for device and entry
* Use if block instead of ternary for _attr_unique_id
* Improve errors ternary in config_flow
* Use set instead of list for running_type
* Improve errors ternary in config_flow
* Remove init from MotionblindsBLECoverEntity and move debug log to async_added_to_hass
* Update debug log create cover
* Fix ruff
* Use identity check instead of equals
* Use identity check instead of equals
* Change MotionblindsBLECoverEntityDescription name
* Change debug log text
* Remove ATTR_CONNECTION from const
* Add types for variables in async_setup_entry
* Add types for variables in async_setup_entry
* Change PositionBlind class name to PositionCover etc
* Improve docstrings
* Improve docstrings
---------
Co-authored-by: starkillerOG <starkiller.og@gmail.com>
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add generic entity platform setup fixture
* rename fixture
* No need for passing hass
* Make function instead of fixture
* Improve typing
* Use Sequence instead
* Migrate flux to use the new helper
* Use list instead
* Use Sequence instead
* Implement diagnostic platform for APCUPSd
* Put APCUPSd in gold quality scale
* Revert quality scale update
* Use snapshot testing for apcupsd
* Prettify the code