Automation gets triggered with HA restart - Sonoff ZBMini

Hi all, I have a strange issue with an automation that I use for lights in one room. I have a Sonoff ZBMini attached to a light switch that turns on/off the bathroom lights. Now when I restart HA, that triggers the automation with the new state it gets from the ZBMini. Is there any way I can change that behavior?

Automation looks like this:

alias: Sonoff Bad
description: ''
trigger:
  - platform: device
    type: changed_states
    device_id: e65ae854f857bde4929e920c15adf7c2
    entity_id: light.sonoff_bad_on_off
    domain: light
condition: []
action:
  - service: light.toggle
    data: {}
    target:
      entity_id: light.bad
mode: single

Trigger of the automation after restart:

platform: device
type: changed_states
device_id: e65ae854f857bde4929e920c15adf7c2
entity_id: light.sonoff_bad_on_off
domain: light

Zigbee is now running of ZHA