Replace Ferraris number and button components with template components #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request replaces the Ferraris number and button components (which were used to overwrite the energy meter reading value) with template variants from the YAML configuration file. Additionally, the Ferraris component now provides two actions
ferraris.set_energy_meter
andferraris.set_rotation_counter
which can be used to set the energy meter reading value and the rotation counter respectively (the latter is updated with both actions as the Ferraris component internally works with rotations only).The new template number and button components make use of the
ferraris.set_energy_meter
action to overwrite the energy meter reading value. As these components are now part of the YAML file and no more part of the C++ component code, they can be easily adapted to custom needs.Closes #2