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

2023.9.1: Expand Icon to 9 pixels #179

Closed andrewjswan closed 8 months ago

andrewjswan commented 8 months ago

Extends the icon display on the clock screen and date screen by one line (9 pixels wide). Convenient for displaying the current date with a distance of one pixel between numbers, visual harmony. Mode 0 (default) - do not expand. Mode 1 - expand only on the clock screen. Mode 2 - expand only on the date screen. Mode 3 - expand on the screen with clock and on the screen with date.

malinovsku commented 8 months ago

I tested this function, everything works, super, is it possible to add a selector to the config immediately to configure it immediately in the device?

select:
  - platform: template
    name: "Expand icon to 9"
    optimistic: true
    options:
      - "not"
      - "clock"
      - "date"
      - "clock and date"
    restore_value: true
    on_value:
      then:
        - lambda: |-
            if (x == "not") {
              id(rgb8x32)->expand_icon_to_9(0);
            }
            else if (x == "clock"){
              id(rgb8x32)->expand_icon_to_9(1);
            }
            else if (x == "date"){
              id(rgb8x32)->expand_icon_to_9(2);
            }
            else if (x == "clock and date"){
              id(rgb8x32)->expand_icon_to_9(3);
            }

IMAGE 2023-12-21 01:32:05

andrewjswan commented 8 months ago

is it possible to add a selector to the config immediately to configure it immediately in the device?

Select added to Readme