I have a couple sensors that are being read from a csv file. I have been looking for a way to mark them as unavailable under certain conditions. Is that possible or do they always need to have a value?
I haven’t tested it, but you should be able to disable the entity to prevent it from being used and re-enable it after?
Thanks for the tip. That does the job. It would be kind of nice if they didn’t have to be hidden or if it could be automated, but from a logging standpoint disabling it does what I was hoping for.
Have you tried Spook
a scary powerful toolbox for Home Assistant. - this adds the capability to disable/enable an entity (amongst other things) that you can use in an automation?
I got digging into this again recently and the most elegant solution I’ve come up with is creating a template entity that takes on the value of the file entity. The template entity has an “Advanced Options” section where I can set an availability template and make it unavailable if the last update exceeds a certain length of time. While I was at it, I added a webhook to replace the file entity with an input_number type entity. I thought it worth updating in case anybody else comes across this thread.