I waited until I had several cups of coffee to post this this morning, but I still can't make sense of it. I want to check to see if a medicine cabinet door has been opened (at all) during three specific times a day. Basically, if the time of day is between 9AM and 11AM, (3 & 5, 9 & 11PM) has this cabinet door been opened at least once? If false, change a light to red. If true, leave light as is or change it back from red.
This assumes I have a virtual device called MEDS and the cabinet door is never opened except to take meds. Is this logical?
{Reset MEDS to TAKE}
{Were Meds Taken?}
IF Med Cabinet is CLOSED
AND IF Time is between 9 and 11
AND IF MEDS = TAKE
Change LIGHT to RED
(Same for other times)
This assumes I have a virtual device called MEDS and the cabinet door is never opened except to take meds. Is this logical?
{Reset MEDS to TAKE}
If the time is 6AM
OR IF the time is 12PM
OR IF the time is 4PM
OR IF the time is 8PM
AND IF MEDS = TOOK
Change MEDS to TAKE
{Set MEDS to TOOK}
If Med Cabinet is changed to OPEN
If Med Cabinet is changed to OPEN
Change MEDS to TOOK
Change LIGHT to White
{Were Meds Taken?}
IF Med Cabinet is CLOSED
AND IF Time is between 9 and 11
AND IF MEDS = TAKE
Change LIGHT to RED
(Same for other times)
Comment