Fragen zu Widget Popup

Begonnen von Mundus, 03 Januar 2019, 23:59:27

Vorheriges Thema - Nächstes Thema

Mundus

Hi,

ich habe mir folgendes Konstrukt erstellt:
<div data-type="popup" data-width="35%" data-height="75%" data-return-time="15">
                        <div data-type="symbol"
                                data-icon="oa-it_television"
                                class="tall compressed top-space">
                        </div>
                        <div class="red bold top-space-2x"></div>
                        <div class="dialog">
                                <header>Fernsehsteuerung</header>
                                <div data-type="label" class="cell big top-space-2x wider" data-hide="PinPad:state" data-hide-off="locked" data-hide-on="!off">PIN-Code</div>
                        <!-- #################################################################### -->
                                <!-- Erste Spalte -->
                        <!-- #################################################################### -->
                                <div class="inline big top-space">
                                          <div data-type="push" data-color="blue" data-icon="" data-device="PinPad" data-set="key" data-set-on="1" onclick="" data-hide="state" data-hide-off="locked" data-hide-on="!off">1</div>
                                          <div data-type="push" data-icon="" data-device="PinPad" data-set="key" data-set-on="4" onklick="" data-hide="state" data-hide-off="locked" data-hide-on="!off">4</div>
                                          <div data-type="push" data-icon="" data-device="PinPad" data-set="key" data-set-on="7" onklick="" data-hide="state" data-hide-off="locked" data-hide-on="!off">7</div>
                                          <div data-type="push" data-icon="fa-long-arrow-left" data-device="PinPad" data-set="key" onklick="" data-set-on="<" data-hide="state" data-hide-off="locked" data-hide-on="!off"></div>
                                </div>
                        <!-- #################################################################### -->
                                <!-- Ende Erste Spalte -->
                        <!-- #################################################################### -->
                        <!-- #################################################################### -->
                                <!-- Zweite Spalte -->
                        <!-- #################################################################### -->
                                <div class="inline big">
                                          <div data-type="push" data-icon="" data-device="PinPad" data-set="key" data-set-on="2" onklick="" data-hide="state" data-hide-off="locked" data-hide-on="!off">2</div>
                                          <div data-type="push" data-icon="" data-device="PinPad" data-set="key" data-set-on="5" onklick="" data-hide="state" data-hide-off="locked" data-hide-on="!off">5</div>
                                          <div data-type="push" data-icon="" data-device="PinPad" data-set="key" data-set-on="8" onklick="" data-hide="state" data-hide-off="locked" data-hide-on="!off">8</div><div data-type="push" data-icon="" data-device="PinPad" data-set="key" data-set-on="0" onklick="" data-hide="state" data-hide-off="locked" data-hide-on="!off">0</div>
                                </div>
                        <!-- #################################################################### -->
                                <!-- Ende Zweite Spalte -->
                        <!-- #################################################################### -->
                        <!-- #################################################################### -->
                                <!-- Dritte Spalte -->
                        <!-- #################################################################### -->
                                <div class="inline big">
                                          <div data-type="push" data-icon="" data-device="PinPad" data-set="key" data-set-on="3" data-hide="state" data-hide-off="locked" data-hide-on="!off" onclick="">3</div>
                                          <div data-type="push" data-icon="" data-device="PinPad" data-set="key" data-set-on="6" data-hide="state" data-hide-off="locked" data-hide-on="!off" onclick="">6</div>
                                          <div data-type="push" data-icon="" data-device="PinPad" data-set="key" data-set-on="9" data-hide="state" data-hide-off="locked" data-hide-on="!off" onclick="">9</div>
                                          <div data-type="push" data-off-color="green" data-icon="fa-unlock" data-device="PinPad" data-set="key" data-set-on="#" onklick="" data-hide="state" data-hide-off="locked" data-hide-on="!off"></div>
                                </div>
                        <!-- #################################################################### -->
                                <!-- Ende Dritte Spalte -->
                        <!-- #################################################################### -->
                        <!-- #################################################################### -->
                                <!-- Kindersicherung TV -->
                        <!-- #################################################################### -->
                                <!-- #################################################################### -->
                                        <!-- Erste Spalte -->
                                <!-- #################################################################### -->
                                <div class="inline big top-space">
                                        <div data-type="push" data-device="pr_SamsungTV" data-get="STATE" data-get-on="present" data-get-off="!on" data-set-on="" data-icon="oa-it_television" data-on-color="green" data-off-color="red" data-cmd="set SamsungTV POWEROFF" class="row" data-hide="PinPad:state" data-hide-off="unlocked" data-hide-on="!off"></div>
                                          <!--div data-type="push" data-color="red" data-icon="fs-christmas_tree" data-device="PinPad" data-set="key" data-set-on="#" onclick="" data-hide="state" data-hide-off="unlocked" data-hide-on="!off"></div-->
                                </div>
                                <!-- #################################################################### -->
                                        <!-- Ende erste Spalte -->
                                <!-- #################################################################### -->
