Browse Source

fix compilation problem with esphoem 2025.7.5, calibrate voltage. add standard diag to LS PC

Patryk M. Gutowski 2 months ago
parent
commit
99376e960c
3 changed files with 23 additions and 14 deletions
  1. 11 6
      lscp01.yaml
  2. 11 7
      lscp02.yaml
  3. 1 1
      lscp03.yaml

+ 11 - 6
lscp01.yaml

@@ -8,6 +8,9 @@ substitutions:
 esphome:
   name: $devicename
   friendly_name: $friendly_devicename
+  platformio_options:
+    lib_ignore:
+      - RPAsyncTCP
 
 bk72xx:
   board: generic-bk7231t-qfn32-tuya
@@ -17,6 +20,8 @@ bk72xx:
 packages:
   # Enable Home Assistant API
   esphome: !include common/keys.yaml
+  diag: !include common/diag.yaml
+
 
 # Enable logging
 logger:
@@ -81,7 +86,7 @@ sensor:
     # Adjust according to the actual resistor values on board to calibrate the specific unit
     # voltage_divider:  "895"               # LOWER VALUE GIVES LOWER VOLTAE
     # current_resistor: "0.0006"          # HIGHER VALUE GIVES LOWER WATTAGE
-    voltage_divider: "795"
+    voltage_divider: "814"
     current_resistor: "0.001"
     # how the power monitoring values are returned to ESPHome
     voltage:
@@ -199,9 +204,9 @@ status_led:
       # inverted: true
 
 binary_sensor:
-  - platform: status
-    name: Status
-    entity_category: diagnostic
+  # - platform: status
+  #   name: Status
+  #  entity_category: diagnostic
 
   - platform: gpio
     pin:
@@ -217,8 +222,8 @@ binary_sensor:
     on_click:
       - switch.toggle: outlet
 
-  - platform: status
-    name: ${friendly_devicename} status
+  # - platform: status
+  #  name: ${friendly_devicename} status
 
 switch:
   - platform: gpio

+ 11 - 7
lscp02.yaml

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

+ 1 - 1
lscp03.yaml

@@ -80,7 +80,7 @@ sensor:
     # Adjust according to the actual resistor values on board to calibrate the specific unit
     # voltage_divider:  "895"               # LOWER VALUE GIVES LOWER VOLTAE
     # current_resistor: "0.0006"          # HIGHER VALUE GIVES LOWER WATTAGE
-    voltage_divider: "795"
+    voltage_divider: "814"
     current_resistor: "0.001"
     # how the power monitoring values are returned to ESPHome
     voltage: