aquaticus / esphome-snmp

SNMP component for ESPHome
GNU General Public License v3.0
7 stars 10 forks source link

WiFiComponent' has no member named 'wifi_sta_ip'; did you mean 'wifi_soft_ap_ip'? #1

Closed cryptedx closed 7 months ago

cryptedx commented 7 months ago

Hi,

since Home Assistant 2024.3.2 I have an issue with the SNMP component:

INFO ESPHome 2024.3.1
INFO Reading configuration /config/esphome/esp_guest_bathroom.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing esp-guest-bathroom (board: d1_mini; framework: arduino; platform: platformio/espressif8266@3.2.0)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
|-- SNMP_Agent @ 2.1.0+sha.ddefdf9
Compiling .pioenvs/esp-guest-bathroom/src/esphome/components/snmp/snmp_component.cpp.o
Compiling .pioenvs/esp-guest-bathroom/src/esphome/components/socket/lwip_sockets_impl.cpp.o
Compiling .pioenvs/esp-guest-bathroom/src/esphome/components/socket/socket.cpp.o
src/esphome/components/snmp/snmp_component.cpp: In lambda function:
src/esphome/components/snmp/snmp_component.cpp:234:85: error: 'class esphome::wifi::WiFiComponent' has no member named 'wifi_sta_ip'; did you mean 'wifi_soft_ap_ip'?
  234 |       CUSTOM_OID "4.4.0", []() -> std::string { return wifi::global_wifi_component->wifi_sta_ip().str(); });
      |                                                                                     ^~~~~~~~~~~
      |                                                                                     wifi_soft_ap_ip
*** [.pioenvs/esp-guest-bathroom/src/esphome/components/snmp/snmp_component.cpp.o] Error 1
========================== [FAILED] Took 1.99 seconds ==========================

Thanks, crypted

aquaticus commented 7 months ago

Fixed in 98a7b0cc7f2425ab9f892d7dcc6f60ff14208c32