We can just copy the solution to assignment 2, adding a situation term to each predicate. Note that all of these can be considered to be derived predicates. [I also added a flow from the sink spout.]
pressurised(p1,init). pressurised(p1,do(A,S)) <- pressurised(p1,S). pressurised(p2,S) <- on(t1,S) & pressurised(p1,S). pressurised(p3,S) <- on(t1,S) & pressurised(p1,S). flow(shower,S) <- on(t2,S) & pressurised(p2,S). wet(bath,S) <- flow(shower,S). flow(sink,S) <- on(t3,S) & pressurised(p3,S). wet(sink,S) <- flow(sink,S). flow(d2,S) <- wet(bath,S) & unplugged(bath,S). flow(d1,S) <- flow(d2,S). flow(d3,S) <- wet(sink,S) & unplugged(sink,S). flow(d1,S) <- flow(d3,S).