Define an own sensor? Is this, what I want in my case?
I have a pressure sensor, which is read out every two seconds. The problem is, the values are not usable directly, as a pump might influence them. Hence, I measure in a loop and store always the last measurement value in a variable. Given a certain condition is met, I want to take that last value and present it to Home Assistant as the valid measurement.
One idea I have is to send a MQTT message when the condition is met. But I don’t know whether this is necessary.
Is it possible to define a ‘virtual sensor’, which’s value is updated every time the condition is met?
Thanks for pointing me in the right direction!