|
@@ -8,6 +8,9 @@ substitutions:
|
|
|
esphome:
|
|
esphome:
|
|
|
name: $devicename
|
|
name: $devicename
|
|
|
friendly_name: $friendly_devicename
|
|
friendly_name: $friendly_devicename
|
|
|
|
|
+ platformio_options:
|
|
|
|
|
+ lib_ignore:
|
|
|
|
|
+ - RPAsyncTCP
|
|
|
|
|
|
|
|
bk72xx:
|
|
bk72xx:
|
|
|
board: generic-bk7231t-qfn32-tuya
|
|
board: generic-bk7231t-qfn32-tuya
|
|
@@ -17,6 +20,7 @@ bk72xx:
|
|
|
packages:
|
|
packages:
|
|
|
# Enable Home Assistant API
|
|
# Enable Home Assistant API
|
|
|
esphome: !include common/keys.yaml
|
|
esphome: !include common/keys.yaml
|
|
|
|
|
+ diag: !include common/diag.yaml
|
|
|
|
|
|
|
|
logger:
|
|
logger:
|
|
|
|
|
|
|
@@ -80,7 +84,7 @@ sensor:
|
|
|
# Adjust according to the actual resistor values on board to calibrate the specific unit
|
|
# Adjust according to the actual resistor values on board to calibrate the specific unit
|
|
|
# voltage_divider: "895" # LOWER VALUE GIVES LOWER VOLTAE
|
|
# voltage_divider: "895" # LOWER VALUE GIVES LOWER VOLTAE
|
|
|
# current_resistor: "0.0006" # HIGHER VALUE GIVES LOWER WATTAGE
|
|
# current_resistor: "0.0006" # HIGHER VALUE GIVES LOWER WATTAGE
|
|
|
- voltage_divider: "795"
|
|
|
|
|
|
|
+ voltage_divider: "814"
|
|
|
current_resistor: "0.001"
|
|
current_resistor: "0.001"
|
|
|
# how the power monitoring values are returned to ESPHome
|
|
# how the power monitoring values are returned to ESPHome
|
|
|
voltage:
|
|
voltage:
|
|
@@ -198,9 +202,9 @@ status_led:
|
|
|
# inverted: true
|
|
# inverted: true
|
|
|
|
|
|
|
|
binary_sensor:
|
|
binary_sensor:
|
|
|
- - platform: status
|
|
|
|
|
- name: Status
|
|
|
|
|
- entity_category: diagnostic
|
|
|
|
|
|
|
+ # - platform: status
|
|
|
|
|
+ # name: Status
|
|
|
|
|
+ # entity_category: diagnostic
|
|
|
|
|
|
|
|
- platform: gpio
|
|
- platform: gpio
|
|
|
pin:
|
|
pin:
|
|
@@ -216,8 +220,8 @@ binary_sensor:
|
|
|
on_click:
|
|
on_click:
|
|
|
- switch.toggle: outlet
|
|
- switch.toggle: outlet
|
|
|
|
|
|
|
|
- - platform: status
|
|
|
|
|
- name: ${friendly_devicename} status
|
|
|
|
|
|
|
+ #- platform: status
|
|
|
|
|
+ # name: ${friendly_devicename} status
|
|
|
|
|
|
|
|
switch:
|
|
switch:
|
|
|
- platform: gpio
|
|
- platform: gpio
|
|
@@ -229,7 +233,7 @@ switch:
|
|
|
- light.turn_on: led
|
|
- light.turn_on: led
|
|
|
on_turn_off:
|
|
on_turn_off:
|
|
|
- light.turn_off: led
|
|
- light.turn_off: led
|
|
|
- restore_mode: RESTORE_DEFAULT_OFF
|
|
|
|
|
|
|
+ restore_mode: RESTORE_DEFAULT_ON
|
|
|
# Switch to restart the plug
|
|
# Switch to restart the plug
|
|
|
- platform: restart
|
|
- platform: restart
|
|
|
name: ${friendly_devicename} Restart Switch
|
|
name: ${friendly_devicename} Restart Switch
|