Reminder to change the blades on my lawn mower

Hi everyone,

I am not getting my head around a solution for this. I need need to change the blades on my lawn mower every four weeks.

I would like to show on my dashboard the last date the blades have been changed and days until the next change. The first one I have managed, but not the second one. Below that I would like to have a button that when being pressed asks me to input the date of change.
Any help is appreciated :slight_smile:

I use this methodology for a number of things in my home automation - furnace filter, mower blades, etc. What I have found works best for me is:

  • A BUTTON helper to indicate when you last did “the thing” (changed blades, changed a filter)
  • A HISTORY TEMPLATE that uses the date of that button to determine how long it has been since you clicked that button and, thus, did the task
  • AUTOMATION to read the history template and notify me if the furnace filter has 450 hours on it - which I know because every time my furnace kicks on it fires automation to track how long it ran

It sounds complex but it isn’t. For my furnace filter button, my history template looks like this:

platform: history_stats
name: "Furnace Use Total"
entity_id: binary_sensor.furnace_is_running
state: "on"
type: time
start: >
  {{ as_timestamp(states('input_button.furnace_changed_filter'), (now() | as_timestamp) ) }}
end: "{{ now() }}"

You can use a variation of this system and it will work quite nicely. Just be sure to make your history stats items part of your recorder config so they trap usage over time and across restarts.

Holy mower blade Batman!

What are you mowing? Sandpaper? I have exposed limestone pebbles and still manage a year. :joy:

3 Likes

Personally, before the robot mower, I was (and am) very persnickety about my mower blades, I have three blades and they get changed every 2 months and then all sharpened at the end of the season. I’m a grass snob :).

OP asked to be able to set the date that the blades were replaced, which is the same reason why I use a date helper instead of just checking the last time the button was pushed. The button can trigger an automation that sets the date helper to today.

To get the “prompt to enter the date” functionality OP mentioned, you could use a conditional card to show the the date helper if it’s be changed less than 60 seconds ago. This way, when the button is pushed it will set the date helper, which will cause it to show on the dashboard for a minute where it can be edited, if needed.

All this, fwiw, is the one use case I bother to use blueprints for. I still have to create the date helper, etc, but then I use the blueprint to configure the reminder period.

I’m pretty sure I answered that request, but your input into the solution is probably also appreciated by them.

My mistake. As I understood your approach, it only allows one to set the time the task was completed to “now”.

I’d add a local calendar event that repeats every 4 weeks. Then trigger a notification automation from that.

Or if you are less regular at actually changing the blades, just enter the event into the calendar when you actually change the blades with a duration of 4 weeks (no repeat). Then trigger the notification automation on the end of the event.

 trigger:
  - platform: calendar
    event: end
    entity_id: calendar.blade_change

My bot mower app tells me I need to change them.

It seems that I can ignore that as well as ignoring my wife asking me to take the garbage out. Hmmmm

I should probably do better with the mower blades :slight_smile:

2 Likes

:smiley: Don’t ask me why, but after four weeks the blades are blunt as heck.

I haven’t considered the approach by @CO_4X4 which can work for me as well. So I will give it a try.

The code you posted tracks the binary_sensor.furnace_is_running if I understand the docs of history template correct but you state that the history template is tracking that button.

My understanding leads me to this code:

  - platform: history_stats
    name: "Zeit seit letztem Messerwechsel"
    entity_id: input_button.messerwechsel
    state: "on"
    type: time
    start: >
      {{ as_timestamp(states('input_button.messerwechsel'), (now() | as_timestamp) ) }}
    end: "{{ now() }}"

I don’t know if that code would work or not, I always have a sensor to indicate when it’s on or off so I’m tracking actual furnace hours (etc). You might simply point it to any device you have that’s always the same state or what I do is have helper toggles for if it’s “lawn mowing season” for stuff like that, which then drives other automation.

I managed to get this working. Input_buttons are stateless, therefore I needed a binary sensor to give the history_stat something to trigger.

This is how it looks like now:

The sensor for Days until next change (Tage bis Wechsel)" is this:

    - name: Tage bis nächstem Messerwechsel
      unique_id: e1fd55a7-6773-41ed-8494-ffc051a10b75
      state: >
        {{(720 - states("sensor.zeit_seit_letztem_messerwechsel") | int) / 24}}

Can someone guide me how to format that to full numbers only? So in this case 30 with no decimals?

- name: Tage bis nächstem Messerwechsel
      unique_id: e1fd55a7-6773-41ed-8494-ffc051a10b75
      state: >
        {{ ((720 - states("sensor.zeit_seit_letztem_messerwechsel") | int) / 24) | round(0) }}

That works perfectly!

Thanks everyone, I have this running now.

1 Like

Glad to hear it! That solution is something I use on a lot of things and I rely on it nearly every day for one thing or another.

1 Like