esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

error when want install "WiFi Signal Sensor" in esphome #4298

Closed lysiong closed 1 year ago

lysiong commented 1 year ago

The problem

ESPHOME always come out error when want install "WiFi Signal Sensor"

Which version of ESPHome has the issue?

2023.2.4

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

Home Assistant 2023.3.3

What platform are you using?

ESP32

Board

generic

Component causing the issue

No response

Example YAML snippet

INFO Reading configuration /config/esphome/esp32-proxy1.yaml...
INFO Configuration is valid!
substitutions:
  name: esp32-proxy1
  friendly_name: Bluetooth Proxy
esphome:
  name: esp32-proxy1
  friendly_name: Bluetooth Proxy
  name_add_mac_suffix: false
  project:
    name: esphome.bluetooth-proxy
    version: '1.0'
  build_path: .esphome/build/esp32-proxy1
  platformio_options: {}
  includes: []
  libraries: []
  min_version: 2023.2.4
esp32:
  board: esp32dev
  framework:
    version: 4.4.2
    sdkconfig_options: {}
    advanced:
      ignore_efuse_mac_crc: false
    source: ~3.40402.0
    platform_version: platformio/espressif32 @ 5.2.0
    type: esp-idf
  variant: ESP32
wifi:
  ap:
    ap_timeout: 1min
  domain: .local
  reboot_timeout: 15min
  power_save_mode: LIGHT
  fast_connect: false
  enable_btm: false
  enable_rrm: false
  networks:
  - ssid: xxx
    password: xxx
    priority: 0.0
  use_address: esp32-proxy1.local
api:
  encryption:
    key: xxx
  port: 6053
  password: ''
  reboot_timeout: 15min
logger:
  baud_rate: 115200
  tx_buffer_size: 512
  deassert_rts_dtr: false
  hardware_uart: UART0
  level: DEBUG
  logs: {}
ota:
  safe_mode: true
  port: 3232
  reboot_timeout: 5min
  num_attempts: 10
improv_serial: {}
dashboard_import:
  package_import_url: github://esphome/bluetooth-proxies/esp32-generic.yaml@main
  import_full_config: false
esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms
    window: 1100ms
    active: true
    duration: 5min
    continuous: true
bluetooth_proxy:
  active: true
  cache_services: true
  connections:
  - {}
  - {}
  - {}
button:
- platform: safe_mode
  name: Safe Mode Boot
  entity_category: diagnostic
  disabled_by_default: false
  icon: mdi:restart-alert
  device_class: restart
sensor:
- platform: wifi_signal
  name: WiFi Signal Sensor
  update_interval: 60s
  disabled_by_default: false
  force_update: false
  unit_of_measurement: dBm
  accuracy_decimals: 0
  device_class: signal_strength
  state_class: measurement
  entity_category: diagnostic

Anything in the logs that might be useful for us?