<!-- #################################################################### -->
                                        <!-- Zweite Spalte -->
                                <!-- #################################################################### -->
                                <div class="inline big">
                                        <div data-type="switch" data-device="dTimerTV" data-states='["on","off"]' data-icons='["mi-timer","mi-timer_off"]' data-colors='["blue","#505050"]' data-background-icon="fa-circle-thin" class="" data-hide="PinPad:state" data-hide-off="unlocked" data-hide-on="!off"></div>
                                </div>
                                <!-- #################################################################### -->
                                        <!-- Ende zweite Spalte -->
                                <!-- #################################################################### -->
                                <!-- #################################################################### -->
                                        <!-- Dritte Spalte -->
                                <!-- #################################################################### -->
                                <div class="inline big">
                                        <div data-type="switch" data-device="dKindersicherungTV" data-get="state" data-states='["on","off"]'  data-icons='["fa-lock","fa-unlock"]' data-colors='["blue","#505050"]' data-background-icon="fa-circle-thin" class="" data-hide="PinPad:state" data-hide-off="unlocked" data-hide-on="!off"></div>
                                </div>
                                <!-- #################################################################### -->
                                        <!-- Ende dritte Spalte -->
                                <!-- #################################################################### -->
                                <!-- #################################################################### -->
                                        <!-- Zweite Zeile-->
                                <!-- #################################################################### -->
                                <div class="big centered">
                                        <div data-type="classchanger" data-device="PinPad" data-get-on="locked" data-off-class="doublebox-h compressed centered" data-on-class="hide">
                                                <div data-type="push" data-device="dTimerTV_p_m" data-fhem-cmd="set dTimerTV_p_m plus" data-icon="fa-plus" data-color="green" class="small" data-hide="PinPad:state" data-hide-off="unlocked" data-hide-on="!off"></div>
                                                <div data-type="push" data-device="dTimerTV_p_m" data-fhem-cmd="set dTimerTV_p_m minus" data-icon="fa-minus" data-color="red" class="small" data-hide="PinPad:state" data-hide-off="unlocked" data-hide-on="!off"></div>
                                        </div>
                                </div>
                        <!-- #################################################################### -->
                                <!-- Ende Kindersicherung TV -->
                        <!-- #################################################################### -->
                        <!-- #################################################################### -->
                                <!-- Anzeige des eingegebenen Codes -->
                                <!-- Anzeige des Zeitlimits für Kindersicherung -->
                        <!-- #################################################################### -->
<!-- #################################################################### -->
                                <!-- Anzeige des eingegebenen Codes -->
                                <!-- Anzeige des Zeitlimits für Kindersicherung -->
                        <!-- #################################################################### -->
                                <!-- ##### Überschrift falls TV Zeit angezeigt werden soll #### -->
                                <div data-type="label" class="big compressed top-space" data-hide="PinPad:state" data-hide-off="unlocked" data-hide-on="!off">TV-Zeit-Budget</div>
                                <!-- Anzeige des grauen Einhgabefeldes -->
                                <div class="bg-lightgray border-white top-space centered" style="width:280px; height:50px;">
                                        <!-- erfasster Code -->
                                        <div data-type="label" data-device="PinPad" data-get="inputPin" class="tall" data-hide="state" data-hide-off="locked" data-hide-on="!off"></div>
                                        <!-- Zeit Kindersicherung -->
                                        <div data-type="label" data-device="dTimerTV" data-get="ZeitBudgetTV" class="tall" data-hide="PinPad:state" data-hide-off="unlocked" data-hide-on="!off"></div>
                                </div>
                        <!-- #################################################################### -->
                                <!-- Ende Anzeige des eingegebenen Codes -->
                        <!-- #################################################################### -->
                        </div> <!-- Ende Dialog -->

Den Bereich des PinPads habe ich von pah abgeschrieben (Alarmanlage) und um meine Bedarfe ergänzt. Wenn der Pin-Code korrekt eingegeben wurde, verschwindet das PinPad und verschiedene Steuerungsmöglichkeiten für meinen TV werden angezeigt. Das läuft auch alles wunderbar, zwei Screenshots habe ich angefügt.

Leider habe ich noch zwei "Probleme",  für die mir Lösungsideen fehlen:
1. Beim Schließen des PopUps (egal ob auto-return oder schließen durch Anwenderin) soll ein Befehl data-device="PinPad" data-set="key" data-set-on="#" abgesetzt werden. Dieser Befehl aktiviert das PinPad erneut. Da ich keine Idee habe, die Suche mir keine Antwort gegeben hat, die Frage an euch, wie muss ich das Einbauen?

2. Mit dem Setzen der Auto-return-time wird das Popup nach 15 Sekunden geschlossen. Wird das Popup zuvor jedoch manuell geschlossen und dann erneut aufgerufen, so schließt das erneut geöffnete Popup viel schneller. Es stellt sich für mich so dar, als würde der Wert der auto-return-time beim Schließen nicht gelöscht, sondern gespeichert werden. Ist das so und wie kann ich dieses Verhalten korrigieren?

So, ich hoffe, ihr könnt mir weiterhelfen.

Gruß Mundus