Generic way to test "time since state became X" for device attributes?

Created a FR: Attribute Metadata in RM