вот мой конфиг, с ним не видит даже питания. Где-то gpio не так прописал, не пойму где ошибка. Помоги ДРУЖИЩЕ ~# Переменные
substitutions:
plug_name: lonsonho
current_res: "0.00221"
voltage_div: "816"
esphome:
name: ${plug_name}_socket
platform: ESP8266
board: esp8285
wifi:
ssid: "ssd"
password: "password"
manual_ip:
static_ip: 192.168.xx.xx
gateway: 192.168.xx.xx
subnet:
255.255.255.0# Enable logging
logger:
# Enable Home Assistant API
api:
password: "password"
ota:
password: "password"
# Веб сервер
web_server:
port: 80
# Состояние кноки
binary_sensor:
- platform: gpio
name: ${plug_name}_button
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: true
on_press:
- switch.toggle: relay
- platform: status
name: "Status"
# Управление реле
switch:
- platform: gpio
name: ${plug_name}_relay
pin: GPIO14
id: relay
restore_mode: ALWAYS_ON
on_turn_on:
- switch.turn_on: blue_led
- switch.turn_off: red_led
on_turn_off:
- switch.turn_off: blue_led
- switch.turn_on: red_led
# Синяя лампочка
- platform: gpio
id: blue_led
name: ${plug_name}_LED_Blue
icon: mdi:led-on
restore_mode: ALWAYS_ON
pin:
number: GPIO13
inverted: true
# Красная лампочка
- platform: gpio
id: red_led
name: ${plug_name}_LED_Red
icon: mdi:led-on
restore_mode: ALWAYS_OFF
pin:
number: GPIO16
inverted: true
# Сенсор нагрузки
sensor:
- platform: hlw8012
sel_pin:
number: GPIO12
inverted: True
cf_pin: GPIO4
cf1_pin: GPIO5
current_resistor: ${current_res}
voltage_divider: ${voltage_div}
current:
name: ${plug_name}_current
icon: mdi:current-ac
unit_of_measurement: A
voltage:
name: ${plug_name}_voltage
icon: mdi:flash-circle
unit_of_measurement: V
power:
name: ${plug_name}_power
icon: mdi:flash-outline
unit_of_measurement: W
change_mode_every: 8
update_interval: 10s
# Время в онлайне
- platform: uptime
name: ${plug_name}_Uptime
# Уровень сигнала розетки
- platform: wifi_signal
name: ${plug_name}_Wi-Fi_Signal
update_interval: 60s
# Версия прошивки
text_sensor:
- platform: version
name: ${plug_name}_firmware_version~