Check on/off state

Dear all,

do I need to check on state of the device before switching it off to avoid sending unnecessary messages? Example when I need to switch off a lot of devices in the same time?


And how to you do it, in case it is helpfull.
There is a “current state” node in Home Assistance for this function.