Skip to content

Latest commit

 

History

History
206 lines (145 loc) · 4.71 KB

copy.rst

File metadata and controls

206 lines (145 loc) · 4.71 KB

Copy Component

.. seo::
    :description: Instructions for setting up the copy component in ESPHome
    :image: content-copy.svg

The copy component can be used to copy an existing component (like a sensor, switch, etc.) and create a duplicate mirroring the source's state and forwarding actions such as turning on to the source.

For each of the supported platforms, the configuration consists of the required configuration variable source_id, which is used to indicate the source of the object being mirorred.

Copy Binary Sensor

# Example configuration entry
binary_sensor:
  - platform: copy
    source_id: source_binary_sensor
    name: "Copy of source_binary_sensor"

Configuration variables:

Copy Button

# Example configuration entry
button:
  - platform: copy
    source_id: source_button
    name: "Copy of source_button"

Configuration variables:

Copy Cover

# Example configuration entry
cover:
  - platform: copy
    source_id: source_cover
    name: "Copy of source_cover"

Configuration variables:

Copy Fan

# Example configuration entry
fan:
  - platform: copy
    source_id: source_fan
    name: "Copy of source_fan"

Configuration variables:

Copy Lock

# Example configuration entry
lock:
  - platform: copy
    source_id: source_lock
    name: "Copy of source_lock"

Configuration variables:

Copy Number

# Example configuration entry
number:
  - platform: copy
    source_id: source_number
    name: "Copy of source_number"

Configuration variables:

Copy Select

# Example configuration entry
select:
  - platform: copy
    source_id: source_select
    name: "Copy of source_select"

Configuration variables:

Copy Sensor

# Example configuration entry
sensor:
  - platform: copy
    source_id: source_sensor
    name: "Copy of source_sensor"

Configuration variables:

Copy Switch

# Example configuration entry
switch:
  - platform: copy
    source_id: source_switch
    name: "Copy of source_switch"

Configuration variables:

Copy Text Sensor

# Example configuration entry
text_sensor:
  - platform: copy
    source_id: source_text_sensor
    name: "Copy of source_text_sensor"

Configuration variables:

Copy Text

# Example configuration entry
text:
  - platform: copy
    source_id: source_text
    name: "Copy of source_text"

Configuration variables:

See Also