* * Add select platform to opentherm_gw
* Add tests for select entities
* Address capitalization feedback
* Add initial state on startup and status update support
* Wrap lambdas in parentheses
threshold: Parameterize many of the tests
This simplfies the structure of the basic threshold tests,
making it easier to subsequently update or add missing test cases.
Except for a few removals of an inconsistenly applied assertions on
`state.attributes["sensor_value"]`, there are no changes to the existing
tests intended. All previous tests are expected to run identically.
A few extra test cases for None are added.
* added calories to energy class
* changes
* temporarily solving the problem with conversion accuracy
* add tests
* added calories to energy class
* changes
* add tests
* Update homeassistant/util/unit_conversion.py
Co-authored-by: Robert Resch <robert@resch.dev>
* Update homeassistant/util/unit_conversion.py
Co-authored-by: Robert Resch <robert@resch.dev>
* apply suggestions
* Update homeassistant/util/unit_conversion.py
---------
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add ffmpeg proxy view
* Add tests
* Add proxy to media player
* Add proxy test
* Only allow one ffmpeg proc per device
* Incorporate feedback
* Fix tests
* address comments
* Fix test
* Update paths without auth const
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Fix bugs when a lock is no longer returned by the API
* Changes requested during review
* Only mark unavailable if lock is not present
* Remove stale comment
* Remove over-judicious nullability checks
* Remove another unnecessary null check
* Add set_profile service for Vallox integration
* Merge profile constants, use str input for service
* add service test and some related refactoring
* Change service uom to 'minutes'
Co-authored-by: Sebastian Lövdahl <slovdahl@hibox.fi>
* Update icons.js format after rebase
* Translate profile names for service
* Fix test using wrong dict
---------
Co-authored-by: Sebastian Lövdahl <slovdahl@hibox.fi>
* Create an issue in the issue registry if deprecated config is found in configuration.yaml
* Add deprecation comments to functions that can be removed after deprecation period
* Add test for the creation of a deprecation issue
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Listen to reported events for stale check
* Always enable stale sensor tracking
There is no reason not to have this enabled
now that we track reported events for sensors.
* Remove default stale code
* Adjust for ruff change
* chore: Add tests for BSBLAN climate component
* fix return types
* fix MAC data
* chore: Update BSBLAN climate component tests
used setup from conftest added setup for farhenheit temp unit
* chore: Update BSBLAN climate component tests
use syrupy to compare results
* add test for temp_unit
* update climate tests
set current_temperature to None in test case. Is this the correct way for testing?
* chore: Update BSBLAN diagnostics to handle asynchronous data retrieval
* chore: Refactor BSBLAN conftest.py to simplify fixture and patching
* chore: Update BSBLAN climate component tests
100% test coverage
* chore: Update BSBLAN diagnostics to handle asynchronous data retrieval
* chore: Update snapshots
* Fix BSBLAN climate test for async_set_preset_mode
- Update test_async_set_preset_mode to correctly handle ServiceValidationError
- Check for specific translation key instead of full error message
- Ensure consistency between local tests and CI environment
- Import ServiceValidationError explicitly for clarity
* Update homeassistant/components/bsblan/entity.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* chore: Update BSBLAN conftest.py to simplify fixture and patching
* chore: Update BSBLAN integration setup function parameter name
* chore: removed set_static_value
* refactor: Improve BSBLANClimate async_set_preset_mode method
This commit refactors the async_set_preset_mode method in the BSBLANClimate class to improve code readability and maintainability. The method now checks if the HVAC mode is not set to AUTO and the preset mode is not NONE before raising a ServiceValidationError.
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* refactor: Improve tests
test_celsius_fahrenheit
test_climate_entity_properties
test_async_set_hvac_mode
test_async_set_preset_mode still broken. Not sure why hvac mode will not set. THis causes error with preset mode set
* update snapshot
* fix DOMAIN bsblan
* refactor: Improve BSBLANClimate async_set_data method
* refactor: fix last tests
* refactor: Simplify async_get_config_entry_diagnostics method
* refactor: Improve BSBLANClimate async_set_temperature method
This commit improves the async_set_temperature method in the BSBLANClimate class. It removes the unnecessary parameter "expected_result" and simplifies the code by directly calling the service to set the temperature. The method now correctly asserts that the thermostat method is called with the correct temperature.
* refactor: Add static data to async_get_config_entry_diagnostics
* refactor: Add static data to async_get_config_entry_diagnostics
right place
* refactor: Improve error message for setting preset mode
This commit updates the error message in the BSBLANClimate class when trying to set the preset mode.
* refactor: Improve tests
* Fix
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Added PlugState 3, that is coming with renault-api 0.2.7, it fixes#124682 HA ticket
* Added PlugState 3, that is coming with renault-api 0.2.7, it fixes#124682 HA ticket
* WIP
* * Add switch platform
* Add tests for switches
* Remove unnecessary block_till_done-s
* Test that entities get added in a disabled state separately
* Convert to parametrized test
* Use fixture to add entities enabled.
* Bring Nice G.O. up to platinum
* Switch to listen in coordinator
* Tests
* Remove parallel updates from coordinator
* Unsub from events on config entry unload
* Detect WS disconnection
* Tests
* Fix tests
* Set unsub to None after unsubbing
* Wait 5 seconds before setting update error to prevent excessive errors
* Tweaks
* More tweaks
* Tweaks part 2
* Potential test for hass stopping
* Improve reconnect handling and test on Homeassistant stop event
* Move event handler to entry init
* Patch const instead of asyncio.sleep
---------
Co-authored-by: jbouwh <jan@jbsoft.nl>
* Add tests for LCN climate and scene platform
* Add type hints
* Add snapshots for test_climate
* Add snapshots for test_scene
* Replace await_called assertion with snapshots
* Remove snapshots for simple status changes
* Test platform setup using snapshot_platform
* Fix type hints
* Patch homeassistant.components.lcn context instead of pypck module
* Fix side effects caused by patching PchkConnectionManager in lcn platform context
* Improve coordinator test coverage for enphase_envoy
* rename to test_coordinator to test_init for enphase_envoy
* Mock pyenphase _obtain_token instead of httpx auth requests in enphase_envoy tests.
* Move EnvoyTokenAuth patch to mock_envoy of enphase_envoy
* Update Info fixture with new fields from pysmlight 0.0.14
* Create repair if device is running unsupported firmware
* Add test for legacy firmware info
* Add strings for repair issue
* Add filter run time for deCONZ air purifiers
* Add duration and second
* Fix review comments
* Update tests/components/deconz/snapshots/test_sensor.ambr
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Add tests for local connection
* Test cloud setup
* Improve tests.
* Simplied coverage test to cloud setup.
* Mock out library and add snapshots
* Mock out library and add snapshots
* Update tests/components/geniushub/conftest.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Attempt to make it nice
* Fix
---------
Co-authored-by: Joostlek <joostlek@outlook.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Add empty weheat integration
* Add first sensor to weheat integration
* Add weheat entity to provide device information
* Fixed automatic selection for a single heat pump
* Replaced integration specific package and removed status sensor
* Update const.py
* Add reauthentication support for weheat integration
* Add test cases for the config flow of the weheat integration
* Changed API and OATH url to weheat production environment
* Add empty weheat integration
* Add first sensor to weheat integration
* Add weheat entity to provide device information
* Fixed automatic selection for a single heat pump
* Replaced integration specific package and removed status sensor
* Add reauthentication support for weheat integration
* Update const.py
* Add test cases for the config flow of the weheat integration
* Changed API and OATH url to weheat production environment
* Resolved merge conflict after adding weheat package
* Apply suggestions from code review
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Added translation keys, more type info and version bump the weheat package
* Adding native property value for weheat sensor
* Removed reauth, added weheat sensor description and changed discovery of heat pumps
* Added unique ID of user to entity
* Replaced string by constants, added test case for duplicate unique id
* Removed duplicate constant
* Added offline scope
* Removed re-auth related code
* Simplified oath implementation
* Cleanup tests for weheat integration
* Added oath scope to tests
---------
Co-authored-by: kjell-van-straaten <kjell.van.straaten@wefabricate.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* 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