When I power my device down I need to use a switch to get it updated and say the device is unavailable, any help?

Hi i am using an ikea smart light, this lamp is connected to a normal wall switch so if I turn it off it will become unavailable. however this status will only show up when I try to switch the light on in home assistant. is there a way to check the status of the light with an interval of 2 sec? I want to check this because I want to make an automation that will turn the light to full brightness when I turn the light back on with the wall switch