Wake on lan Switch state

I have a wake on lan switch who works, and starts the computer perfectly, but before 5 seconds the state of this switch baks to off.

It seem like the switch don’t get machine state.

Can you help me?

It’s normal that the switch turns back to off until the computer is available at the network.
Have you defined the host variable?

- platform: wake_on_lan
    name: "Eddds"
    mac_address: "00-11-XX-XX-XX-XX"
    host: ""
 service: shell_command.turn_off_edulis

This is my code

Works, the host ip was wrong.