Big fellow Geplaatst: 27 mei Geplaatst: 27 mei Ik heb hier een mooi display van Waveshare liggen, 7" 800x480 resolutie, waar ik met de hulp van de online documentatie ESPHome + LVGL aan de gang heb gekregen. Nu heb ik op mijn display een paar buttons gecreëerd, maar ik krijg het niet voor elkaar aan de aanraking van de button een actie te knopen. Als ik op de button "klik" (met mijn vingers) dan zie ik dat het geregistreerd wordt (button reageerd), zie ik in de log files dat er een "touch" actie is gedetecteerd, maar ik wat ik ook probeer, ik krijg het niet voor elkaar om een actie aan de button te hangen. Dit is een deel van de yaml: widgets: - label: text: "Living" - button: id: but_living_lights width: 150 # choose the button dimensions so height: 150 # they fill the columns nincely as they flow widgets: - label: id: living_lights align: CENTER text_font: mdi_64 text: "\U000F0336" # mdi-lightbulb-outline on_press: - homeassistant.action: action: group.toggle data: entity_id: group.living De indentatie is vanwege de yaml structuur. In plaats van "on_press" heb ik ook "on_release" geprobeerd, geen geluk 😞 . Vreemd genoeg is "on_touch" geen optie hier.... Mijn vraag is dus wat ik mis / fout doe.... Tot nu toe pas een halve dag gekost... 😞 (OK, dat was inclusief het werkend krijgen van het display... 😉 ) “Success is not final, failure is not fatal: it is the courage to continue that counts.” ~ Winston Churchill
Con Geplaatst: 27 mei Geplaatst: 27 mei (aangepast) Wat zegt de logfile hierover? tap_action wellicht? Wellicht moet je een boolean button aanmaken in "Helpers". Kun je bij statussen de entity vinden en hier de status aanpassen? 27 mei aangepast door Con Groet, Con. Gloeiende, gloeiende, een beetje humor moet kunnen, anders ga je maar ergens anders heen.. Sinds november 2024 gelukkig weer glasvezel via KPN. Internet/PC: modem/router Fritzbox en TP-Link accesspoint, switch (8), switch (4) PC: Intel Nuc i7 met W11. Laptop Thinkpad met W11 met 24H2. Asus Gigabyte Home Assistant, 20 Shelly's en 2 ESP-tjes en Zigbee.
Big fellow Geplaatst: 28 mei Auteur Geplaatst: 28 mei (aangepast) Log file van een touch event 21:02:43 [I] [Touch points: 28]: id=0 x=677, y=332 x.raw=678, y.raw=333 21:02:43 [I] [Touch:415] Touch detected at x=677, y=332 21:02:43 [D] [main:228] LVGL resuming 21:02:43 [D] [switch:012] 'lcdbacklight' Turning ON. 21:02:43 [D] [switch:055] 'lcdbacklight': Sending state ON 21:02:46 [D] [text_sensor:064] 'Uptime Human Readable': Sending state '1d 1h 2m 44s' 21:02:46 [D] [sensor:093] 'Uptime Sensor': Sending state 90163.87500 s with 0 decimals of accuracy Als ik de yaml aanpas naar: widgets: - label: text: "Living" - button: id: but_living_lights width: 150 # choose the button dimensions so height: 150 # they fill the columns nincely as they flow widgets: - label: id: living_lights align: CENTER text_font: mdi_64 text: "\U000F0336" # mdi-lightbulb-outline on_press: then: switch.toggle: living_touch De "switch" is als volgt geconfigureerd: switch: - platform: homeassistant id: living_touch entity_id: switch.living_touched name: living_lights_button Krijg ik dit resultaat: Compiling .pioenvs/frontdoordisplay/src/main.cpp.o Linking .pioenvs/frontdoordisplay/firmware.elf /data/cache/platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: .pioenvs/frontdoordisplay/src/main.cpp.o:(.literal._Z5setupv+0x124): undefined reference to `_ZTVN7esphome13homeassistant19HomeassistantSwitchE' /data/cache/platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: .pioenvs/frontdoordisplay/src/main.cpp.o:(.literal._Z5setupv+0x128): undefined reference to `_ZTVN7esphome13homeassistant19HomeassistantSwitchE' collect2: error: ld returned 1 exit status *** [.pioenvs/frontdoordisplay/firmware.elf] Error 1 Zoeken gaat voort.... 28 mei aangepast door Big fellow “Success is not final, failure is not fatal: it is the courage to continue that counts.” ~ Winston Churchill
Big fellow Geplaatst: 28 mei Auteur Geplaatst: 28 mei Voor het geval dat iemand zich afvraagt welk display het is: Waveshare ESP32-S3-Touch-LCD7 . Als ik dit eenmaal goed werkend heb, dan is het zeker een zeer mooie optie voor mensen die een groter touch display willen hebben voor hun home assistant installatie 🙂 “Success is not final, failure is not fatal: it is the courage to continue that counts.” ~ Winston Churchill
Aanbevolen berichten
Maak een account aan of log in om te reageren
Je moet een lid zijn om een reactie te kunnen achterlaten
Account aanmaken
Registreer voor een nieuwe account in onze community. Het is erg gemakkelijk!
Registreer een nieuwe accountInloggen
Heb je reeds een account? Log hier in.
Nu inloggen