Esphome display icons of a state

hello

my espdisplay should display the differnet states as icons.

here my attemp, seems that something is wrong. im not
a esphome expert, perhaps anyone can help:

binary_sensor:
  
  - platform: homeassistant
    id: Schalter_WP
    entity_id: climate.34eae7f5ad56
    internal: true 


      /* Wärmepumpe Symbol An/Aus*/
      if(id(Schalter_WP).state=="off") {
        it.print(30,280, id(display_font_50), TextAlign::BASELINE_CENTER, "\U000F1B22");
      } else if(id(Schalter_WP).state=="heat"){
        it.print(30,280, id(display_font_50), TextAlign::BASELINE_CENTER, "\U000F1A45");
      } else if(id(Schalter_WP).state=="cool"){
        it.print(30,280, id(display_font_50), TextAlign::BASELINE_CENTER, "\U000F0717");
      } else if(id(Schalter_WP).state=="auto"){
        it.print(30,280, id(display_font_50), TextAlign::BASELINE_CENTER, "\U000F18F2");
      } else 
        it.print(30,280, id(display_font_50), TextAlign::BASELINE_CENTER, "\U000F0338");
      }

INFO ESPHome 2024.6.3
INFO Reading configuration /config/esphome/display-pool.yaml...
WARNING GPIO15 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO12 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing display-pool (board: esp32dev; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.3
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|-- SPI @ 2.0.0
Compiling .pioenvs/display-pool/src/main.cpp.o
/config/esphome/display-pool.yaml: In lambda function:
/config/esphome/display-pool.yaml:352:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
       if(id(Schalter_WP).state=="off") {
                              ^~~~~
/config/esphome/display-pool.yaml:354:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
       } else if(id(Schalter_WP).state=="heat"){
                                     ^~~~~~
/config/esphome/display-pool.yaml:356:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
       } else if(id(Schalter_WP).state=="cool"){
                                     ^~~~~~
/config/esphome/display-pool.yaml:358:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
       } else if(id(Schalter_WP).state=="auto"){
                                     ^~~~~~
/config/esphome/display-pool.yaml: In function 'void setup()':
/config/esphome/display-pool.yaml:362:8: error: expected ')' before 'it'
       }
        ^
        )
/config/esphome/display-pool.yaml:364:7:
       it.printf(30,295, id(consolaMono_bold_15), TextAlign::BASELINE_CENTER, "WP");
       ~~
