I need a little bit of help for a general concept for the following szenario:
- Homematic smoke detector is manually tested by physically pushing a test button on the device
SD1_SmokeDetectorTestResultchanges from “NONE” to either “SMOKE_TEST_OK” or “SMOKE_TEST_FAILED”
- device resets its state after 1 minute to “NONE”
GOAL: Show in MainUI the date of test and last test result.
PROBLEM: as written above the test result is overriden by state “NONE” after 1 minute
What is your recommendation?
- persisting the item and extracting the last value != “NONE” (is this possible anyway?) from persistency database?
- Is it possible to persist conditionally (e.g. do only persist if value != “NONE”). Sure, there is a way to persist manually, but I’d prefer to have “built-in” into the persistency strategy
- create a virtual item for each device and write a rule which sets the value when it changes to a value !=“NONE”. But then I need to think about persistency again, is I need the state after a potential restart of OH