Hi,
I’m working on an S0PCM5 sensor, to count pulses from the utility sensors.
That is working fine most of the time, but sometimes it misses some pulses.
For that reason, I have a helper for each counter (just talking about the first one, to keep things short):
input_number.m1_offset
When I notice I missed pulses, I need to correct this offset. For various reasons, I want to to this with a button, which increments this offset. So I made a helper button:
input.button.add_m1
On the dashboard, I added a ‘Button’ card, selected this button, and on the click action, I used:
call_service: input_number.increment -> entity: input_number.m1_offset
When I click the button, the input_number is incremented with 0.001, which is the step size of the input_number.m1_offset
helper.
Because my correction can be bigger, I want to know if there is a way to change the value of this increment, eg 0.01, 0.1, 1, or even -1.
I’ve put this in a grid card, which results in the following yaml:
square: true
columns: 2
type: grid
cards:
- type: entity
entity: input_number.m1_offset
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: input_number.increment
data: {}
target:
entity_id: input_number.m1_offset
entity: input_button.add_m1
hold_action:
action: none
Is it possible to change the value the service is incrementing with?
Marcel