Giter Site home page Giter Site logo

Extra widgets suggestion about esphome HOT 8 OPEN

nagyrobi avatar nagyrobi commented on June 20, 2024
Extra widgets suggestion

from esphome.

Comments (8)

nielsnl68 avatar nielsnl68 commented on June 20, 2024 1

The lv_msgbox is for sure interested to show notifications on the screen.
There is already a PR that added this functionality and can be used like:

binary_sensor:
  - platform: gpio
    pin: GPIO0
    name: "Notificatiom Button"
    on_press:
      then:
       - lvgl.notification:
          title: "Hello World"
          message: "Please, brush your teeth every day."
          buttons: ["Done","Not Today"]
          on_return: 
             then:
                if:
                 condition:
                     lambda: |-
                         return  x== "Done"
                 then:
                   ... # do something`

I hope @clydebarrow can add it soon.

from esphome.

clydebarrow avatar clydebarrow commented on June 20, 2024

Yeah, I saw that just earlier. I don't seem to have notifications on for PRs or issues :-( Will get to it as I work through the widgets.

from esphome.

nagyrobi avatar nagyrobi commented on June 20, 2024

How would a lv_win look like? Would it be easier than drawing the items manually? (a full screen translucent object to make it modal, children objects on top of it for interaction).

How do we get return states?

Use case:
kÊp
Five windows with motorized shutters. In addition to the usual UP/STOP/DOWN buttons, the inhabitants want to have three shortcut positions for each shutter, and also a slider for free positioning. Useless to say that it's impossible to put all these on a page, and also it would be a pity to use up 5 pages just for these.

We'll just put the most used, UP/STOP/DOWN buttons on the page (this already looks a bit much...) and we'll use a long press event on the middle STOP button to show a pop-up with the extra required settings related to the desired shutter.

OpenHASP solution with manual drawing, very cumbersome.

from esphome.

nagyrobi avatar nagyrobi commented on June 20, 2024

You can create more complex dialogs added to top_layer with a full-screen sized, half-opaque obj with any child widgets on it, and the hidden flag set to true by default. For non-modal dialogs, simply set the clickable flag to false on it.
(added this as a note to the doc)

from esphome.

nielsnl68 avatar nielsnl68 commented on June 20, 2024

Yeah, I saw that just earlier. I don't seem to have notifications on for PRs or issues :-( Will get to it as I work through the widgets.

still waiting to see it merged or commenting on.

from esphome.

nagyrobi avatar nagyrobi commented on June 20, 2024

Yeah, I saw that just earlier. I don't seem to have notifications on for PRs or issues :-( Will get to it as I work through the widgets.

still waiting to see it merged or commenting on.

Meanwhile it got implemented in a different way: https://deploy-preview-3510--esphome.netlify.app/components/lvgl#msgboxes

from esphome.

clydebarrow avatar clydebarrow commented on June 20, 2024

Yes I considered not implementing the inbuilt msgbox but decided it was nice to have a shorthand way to create dialogs.

from esphome.

nielsnl68 avatar nielsnl68 commented on June 20, 2024

Yeah, I saw that just earlier. I don't seem to have notifications on for PRs or issues :-( Will get to it as I work through the widgets.

still waiting to see it merged or commenting on.

Meanwhile it got implemented in a different way: https://deploy-preview-3510--esphome.netlify.app/components/lvgl#msgboxes

I like my solution more sorry. I have already some use cases where i want to use this msgboxes. I do not see why we should predefine them,

from esphome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.