lubeda / EspHoMaTriXv2

A simple DIY status display with a 8x32 RGB LED matrix, implemented with esphome.io and Home Assistant.
MIT License
276 stars 25 forks source link

[BUG] Breaking change in ESPHome 2023.11.3 #163

Closed TheGabeMan closed 9 months ago

TheGabeMan commented 9 months ago

After upgrading to ESPHome 2023.11.3, the Yaml for the ulanzi was no longer correct and I received the following error when compiling:

[text] is an invalid option for [variables]

I found out that "text" is conflicting with a new function name in ESPHome. After changing text to texts in parts of the yaml, it went through validation and install.

The parts I changed:

api:
  services:
    - service: alarm
      variables:
        icon_name: string
        texts: string                                    <== text to texts
      then:
        lambda: |-
          id(rgb8x32)->add_screen(icon_name,texts,7,30,true);                 <== text to texts
          id(rgb8x32)->force_screen(icon_name);                                        <== text to texts
    - service: screen
      variables:
        icon_name: string
        texts: string
      then:
        - ehmtx.add.screen:
            id: rgb8x32
            text: !lambda return texts;                                        <== text to texts (only the 2nd one)
            icon_name: !lambda return icon_name;
            alarm: false

Hope this helps others!

andrewjswan commented 9 months ago

replacing text with message will also be fine, But in EspHoMaTriXv2 2023.9.1 there is an alert_screen that shows a message with an icon and is immediately forced.