Hello everyone. I’m trying to set up an ESP32 with a MAX6675 sensor and a TM1632 display. I would like the temperature to be read and shown on the display. This is my configuration but it is incorrect. I can’t understand why. Could you give me a hand?
Lambda contains reference to entity-id-style ID 'sensor.esp_caldaia_temperatura_acqua'. The id() wrapper only works for ESPHome-internal types. For importing states from Home Assistant use the 'homeassistant' sensor platforms.
Thank you for the answer, you were very fast! last night I had tried with Zoogara’s suggestion but the esp32 no longer connected to the network… Maybe I made some typos. I thought there was some problem so I tried to get around it by using the HomeAssistant sensor. Now I tried again with the modification described by Zoogara and indeed the esp32 connected. I can’t verify the proper functioning of the display right now but I’ll look tonight. Thank you very much zoogara! Thank you very much for the insight Karosm.
sorry maybe I misunderstood. I tried to change the configuration using Zoogara’s suggestion but the results were:
Device disconnection
display off.
I’m sure the display works because if I write “it.print(“0123”);” 0123 is shown on the display. at this point I reread what Karosm wrote but after compiling it I get an error… The sensor is float type.
I am continuing to search on the internet but the proposed solutions, in my case, do not work.
/config/esphome/esp-caldaia.yaml:60:60: error: request for member 'c_str' in 'temperatura_acqua->esphome::max6675::MAX6675Sensor::esphome::sensor::Sensor.esphome::sensor::Sensor::state', which is of non-class type 'float'
60 | it.printf(0, 0, "Temp: %s", id(temperatura_acqua).state.c_str());
| ^~~~~
*** [.pioenvs/esp-caldaia/src/main.cpp.o] Error 1
INFO Processing unexpected disconnect from ESPHome API for esp-caldaia @ esp ip
WARNING Disconnected from API
INFO Successfully resolved esp-caldaia @ esp ip in 0.000s
WARNING Can't connect to ESPHome API for esp-caldaia @ esp ip: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='esp ip', port=6053))]: [Errno 111] Connect call failed ('esp ip', 6053) (SocketAPIError)
INFO Trying to connect to esp-caldaia @ esp ip in the background
INFO Starting log output from esp_ip using esphome API
INFO Successfully resolved esp-caldaia @ esp_ip in 0.000s
WARNING Can't connect to ESPHome API for esp-caldaia @ esp_ip: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='esp_ip', port=6053))]: [Errno 111] Connect call failed ('esp_ip', 6053) (SocketAPIError)
INFO Trying to connect to esp-caldaia @ esp_ip in the background