* 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
* chore: Update WallboxEntity model ID to use CHARGER_PART_NUMBER_KEY
The WallboxEntity model ID is updated to use the CHARGER_PART_NUMBER_KEY value from the coordinator data. This change ensures consistency and accuracy in identifying the model of the Wallbox entity.
* Update WallboxEntity model ID to use CHARGER_PART_NUMBER_KEY
* chore: Update WallboxEntity model ID to use CHARGER_PART_NUMBER_KEY
* remove obsolete key from test
* 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