You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
drive the gui (activating and deactivating buttons)
triggering the binary sensor when the logic says so
I want to stay with the abstractions provided, using binary sensors for the buttons, id() of the pages, sensors and so on.
My very first sketch of the configuration follows. I would be grateful for comments and ideas. The code is committed to this branch
display:
id: tftpages:
- id: page_1lambda: ...
- id: page_2lambda: ...# The main component to route touch screen events to the virtual buttons# A touch screen component uses the touch_gui.touch action to report# the coordinates of the touch. The GUI processes this in all registered# virtual buttonstouch_gui:
id: my_guidisplay_id: tftbinary_sensor:
- platform: touch_guiid: btn0# Momentary, radio, toggle, ...type: momentary# The page this buttons is processed onpage_id: page_1# The area senwitive to the touchx_min: 70y_min: 70x_max: 90y_max: 90# Fonts, colors and a drawing lambda will be added later
- platform: touch_guiid: btn1type: momentary# A list of pages can be specified as well. Neither page_id# nor pages is same as all pagespages:
- id: page_1
- id: page_2x_min: 150y_min: 150x_max: 170y_max: 170
- platform: touch_guiid: btn2type: togglex_min: 110y_min: 110x_max: 130y_max: 130on_...:
- touch_gui.touch:
id: my_guix: 80 y: !lambda|- return 80; touched: 'True'
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello all,
I am thinking of creating a gui component that will take care of
I want to stay with the abstractions provided, using binary sensors for the buttons, id() of the pages, sensors and so on.
My very first sketch of the configuration follows. I would be grateful for comments and ideas. The code is committed to this branch
Many thanks
Beta Was this translation helpful? Give feedback.
All reactions