ESPHome: Unable to coding for relay on/off using pzemac

Hi…
The below code i have cofigured for 3 Pzeam004t sensor in esphome but it showing error AssertionError,
so please anybody help, how to automate to torn on and off whenever the voltage value of L1, L2, L3 above 250 and below 180 relay will on(i.e RKV, YKV & BKV) otherwise will be off with ondelay of 5sec.
Thank you for your Help…
My present code:

esphome:
  name: aps-pcb
  friendly_name: APS_PCB

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "CLPMWNBG8xQ8VS7KAM1Zm2ipN9IJZbkkUE1JuT3bso8="

ota:
  password: "8c65f36d76c269c42ed8b45dfc64a28f"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Aps-Pcb Fallback Hotspot"
    password: "qmT5EFIS68jD"

captive_portal:
uart:
    tx_pin: 17
    rx_pin: 16
    baud_rate: 9600
    data_bits: 8
    stop_bits: 1
    parity: NONE

modbus:
  - id: mod_bus_pzem
    send_wait_time: 250ms

sensor:
- platform: pzemac
  id: pzem_1
  voltage:
    id: Rvolt
    name: "R Voltage"
  address: 0x10
  modbus_id: mod_bus_pzem

- platform: pzemac
  id: pzem_2
  voltage:
    id: Yvolt
    name: "Y Voltage"
  address: 0x11
  modbus_id: mod_bus_pzem

- platform: pzemac
  id: pzem_3
  voltage:
    id: Bvolt
    name: "B Voltage"
  address: 0x12
  modbus_id: mod_bus_pzem

output:
- platform: gpio
  id: RVK
  pin: 18
- platform: gpio
  id: YVK
  pin: 19
- platform: gpio
  id: BVK
  pin: 23

on_value_range:
  - above: 260
  - below: 180
sensor.pzem_1.voltage:
then:
 output.RVK.turn_on
after: 5s
sensor.pzem_2.voltage:
 then:
  output.YVK.turn_on
 after: 5s
sensor.pzem_3.voltage:
 then:
  output.BVK.turn_on
 after: 5s

Error Display:

Error log as text:

INFO ESPHome 2023.6.3
INFO Reading configuration /config/esphome/aps-pcb.yaml...
ERROR Unexpected exception while reading configuration:
Traceback (most recent call last):
  File "/usr/local/bin/esphome", line 33, in <module>
    sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')())
  File "/esphome/esphome/__main__.py", line 1015, in main
    return run_esphome(sys.argv)
  File "/esphome/esphome/__main__.py", line 993, in run_esphome
    config = read_config(dict(args.substitution) if args.substitution else {})
  File "/esphome/esphome/config.py", line 986, in read_config
    res = load_config(command_line_substitutions)
  File "/esphome/esphome/config.py", line 840, in load_config
    return _load_config(command_line_substitutions)
  File "/esphome/esphome/config.py", line 828, in _load_config
    result = validate_config(config, command_line_substitutions)
  File "/esphome/esphome/config.py", line 756, in validate_config
    result.run_validation_steps()
  File "/esphome/esphome/config.py", line 125, in run_validation_steps
    task.step.run(self)
  File "/esphome/esphome/config.py", line 300, in run
    component = get_component(self.domain)
  File "/esphome/esphome/loader.py", line 180, in get_component
    assert "." not in domain
AssertionError