Hello i’m new on esphome, and trying slipt my config, got multipy shelly devices and i want create config like this
substitutions:
system_name: xxx
name: XXXX XXXX
descricao: "DESCRIPTION"
packages:
board: !include common/boards/shelly1.yaml
device_base: !include common/.base.yaml
This works by i need reuse switch / binary_sensor
My shelly1 file is:
esphome:
<<: !include .esphome.yaml
platform: ESP8266
board: esp01_1m
switch:
- platform: gpio
id: relay_1
name: ${name}
pin: GPIO4
restore_mode: restore_default_off
binary_sensor:
- platform: gpio
id: ${name}_button_status
name: ${name} Button Status
pin: GPIO5
filters:
- delayed_on_off: 50ms
Now my devies as multi propoes and i need to define per device some actions. I would like to be able to do something like this in device file:
binary_sensor:
- platform: esphome
related_id: xxx_button_status **<-- reuse the binary_sensor created in common/boards/shelly1.yaml**
on_state:
then:
- switch.toggle: relay_1
Is possible reuse binary_sensor / switch? It doesn’t have to be exactly that way, just a way that gives
Thanks