-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor service event to distinguish event with data or without (#308)
Only charging events have data and some of them have the data optionally. It could make sense to get only two types of events: with data or without. Currenly only charging events will have these types, all other service events will be of ServiceEvent base type. This solution has pros and cons: - this is simpler and shorter - only two event types to distinguish and process But: - this solution is not future proof: if any of the event start to get other data, it would be required to introduce new types anyway which will make mqtt._parse_topic function to look even more ugly and complicated than now. NOTE!!! This change is not compatible with current one that is used in HA addon. Adaptation is required. Co-authored-by: WebSpider <[email protected]>
- Loading branch information
Showing
4 changed files
with
55 additions
and
88 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
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