Device Maintenance Monitor - Smart maintenance monitor

Device Maintenance Monitor: Custom Component for Home Assistant

I am very happy to inroduce my first HA custo component!

Overview - What and Why?

Maintaining the various devices in our homes can be challenging, especially when their usage varies greatly.
The Device Maintenance Monitor custom component for Home Assistant aims to solve this by providing a tailored maintenance reminder system based on actual device usage rather than just fixed intervals.
This is particularly useful for devices like air conditioners that have different usage patterns across different rooms. For instance, in my home, the bedroom AC runs for about 10 hours a day, while the office AC runs only 2-3 hours a week. The standard three-month cleaning schedule often resulted in the bedroom AC being overdue for maintenance while the office AC was still in pristine condition.
This component ensures that each device gets the attention it needs based on how much it is actually used.

Features & Entities

Features

  • Runtime-Based Reminders: Reminders based on the total runtime of the device (e.g., every X hours of operation).
  • Turn-On Count-Based Reminders: Reminders based on how many times the device has been turned on (e.g., every X on/off cycles).
  • Fixed Interval Reminders: Traditional reminders based on fixed time intervals (e.g., every X days/months).

Entities Created

  1. Binary Sensor: Indicates whether maintenance is needed.

    Attributes:

    • Last maintenance date
    • Runtime duration since last maintenance (if runtime method chosen)
    • Turn-on count since last maintenance (if count method chosen)
    • Estimated maintenance date (based on usage since last maintenance)
  2. Button Entity: Used to reset the maintenance needed status (indicates maintenance done).

Services

  • Reset Maintenance Service: Resets the maintenance needed status.

How to Install

  1. HACS Installation:
    • Ensure you have HACS installed in your Home Assistant.
    • Add the Device Maintenance Monitor repository to HACS.
    • Install the integration via HACS.
  2. Manual Installation:
    • Download the component from the GitHub repository.
    • Place the downloaded files in the custom_components/device_maintenance_monitor/ directory within your Home Assistant configuration folder.
    • Restart Home Assistant.
    • Configure the integration via the Home Assistant UI.

Future Enhancements

We are continuously working to improve the Device Maintenance Monitor component. Here are some ideas for future enhancements:

  • Adding a minimum and maximum fixed interval for the runtime method (e.g., every X hours of operation, but at max every Y days/months).
  • Introducing methods for tracking increasing measurements (e.g., water meters).
  • Utilizing machine learning to predict estimated maintenance dates more accurately, reducing fluctuations.
  • Adding dedicated sensors instead of attributes for more granular tracking.
  • Supporting state-based runtime adjustments (similar to the PowerCalc component).
  • Implementing templates to determine whether the current state should be counted towards usage.

We encourage you to open feature requests on the GitHub repository and comment on existing requests to help prioritize the features you’d like to see implemented.

Thank you for your support and contributions to making Home Assistant an even more powerful and versatile smart home platform!

4 Likes

Really good idea, thank you!

1 Like

Nice work! Slightly annoyed (in a good way :wink: ) that my handywork from a month ago could have been way easier done using this. I edited it to reference your great contribution:

Now I need to revisit my work to integrate your solution, and throw away a good part of it :rofl: The tasks bit to put reminders in Google remains.

1 Like

[Release] Device Maintenance Monitor v0.1.0: New Features & Bug Fixes

Hello Home Assistant Community,

I’m excited to announce the release of version 0.1.0 of the Device Maintenance Monitor custom component! This update brings several new features, enhancements, and important bug fixes that improve the overall functionality and user experience.

:rocket: New Features

  • Dedicated Sensors for Granular Tracking
    We’ve introduced dedicated sensors for tracking the inner state of the logic, in addition to the existing binary sensor attributes. This allows for more granular monitoring and control.
  • Support for Fixed Interval Sensors Without Linked Devices
    You can now configure fixed interval sensors that operate independently of any linked device. This is perfect for tracking maintenance tasks that don’t have a specific device associated with them.
  • State Templates for Custom Usage Tracking
    Implemented templates allow you to determine whether the current state of a device should be counted towards its usage. This gives you greater flexibility in how you track and manage device maintenance.
  • Reset Maintenance Service
    A new reset_maintenance service has been added, allowing you to reset maintenance data and start a new tracking period with ease.
  • Minimum and Maximum Fixed Intervals for Runtime Method
    You can now set minimum and maximum intervals for the runtime method, ensuring that reminders are both timely and not overly frequent.

:bug: Bug Fixes

  • Configuration Entry Name Update
    Fixed an issue where the configuration entry name wouldn’t update after changing the name of the integration in the configuration.
  • Statistics Reset Issue
    Resolved a problem where statistics would reset when updating configuration or reloading the integration.

This release is a significant step forward, and I’m grateful for the community’s feedback and contributions. Please update to the latest version and let me know how these changes improve your Home Assistant experience!

As always, your feedback is welcome. Feel free to open any issues or feature requests on the GitHub repository.

Thank you for your support!

1 Like