INFO Reading configuration /config/esphome/esp32-proxy1.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing esp32-proxy1 (board: esp32dev; framework: espidf; platform: platformio/espressif32 @ 5.2.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - framework-espidf @ 3.40402.0 (4.4.2) 
 - tool-cmake @ 3.16.4 
 - tool-ninja @ 1.7.1 
 - toolchain-esp32ulp @ 2.35.0-20220830 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
Reading CMake configuration...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- noise-c @ 0.1.4
|   |-- libsodium @ 1.10018.1
|-- Improv @ 1.2.3
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_connection.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_frame_helper.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_pb2.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_pb2_service.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_server.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/list_entities.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/proto.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/subscribe_state.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/user_services.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/bluetooth_proxy/bluetooth_connection.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/bluetooth_proxy/bluetooth_proxy.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/button/button.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/esp32/gpio.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/esp32/preferences.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/esp32_ble/ble.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/esp32_ble/ble_advertising.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/esp32_ble/ble_uuid.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/esp32_ble_client/ble_characteristic.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/esp32_ble_client/ble_client_base.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/esp32_ble_client/ble_service.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/improv_base/improv_base.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/improv_serial/improv_serial_component.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/logger/logger.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/md5/md5.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/mdns/mdns_component.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/mdns/mdns_esp32.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/mdns/mdns_esp8266.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/mdns/mdns_rp2040.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/network/util.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/ota/ota_backend_arduino_esp32.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/ota/ota_backend_arduino_esp8266.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/ota/ota_backend_arduino_rp2040.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/ota/ota_backend_esp_idf.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/ota/ota_component.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/safe_mode/button/safe_mode_button.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/socket/bsd_sockets_impl.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/socket/lwip_raw_tcp_impl.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/socket/socket.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/wifi/wifi_component.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/wifi/wifi_component_esp32_arduino.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/wifi/wifi_component_esp8266.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/wifi/wifi_component_esp_idf.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/wifi/wifi_component_pico_w.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/core/application.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/core/component.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/core/component_iterator.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/core/controller.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/core/helpers.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/core/log.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/core/scheduler.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/core/util.o
Compiling /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/main.o
Linking /data/esp32-proxy1/.pioenvs/esp32-proxy1/firmware.elf
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_connection.o:(.literal._ZN7esphome3api13APIConnection17send_sensor_stateEPNS_6sensor6SensorEf+0x8): undefined reference to `esphome::sensor::Sensor::has_state() const'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_connection.o:(.literal._ZN7esphome3api13APIConnection16send_sensor_infoEPNS_6sensor6SensorE+0x10): undefined reference to `esphome::sensor::Sensor::get_unit_of_measurement[abi:cxx11]()'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_connection.o:(.literal._ZN7esphome3api13APIConnection16send_sensor_infoEPNS_6sensor6SensorE+0x14): undefined reference to `esphome::sensor::Sensor::get_accuracy_decimals()'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_connection.o:(.literal._ZN7esphome3api13APIConnection16send_sensor_infoEPNS_6sensor6SensorE+0x18): undefined reference to `esphome::sensor::Sensor::get_device_class[abi:cxx11]()'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_connection.o:(.literal._ZN7esphome3api13APIConnection16send_sensor_infoEPNS_6sensor6SensorE+0x1c): undefined reference to `esphome::sensor::Sensor::get_state_class()'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_connection.o: in function `esphome::api::APIConnection::send_sensor_state(esphome::sensor::Sensor*, float)':
/config/esphome/.esphome/build/esp32-proxy1/src/esphome/components/api/api_connection.cpp:414: undefined reference to `esphome::sensor::Sensor::has_state() const'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_connection.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/data/cache/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1366: undefined reference to `esphome::sensor::Sensor::get_unit_of_measurement[abi:cxx11]()'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/components/api/api_connection.o: in function `esphome::api::APIConnection::send_sensor_info(esphome::sensor::Sensor*)':
/config/esphome/.esphome/build/esp32-proxy1/src/esphome/components/api/api_connection.cpp:426: undefined reference to `esphome::sensor::Sensor::get_accuracy_decimals()'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /config/esphome/.esphome/build/esp32-proxy1/src/esphome/components/api/api_connection.cpp:427: undefined reference to `esphome::sensor::Sensor::get_device_class[abi:cxx11]()'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /config/esphome/.esphome/build/esp32-proxy1/src/esphome/components/api/api_connection.cpp:429: undefined reference to `esphome::sensor::Sensor::get_state_class()'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/main.o:(.literal._Z5setupv+0xb8): undefined reference to `vtable for esphome::wifi_signal::WiFiSignalSensor'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/main.o:(.literal._Z5setupv+0xbc): undefined reference to `vtable for esphome::wifi_signal::WiFiSignalSensor'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/main.o:(.literal._Z5setupv+0x104): undefined reference to `esphome::sensor::Sensor::Sensor()'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/main.o:(.literal._Z5setupv+0x108): undefined reference to `esphome::sensor::Sensor::set_device_class(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/main.o:(.literal._Z5setupv+0x10c): undefined reference to `esphome::sensor::Sensor::set_state_class(esphome::sensor::StateClass)'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/main.o:(.literal._Z5setupv+0x110): undefined reference to `esphome::sensor::Sensor::set_unit_of_measurement(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/main.o:(.literal._Z5setupv+0x114): undefined reference to `esphome::sensor::Sensor::set_accuracy_decimals(signed char)'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/main.o: in function `esphome::safe_mode::SafeModeButton::SafeModeButton()':
/config/esphome/.esphome/build/esp32-proxy1/src/esphome/components/safe_mode/button/safe_mode_button.h:10: undefined reference to `esphome::sensor::Sensor::Sensor()'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/main.o: in function `setup()':
/config/esphome/.esphome/build/esp32-proxy1/src/main.cpp:215: undefined reference to `esphome::sensor::Sensor::set_device_class(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /config/esphome/.esphome/build/esp32-proxy1/src/main.cpp:216: undefined reference to `esphome::sensor::Sensor::set_state_class(esphome::sensor::StateClass)'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /config/esphome/.esphome/build/esp32-proxy1/src/main.cpp:217: undefined reference to `esphome::sensor::Sensor::set_unit_of_measurement(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/main.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()':
/data/cache/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:657: undefined reference to `esphome::sensor::Sensor::set_accuracy_decimals(signed char)'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/core/controller.o:(.literal._ZN7esphome10Controller16setup_controllerEb+0x8): undefined reference to `esphome::sensor::Sensor::add_on_state_callback(std::function<void (float)>&&)'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/esp32-proxy1/.pioenvs/esp32-proxy1/src/esphome/core/controller.o: in function `esphome::Controller::setup_controller(bool)':
/config/esphome/.esphome/build/esp32-proxy1/src/esphome/core/controller.cpp:29: undefined reference to `esphome::sensor::Sensor::add_on_state_callback(std::function<void (float)>&&)'
collect2: error: ld returned 1 exit status
*** [/data/esp32-proxy1/.pioenvs/esp32-proxy1/firmware.elf] Error 1
========================= [FAILED] Took 21.05 seconds =========================

Additional information

No response

ssieb commented 1 year ago

Do a clean build.

lysiong commented 1 year ago

Do a clean build.

I been try before to uninstall the entire ESPhome module & delete the ESPhome folder in home assistant, restart HA & install back ESPhome but seem like problem still occur. I also try change another ESP32 board. I not sure if my code is wrong but I just follow the official documentation from the ESPhome.io website.

ssieb commented 1 year ago

Try the clean build option.

lysiong commented 1 year ago

Try the clean build option.

can I have the actual step? I not so expert in this thing. where do I find the clean build option?

lysiong commented 1 year ago

https://esphome.github.io/bluetooth-proxies/ above is the website that I use to built the bluetooth proxy

ssieb commented 1 year ago

That's where you got the initial install, but that's not where you're doing the compiling. There should be a menu on the dashboard card for the device that has a "clean" option on it.

lysiong commented 1 year ago

That's where you got the initial install, but that's not where you're doing the compiling. There should be a menu on the dashboard card for the device that has a "clean" option on it.

image

did you mean this? I also try to click that then rebuild with new wifi sensor option but somehow didn't fix it.

ssieb commented 1 year ago

Yes, that. You still get the same error after that?

lysiong commented 1 year ago

Yes, that. You still get the same error after that?

yes, same error come out.

lysiong commented 1 year ago
image

I add the wifi signal sensor in this particular yaml file, I not sure if I add it correctly.

rleongcs commented 1 year ago

Try the clean build option.

I was having similar issue with my BT Proxy after I decided to add "sensor:" to the code. No matter what I did, I got the error. Landed on this page from google search and @ssieb you saved my day ;) Now it compiles properly with no errors!

@lysiong I am not sure if the indentations has anything to do with it but below is how I have mine.

sensor:
- platform: uptime
  name: Uptime Sensor

Update: I decided to add another sensor and again same error. So I did a clean build option again and then Install and all went well.

sensor:
- platform: uptime
  name: Uptime Sensor
- platform: template
  name: BTProxy Free Memory
  lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL) / 1024;
  unit_of_measurement: 'kB'
  state_class: measurement

Update2: I decided to add the wifi sensor also and at the same time played with the indentation. All is well even if I added the indentation. I did however have to do the clean build option before the install.

sensor:
  - platform: uptime
    name: "${friendly_name} - Uptime Sensor"
  - platform: wifi_signal
    name: "${friendly_name} - WiFi Signal"
    update_interval: 60s
  - platform: template
    name: "${friendly_name} - Free Memory"
    lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL) / 1024;
    unit_of_measurement: 'kB'
    state_class: measurement
lysiong commented 1 year ago

@rleongcs

May I know that sensor is it add it to ESP.yaml file? maybe I add the sensor to wrong file :( below is my actual esp.yaml file content. that sample sensor I add didn't work as well, come out error when install.

substitutions:
  name: "esp32-proxy1"
packages:
  esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/esp32-generic.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
api:
  encryption:
    key: xxx

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

#sensor:
  # -platform: wifi_signal
  #    name: "WiFi Signal Sensor"
  #    update_interval: 60s

sensor:
  - platform: uptime
    name: Uptime Sensor
lysiong commented 1 year ago

@rleongcs I add the sensor in here

image

is this the correct place that I add the uptime sensor & other sensor as well?

lysiong commented 1 year ago

Problem solved ! proper procedure is click "clean build files", then click "install". It work on latest version of ESPHOME

image
rleongcs commented 1 year ago

@lysiong Sorry missed your post. Good to hear you finally got it resolved. 🎉

Yes, you need to click "clean build files", then click "install"