Commit Graph

6 Commits (50cc6b4e014208aaab0e55187493062b726a3df3)

Author SHA1 Message Date
Willem-Jan van Rootselaar 4e8f878d83
Bump python bsblan version 0.6.4 (#128999) 2024-10-23 14:16:34 +02:00
Willem-Jan van Rootselaar 1ae1391cb9
Add platform sensor to BSBLAN integration (#125474)
* add sensor platform

* refactor: Add sensor data to async_get_config_entry_diagnostics

* refactor: Add tests for sensor

* chore: remove duplicate test

* Update tests/components/bsblan/test_sensor.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* refactor: let hass use translation_key

fix raise

* refactor: Add new sensor entity names to strings.json

* refactor: Add tests for current temperature sensor

* refactor: Update native_value method in BSBLanSensor

* refactor: Update test

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-13 14:04:00 +02:00
Willem-Jan van Rootselaar 4e94ce0cc7
Refactor bsblan coordinator (#124308)
* 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
2024-08-23 08:42:36 +02:00
Marc Mueller ff3a801936
Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00
Jan-Philipp Benecke 70843862aa
Address late review for bsblan (#99360)
* Address late review comment

* Break also comment
2023-08-31 07:31:05 +02:00
Jan-Philipp Benecke 5c8e5a7af2
Split bsblan coordinator and randomize update interval (#99269)
* Split out bsblan coordinator and randomize update interval

* Use logger const

* Add randomising update interval for following updates

* Implement review comments

* Re-add config_entry

* Remove line
2023-08-30 13:14:30 +02:00