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 and ferraris.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.
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