Why the heck can't I have a manual-only sensor?

I want to have a sensor which is only re-calculated when I do homeassistant.update_entity. I never want HA to automatically recalculate its value, I want to control when it recalculates with my own custom automation logic on my own custom schedule.

I want this for use cases such as these:

  • Data comes from a REST service with rate limits or is expensive per call
  • Data comes from a device which is often unavailable (only visible on home network, powered off at specific times of day, etc.) so I only want to do update checks during those availability times
  • Data comes from a device which proactively reaches out to me with updates but I don’t have an integration for so I need to build my own automation around a webhook

There are hacky workarounds for this today like setting scan_interval to an arbitrarily high value. But of course as pointed out in this WTH post, that doesn’t cover restarts so it doesn’t really work. I think rather then workarounds there should be a straight-up “manual only” option. Then with that you can build custom update schedules using automations easily after that.

To give an example of this, I query Wolfram Alpha to get the next Easter date. It is rude of me to query their service any more than once per year. Right? :smile: