Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Ergebnis von Level keine Ganzzahl

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    837

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    18
    1
    6.3k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.6k

Ergebnis von Level keine Ganzzahl

Scheduled Pinned Locked Moved Skripten / Logik
4 Posts 3 Posters 585 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Micro1959
    wrote on last edited by
    #1

    Hallo,

    ich möchte die Eingänge an meinen Fernseher über Broadlink steuern.

    Dazu gibt es auf meiner Fernbedieung einen button.

    Ich habe folgende Eingänge, die ich über mehrfaches drücken des buttons anwählen kann.

    Nun möchte ich zum Beispiel bei Alexa sagen: Alexa, wähle Eingang 3

    Dann soll per Skript der button dreimal gedrückt werden.

    Ich habe in meiner Broadlinkinstanz einen State angelegt mit role "level" und .

    {
      "common": {
        "name": "Eingang",
        "role": "level",
        "type": "mixed",
        "desc": "Manuell erzeugt",
        "state": "state",
        "states": "0: TV;1: Chrome;2: Fire;3: Raspi;4: Pione",
        "min": 0,
        "max": 4,
        "read": true,
        "write": true,
        "def": false,
        "smartName": {
          "de": "Eingang"
        }
      },
      "native": {
        "state": {
          "id": "States.Eingang",
          "name": "Eingang",
          "on": [
            "0: TV",
            "1: Chrome",
            "2: Fire",
            "3: Raspi",
            "4: Pione"
          ],
          "off": null,
          "mult": false
        }
      },
      "acl": {
        "object": 1638,
        "owner": "system.user.admin",
        "ownerGroup": "system.group.administrator",
        "state": 1638
      },
      "_id": "broadlink2.0.States.Eingang",
      "type": "state"
    }
    

    Wenn ich sage, Alexa, setze Eingang auf 0, dann erscheint im Ergebnis TV(0).

    Bei 1 erscheint allerdings das Ergebnis 0.04

    Bei 2 erscheint 0.08

    bei 3 erscheint 0.12

    bei 4 erscheint 0.16

    Wieso ist das so, und wie bekomme ich die korrekten Erbegnisse Chrom(1), Fire(2), Raspi(3), Pione(4) ?

    LG von Volker

    Win 10 Rechner - Raspberry Pi 3 - piVCCU - Alexa Echo plus+dot, Homematic IP Heizkörperthermostat 140280, Sonoff Tasmota Switches, WiFi (Steckdosen, RGB Led Streifen Kontrolleur, LED RGB) Hue Lampen weiß.

    1 Reply Last reply
    0
    • apollon77A Online
      apollon77A Online
      apollon77
      wrote on last edited by
      #2

      Level passt hier nicht weil Level ein Prozentwert ist der am Ende als Zahl 0..1 (0..100%) umgesetzt wird. Du kannst dan per JavaScript ggf umrechnen?!

      Beitrag hat geholfen? Votet rechts unten im Beitrag :-) https://paypal.me/Apollon77 / https://github.com/sponsors/Apollon77

      • Debug-Log für Instanz einschalten? Admin -> Instanzen -> Expertenmodus -> Instanz aufklappen - Loglevel ändern
      • Logfiles auf Platte /opt/iobroker/log/… nutzen, Admin schneidet Zeilen ab
      1 Reply Last reply
      0
      • AlCalzoneA Offline
        AlCalzoneA Offline
        AlCalzone
        Developer
        wrote on last edited by
        #3

        Wenn ich mich nicht täusche, kann Alexa auch nur Prozent-Werte setzen, keine ganzen Zahlen. Und ich meine, da gehen auch nur 5%-Schritte.

        Hast du mal mit Routinen (in der Alexa-App) gespielt? Da könntest du dir 5 States anlegen (1 pro Eingang) und dann z.B. mit "Alexa, wähle TV-Eingang" o.ä. den jeweiligen auswählen.

        Warum `sudo` böse ist: https://forum.iobroker.net/post/17109

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Micro1959
          wrote on last edited by
          #4

          Meine Lösung ist jetzt hier.

          http://www.forum.iobroker.org/forum/vie … eb48f4566a

          Allerdings gibt es noch ein kleines Begrenzungsproblem.

          Win 10 Rechner - Raspberry Pi 3 - piVCCU - Alexa Echo plus+dot, Homematic IP Heizkörperthermostat 140280, Sonoff Tasmota Switches, WiFi (Steckdosen, RGB Led Streifen Kontrolleur, LED RGB) Hue Lampen weiß.

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          Support us

          ioBroker
          Community Adapters
          Donate

          456

          Online

          32.8k

          Users

          82.7k

          Topics

          1.3m

          Posts
          Community
          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
          ioBroker Community 2014-2025
          logo
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Home
          • Recent
          • Tags
          • Unread 0
          • Categories
          • Unreplied
          • Popular
          • GitHub
          • Docu
          • Hilfe