Hello everyone, I’m new here and how can I transfer data to the custom component I use in my project via homeassistant?
substitutions:
devicename: "devkit-s"
esphome:
name: $devicename
friendly_name: $devicename
includes:
- i2c.h
libraries:
# - "Grove 3-Axis Digital Gyro"
- "Wire"
- "SPI"
- "Adafruit BusIO"
- "Adafruit Unified Sensor"
- "Adafruit ADXL345"
- "BluetoothSerial"
- "Adafruit ADS1X15"
- "Adafruit MAX1704X"
esp32:
board: esp32dev
framework:
type: arduino
logger:
# level: VERY_VERBOSE
api:
reboot_timeout: 0s
ota:
wifi:
ssid: !secret wifi_ssid2
password: !secret wifi_password2
ap:
ssid: ${devicename}
password: ${devicename}
fast_connect: true
# power_save_mode: none
captive_portal:
web_server:
port: 80
css_url: v3
include_internal: True
local: True
version: 2
sensor:
- platform: internal_temperature
name: "Internal Temperature"
update_interval: 1s
custom_component:
- lambda: |-
auto mybluetooth = new MyBluetoothComponent();
return {mybluetooth};
- lambda: |-
auto myi2c = new Myi2cComponent();
return {myi2c};
button:
- platform: restart
name: "Restart"
light:
- platform: status_led
name: "status led"
id: status
pin:
number: GPIO13
mode:
output: True
inverted: False
on_state:
if:
condition:
wifi.connected:
then:
- light.turn_on:
id: led
# effect: strobe
- platform: binary
name: "led"
id: led
output: o13
effects:
- strobe:
name: strobe
colors:
- state: true
brightness: 100%
duration: 100ms
- state: false
duration: 50ms
- state: true
brightness: 100%
duration: 100ms
- state: false
duration: 200ms
output:
- platform: gpio
id: o13
pin:
number: GPIO13
mode:
output: True
inverted: False