-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* (Re)send the configuration payload once it changes (e.g. due to
interpolation). The entities are tracked using hash of JSON formatted configuration payloads sent, and compared for any change to make a decision it should be sent again + `EnergomeraConfig`: introduced `_read_config` method dedicated to reading configuration file, for ease of mocks during testing * Better test organization by moving fixtures `mock_serial`, `mock_mqtt`, `mock_config` to `conftest.py` and making those configurable via `pytest` markers * `EnergomeraConfig` class no longer requires mocking `patch` built-in, since the class now has `_read_config()` method easily mocked * `test_energomera` no longer generates separate tests for each particular MQTT and serial call - those are now validates by single test as the whole flow + Added tests for handling HomeAssistant configuration payloads, especialy for resending those once the payload changes
- Loading branch information
Showing
6 changed files
with
244 additions
and
1,340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.