Decrease numeric value every month

Hi, Ive got a numeric value that decrease every month with 1000, is it possible to create a sensor for this? Sort of countdown. Thanks

How is your numeric value stored in home assistant?

Ive created a number helper for it but not sure if it is the correct approach

It’s a good a way as any. What is the entity id?

Do you want a read only sensor or do you want the number to be decremented?

The id: input_number.80000
The 80000 needs to be decremented every first of the month with 1000

trigger:
  - platform: template
    value_template: "{{ now().day == 1 }}"
action:
  - service: input_number.decrement
    target:
      entity_id: input_number.80000

Make sure your input number configuration includes step: 1000.

1 Like

The other option is to create a monthly repeating local calendar event and trigger off of that.

1 Like