I may misunderstand your need but to me it sounds like using a switch,delay and state node would do what you want?
[{"id":"7c312acb.5290c4","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"ee5e415c.f67bc","type":"server-state-changed","z":"7c312acb.5290c4","name":"Event State","server":"74cbfde1.f316f4","entityidfilter":"light.bedroom","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":128.10000610351562,"y":136.00000095367432,"wires":[["3c16e83e.51c408"]]},{"id":"3c16e83e.51c408","type":"switch","z":"7c312acb.5290c4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"availible","vt":"str"},{"t":"eq","v":"unavailible","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":321.1000061035156,"y":136.00000190734863,"wires":[["610e9ee7.ff40a"],["1c06ffd7.447db"]]},{"id":"1c06ffd7.447db","type":"delay","z":"7c312acb.5290c4","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470.8500633239746,"y":153.7500057220459,"wires":[["cfae8f1f.c9499"]]},{"id":"cfae8f1f.c9499","type":"api-current-state","z":"7c312acb.5290c4","name":"Current State","server":"74cbfde1.f316f4","outputs":2,"halt_if":"availible","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.bedroom","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":642.8501129150391,"y":156.0000171661377,"wires":[["de777c67.5067b"],[]]},{"id":"de777c67.5067b","type":"debug","z":"7c312acb.5290c4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":887.6251258850098,"y":132.50001525878906,"wires":[]},{"id":"610e9ee7.ff40a","type":"delay","z":"7c312acb.5290c4","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470.00001525878906,"y":117.50000190734863,"wires":[["1bcfc11c.ae48af"]]},{"id":"1bcfc11c.ae48af","type":"api-current-state","z":"7c312acb.5290c4","name":"Current State","server":"74cbfde1.f316f4","outputs":2,"halt_if":"unavailible","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.bedroom","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":643.7500152587891,"y":118.75000190734863,"wires":[["de777c67.5067b"],[]]},{"id":"74cbfde1.f316f4","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]