* Jellyfin: Properly display album primary art instead of artist backdrop when playing music
* add test for album art urls, fix existing tests that broke because they have extraneous "album*" fields for non-album items.
* fix snapshot test
* Do not return router as source_type
* Add test
* Update stale docstring
---------
Co-authored-by: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>
* Bump PyTado 0.19.0
* Initial setup
* Current state
* Update to PyTado 0.18.8
* First concept for review
* Fix
* Fix
* Fix
* First concept for review
* Bump PyTado to 0.18.9
* Remove redundant part
* Initial test setup
* Authentication exceptions
* Fix
* Fix
* Fix
* Update version to 2
* All migration code
* Small tuning
* Add reauth unique ID check
* Add reauth test
* 100% on config flow
* Making tests working on new device flow
* Fix
* Fix
* Fix
* Update homeassistant/components/tado/strings.json
* Update homeassistant/components/tado/strings.json
---------
Co-authored-by: Joostlek <joostlek@outlook.com>
Co-authored-by: Josef Zweck <josef@zweck.dev>
* add sensor platform to backup integration
* adjust namings, remove system integration flag
* add first simple test
* apply review comments
* fix test
* add sensor tests
* adjustements to use backup helper
* remove obsolet async_get_manager from init
* unsubscribe from events on entry unload
* add configuration_url
* fix doc string
* fix sensor tests
* mark async_unsubscribe as callback
* set integration_type service
* extend sensor test
* set integration_type on correct integration :)
* fix after online conflict resolution
* add sensor update tests
* simplify the sensor update tests
* avoid io during tests
* Add comment
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Support for hierarchy of individual energy devices
* update DeviceConsumption dict
* change name parent to 'included_in'
* Break comment
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Use correct unit symbol "min" for minutes in `systemmonitor` integration
* Update test_sensor.ambr
* Remove accidentially added, excessive space character
* Add gemini token status to the conversation trace
* Add OpenAI Token Stats
* Revert input_tokens_details since its not in the openai version yet
* Fix ruff lint errors
* Fixes to user-facing strings of `azure_devops` integration
- capitalize abbreviations "ID" and "URL"
- sentence-case "project"
- consistently capitalize "Personal Access Token" as a name
* Update test_sensor.ambr
* Add discovery to Roborock
* Update homeassistant/components/roborock/config_flow.py
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* MR comments
* go back to removing the ":"
* change method of getting devices
---------
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Add metered PDU dynamic outlet sensors
* Make deep copy and improve efficiency of loops
* Improve performance by creating new dict
Co-authored-by: J. Nick Koston <nick+github@koston.org>
* Remove unused import copy
* Use outlet name (if available) in friendly name and remove as separate sensor
---------
Co-authored-by: J. Nick Koston <nick+github@koston.org>
* Changed where the script events are collected to remove any device communication from async_setup_entry
* Implemented improvements and added a test to test whats happends when script_getcode fails
* Renamed script_events to rpc_script_event to make clear this is only for RPC devices
Co-authored-by: Shay Levy <levyshay1@gmail.com>
---------
Co-authored-by: Shay Levy <levyshay1@gmail.com>
* Initial commit
* Refactor
* Call async_add_entities() once
* Type
* Cleaning
* `supported` is not needed here
* Add error handling
* Add test
* Fix name
* Change class name
* Change method name
* Move BLU_TRV_TIMEOUT
* Fix BLU_TRV_TIMEOUT import
* Coverage
* Use test snapshots
* Support error translations
* Fix tests
* Introduce ShellyBaseButton class
* Rename press_method to _press_method
* Improve exception strings
* Log a warning for modules that log too often
* Improve var naming
* Increase time window; improve log info
* Fix zha type
* Fix typo
* Ignore debug logs
* Use timer to avoid now() calls
* Switch to async_track_time_interval
* Allow using base QueueLister
* Add test for counters reset
* Make var names consistent; reduce message/time ratio
* Use log times instead of timer
* Simplify reset test
* Warn only once per module
* Remove uneeded counter reset
* Add missing Heatpump parameters and units
* Fix merge issue
* Fix snapshot
* Removing bundle_id as extra state attribute till functionality is needed and updating api translation with missing phrase
* Fix translations for listparameters
* Fix translations for listparameters
* Capitalize "PIN to Drive" as feature name in `teslemetry`
Fixes the spelling of "PIN" for consistency and turns "PIN to Drive" into the feature name that Tesla uses (in English).
* Update test_binary_sensor.ambr
* Add password length restriction
* Bump reolink-aio to 0.12.3
* Add repair issue for too long password
* finish password too long repair issue
* add test
* Refactor zwave_js config entry setup
* Fix blocking update test
* Address timeout comment
* Remove platform tasks
* Replace deprecated async_add_job
* Use ConfigEntry.async_on_state_change
* Use modern config entry methods
* Clarify exception message
* Test listen error after config entry setup
* Test listen failure during setup after forward entry
* Test not reloading when hass is stopping
* Test client disconnect is called on entry unload
* Fix and test client not connected during driver setup
* Fix and test driver ready timeout
* Stringify listen task exception when logging
* Use identity compare
* Guard for closed connection
* Consolidate listen task checking and tests
* Fix initial fetch of appliance data to handle API rate limit errors
* Apply comments
* Delete stale function
* Handle api rate limit error at options fetching
* Update appliances after stream non-breaking error
* Always initialize coordinator data
* Improve device update
* Update test description
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* update map on status change
* Update tests/components/roborock/test_image.py
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* update code to handle state logic within async_update_data
* Update homeassistant/components/roborock/coordinator.py
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* move previous_state and allow update on None
---------
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Move MapData to Coordinator
* seeing if mypy likes this
* delete dead code
* Some MR comments
* remove MapData and always update on startup if we don't have a stored map.
* don't do on demand updates
* remove unneeded logic and pull out map save
* Apply suggestions from code review
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* see if mypy is happy
---------
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Update MCP server to not register the stateless API, but use it implicitly as an Assist API replacement
* Ensure backwards compatibility with old registration
* Add Crossline smart AI binary sensor
* Add intrusion, lingering, forgotten item, item taken detection
* Use unique_index instead of location for unique_id
* Add test
* Apply suggestions from code review
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
* Name changes
* Update homeassistant/components/reolink/binary_sensor.py
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
* Use smart_type instead of key
* Use occupancy translation instead of gas (point to the same thing).
* Revert "Use occupancy translation instead of gas (point to the same thing)."
This reverts commit 9caf796585.
* fix styling
---------
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
* Update config_entry_oauth2_flow.py
* Specify type on request_data
* Added LocalOAuth2ImplementationWithPkce
* LocalOAuth2ImplementationWithPkce works more like specs
* fix: Adding tests for pkce flow and feedback applied
* fix last test for pkce
* Clean test_abort_if_oauth_with_pkce_rejected
* Improve assertion of code verifier and code challenge
* Break long docstrings
* Shorten docstring
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* style: rename humidifier night const
* fix: separate night light for fan and humidifier
Check for the presence of set_night_light_brightness and
set_night_light to indentify humidifier and fan devices.
set_night_light is defined on VeSyncAirBypass and
set_night_light_brightness is defined on VeSyncHumid200300S.
update test
* Add price cap support
* Change service input to box mode
* Add icon for set_price_cap service
* Improve test coverage
* Change ohme service description wording
* Add remote_calendar with storage
* Use coordinator and remove storage
* cleanup
* cleanup
* remove init from config_flow
* add some tests
* some fixes
* test-before-setup
* fix error handling
* remove unneeded code
* fix updates
* load calendar in the event loop
* allow redirects
* test_update_failed
* tests
* address review
* use error from local_calendar
* adress more comments
* remove unique_id
* add unique entity_id
* add excemption
* abort_entries_match
* unique_id
* add ,
* cleanup
* deduplicate call
* don't raise for status end de-nest
* multiline
* test
* tests
* use raise_for_status again
* use respx
* just use config_entry argument that already is defined
* Also assert on the config entry result title and data
* improve config_flow
* update quality scale
* address review
---------
Co-authored-by: Allen Porter <allen@thebends.org>
* Add sensor values for Power and Energy
* test
* test
* Sensor test
* Fix test
* fix test
* Fixing test coverage
* refactored
* WolfllinkSensorEntityDescriptions and updated tests
* fix test
* Add name_fn and test_sensor adoptions
* fix test coverage
* Revert "fix test coverage"
This reverts commit 2405751f5a.
* resolve requested changes and fix test
* Fix Snapshot
* clean up
* Fixed unknown state in snapshot test
* Aded Generate Content Service for OpenAI to match Google AI
* Fixed code for commit checks
* Addressed code review comments
* Address review comments
* Addressed @balloob review comments.
* Address futher review comments from @balloob
* Seperate entities to a new dock device
* update entity names
* Update homeassistant/components/roborock/coordinator.py
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Initial implementation of hardware update model
* Fixes
* WIP: change the `homeassistant_sky_connect` integration type
* More fixes
* WIP
* Display firmware info in the device page
* Make progress more responsive
* WIP: Yellow
* Abstract the bootloader reset type
* Clean up comments
* Make the Yellow integration non-hardware
* Use the correct radio device for Yellow
* Avoid hardcoding strings
* Use `FIRMWARE_VERSION` within config flows
* Fix up unit tests
* Revert integration type changes
* Rewrite hardware ownership context manager name, for clarity
* Move manifest parsing logic into a new package
Pass the correct type to the firmware API library
* Create and delete entities instead of mutating the entity description
* Move entity replacement into a `async_setup_entry` callback
* Change update entity category from "diagnostic" to "config"
* Have the client library handle firmware fetching
* Switch from dispatcher to `async_on_state_change`
* Remove unnecessary type annotation on base update entity
* Simplify state recomputation
* Remove device registry code, since the devices will not be visible
* Further simplify state computation
* Give the device-less update entity a more descriptive name
* Limit state changes to integer increments when sending firmware update progress
* Re-raise `HomeAssistantError` if there is a problem during flashing
* Remove unnecessary state write during entity creation
* Rename `_maybe_recompute_state` to `_update_attributes`
* Bump the flasher to 0.0.30
* Add some tests
* Ensure the update entity has a sensible name
* Initial ZBT-1 unit tests
* Replace `_update_config_entry_after_install` with a more explicit `_firmware_info_callback` override
* Write the firmware version to the config entry as well
* Test the hardware update platform independently
* Add unit tests to the Yellow and ZBT-1 integrations
* Load firmware info from the config entry when creating the update entity
* Test entity state restoration
* Test the reloading of integrations marked as "owning"
* Test installation failure cases
* Test firmware type change callback failure case
* Address review comments
* Add initial MQTT subentry support for notify entities
* Fix componts assigment is reset on device config. Translation tweaks
* Rephrase
* Go to summary menu when components are set up already - add test
* Fix suggested device info on config flow
* Invert
* Simplify subentry config flow and omit menu
* Use constants instead of literals
* More constants
* Teak some translations
* Only show save when the the entry is dirty
* Do not trigger an entry reload twice
* Remove encoding, entity_category
* Remove icon from mqtt subentry flow
* Separate entity settings and MQTT specific settings
* Remove object_id and refactor
* Migrate translations
* Make subconfig flow test extensible
* Make sub reconfig flow tests extensible
* Rename entity_platform_config step to mqtt_platform_config
* Make component unique ID independent from the name
* Move code for update of component data to helper
* Follow up on code review
* Skip dirty stuff
* Fix rebase issues #1
* Do not allow reconfig for entity platform/name, default QoS and refactor tests
* Add entity platform and entity name label to basic entity config dialog
* Rename to exclude_from_reconfig and make reconfig option not optional
* Use correct unit symbol "min" for minutes in `webmin` integration
Replace the unit symbol "m" which stands for meter with the correct SI uni symbol "min".
* Update test_sensor.ambr
* Update test_sensor.ambr (2)
* Added the hvac action attribute for modbus climate entities.
* Fixed issue in hvac action unit test, was incorrectly referencing the hvac mode attribute.
* Fixed the modbus climate test for hvac action, it now correctly checks that hvac actions in the config match HVACActions.
* Made changes recommended by @crug80 to remove dead code and to add ability to use input or holding register for hvac action.
* Moved action test case in test_climate.py
* Updated comment for `test_service_climate_action_update`
* Fixed ruff formatting error.
* Addressed request to update labels from `state_*` to `action_*`
* Fix bug with all maps being set to the same when empty
* fix parens
* fix other parens
* rework some of the logic
* few small updates
* Remove test that is no longer relevant
* remove updated time bump
* Update hdate version
* Update code to reflect changes from hdate==1.0.0
* Fix some tests
* Fix parasha tests
* Fix holiday tests
* Cleanup holidays changes
* Zmanim objects should now access the local attribute
* Fix binary sensors
* Update test values on upcoming shabbat times
* Update hdate to 1.0.1
* Adapt to changes from 1.0.0 -> 1.0.1
* Change shabbat candle lighthing test scenario to 40 minutes as expected in Jerusalem
* Update to version 1.0.2
* Update keys based on updated nomenclature in library
* Update HolidayDatabase .get_all_names in test
* Make holiday type an ordered set
* Fix freeze_time
* Fix imports
* Fix tests and minor change
* Update hdate version 1.0.3, add migration method
* Fix migration code
* Add test for migration
* The change is not backwards compatible if config is not restored
* Don't allow creating backups if hass is not running
* Revert "Don't allow creating backups if hass is not running"
This reverts commit 1bf545eb25.
* Set backup manager to idle only after Home Assistant has started
* Update according to discussion, add tests
* Add more test
* - Added lock platform
- Added creation of IgloohomeLockEntity when bridge devices are included.
* - Migrated retrieval of linked_bridge utility to utils module.
- Added ability for lock to update it's own linked bridge automatically
* - Added mock bridge device to test fixture
* - Added snapshot test for lock module
* - Added bridge with no linked devices
- Added test for util.get_linked_bridge
* - Added handling of errors from API call
* - Bump igloohome-api to v0.1.0
* - Minor change
* - Removed async update for locks. Focus on MVP
* - Removed need for update on entity creation
* - Updated snapshot test
* - Updated snapshot
* - Updated to use walrus during lock entity creation
- Updated callback class for async_setup_entry based on lint suggestion
* - Set _attr_name as None
- Updated snapshot test
* Update homeassistant/components/igloohome/lock.py
* Update homeassistant/components/igloohome/lock.py
---------
Co-authored-by: Josef Zweck <josef@zweck.dev>
* extend tests to catch null schedules
* add fixture with null schedule
* remove null schedules for now
* fic the typing for _schedule attr (is list, not dict)
* add valid schedule to fixture
* update ssetpoints only if there is a schedule
* snapshot to match last change
* refactor: dont update switchpoints if no schedule
* add in warnings for null schedules
* add fixture for DHW without schedule
* Reset helpers.frame._REPORTED_INTEGRATIONS in between tests
* Rename
* Apply suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Reimplement PGLab sensor to use a coordinator
* fix spelling mistake on coordinator name
* rename createDiscoverDeviceInfo function in snake_case
* adding suffix pglab_ to PGLabBaseEntity/PGLabEntity constructor parameters
* Fix docs of PGLabEntity::async_added_to_hass
* make coordinator able to return the sensor native value
* renaming PGLABConfigEntry in PGLabConfigEntry to be consistent with the integration naming
* renamed entry function arguments to config_entry to be less confusing
* pass config_entry to constructor of base class of PGLabSensorsCoordinator
* set the return value type of get_sensor_value
* store coordinator as regular instance attribute
* Avoid to access directly entity from discovery module
* Rearrange get_sensor_value return types
* Make helpers.frame.report_usage work when called from any thread
* Address review comments, update tests
* Add test
* Update test
* Update recorder test
* Update tests
* Conditionally remove ambient sensors if not present
* Create ambient sensors list and use list comprehension
* Update homeassistant/components/nut/sensor.py
Co-authored-by: J. Nick Koston <nick@koston.org>
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Get temperature data appropriate for hass.config.unit
* Modify temperature_unit for init
* Modify unit's map
* Fix ruff error
---------
Co-authored-by: yunseon.park <yunseon.park@lge.com>
* fix brigtness sensor having percent as unit.
* add test for percent-brightness-sensor
* remove valve position and update tests
* Removed test, because covered by Snapshots
* fix review comments
* move device calss to init.
* fix test
* fix review comments
* add battery sensor back to test fixture
* fix
* Fix ability to remove orphan device in Music Assistant integration
* Add test
* Remove orphaned device entries at startup as well
* adjust mocked client
* Abort SmartThings flow if default_config is not enabled
* Abort SmartThings flow if default_config is not enabled
* Abort SmartThings flow if default_config is not enabled
* Create unique identifiers where multiple gateways are in use
Resolving issue https://github.com/home-assistant/core/issues/134497
* Added migration function to __init__.py
Added migration function to execute upon initialisation, to:
a) remove the erroneously-added config)_entry added to the device (gateway B gets added as a config_entry to a device associated to gateway A), and
b) swap out the non-unique identifiers for genuinely unique identifiers.
* Added tests to simulate migration from bad data scenario (i.e. explicitly executing migrate_entity_unique_ids() from __init__.py)
* Ammendments suggested in first review
* Changes after second review
* Rewrite of test_migrate_config_entry_and_identifiers after feedback
* Converted migrate function into major version, updated tests
* Finalised variable naming convention per feedback, added test to validate config entry migrated to v2
* Hopefully final changes for cosmetic / comment stucture
* Further code-coverage in test_migrate_config_entry_and_identifiers()
* Minor test corrections
* Added test for non-tradfri identifiers
* add night mode toggle
* populate AC's action
* set hvac action on zones
* update tests
* show zones as off if AC is off
---------
Co-authored-by: Franck Nijhof <git@frenck.dev>
* fix for exception for specific ventilation device type + tests
* fix for exception for specific ventilation device type + tests
* New Testset just for fan
* update test_sensor.ambr
* Add fault sensor to balboa
* Use an event instead of sensor for faults
* Don't set fault initially in conftest
* Use event type per fault message code
* Set fault to None in conftest
ESPHome always uses .0 in the URL for the changelog,
and we never had a patch version in the stable
BLE version field so we need to switch it to
.0 for the URL.
* tweaks
* mysql
* mysql
* Update homeassistant/components/recorder/history/modern.py
* Update homeassistant/components/recorder/history/modern.py
* Update homeassistant/components/recorder/const.py
* Update homeassistant/components/recorder/statistics.py
* Apply suggestions from code review
* mysql
* mysql
* cover
* make sure db is fully init on old schema
* fixes
* fixes
* coverage
* coverage
* coverage
* s/slow_dependant_subquery/slow_dependent_subquery/g
* reword
* comment that callers are responsible for staying under the limit
* comment that callers are responsible for staying under the limit
* switch to kwargs
* reduce branching complexity
* split stats query
* preen
* split tests
* split tests
fix sync date for multiple devices
do not use handler for explicit update devices as internal communication lib do not provide which device is updated
use ha update loop
copy data object to prevent rewrite data from internal lib
allow more time to process response before log warning about long wait for response and make log message more clear
Previously, when the source sensor's state remains constant, the derivative
sensor repeats its latest value indefinitely.
This patch fixes this bug by consuming the state_reported event and updating
the sensor's output even when the source sensor doesn't change its state.
This reverts #116200
We changed the polling logic to avoid polling if all chars are marked as watchable
to avoid crashing the firmware on a very limited set of devices as it was
more in line with what iOS does. In the end, the user ended up replacing
the device in #116143 because it turned out to be unreliable in other
ways. The vendor has since issued a firmware update that may resolve
the problem with all of these devices.
In practice it turns out many more devices
report that chars are evented and never send events. After a few months
of data and reports the trade-off does not seem worth it since
users are having to set up manual polling on a wide range of
devices. The amount of devices with evented chars that do not
actually send state vastly exceeds the number of devices that
might crash if they are polled too often so restore the previous
behavior
fixes#138561fixes#100331fixes#124529fixes#123456fixes#130763fixes#124099fixes#124916fixes#135434fixes#125273fixes#124099fixes#119617
* fix(alert): check can_ack prior to acking
* fix(alert): add test for when can_acknowledge=False
* fix(alert): warn on can_ack blocking an ack
* Raise error when trying to acknowledge alert with can_acknowledge set to False
* Rewrite can_ack check as guard
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Make can_ack service error msg human readable because it will show up in the UI
* format with ruff
* Make pytest aware of service error when acking an unackable alert
---------
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Bump Music Assistant client to 1.1.0
* Add some casts to help mypy
* Add handling of the new media types in Music Assistant
* mypy cleanup
* lint
* update snapshot
* Adjust tests
---------
Co-authored-by: Franck Nijhof <git@frenck.dev>