src/main.cpp:3948:28: note: to match this '('
   epaperdisplay->set_writer([=](display::Display & it) -> void {
                            ^
/config/esphome/display-pool.yaml:372:11: error: 'it' was not declared in this scope
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F0928");
           ^~
/config/esphome/display-pool.yaml:372:11: note: suggested alternative: 'bit'
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F0928");
           ^~
           bit
/config/esphome/display-pool.yaml:376:11: error: 'it' was not declared in this scope
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F0925");
           ^~
/config/esphome/display-pool.yaml:376:11: note: suggested alternative: 'bit'
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F0925");
           ^~
           bit
/config/esphome/display-pool.yaml:380:11: error: 'it' was not declared in this scope
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F0922");
           ^~
/config/esphome/display-pool.yaml:380:11: note: suggested alternative: 'bit'
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F0922");
           ^~
           bit
/config/esphome/display-pool.yaml:384:11: error: 'it' was not declared in this scope
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F091F");
           ^~
/config/esphome/display-pool.yaml:384:11: note: suggested alternative: 'bit'
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F091F");
           ^~
           bit
/config/esphome/display-pool.yaml:388:11: error: 'it' was not declared in this scope
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F092F");
           ^~
/config/esphome/display-pool.yaml:388:11: note: suggested alternative: 'bit'
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F092F");
           ^~
           bit
/config/esphome/display-pool.yaml: At global scope:
/config/esphome/display-pool.yaml:392:4: error: expected unqualified-id before ')' token
 
    ^
/config/esphome/display-pool.yaml:393:3: error: 'esp32_esp32internalgpiopin_id_6' does not name a type
 
   ^                              
/config/esphome/display-pool.yaml:394:3: error: 'esp32_esp32internalgpiopin_id_6' does not name a type
/config/esphome/display-pool.yaml:395:3: error: 'esp32_esp32internalgpiopin_id_6' does not name a type
/config/esphome/display-pool.yaml:396:3: error: 'esp32_esp32internalgpiopin_id_6' does not name a type
/config/esphome/display-pool.yaml:397:3: error: 'esp32_esp32internalgpiopin_id_6' does not name a type
/config/esphome/display-pool.yaml:398:3: error: 'epaperdisplay' does not name a type
/config/esphome/display-pool.yaml:399:3: error: 'esp32_esp32internalgpiopin_id_5' does not name a type
/config/esphome/display-pool.yaml:400:3: error: 'esp32_esp32internalgpiopin_id_5' does not name a type
/config/esphome/display-pool.yaml:401:3: error: 'esp32_esp32internalgpiopin_id_5' does not name a type
/config/esphome/display-pool.yaml:402:3: error: 'esp32_esp32internalgpiopin_id_5' does not name a type
/config/esphome/display-pool.yaml:403:3: error: 'esp32_esp32internalgpiopin_id_5' does not name a type
/config/esphome/display-pool.yaml:404:3: error: 'epaperdisplay' does not name a type
/config/esphome/display-pool.yaml:410:3: error: 'updatecomponentaction_id' does not name a type
/config/esphome/display-pool.yaml:411:3: error: 'automation_id' does not name a type
/config/esphome/display-pool.yaml:411:56: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:412:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:413:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:413:41: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:414:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:414:45: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:415:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:415:64: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:416:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:416:159: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:417:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:417:76: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:418:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:418:64: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:419:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:420:3: error: 'App' does not name a type
/config/esphome/display-pool.yaml:421:3: error: 'automation_id_2' does not name a type
/config/esphome/display-pool.yaml:422:3: error: 'updatecomponentaction_id_2' does not name a type
/config/esphome/display-pool.yaml:423:3: error: 'automation_id_2' does not name a type
/config/esphome/display-pool.yaml:423:60: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:424:3: error: 'homeassistant_time' does not name a type
/config/esphome/display-pool.yaml:425:3: error: 'homeassistant_time' does not name a type
/config/esphome/display-pool.yaml:426:3: error: 'App' does not name a type
/config/esphome/display-pool.yaml:428:3: error: 'App' does not name a type
/config/esphome/display-pool.yaml:429:1: error: expected declaration before '}' token
*** [.pioenvs/display-pool/src/main.cpp.o] Error 1
========================= [FAILED] Took 19.91 seconds =========================

Where did you copy the code from?

i dont know…
I have extended my old code. old code works.

my old code:

      if(id(Schalter_WP).state) {
        it.print(30,280, id(display_font_50), TextAlign::BASELINE_CENTER, "\U000F1402");
      } else {
        it.print(30,280, id(display_font_50), TextAlign::BASELINE_CENTER, "\U000F1B22");
      }   
      it.printf(30,295, id(consolaMono_bold_15), TextAlign::BASELINE_CENTER, "WP");

id(climate).state not a string, but enum (list of numbers).

Using for esphome climate:

id(xxx_climate).mode   == CLIMATE_MODE_HEAT

for climate mode and

id(xxx_climate).action == CLIMATE_ACTION_HEATING

for climate current action.

Need to check about homeassistant climate devices.

Anyway
/config/esphome/display-pool.yaml:358:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
mean Ypu comparing string with number, which not actually can be done.

1 Like

i will check this, thx

tried both without luck

      if(id(Schalter_WP).mode==CLIMATE_MODE_OFF) {
        it.print(30,280, id(display_font_50), TextAlign::BASELINE_CENTER, "\U000F1B22");
      } else if(id(Schalter_WP).mode==CLIMATE_MODE_HEAT){
        it.print(30,280, id(display_font_50), TextAlign::BASELINE_CENTER, "\U000F1A45");
      } else if(id(Schalter_WP).mode==CLIMATE_MODE_COOL){
        it.print(30,280, id(display_font_50), TextAlign::BASELINE_CENTER, "\U000F0717");
      } else if(id(Schalter_WP).mode==CLIMATE_MODE_AUTO){
        it.print(30,280, id(display_font_50), TextAlign::BASELINE_CENTER, "\U000F18F2");
      } else 
        it.print(30,280, id(display_font_50), TextAlign::BASELINE_CENTER, "\U000F1B22");
      }

      it.printf(30,295, id(consolaMono_bold_15), TextAlign::BASELINE_CENTER, "WP");

INFO ESPHome 2024.6.3
INFO Reading configuration /config/esphome/display-pool.yaml...
WARNING GPIO15 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO12 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing display-pool (board: esp32dev; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.3
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|-- SPI @ 2.0.0
Compiling .pioenvs/display-pool/src/main.cpp.o
/config/esphome/display-pool.yaml: In lambda function:
/config/esphome/display-pool.yaml:352:23: error: 'class esphome::homeassistant::HomeassistantBinarySensor' has no member named 'mode'
       if(id(Schalter_WP).mode==CLIMATE_MODE_OFF) {
                       ^~~~
/config/esphome/display-pool.yaml:352:29: error: 'CLIMATE_MODE_OFF' was not declared in this scope
       if(id(Schalter_WP).mode==CLIMATE_MODE_OFF) {
                             ^~~~~~~~~~~~~~~~
/config/esphome/display-pool.yaml:352:29: note: suggested alternative:
In file included from src/esphome/components/api/api_connection.h:4,
                 from src/esphome.h:3,
                 from src/main.cpp:3:
src/esphome/components/api/api_pb2.h:84:3: note:   'CLIMATE_MODE_OFF'
   CLIMATE_MODE_OFF = 0,
   ^~~~~~~~~~~~~~~~
/config/esphome/display-pool.yaml:354:30: error: 'class esphome::homeassistant::HomeassistantBinarySensor' has no member named 'mode'
       } else if(id(Schalter_WP).mode==CLIMATE_MODE_HEAT){
                              ^~~~
/config/esphome/display-pool.yaml:354:36: error: 'CLIMATE_MODE_HEAT' was not declared in this scope
       } else if(id(Schalter_WP).mode==CLIMATE_MODE_HEAT){
                                    ^~~~~~~~~~~~~~~~~
/config/esphome/display-pool.yaml:354:36: note: suggested alternative:
In file included from src/esphome/components/api/api_connection.h:4,
                 from src/esphome.h:3,
                 from src/main.cpp:3:
src/esphome/components/api/api_pb2.h:87:3: note:   'CLIMATE_MODE_HEAT'
   CLIMATE_MODE_HEAT = 3,
   ^~~~~~~~~~~~~~~~~
/config/esphome/display-pool.yaml:356:30: error: 'class esphome::homeassistant::HomeassistantBinarySensor' has no member named 'mode'
       } else if(id(Schalter_WP).mode==CLIMATE_MODE_COOL){
                              ^~~~
/config/esphome/display-pool.yaml:356:36: error: 'CLIMATE_MODE_COOL' was not declared in this scope
       } else if(id(Schalter_WP).mode==CLIMATE_MODE_COOL){
                                    ^~~~~~~~~~~~~~~~~
/config/esphome/display-pool.yaml:356:36: note: suggested alternative:
In file included from src/esphome/components/api/api_connection.h:4,
                 from src/esphome.h:3,
                 from src/main.cpp:3:
src/esphome/components/api/api_pb2.h:86:3: note:   'CLIMATE_MODE_COOL'
   CLIMATE_MODE_COOL = 2,
   ^~~~~~~~~~~~~~~~~
/config/esphome/display-pool.yaml:358:30: error: 'class esphome::homeassistant::HomeassistantBinarySensor' has no member named 'mode'
       } else if(id(Schalter_WP).mode==CLIMATE_MODE_AUTO){
                              ^~~~
/config/esphome/display-pool.yaml:358:36: error: 'CLIMATE_MODE_AUTO' was not declared in this scope
       } else if(id(Schalter_WP).mode==CLIMATE_MODE_AUTO){
                                    ^~~~~~~~~~~~~~~~~
/config/esphome/display-pool.yaml:358:36: note: suggested alternative:
In file included from src/esphome/components/api/api_connection.h:4,
                 from src/esphome.h:3,
                 from src/main.cpp:3:
src/esphome/components/api/api_pb2.h:90:3: note:   'CLIMATE_MODE_AUTO'
   CLIMATE_MODE_AUTO = 6,
   ^~~~~~~~~~~~~~~~~
/config/esphome/display-pool.yaml: In function 'void setup()':
/config/esphome/display-pool.yaml:362:8: error: expected ')' before 'it'
       }
        ^
        )
/config/esphome/display-pool.yaml:364:7:
       it.printf(30,295, id(consolaMono_bold_15), TextAlign::BASELINE_CENTER, "WP");
       ~~
src/main.cpp:3947:28: note: to match this '('
   epaperdisplay->set_writer([=](display::Display & it) -> void {
                            ^
/config/esphome/display-pool.yaml:372:11: error: 'it' was not declared in this scope
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F0928");
           ^~
/config/esphome/display-pool.yaml:372:11: note: suggested alternative: 'bit'
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F0928");
           ^~
           bit
/config/esphome/display-pool.yaml:376:11: error: 'it' was not declared in this scope
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F0925");
           ^~
/config/esphome/display-pool.yaml:376:11: note: suggested alternative: 'bit'
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F0925");
           ^~
           bit
/config/esphome/display-pool.yaml:380:11: error: 'it' was not declared in this scope
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F0922");
           ^~
/config/esphome/display-pool.yaml:380:11: note: suggested alternative: 'bit'
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F0922");
           ^~
           bit
/config/esphome/display-pool.yaml:384:11: error: 'it' was not declared in this scope
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F091F");
           ^~
/config/esphome/display-pool.yaml:384:11: note: suggested alternative: 'bit'
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F091F");
           ^~
           bit
/config/esphome/display-pool.yaml:388:11: error: 'it' was not declared in this scope
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F092F");
           ^~
/config/esphome/display-pool.yaml:388:11: note: suggested alternative: 'bit'
           it.print(wifi_x, wifi_y, id(wifi_font_30), TextAlign::BASELINE_CENTER, "\U000F092F");
           ^~
           bit
/config/esphome/display-pool.yaml: At global scope:
/config/esphome/display-pool.yaml:392:4: error: expected unqualified-id before ')' token
 
    ^
/config/esphome/display-pool.yaml:393:3: error: 'esp32_esp32internalgpiopin_id_6' does not name a type
 
   ^                              
/config/esphome/display-pool.yaml:394:3: error: 'esp32_esp32internalgpiopin_id_6' does not name a type
/config/esphome/display-pool.yaml:395:3: error: 'esp32_esp32internalgpiopin_id_6' does not name a type
/config/esphome/display-pool.yaml:396:3: error: 'esp32_esp32internalgpiopin_id_6' does not name a type
/config/esphome/display-pool.yaml:397:3: error: 'esp32_esp32internalgpiopin_id_6' does not name a type
/config/esphome/display-pool.yaml:398:3: error: 'epaperdisplay' does not name a type
/config/esphome/display-pool.yaml:399:3: error: 'esp32_esp32internalgpiopin_id_5' does not name a type
/config/esphome/display-pool.yaml:400:3: error: 'esp32_esp32internalgpiopin_id_5' does not name a type
/config/esphome/display-pool.yaml:401:3: error: 'esp32_esp32internalgpiopin_id_5' does not name a type
/config/esphome/display-pool.yaml:402:3: error: 'esp32_esp32internalgpiopin_id_5' does not name a type
/config/esphome/display-pool.yaml:403:3: error: 'esp32_esp32internalgpiopin_id_5' does not name a type
/config/esphome/display-pool.yaml:404:3: error: 'epaperdisplay' does not name a type
/config/esphome/display-pool.yaml:410:3: error: 'updatecomponentaction_id' does not name a type
/config/esphome/display-pool.yaml:411:3: error: 'automation_id' does not name a type
/config/esphome/display-pool.yaml:411:56: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:412:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:413:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:413:41: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:414:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:414:45: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:415:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:415:64: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:416:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:416:159: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:417:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:417:76: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:418:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:418:64: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:419:3: error: 'time_crontrigger_id_2' does not name a type
/config/esphome/display-pool.yaml:420:3: error: 'App' does not name a type
/config/esphome/display-pool.yaml:421:3: error: 'automation_id_2' does not name a type
/config/esphome/display-pool.yaml:422:3: error: 'updatecomponentaction_id_2' does not name a type
/config/esphome/display-pool.yaml:423:3: error: 'automation_id_2' does not name a type
/config/esphome/display-pool.yaml:423:60: error: expected unqualified-id before ')' token
/config/esphome/display-pool.yaml:424:3: error: 'homeassistant_time' does not name a type
/config/esphome/display-pool.yaml:425:3: error: 'homeassistant_time' does not name a type
/config/esphome/display-pool.yaml:426:3: error: 'App' does not name a type
/config/esphome/display-pool.yaml:428:3: error: 'App' does not name a type
/config/esphome/display-pool.yaml:429:1: error: expected declaration before '}' token

You miss a ) at the end if your ifs conditions and you have to qualify your enums with climate::, e.g. climate::CLIMATE_MODE_HEAT

i dont exactly what you mean, is there a guide available?

Sure:

Or you could go look at the actual esphome documentation. This is why you shouldnt just go copy/paste code from the internet. Instead, just go read the dang documentation as it explains all this and gives you examples. Thats my suggestion unless you like wasting your time with people who only address 1 of the multitude of errors you have and then send you to a subscription based website to learn stuff that free in the esphome documentation.

I guess this is for me?

The errors are plain C++ errors (lambda’s are C++ code, for clarity), and I told OP what the errors are. Apparently, C++ is alien to him, so I showed him one of the multitude site allowing him to learn that language.
AFAIK, “W3C schools” is free, is the first google hit I recognized and I know of no subscription, and I pointed to that guide, as requested.

Bottom-line: One has to learn walking before learning running.

Re multitude, a keen eye might notice the “multitude” can be categorized as 2 types:

  • The missing ) on each if
  • The climate constants. That one might actually be because climate is not included in the esphome generated code at all. We cannot tell as only (very) partial yaml is shown.

I agree with you on that one.

Well crap, you’ve got some points here. I could have sworn w3schools.com was a subscription and it doesnt appear to be. Putting all of the errors into 2 groups… OK, ill concede on that too.

I guess I was a little “over the top” there. Sending a link for w3schools looked like cruel humor at the time, kind of like saying, “ya, you can find a guide here” www.google.com

Maybe you were genuinely trying to help, I can see that now. My mistake, I apologize.

The one issue/complaint I have with that resource over using official documentation first is, you can really get pulled down some programming rabbit holes on those sites and easily discourage people. Maybe they wanted help with a switch in yaml and they’re at w3schools taking courses regarding 100+ cpp math functions and pulling their hair out. Irregardless it definitely is a good resource and Id suggest people that want to learn, they should bookmark it. It just wouldnt be my first choice when referring educational material to complete newbies.

It actually was, tbh :face_with_raised_eyebrow:
I was pissed by the “give me a guide” answer to me telling what the C++ errors were, highly suspecting the code is just copy/pasted.

lol! I completely know how you feel! That type of stuff used to(still does) drive me crazy, I mean how hard is it to do a simple search here or google? It usually is some copy/paste code found online and more often than not, they don’t even make an attempt to look at it and try to understand what’s going on in it. Most of it is self-explanatory since it’s “human readable code” so, I don’t get it.

No reason someone can’t make an effort to help themselves before asking someone else. I just had my account unblocked after some 30 days for a similar behavior to those people so, I’m trying to be on my best behavior at the moment. Save yourself the frustration and just ignore those people, that’s what I try to do now.

Patience grasshopper!!

1 Like