Scene not triggering when a device change from offline to on

hello i have a smart switch A connected to a municipality electricity supply that goes down always and i have to use ups to power my house
so i wanted to use the switch to know when ever the smart switch A goes on turn my wifi smart switch energy meter that is connected to my water heater on
but i discovered that the ewelink is not detecting the change from offline to on status
and the scene between my wifi smart switch energy meter and the smart switch A not working
please advice