WT32-ETH01 Action if offline

I have a WT32-ETH01 in operation via LAN cable.
How can I do that that the ESP makes a switch false and sets the analogue output to 1 via I2C, when he’s offline?

esphome:
name: esp-pwm

esp32:
board: esp-wrover-kit

board: esp32dev

framework:
type: arduino

ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO0_IN
phy_addr: 1
power_pin: GPIO16

logger:
api:
ota:

DFR0971 (PWM 0-10V)

i2c:
scl: GPIO15
sda: GPIO14
scan: true
frequency: 400000Hz

DFR0971 (PWM 0-10V)

Set voltage of 0-5v or 0-10v

gp8403:
id: gp8403_10v
voltage: 10v
address: 0x58

output:

  • platform: gp8403
    gp8403_id: gp8403_10v
    channel: 0
    id: gp8403_0

light:

  • platform: monochromatic
    name: “Analogausgabewert”
    output: gp8403_0
    gamma_correct: 1.2

switch:
#Relai Leistung

  • platform: gpio
    name: “Regler_EinAus”
    pin: GPIO12
    inverted: false

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16