Home Assistant: Maintenance reminders using NFC tags

There are places where NFC tags can be very useful and one of those is possibly a cleanup reminder! I have Mitsubishi Heat pump which filters should be vacuumed once a month as recommended by the manufacturer. The problem here is, I never ever remember when was the last time I actually did it! So, how about Home Assistant and NFC tags to keep track of it? Let’s think of a following sequence:

  1. Vacuum the filters
  2. Tap phone next to the heat pump NFC tag to reset cleanup timer
  3. Get notified when a month has passed since last cleanup

Quite useful right? Of course you could create automation to manually click an entity on Home Assistant using app or web browser, but I think a NFC sticker works here quite well.

Creating NFC tag

NFC tags can be programmed just by using Home Assistant Companion App (iOS or Android) and a programmable NFC sticker. To write your tag using the companion app can be done by navigating the app to Settings -> Tags -> + Add New -> Fill in the info -> Create and Write.

After writing you should get a TAG ID that can then be used in an automation. So store the ID in a text file for a while and then paste it to the automation later.

Now just stick the NFC sticker on the side of selected device.


For this automation we need three items: input_datetime to keep the date of our ‘last cleaned’ status, template sensor to convert this date time to ‘last cleaned‘ days and finally an automation to set the last cleaned date into the input_datetime defined previously.

Here’s my package:

    name: Heat Pump filter last cleaned
    has_time: false
    has_date: true

  -  sensor:
      - name: "Heat Pump filter cleanup in days"
        unique_id: heat_pump_filter_clean
        icon: "mdi:wrench-clock"
        state: >
          {%- set cycle = (this.attributes.get('clean_cycle_days', 30) | int) -%}
          {%- set due =  strptime(states('input_datetime.heat_pump_filter_last_cleaned'), '%Y-%m-%d' ) + timedelta(days = cycle) -%}
          {{ ((as_timestamp(due) - as_timestamp(now())) | int /60/1440) | round(0) }}
          clean_cycle_days: 30 # Cycle amount in days

  - id: 'maintenance_set_heatpump_filter_last_cleaned'
    description: "Maintenance: Reset heat pump filter last cleaned"
    - platform: tag
      tag_id: f1892138-fe90-442e-8d0b-d1cc356e5d13 # Tag id
    condition: []
    - service: input_datetime.set_datetime
        datetime: '{{ now() }}'
        entity_id: input_datetime.heat_pump_filter_last_cleaned
    mode: single

The configurable variable here is the cycle_clean_days that contains the clean cycle in days and tag_id that is responsible of resetting the cycle when scanned.

This automation does not contain the reminder itself, but is trivial to implement when needed. I’m using this only to show the due time on my maintenance dashboard rather than getting even more push notifications on my phone.

4 Replies to “Home Assistant: Maintenance reminders using NFC tags”

    1. Hi Filipe!

      It’s nothing fancy at the moment (it’s the functionality that matters to me).
      Anyhow, I added image of the dashboard element at the end of the post 🙂

  1. I have a similar automation for replacing the air filter on my furnace, but I took a very different approach. I setup a counter helper with a max of 30 + min of 0, Then everyday at 7PM an automation is triggered which decrements the counter if counter>0, and if counter=0 it sends me a notification. Its nice because I can check the counter whenever I’m curious and see how long is left on it. Its probably a bit less accurate than yours but I don’t need a high degree of accuracy for what it is.

    1. One day accuracy is more than enough for functionality like this and there are many ways to implement it. Good job! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *