I have an MQTT topic that will only report an ON status, and never reports and OFF status. When it reports the ON status, it puts the timestamp as the value of the sensor. I can modify the format of the timestamp and/or put a static string before or after the timestamp if needed.
I’d like to make an MQTT binary sensor for this, and anytime that I see a new timestamp or value, set it to ON and then use the expire_after function of the sensor to reset the binary sensor back to off within a second.
But how can I leverage the template when it’s looking for the ON value to account for this? Basically I’m looking for any change in value with the template, but not sure if this is possible to do.