* Initial version
* Baseline release
* Refactor based on first PR feedback
* Refactoring based on second PR feedback
* Initial version
* Baseline release
* Refactor based on first PR feedback
* Refactoring based on second PR feedback
* Refactoring based on PR feedback
* Refactoring based on PR feedback
* Remove extra attribute soil type
Soil type isn't really a sensor, but more like a configuration entity.
Move soil type to a different PR to keep this PR simpler.
* Refactor SensoterraSensor to a named tuple
* Implement feedback on PR
* Remove .coveragerc
* Add async_set_unique_id to config flow
* Small fix based on feedback
* Add test form unique_id
* Fix
* Fix
---------
Co-authored-by: Joostlek <joostlek@outlook.com>
* squeezebox add binary sensor + coordinator
* squeezebox add connected via for media_player
* squeezebox add Player type for player
* Add more type info
* Fix linter errors
* squeezebox use our own status entity
* squeezebox rework device handling based on freedback
* Fix device creation
* squeezebox rework coordinator error handling
* Fix lint type error
* Correct spelling
* Correct spelling
* remove large comments
* insert small comment
* add translation support
* Simply sensor
* clean update function, minimise comments to the useful bits
* Fix after testing
* Update homeassistant/components/squeezebox/entity.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* move data prep out of Device assign for clarity
* stop being a generic api
* Humans need to read the sensors...
* ruff format
* Humans need to read the sensors...
* Revert "ruff format"
This reverts commit 8fcb8143e7.
* ruff format
* Humans need to read the sensors...
* errors after testing
* infered
* drop context
* cutdown coordinator for the binary sensors
* add tests for binary sensors
* Fix import
* add some basic media_player tests
* Fix spelling and file headers
* Fix spelling
* remove uuid and use service device cat
* use diag device
* assert execpted value
* ruff format
* Update homeassistant/components/squeezebox/__init__.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Simplify T/F
* Fix file header
* remove redudant check
* remove player tests from this commit
* Fix formatting
* remove unused
* Fix function Type
* Fix Any to bool
* Fix browser tests
* Patch our squeebox componemt not the server in the lib
* ruff
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Add reauth flow for smlight integration
* add strings for reauth
* trigger reauth flow on authentication errors
* Add tests for reauth flow
* test for update failed on auth error
* restore name title placeholder
* raise config entry error to trigger reauth
* Add test for reauth triggered at startup
---------
Co-authored-by: Tim Lunn <tim@feathertop.org>
* simple diagnostics
* add service status information
* remove from no diagnostics list
* wip
* cater for the case where status info is undefined
* make test work
* code reformatted
* add snapshot data
* simplify code
* Add uptime sensor as derived sensor class
* Add strings for uptime sensors
* Update sensor tests to include uptime sensors
* test zigbee uptime when disconnected
* Add option to force nightlatch operation mode
* Fix format
* Make the new option available only for lock pro entry
* use senor_type instead of switchbot model + tests
* Update homeassistant/components/switchbot/lock.py
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Add diagnostics platform
* Add diagnostics test
* Remove comments
* Exclude created_at and modified_at from snapshot
* Fix entry_id in mock_config_entry
* Add repr to excluded props from snapshot
* Improve diagnostics
* Use function name instead of number for callback diagnostics
* Remove info from diagnostics
* Reformat
* Update tests to avoid patching internals
* * Use fixtures for tests
* Update variable names in tests for clarity
* Use hass.config_entries.async_setup instead of setup.async_setup_component
* Add support for retrieving the total views of a channel.
* Add missing tests
* Re-order imports
* Another run on code format
* Add missing translation
* Update YouTube test snapshots
* Migrate emoncms to config flow
* tests coverage 98%
* use runtime_data
* Remove pyemoncms bump.
* Remove not needed yaml parameters add async_update_data to coordinator
* Reduce snapshot size
* Remove CONF_UNIT_OF_MEASUREMENT
* correct path in emoncms_client mock
* Remove init connexion check
as done by config_entry_first_refresh
since async_update_data catches exceptionand raise UpdateFailed
* Remove CONF_EXCLUDE_FEEDID from config flow
* Update homeassistant/components/emoncms/__init__.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Update homeassistant/components/emoncms/sensor.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Update homeassistant/components/emoncms/strings.json
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Use options in options flow and common strings
* Extend the ConfigEntry type
* Define the type explicitely
* Add data description in strings.json
* Update tests/components/emoncms/test_config_flow.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Update tests/components/emoncms/test_config_flow.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Add test import same yaml conf + corrections
* Add test user flow
* Use data_description...
* Use snapshot_platform in test_sensor
* Transfer all fixtures in conftest
* Add async_step_choose_feeds to ask flows to user
* Test abortion reason in test_flow_import_failure
* Add issue when value_template is i yaml conf
* make text more expressive in strings.json
* Add issue when no feed imported during migration.
* Update tests/components/emoncms/test_config_flow.py
* Update tests/components/emoncms/test_config_flow.py
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Additional sensors for AsusWRT using http(s) library
* Remove temperature sensors refactor from PR
* Fix test function name
* Change translation a suggested
* Requested changes
* Add Favorites support to Media Browser
* CI fixes
* More CI Fixes
* Another CI
* Change icons for other library items to use standard LMS icons
* Change max favorites to BROWSE_LIMIT
* Simplify library_payload to consolidate favorite and non-favorite items
* Simplify library_payload to consolidate favorite and non-favorite items
* Add support for favorite hierarchy
* small fix for icon naming with local albums
* Add ability to expand an album from a favorite list
* Reformat to fix linting error
* and ruff format
* Use library calls from pysqueezebox
* Folder and playback support
* Bump to pysqueezebox 0.8.0
* Bump pysqueezebox version to 0.8.1
* Add unit tests
* Improve unit tests
* Refactor tests to use websockets and services.async_call
* Apply suggestions from code review
---------
Co-authored-by: peteS-UK <64092177+peteS-UK@users.noreply.github.com>
* Speed up hassio send_command url check
The send_command call checked the resulting path to make
sure that the input path was not modified when converting
to a URL. Since the host is is pre-set, we only need to check
the processed raw_path matches command instead of converting
back to a string, and than comparing it against another
constructed string.
* Speed up hassio send_command url check
The send_command call checked the resulting path to make
sure that the input path was not modified when converting
to a URL. Since the host is is pre-set, we only need to check
the processed raw_path matches command instead of converting
back to a string, and than comparing it against another
constructed string.
* adjust
* Change the Google Photos client library to a new external package
* Remove mime type guessing
* Update tests to mock out the client library and iterators
* Update homeassistant/components/google_photos/media_source.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Work
* Implement 0.0.8 changes, fixup tests
* Cleanup
* Implement new playmodes, close clientsession upon ha close
* Implement new playmodes, close clientsession upon ha close
* Add test for zeroconf bridge failure
* Bump 0.0.9
Address old comments in 113940
* Exact _async_register_default_clientsession_shutdown
* Google Cloud can now be setup from the UI
* mypy
* Add BaseGoogleCloudProvider
* Allow clearing options in the UI
* Address feedback
* Don't translate Google Cloud title
* mypy
* Revert strict typing changes
* Address comments
* * Add migration from single device to multiple devices, removing all old entities
* Create new devices for Boiler and Thermostat
* Add classes for new entities based on the new devices
* Split binary_sensor entities into devices
* Split sensor entities into different devices
* Move climate entity to thermostat device
* Fix climate entity away mode
* Fix translation placeholders
* Allow sensor values with capital letters
* * Add EntityCategory
* Update and add device_classes
* Fix translation keys
* Fix climate entity category
* Update tests
* Handle `available` property in `entity.py`
* Improve GPIO state binary_sensor translations
* Fix: Updates are already subscribed to in the base entity
* Remove entity_id generation from sensor and binary_sensor entities
* * Use _attr_name on climate class instead of through entity_description
* Add type hints
* Rewrite to derive entities for all OpenTherm devices from a single base class
* Improve type annotations
* Use OpenThermDataSource to access status dict
* Move entity_category from entity_description to _attr_entity_category
* Move entity descriptions with the same translation_key closer together
* Update tests
* Add device migration test
* * Add missing sensors and binary_sensors back
* Improve migration, do not delete old entities from registry
* Add comments for migration period
* Use single lists for entity descriptions
* Avoid changing sensor values, remove translations
* * Import only required class from pyotgw
* Update tests
* Always prefer XY color mode in ZHA
Remove a few more HS remnants
* Use new ZHA OTA format
* Bump ZHA to 0.0.32
* Fix existing OTA unit tests
* Fix schema conversion test to account for new command parameters
* Update snapshot with new `zcl_type` kwarg
* Migrate existing entities to icon translations
* Remove "no longer compatible" test
* Test that the library release summary is correctly exposed to ZHA
* Revert "Always prefer XY color mode in ZHA"
This reverts commit 8fb7789ea8.
* Test `release_notes`, not `release_summary`
* Add 100% switch test coverage
* use DOMAIN instead of const.DOMAIN
* Split tests and use parametrize
* Revert "Split tests and use parametrize"
This reverts commit 50d2184ce6.
* fixes
* Add Lektrico Integration
* Make the changes proposed by Lash-L: new coordinator.py, new entity.py; use: translation_key, last_update_sucess, PlatformNotReady; remove: global variables
* Replace FlowResult with ConfigFlowResult and add tests.
* Remove unused lines.
* Remove Options from condif_flow
* Fix ruff and mypy.
* Fix CODEOWNERS.
* Run python3 -m script.hassfest.
* Correct rebase mistake.
* Make modifications suggested by emontnemery.
* Add pytest fixtures.
* Remove meaningless patches.
* Update .coveragerc
* Replace CONF_FRIENDLY_NAME with CONF_NAME.
* Remove underscores.
* Update tests.
* Update test file with is and no config_entries. .
* Set serial_number in DeviceInfo and add return type of the async_update_data to DataUpdateCoordinator.
* Use suggested_unit_of_measurement for KILO_WATT and replace Any in value_fn (sensor file).
* Add device class duration to charging_time sensor.
* Change raising PlatformNotReady to raising IntegrationError.
* Test the unique id of the entry.
* Rename PF Lx with Power factor Lx and remove PF from strings.json.
* Remove comment.
* Make state and limit reason sensors to be enum sensors.
* Use result variable to check unique_id in test.
* Remove CONF_NAME from entry and __init__ from LektricoFlowHandler.
* Remove session parameter from LektricoDeviceDataUpdateCoordinator.
* Use config_entry: ConfigEntry in coordinator.
* Replace Connected,NeedAuth with Waiting for Authentication.
* Use lektricowifi 0.0.29.
* Use lektricowifi 0.0.39
* Use lektricowifi 0.0.40
* Use lektricowifi 0.0.41
* Replace hass.data with entry.runtime_data
* Delete .coveragerc
* Restructure the user step
* Fix tests
* Add returned value of _async_update_data to class DataUpdateCoordinator
* Use hw_version at DeviceInfo
* Remove a variable
* Use StateType
* Replace friendly_name with device_name
* Use sentence case in translation strings
* Uncomment and fix test_discovered_zeroconf
* Add type LektricoConfigEntry
* Remove commented code
* Remove the type of coordinator in sensor async_setup_entry
* Make zeroconf test end in ABORT, not FORM
* Remove all async_block_till_done from tests
* End test_user_setup_device_offline with CREATE_ENTRY
* Patch the full Device
* Add snapshot tests
* Overwrite the type LektricoSensorEntityDescription outside of the constructor
* Test separate already_configured for zeroconf
---------
Co-authored-by: mihaela.tarjoianu <mihaela.tarjoianu@scada.ro>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* update diagnostics to include static
and make room for multiple coordinator data objects
* fix mac address is not stored in config_entry but on device
The Yale Home brand will stop working with the August integration very
soon. Users must migrate to the Yale integration to avoid an interruption in service.
* Address august review comments
Followup to https://github.com/home-assistant/core/pull/124677
* cleanup loop
* drop mixin name
* event entity add cleanup
* remove duplicate prop
* pep0695 type
* remove some not needed block till done
* cleanup august tests
* switch to freezegun
* snapshots for dev reg
* SOURCE_USER nit
* snapshots
* pytest.raises
* not loaded check
* remove cooling setpoint requirement for thermostats. Air conditioning remains unchanged
* remove cooling setpoint requirement for thermostats. Air conditioning remains unchanged
* versions should not be set on core integrations.
* Added tests for minimal smartthings thermostat with no cooling.
* Added tests for minimal smartthings thermostat with no cooling.
* Formatted tests with ruff format
* Z-Wave JS: support non-dimmable color lights
* remove black_is_off light, support on/off/color
* fix: tests for on/off light
* fix: typo
* remove commented out old test code
* add test for off and on
* support colored lights without separate brightness control
* add test for color-only light
* refactor: extract color only light
* fix: preserve color when changing brightness
* extend tests
* refactor again
* refactor scale check
* refactor: remove impossible check
* review feedback
* review feedback
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* allow for different systems
* installation is a load_json_*fixture param
* allow installation to be parameterized
* test setup of various systems
* add more fixtures
* test setup of integration
* tweak test
* tweak const
* add expected state/services
* extend setup test
* tidy up
* tidy up tweaks
* code tweaks
* refactor expected results dicts
* woops
* refatcor serialize
* refactor test
* tweak
* tweak code
* rename symbol
* ensure actual I/O remains blocked
* tweak
* typo
* use constants
* Update conftest.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* change filename
* add config fixture
* config is a fixture
* config is a fixture now 2
* lint
* lint
* refactor
* lint
* lint
* restore email addr
* use const
* use snapshots instead of helper class
* doctweak
* correct snapshot
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Deako integration using pydeako
* fix: address feedback
- make unit tests more e2e
- use runtime_data to store connection
* fix: address feedback part 2
- added better type safety for Deako config entries
- refactored the config flow tests to use a conftest mock instead of directly patching
- removed pytest.mark.asyncio test decorators
* fix: address feedback pt 3
- simplify config entry type
- add test for single_instance_allowed
- remove light.py get_state(), only used once, no need to be separate function
* fix: ruff format
* Update homeassistant/components/deako/__init__.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Fix auth failure
* Test
* Fix test
* Only reauth on 401
* Cover 401 and others
* Update homeassistant/components/tesla_fleet/strings.json
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
---------
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
* Implement Yellow config flow for firmware selection
* Use the probed firmware type when setting up Yellow
* Add translation strings
* Ensure (most) existing `init` tests pass
* Remove multi-PAN setup config flow unit tests
* Get existing config flow unit tests passing
* Add unit tests for uninstalling multi-PAN and such
* Consolidate entity creation for Yellow and clean up steps
* Be explicit with multiple inheritance overrides
* Address review comments
* add first data driven tests
* remove unused mock
* test unique_id migration
* test errors during setup
* test error during data update
* test update entity
* system_versionis always available
* make use of snapshot_platform helper
* use parametrize test for coordinator update errors
* apply suggestions
* don't touch internals on coordinator tests
* rework to use async_get_or_create instead of mock_registry
* Add support for multiple otbr config entries
* Fix test
* Drop useless fixture
* Address review comments
* Change unique id from xa to id
* Improve error text
* Store data in ConfigEntry.runtime_data
* Remove useless function
* Fix defaults for cloud STT/TTS
* Prefer entity over legacy provider
* Remove unrealistic tests
* Add tests which show cloud stt/tts entity is preferred
---------
Co-authored-by: Erik <erik@montnemery.com>
* Fix missing id in completed todos API response
* Copy id only if none
* Update homeassistant/components/habitica/coordinator.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Add nest event platform
* Translate entities
* Put motion events into a single entity type
* Remove none types
* Set event entity descriptions as kw only
* Update translations for event entities
* Add single event entity per trait type
* Update translation keys
* Bump ring-doorbell to 0.9.0
* Convert ring integration to async ring-doorbell api
* Use mock auth fixture class to get token_updater
* Fix typo in fixture name
* Bump yalexs to 8.2.0
changelog: https://github.com/bdraco/yalexs/compare/v8.1.4...v8.2.0
* bump to 8.3.1
* bump
* one more bump to ensure we do not hit the ratelimit/shutdown cleanly
* empty commit to restart ci since close/open did not work in flight
* chore: Refactor BSBLanUpdateCoordinator to improve code readability and maintainability
* feat: Add BSBLan integration models
This commit adds the models for the BSB-Lan integration. It includes a dataclass for the BSBLanCoordinatorData, which stores the state and sensor information.
* refactor: Update BSBLANClimate class to use DataUpdateCoordinator without specifying the State type
* chore: Remove unused Sensor import in BSBLan models
* feat: Refactor BSBLanEntity to use CoordinatorEntity
The BSBLanEntity class has been refactored to inherit from the CoordinatorEntity class, which provides better integration with the update coordinator. This change improves code readability and maintainability.
* refactor: Remove unused config_entry variable in BSBLanUpdateCoordinator
* refactor: Update BSBLANClimate class to use DataUpdateCoordinator
Refactor the BSBLANClimate class to use the Coordinator of the entity
* refactor: Update tests to use the new structure
* fix coverage
it should be the same as before
* refactor: moved dataclass BSBLanCoordinatorData
* use the data class inside init
* refactor: Remove unused config_entry variable in BSBLanUpdateCoordinator
* refactor: use BSBLanData from init
* remove entry data from diagnostics
* fix: add random interval back
* refactor: Simplify coordinator_data assignment in async_get_config_entry_diagnostics
* revert back to original except dataclass import
* revert: Add MAC address back to device info in BSBLanEntity
* Add returning activity state
* update tests
* update tests
* set can return to returning state
* update MQTT tests
* update mqtt back to docked
* fix up other tests that I broke again
* re-add mower_can_dock
* Close database connection before stopping the executor
related issue #117004
* Close database connection before waiting for database executor to finish
related issue #117004
* fix test
* fix
* drop unused arg
* Revert "drop unused arg"
This reverts commit 8a9fe6a24a.
* docstring
* comment
* Add proper media_player typing to tests
* Add proper typing to init tests
* Add proper typing to config_flow tests
* Fix order of parameters of tests
* Add more typing
Reorder parameters
* Fix shelly available check when device is not initialized
available needs to check for device.initialized or if the device
is sleepy as calls to status will raise NotInitialized which results
in many unretrieved exceptions while writing state
fixes
```
2024-08-18 09:33:03.757 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 453, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
update_callback()
File "/config/custom_components/shelly/entity.py", line 374, in _update_callback
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
self.__async_calculate_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 293, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/shelly/binary_sensor.py", line 331, in is_on
return bool(self.attribute_value)
^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/shelly/entity.py", line 545, in attribute_value
self._last_value = self.sub_status
^^^^^^^^^^^^^^^
File "/config/custom_components/shelly/entity.py", line 534, in sub_status
return self.status[self.entity_description.sub_key]
^^^^^^^^^^^
File "/config/custom_components/shelly/entity.py", line 364, in status
return cast(dict, self.coordinator.device.status[self.key])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/device.py", line 390, in status
raise NotInitialized
aioshelly.exceptions.NotInitialized
```
* tweak
* cover
* fix
* cover
* fixes
* Use setup_test_component_platform in Climate tests
* Rename mock integration helper
* Change name to register_test_integration
* Change name in tests
* Fix ruff format
* Opt in to install Mosquitto broker add-on in MQTT config flow
* rephrase
* Tests with supervisor and running add-on
* Complete tests for success flows
* Also set up entry in success flow
* Use realistic names for addon and broker
* Finetuning and fail test cases
* Spelling
* Improve translation strings
* Update addon docstr
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Raise AddonError if add-on does not start
* Only show the option to use the add-on
* Simplify flow, rework and cleanup
* Revert unrelated cleanup, process suggestion
* Move ADDON_SLUG const to addon module
* Move fixture to component level
* Move back supervisor fixture
* Move addon_setup_time_fixture and superfixe to config flow model tests
* Refactor hassio fixture
* Rename helpers as they are no fixtures, remove fixture from their names
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Adding a error condition and a fix for missing lightning epoch values
* adding parentheses around the lambda
* Updating PR
* removed the dumb test
* Updated tests to support good stuff
* Updated snapshots
* Refactoring: exchange POWER_VOLT_AMPERE_REACTIVE with UnitOfReactivePower
* updated iotawatt and mysensors from VOLT_AMPERE_REACTIVE to UnitOfReactivePower.VOLT_AMPERE_REACTIVE
* deprecation period for POWER_VOLT_AMPERE_REACTIVE changed to one year.
* POWER_VOLT_AMPERE_REACTIVE changed to UnitOfReactivePower in blebox integration
* Update homeassistant/const.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* add test case
* add test case
* add test case
* add test case
* add test case
* add test case
* remove commented code
* test only fan platform
* add test case
* remove fan mock