GUITION 4" 480x480 ESP32-S3-4848S040 Smart Display with LVGL

How do you set it?

number:
  - platform: template
    id: display_timeout_backlight
    name: Backlight timeout
    optimistic: true
    unit_of_measurement: "m"
    initial_value: 10
    restore_value: true
    min_value: -1
    max_value: 720
    step: 1
    mode: box
1 Like

It was a bug in the code. It’s fixed now. I also added touchscreen_idle_timeout_always_on: If you set this to true the screen will timeout and blank at any time of day not just night.

substitutions:
  touchscreen_idle_timeout_always_on: "true"
2 Likes

weather using mapping

#-------------------------------------------
# MAPPING
#-------------------------------------------
mapping:
  - id: weather_icon
    from: string
    to: image
    entries:
      clear-night: clear_night_icons
      cloudy: cloudy_icons
      exceptional: exceptional_icons
      fog: fog_icons
      hail: hail_icons
      lightning: lightning_icons
      lightning-rainy: lightning_rainy_icons
      partlycloudy: partlycloudy_icons
      pouring: pouring_icons
      rainy: rainy_icons
      snowy: snowy_icons
      snowy-rainy: snowy_rainy_icons
      sunny: sunny_icons
      windy: windy_icons
      windy-variant: windy_variant_icons
      unknown: blank_icons
      unavailable: blank_icons

#-------------------------------------------
# TEXT SENSOR
#-------------------------------------------
text_sensor:
  - platform: homeassistant
    id: ha_weather_cond
    entity_id: $sensor_weather
    on_value:
      then:
        - lvgl.image.update:
            id: disp_weather_icons
            src: !lambda return id(weather_icon)[x];

Interesting approach. Please share a weather screen picture, if you don’t mind. TY

#-------------------------------------------
# IMAGE
#-------------------------------------------
# image: !include images_mdi.yaml
# image: !include images_an.yaml
image: !include images_andr.yaml
#image: !include images_konfa.yaml
#image: !include images_merlin.yaml 

https://github.com/ananyevgv/Esphome-ESP32-S3-4848S040-LVGL/blob/7df487712228d6d01b9100632ccda7b623af9e71/packages/weather_icons.yaml
There are several of them

1 Like

You can use any of them, this is what I found on the Internet.

picture

1 Like

mapping is a very cool feature. I do the same thing with my button library.

All you need to do is this

packages:
# Weather packages
  # Display weather forecast using direct HA action (no template sensor needed!)
  # Icons are included automatically in the action file
  weather_forcast_100: !include
    file: esphome-modular-lvgl-buttons/weather_homeassistant/weather_forecast_action.yaml
    vars:
      size: 100
      weather_entity: weather.home
  # Get todays weather and display it (icons included automatically)
  weather_today_200: !include
    file: esphome-modular-lvgl-buttons/weather_homeassistant/weather_today.yaml
    vars:
      size: 200
      weather_entity: weather.home
      weather_summary: sensor.home_hourly_summary

The first package builds an icon set of 100x100px images for the weather forecast from SVG file. Then it pulls the weather forecast from home assistant and displays. The second package will pull todays weather and build a 200px icon set for it. You can easily change the icon sizes when you call the library to fit your screen. Looks like this (this works for a 480x480px screen)

1 Like

I have a readme here on how to use it

1 Like

Thank you, Andrew. I will definitely try that later, when have a little bit more free time.

Hey!

Can the version without the relays be wall mounted in Europe (230v mains)?

Can someone point me out how can this be done? Pictures would be great, specially on the wiring.

Thanks!

Relay section also contains power supply, so if you plan to use model without that you’ll have to us eyour own 5V power and bring it to the module. Then, without bakc side installing can be a problem, since front part doesn’t have any practical holes to atach it to the wall. And it protrudes at the back a few mm’s, too.

You can 3d print an adapter plate:

link

Of course you have to provide your own 5Volt power supply.

I printed that plate, more out of curiosity, to see how much pins are strong, and, as i suspected, they snapped off pretty soon, after two or three front removals. I’d say only long-term solution would be to print it “standing up”, to ensure that pins are not layered and thus strong.

Hi, is there example if I want to add confirmation window (yes/no) when I click a button?

That would be a cool feature but the button library has nothing like that so far. LVGL does support a construct for pop up messages so it would be possible to implement.

Can you describe the use case? This may be some I work on in the future.

I second that confirmation popup would be an excellent for many things. Why? Well, display is small, and some of “guys” have big fingers, so wrong touch can happen pretty easily. For example i have icons for my climate pretty small (cool, heat, auto, dry, off…) because i have a lot of things on that screen beside that. So, popups would, for one, allow us to create more dense “dashboards” and result in less wrong actions, i guess.

Yeah I already built one for RGB lights. There would be no way to fit all that stuff on a top page. I will do the same for climate control at some point. A second level page to actually change temperature set points etc. I have not found a use case for a yes/no button but it would be very easy to implement. It would probable just be part of a widget that required confirmation not it’s own widget.

That is why I asked for a use case.

1 Like