* Don't raise when registering entity service with invalid schema
* Update homeassistant/helpers/service.py
Co-authored-by: Robert Resch <robert@resch.dev>
---------
Co-authored-by: Robert Resch <robert@resch.dev>
* 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
* Limit maximum template render output to 256KiB
fixes#124931
256KiB is likely to still block the event loop for an unreasonable amont of
time but its likely someone is using the template engine for large
blocks of data so we want a limit which still allows that but has
a reasonable safety to prevent the system from crashing down
* Update homeassistant/helpers/template.py
* 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
* blebox: extend shutterbox tilt support
* feat: add test for new open/close tilt code in blebox covers
* blebox: resign from using future compat branch for cover open/close tilt
* Update homeassistant/components/blebox/cover.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* blebox: revert changes to BLEBOX_TO_HASS_COVER_STATES
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>