Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • 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

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

  1. ioBroker Community Home
  2. Deutsch
  3. Tester
  4. Test Coronavirus Statistics for ioBroker

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.3k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    2.0k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.4k

Test Coronavirus Statistics for ioBroker

Geplant Angeheftet Gesperrt Verschoben Tester
adapter installationadapterentwicklungtesten
1.2k Beiträge 120 Kommentatoren 337.4k Aufrufe 94 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • ScroungerS Offline
    ScroungerS Offline
    Scrounger
    Developer
    schrieb am zuletzt editiert von
    #44

    Da mich schon immer die Werte pro Kontinent intressiert haben, aber ich dazu nix brauchbares im Netz finden kann, hab ich mal ein kleines Skript geschrieben, dass die Daten dieses Adapters verwendet.

    Voraussetzung:

    • Javascript NPM-Module: country-list-js

    Unter der Javascript instanz wird folgende Struktur automatisch angelegt:
    c7461f3c-0149-4062-817f-b195e9a6c3a6-grafik.png

    Skript:

    const countryJs = require("country-list-js");
    
    let selector = `[id=coronavirus-statistics.0.*.cases]`
    let allCountries = $(selector);
    
    // Fehlermeldung ausgeben, wenn selector kein result liefert
    if (allCountries.length === 0) {
        console.error(`no result for selector '${selector}'`)
    }
    
    on({ id: 'coronavirus-statistics.0.global_totals.updated', change: 'any' }, statsForContinents);
    
    function statsForContinents() {
        setTimeout(function () {
            console.log('Corona Statistik für Kontinente wird erstellt');
    
            let countryTranslator = {
                // https://github.com/i-rocky/country-list-js/blob/master/data/names.json
                "Vatican_City": "Vatican",
                "USA": "United States",
                "UK": "United Kingdom",
                "UAE": "United Arab Emirates",
                "US_Virgin_Islands": "U.S. Virgin Islands",
                "St_Vincent_Grenadines": "Saint Vincent and the Grenadines",
                "St_Barth": "Saint Barthelemy",
                "S_Korea": "South Korea",
                "Palestine": "Palestinian Territory",
                "North_Macedonia": "Macedonia",
                "Faeroe_Islands": "Faroe Islands",
                "Eswatini": "Swaziland",
                "Czechia": "Czech Republic",
                "Congo": "Republic of the Congo",
                "CAR": "Central African Republic",
                "DRC": "Democratic Republic of the Congo",
                "Channel_Islands": "France"                             // gehört zu Europa, deshalb Frankreich einfach vergeben
            }
    
            var continentsStats = {};
            countryJs.continents().forEach(function (continent, index) {
                continentsStats[continent] = {
                    cases: 0,
                    critical: 0,
                    deaths: 0,
                    recovered: 0,
                    todayCases: 0,
                    todayDeaths: 0,
                }
            });
    
            for (var i = 0; i <= allCountries.length - 1; i++) {
                let idCases = allCountries[i];
                let idCritical = idCases.replace('.cases', '.critical');
                let idDeaths = idCases.replace('.cases', '.deaths');
                let idRecovered = idCases.replace('.cases', '.recovered');
                let idTodayCases = idCases.replace('.cases', '.todayCases');
                let idTodayDeaths = idCases.replace('.cases', '.todayDeaths');
    
                let countryName = idCases.split('.')[2];
    
                let country = countryJs.findByName(countryName.replace(/_/g, ' ').replace('é', 'e').replace('ç', 'c'));
                if (country) {
                    calcStats(country);
                } else {
                    country = countryJs.findByName(countryTranslator[countryName]);
                    if (country) {
                        calcStats(country);
                    } else {
                        if (countryName !== 'global_totals' && countryName !== 'Diamond_Princess') {
                            console.warn(`${countryName} nicht in gefunden. Korrekter Name muss im skript manuell hinzugefügt werden!`);
                        }
                    }
                }
    
                function calcStats(country) {
                    if (country.continent) {
                        continentsStats[country.continent].cases = continentsStats[country.continent].cases + getState(idCases).val;
                        continentsStats[country.continent].critical = continentsStats[country.continent].critical + getState(idCritical).val;
                        continentsStats[country.continent].deaths = continentsStats[country.continent].deaths + getState(idDeaths).val;
                        continentsStats[country.continent].recovered = continentsStats[country.continent].recovered + getState(idRecovered).val;
                        continentsStats[country.continent].todayCases = continentsStats[country.continent].todayCases + getState(idTodayCases).val;
                        continentsStats[country.continent].todayDeaths = continentsStats[country.continent].todayDeaths + getState(idTodayDeaths).val;
                    } else {
                        console.warn(`Für ${countryName} existiert kein Kontinent!`);
                    }
                }
            }
    
            for (var continent in continentsStats) {
                for (var prop in continentsStats[continent]) {
                    let dpId = `corona.continents.${continent}.${prop}`
    
                    if (existsState(dpId)) {
                        setState(dpId, continentsStats[continent][prop], true);
                    } else {
                        createState(dpId, continentsStats[continent][prop], {
                            name: `${continent} ${prop}`,
                            read: true,
                            write: false,
                            desc: `${continent} ${prop}`,
                            type: "number",
                            def: 0,
                        });
                    }
                }
            }
        }, 30000);
    }
    
    // Bei JS Start ausführen
    statsForContinents();
    
    

    <a href="https://github.com/Scrounger/ioBroker.linkeddevices">LinkedDevices Adapter</a>

    <a href="https://github.com/Scrounger/ioBroker.vis-materialdesign">Material Design Widgets</a>

    sigi234S DutchmanD Uli977U 3 Antworten Letzte Antwort
    1
    • sigi234S sigi234

      @Tobias

      CSS Font und Text

      1Topf1 Offline
      1Topf1 Offline
      1Topf
      schrieb am zuletzt editiert von
      #45

      @sigi234 sagte in Test Coronavirus Statistics for ioBroker:

      @Tobias

      CSS Font und Text

      Ich sehe die unterste Zeile auch kaum bzw. gar nicht, egal welche Schriftart ich einstelle. :confused:

      ? 1 Antwort Letzte Antwort
      0
      • 1Topf1 1Topf

        @sigi234 sagte in Test Coronavirus Statistics for ioBroker:

        @Tobias

        CSS Font und Text

        Ich sehe die unterste Zeile auch kaum bzw. gar nicht, egal welche Schriftart ich einstelle. :confused:

        ? Offline
        ? Offline
        Ein ehemaliger Benutzer
        schrieb am zuletzt editiert von
        #46

        @1Topf Dann verbreitere das Widget mal...

        ScroungerS 1 Antwort Letzte Antwort
        1
        • ? Ein ehemaliger Benutzer

          @1Topf Dann verbreitere das Widget mal...

          ScroungerS Offline
          ScroungerS Offline
          Scrounger
          Developer
          schrieb am zuletzt editiert von
          #47

          @Yetiberg @1Topf

          per css könnt ihr gezielt alles einstellen:

          .covid-div-title{
              color: #44739e;
              font-family: RobotoCondensed-Regular;
              font-weight: normal !important;
              margin-bottom: 4px;
          }
          
          .covid-div-number{
              color: gray;
              font-family: RobotoCondensed-LightItalic;
              margin-top: 2px;
          }
          
          .covid-div-img {
              height: 30px !important;
          }
          

          <a href="https://github.com/Scrounger/ioBroker.linkeddevices">LinkedDevices Adapter</a>

          <a href="https://github.com/Scrounger/ioBroker.vis-materialdesign">Material Design Widgets</a>

          1 Antwort Letzte Antwort
          0
          • ScroungerS Scrounger

            Da mich schon immer die Werte pro Kontinent intressiert haben, aber ich dazu nix brauchbares im Netz finden kann, hab ich mal ein kleines Skript geschrieben, dass die Daten dieses Adapters verwendet.

            Voraussetzung:

            • Javascript NPM-Module: country-list-js

            Unter der Javascript instanz wird folgende Struktur automatisch angelegt:
            c7461f3c-0149-4062-817f-b195e9a6c3a6-grafik.png

            Skript:

            const countryJs = require("country-list-js");
            
            let selector = `[id=coronavirus-statistics.0.*.cases]`
            let allCountries = $(selector);
            
            // Fehlermeldung ausgeben, wenn selector kein result liefert
            if (allCountries.length === 0) {
                console.error(`no result for selector '${selector}'`)
            }
            
            on({ id: 'coronavirus-statistics.0.global_totals.updated', change: 'any' }, statsForContinents);
            
            function statsForContinents() {
                setTimeout(function () {
                    console.log('Corona Statistik für Kontinente wird erstellt');
            
                    let countryTranslator = {
                        // https://github.com/i-rocky/country-list-js/blob/master/data/names.json
                        "Vatican_City": "Vatican",
                        "USA": "United States",
                        "UK": "United Kingdom",
                        "UAE": "United Arab Emirates",
                        "US_Virgin_Islands": "U.S. Virgin Islands",
                        "St_Vincent_Grenadines": "Saint Vincent and the Grenadines",
                        "St_Barth": "Saint Barthelemy",
                        "S_Korea": "South Korea",
                        "Palestine": "Palestinian Territory",
                        "North_Macedonia": "Macedonia",
                        "Faeroe_Islands": "Faroe Islands",
                        "Eswatini": "Swaziland",
                        "Czechia": "Czech Republic",
                        "Congo": "Republic of the Congo",
                        "CAR": "Central African Republic",
                        "DRC": "Democratic Republic of the Congo",
                        "Channel_Islands": "France"                             // gehört zu Europa, deshalb Frankreich einfach vergeben
                    }
            
                    var continentsStats = {};
                    countryJs.continents().forEach(function (continent, index) {
                        continentsStats[continent] = {
                            cases: 0,
                            critical: 0,
                            deaths: 0,
                            recovered: 0,
                            todayCases: 0,
                            todayDeaths: 0,
                        }
                    });
            
                    for (var i = 0; i <= allCountries.length - 1; i++) {
                        let idCases = allCountries[i];
                        let idCritical = idCases.replace('.cases', '.critical');
                        let idDeaths = idCases.replace('.cases', '.deaths');
                        let idRecovered = idCases.replace('.cases', '.recovered');
                        let idTodayCases = idCases.replace('.cases', '.todayCases');
                        let idTodayDeaths = idCases.replace('.cases', '.todayDeaths');
            
                        let countryName = idCases.split('.')[2];
            
                        let country = countryJs.findByName(countryName.replace(/_/g, ' ').replace('é', 'e').replace('ç', 'c'));
                        if (country) {
                            calcStats(country);
                        } else {
                            country = countryJs.findByName(countryTranslator[countryName]);
                            if (country) {
                                calcStats(country);
                            } else {
                                if (countryName !== 'global_totals' && countryName !== 'Diamond_Princess') {
                                    console.warn(`${countryName} nicht in gefunden. Korrekter Name muss im skript manuell hinzugefügt werden!`);
                                }
                            }
                        }
            
                        function calcStats(country) {
                            if (country.continent) {
                                continentsStats[country.continent].cases = continentsStats[country.continent].cases + getState(idCases).val;
                                continentsStats[country.continent].critical = continentsStats[country.continent].critical + getState(idCritical).val;
                                continentsStats[country.continent].deaths = continentsStats[country.continent].deaths + getState(idDeaths).val;
                                continentsStats[country.continent].recovered = continentsStats[country.continent].recovered + getState(idRecovered).val;
                                continentsStats[country.continent].todayCases = continentsStats[country.continent].todayCases + getState(idTodayCases).val;
                                continentsStats[country.continent].todayDeaths = continentsStats[country.continent].todayDeaths + getState(idTodayDeaths).val;
                            } else {
                                console.warn(`Für ${countryName} existiert kein Kontinent!`);
                            }
                        }
                    }
            
                    for (var continent in continentsStats) {
                        for (var prop in continentsStats[continent]) {
                            let dpId = `corona.continents.${continent}.${prop}`
            
                            if (existsState(dpId)) {
                                setState(dpId, continentsStats[continent][prop], true);
                            } else {
                                createState(dpId, continentsStats[continent][prop], {
                                    name: `${continent} ${prop}`,
                                    read: true,
                                    write: false,
                                    desc: `${continent} ${prop}`,
                                    type: "number",
                                    def: 0,
                                });
                            }
                        }
                    }
                }, 30000);
            }
            
            // Bei JS Start ausführen
            statsForContinents();
            
            
            sigi234S Online
            sigi234S Online
            sigi234
            Forum Testing Most Active
            schrieb am zuletzt editiert von
            #48

            @Scrounger sagte in Test Coronavirus Statistics for ioBroker:

            Da mich schon immer die Werte pro Kontinent intressiert haben, aber ich dazu nix brauchbares im Netz finden kann, hab ich mal ein kleines Skript geschrieben, dass die Daten dieses Adapters verwendet.

            Danke.

            Screenshot (2065).png

            Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.
            Immer Daten sichern!

            1 Antwort Letzte Antwort
            0
            • harrymH Offline
              harrymH Offline
              harrym
              schrieb am zuletzt editiert von
              #49

              Bildschirmfoto vom 2020-03-17 22-46-53.png

              und mich interessiert eher die Entwicklung über nen Zeitraum .... dafür verwende ich den Adapter. DANKE dafür.

              ASRock FM2A88X-ITX+ mit 32GB RAM, 128GB SSD mit Proxmox, 3x1 TB SSD als RAID mit CT und VMs.

              1 Antwort Letzte Antwort
              0
              • C Offline
                C Offline
                Coffeelover
                schrieb am zuletzt editiert von Coffeelover
                #50

                Mich interessieren auch die Verläufe. Mit material-design line history tauchen die Werte häufig nicht auf. Deswegen aktuell mit Float. Ich vergleiche für Deutschland gerade noch 2 Quellen. Auch von mir jedenfalls Danke für den Adapter.
                4aac328f-197a-448f-8fa8-baf11ceb1739-grafik.png
                Edit: So sollte es mit Material-Design aussehen:
                8a26b58d-5a05-420c-b521-a33f5551599f-grafik.png

                1 Antwort Letzte Antwort
                0
                • ScroungerS Scrounger

                  Da mich schon immer die Werte pro Kontinent intressiert haben, aber ich dazu nix brauchbares im Netz finden kann, hab ich mal ein kleines Skript geschrieben, dass die Daten dieses Adapters verwendet.

                  Voraussetzung:

                  • Javascript NPM-Module: country-list-js

                  Unter der Javascript instanz wird folgende Struktur automatisch angelegt:
                  c7461f3c-0149-4062-817f-b195e9a6c3a6-grafik.png

                  Skript:

                  const countryJs = require("country-list-js");
                  
                  let selector = `[id=coronavirus-statistics.0.*.cases]`
                  let allCountries = $(selector);
                  
                  // Fehlermeldung ausgeben, wenn selector kein result liefert
                  if (allCountries.length === 0) {
                      console.error(`no result for selector '${selector}'`)
                  }
                  
                  on({ id: 'coronavirus-statistics.0.global_totals.updated', change: 'any' }, statsForContinents);
                  
                  function statsForContinents() {
                      setTimeout(function () {
                          console.log('Corona Statistik für Kontinente wird erstellt');
                  
                          let countryTranslator = {
                              // https://github.com/i-rocky/country-list-js/blob/master/data/names.json
                              "Vatican_City": "Vatican",
                              "USA": "United States",
                              "UK": "United Kingdom",
                              "UAE": "United Arab Emirates",
                              "US_Virgin_Islands": "U.S. Virgin Islands",
                              "St_Vincent_Grenadines": "Saint Vincent and the Grenadines",
                              "St_Barth": "Saint Barthelemy",
                              "S_Korea": "South Korea",
                              "Palestine": "Palestinian Territory",
                              "North_Macedonia": "Macedonia",
                              "Faeroe_Islands": "Faroe Islands",
                              "Eswatini": "Swaziland",
                              "Czechia": "Czech Republic",
                              "Congo": "Republic of the Congo",
                              "CAR": "Central African Republic",
                              "DRC": "Democratic Republic of the Congo",
                              "Channel_Islands": "France"                             // gehört zu Europa, deshalb Frankreich einfach vergeben
                          }
                  
                          var continentsStats = {};
                          countryJs.continents().forEach(function (continent, index) {
                              continentsStats[continent] = {
                                  cases: 0,
                                  critical: 0,
                                  deaths: 0,
                                  recovered: 0,
                                  todayCases: 0,
                                  todayDeaths: 0,
                              }
                          });
                  
                          for (var i = 0; i <= allCountries.length - 1; i++) {
                              let idCases = allCountries[i];
                              let idCritical = idCases.replace('.cases', '.critical');
                              let idDeaths = idCases.replace('.cases', '.deaths');
                              let idRecovered = idCases.replace('.cases', '.recovered');
                              let idTodayCases = idCases.replace('.cases', '.todayCases');
                              let idTodayDeaths = idCases.replace('.cases', '.todayDeaths');
                  
                              let countryName = idCases.split('.')[2];
                  
                              let country = countryJs.findByName(countryName.replace(/_/g, ' ').replace('é', 'e').replace('ç', 'c'));
                              if (country) {
                                  calcStats(country);
                              } else {
                                  country = countryJs.findByName(countryTranslator[countryName]);
                                  if (country) {
                                      calcStats(country);
                                  } else {
                                      if (countryName !== 'global_totals' && countryName !== 'Diamond_Princess') {
                                          console.warn(`${countryName} nicht in gefunden. Korrekter Name muss im skript manuell hinzugefügt werden!`);
                                      }
                                  }
                              }
                  
                              function calcStats(country) {
                                  if (country.continent) {
                                      continentsStats[country.continent].cases = continentsStats[country.continent].cases + getState(idCases).val;
                                      continentsStats[country.continent].critical = continentsStats[country.continent].critical + getState(idCritical).val;
                                      continentsStats[country.continent].deaths = continentsStats[country.continent].deaths + getState(idDeaths).val;
                                      continentsStats[country.continent].recovered = continentsStats[country.continent].recovered + getState(idRecovered).val;
                                      continentsStats[country.continent].todayCases = continentsStats[country.continent].todayCases + getState(idTodayCases).val;
                                      continentsStats[country.continent].todayDeaths = continentsStats[country.continent].todayDeaths + getState(idTodayDeaths).val;
                                  } else {
                                      console.warn(`Für ${countryName} existiert kein Kontinent!`);
                                  }
                              }
                          }
                  
                          for (var continent in continentsStats) {
                              for (var prop in continentsStats[continent]) {
                                  let dpId = `corona.continents.${continent}.${prop}`
                  
                                  if (existsState(dpId)) {
                                      setState(dpId, continentsStats[continent][prop], true);
                                  } else {
                                      createState(dpId, continentsStats[continent][prop], {
                                          name: `${continent} ${prop}`,
                                          read: true,
                                          write: false,
                                          desc: `${continent} ${prop}`,
                                          type: "number",
                                          def: 0,
                                      });
                                  }
                              }
                          }
                      }, 30000);
                  }
                  
                  // Bei JS Start ausführen
                  statsForContinents();
                  
                  
                  DutchmanD Offline
                  DutchmanD Offline
                  Dutchman
                  Developer Most Active Administrators
                  schrieb am zuletzt editiert von
                  #51

                  @Scrounger sagte in Test Coronavirus Statistics for ioBroker:

                  Da mich schon immer die Werte pro Kontinent intressiert haben, aber ich dazu nix brauchbares im Netz finden kann, hab ich mal ein kleines Skript geschrieben, dass die Daten dieses Adapters verwendet.

                  danke, das werde ich im adapter integrieren :)

                  hast du ein GitHub account damit ich dich verlinken kan als contributor ?

                  C 1 Antwort Letzte Antwort
                  0
                  • DutchmanD Dutchman

                    @Scrounger sagte in Test Coronavirus Statistics for ioBroker:

                    Da mich schon immer die Werte pro Kontinent intressiert haben, aber ich dazu nix brauchbares im Netz finden kann, hab ich mal ein kleines Skript geschrieben, dass die Daten dieses Adapters verwendet.

                    danke, das werde ich im adapter integrieren :)

                    hast du ein GitHub account damit ich dich verlinken kan als contributor ?

                    C Offline
                    C Offline
                    Coffeelover
                    schrieb am zuletzt editiert von
                    #52

                    @Dutchman https://github.com/Scrounger

                    1 Antwort Letzte Antwort
                    0
                    • ScroungerS Offline
                      ScroungerS Offline
                      Scrounger
                      Developer
                      schrieb am zuletzt editiert von
                      #53

                      Hab mein Skript noch erweitert um:

                      • Kontinent Amerika (Zusammenfassung von Nord- & Süd Amerika)
                      • Welt, fehlende Werte für todayCases & todayDeaths

                      Skript:

                      const countryJs = require("country-list-js");
                      
                      let selector = `[id=coronavirus-statistics.0.*.cases]`
                      let allCountries = $(selector);
                      
                      // Fehlermeldung ausgeben, wenn selector kein result liefert
                      if (allCountries.length === 0) {
                          console.error(`no result for selector '${selector}'`)
                      }
                      
                      on({ id: 'coronavirus-statistics.0.global_totals.updated', change: 'any' }, statsForContinents);
                      
                      function statsForContinents() {
                          setTimeout(function () {
                              console.log('Corona Statistik für Kontinente wird erstellt');
                      
                              let countryTranslator = {
                                  // https://github.com/i-rocky/country-list-js/blob/master/data/names.json
                                  "Vatican_City": "Vatican",
                                  "USA": "United States",
                                  "UK": "United Kingdom",
                                  "UAE": "United Arab Emirates",
                                  "US_Virgin_Islands": "U.S. Virgin Islands",
                                  "St_Vincent_Grenadines": "Saint Vincent and the Grenadines",
                                  "St_Barth": "Saint Barthelemy",
                                  "S_Korea": "South Korea",
                                  "Palestine": "Palestinian Territory",
                                  "North_Macedonia": "Macedonia",
                                  "Faeroe_Islands": "Faroe Islands",
                                  "Eswatini": "Swaziland",
                                  "Czechia": "Czech Republic",
                                  "Congo": "Republic of the Congo",
                                  "CAR": "Central African Republic",
                                  "DRC": "Democratic Republic of the Congo",
                                  "Channel_Islands": "France"                             // gehört zu Europa, deshalb Frankreich einfach vergeben
                              }
                      
                              var continentsStats = {};
                              countryJs.continents().forEach(function (continent, index) {
                                  continentsStats[continent] = {
                                      cases: 0,
                                      critical: 0,
                                      deaths: 0,
                                      recovered: 0,
                                      todayCases: 0,
                                      todayDeaths: 0,
                                  }
                              });
                      
                              continentsStats['America'] = {
                                  cases: 0,
                                  critical: 0,
                                  deaths: 0,
                                  recovered: 0,
                                  todayCases: 0,
                                  todayDeaths: 0,
                              };
                      
                              continentsStats['World'] = {
                                  todayCases: 0,
                                  todayDeaths: 0,
                              };
                      
                      
                              for (var i = 0; i <= allCountries.length - 1; i++) {
                                  let idCases = allCountries[i];
                                  let idCritical = idCases.replace('.cases', '.critical');
                                  let idDeaths = idCases.replace('.cases', '.deaths');
                                  let idRecovered = idCases.replace('.cases', '.recovered');
                                  let idTodayCases = idCases.replace('.cases', '.todayCases');
                                  let idTodayDeaths = idCases.replace('.cases', '.todayDeaths');
                      
                                  let countryName = idCases.split('.')[2];
                      
                                  let country = countryJs.findByName(countryName.replace(/_/g, ' ').replace('é', 'e').replace('ç', 'c'));
                                  if (country) {
                                      calcStats(country);
                                  } else {
                                      country = countryJs.findByName(countryTranslator[countryName]);
                                      if (country) {
                                          calcStats(country);
                                      } else {
                                          if (countryName !== 'global_totals' && countryName !== 'Diamond_Princess') {
                                              console.warn(`${countryName} nicht in gefunden. Korrekter Name muss im skript manuell hinzugefügt werden!`);
                                          }
                                      }
                                  }
                      
                                  function calcStats(country) {
                                      if (country.continent) {
                                          continentsStats[country.continent].cases = continentsStats[country.continent].cases + getState(idCases).val;
                                          continentsStats[country.continent].critical = continentsStats[country.continent].critical + getState(idCritical).val;
                                          continentsStats[country.continent].deaths = continentsStats[country.continent].deaths + getState(idDeaths).val;
                                          continentsStats[country.continent].recovered = continentsStats[country.continent].recovered + getState(idRecovered).val;
                                          continentsStats[country.continent].todayCases = continentsStats[country.continent].todayCases + getState(idTodayCases).val;
                                          continentsStats[country.continent].todayDeaths = continentsStats[country.continent].todayDeaths + getState(idTodayDeaths).val;
                      
                                          if (country.continent === 'South America' || country.continent === 'North America') {
                                              continentsStats['America'].cases = continentsStats['America'].cases + getState(idCases).val;
                                              continentsStats['America'].critical = continentsStats['America'].critical + getState(idCritical).val;
                                              continentsStats['America'].deaths = continentsStats['America'].deaths + getState(idDeaths).val;
                                              continentsStats['America'].recovered = continentsStats['America'].recovered + getState(idRecovered).val;
                                              continentsStats['America'].todayCases = continentsStats['America'].todayCases + getState(idTodayCases).val;
                                              continentsStats['America'].todayDeaths = continentsStats['America'].todayDeaths + getState(idTodayDeaths).val;
                                          }
                      
                                          continentsStats['World'].todayCases = continentsStats['World'].todayCases + getState(idTodayCases).val;
                                          continentsStats['World'].todayDeaths = continentsStats['World'].todayDeaths + getState(idTodayDeaths).val;
                                      } else {
                                          console.warn(`Für ${countryName} existiert kein Kontinent!`);
                                      }
                                  }
                              }
                      
                              for (var continent in continentsStats) {
                                  for (var prop in continentsStats[continent]) {
                                      let dpId = `corona.continents.${continent}.${prop}`
                      
                                      if (existsState(dpId)) {
                                          setState(dpId, continentsStats[continent][prop], true);
                                      } else {
                                          createState(dpId, continentsStats[continent][prop], {
                                              name: `${continent} ${prop}`,
                                              read: true,
                                              write: false,
                                              desc: `${continent} ${prop}`,
                                              type: "number",
                                              def: 0,
                                          });
                                      }
                                  }
                              }
                          }, 30000);
                      }
                      
                      // Bei JS Start ausführen
                      statsForContinents();
                      

                      <a href="https://github.com/Scrounger/ioBroker.linkeddevices">LinkedDevices Adapter</a>

                      <a href="https://github.com/Scrounger/ioBroker.vis-materialdesign">Material Design Widgets</a>

                      1 Antwort Letzte Antwort
                      0
                      • sigi234S sigi234

                        @All

                        View fertig.

                        Screenshot (2058).png

                        Uli977U Offline
                        Uli977U Offline
                        Uli977
                        schrieb am zuletzt editiert von Uli977
                        #54

                        @sigi234 stellst du das View mal zur Verfügung?
                        Inkl der nötigen Icons und ggf. Skripte wenn erforderlich.

                        sigi234S 1 Antwort Letzte Antwort
                        0
                        • Uli977U Uli977

                          @sigi234 stellst du das View mal zur Verfügung?
                          Inkl der nötigen Icons und ggf. Skripte wenn erforderlich.

                          sigi234S Online
                          sigi234S Online
                          sigi234
                          Forum Testing Most Active
                          schrieb am zuletzt editiert von
                          #55

                          @Uli977 sagte in Test Coronavirus Statistics for ioBroker:

                          @sigi234 stellst du das View mal zur Verfügung?
                          Inkl der nötigen Icons und ggf. Skripte wenn erforderlich.

                          https://forum.iobroker.net/topic/28717/vis-von-sigi234/180

                          Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.
                          Immer Daten sichern!

                          Uli977U 1 Antwort Letzte Antwort
                          0
                          • sigi234S sigi234

                            @Uli977 sagte in Test Coronavirus Statistics for ioBroker:

                            @sigi234 stellst du das View mal zur Verfügung?
                            Inkl der nötigen Icons und ggf. Skripte wenn erforderlich.

                            https://forum.iobroker.net/topic/28717/vis-von-sigi234/180

                            Uli977U Offline
                            Uli977U Offline
                            Uli977
                            schrieb am zuletzt editiert von
                            #56

                            @sigi234 Danke!

                            Aber was habe ich vergessen?

                            1f23f323-8004-4221-9194-e67b8832f98b-image.png

                            vis-materialdesign.0 ist installiert

                            sigi234S 1 Antwort Letzte Antwort
                            0
                            • Uli977U Uli977

                              @sigi234 Danke!

                              Aber was habe ich vergessen?

                              1f23f323-8004-4221-9194-e67b8832f98b-image.png

                              vis-materialdesign.0 ist installiert

                              sigi234S Online
                              sigi234S Online
                              sigi234
                              Forum Testing Most Active
                              schrieb am zuletzt editiert von sigi234
                              #57

                              @Uli977 sagte in Test Coronavirus Statistics for ioBroker:

                              @sigi234 Danke!

                              Aber was habe ich vergessen?

                              vis-materialdesign.0 ist installiert

                              Das Skript von @Scrounger ?

                              Soweit ich weis baut das @Dutchman aber ein.

                              Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.
                              Immer Daten sichern!

                              Uli977U DutchmanD 2 Antworten Letzte Antwort
                              0
                              • sigi234S sigi234

                                @Uli977 sagte in Test Coronavirus Statistics for ioBroker:

                                @sigi234 Danke!

                                Aber was habe ich vergessen?

                                vis-materialdesign.0 ist installiert

                                Das Skript von @Scrounger ?

                                Soweit ich weis baut das @Dutchman aber ein.

                                Uli977U Offline
                                Uli977U Offline
                                Uli977
                                schrieb am zuletzt editiert von Uli977
                                #58

                                @sigi234

                                6ad5cb5c-642e-48bc-9842-c4f7c60395b2-image.png

                                Wo finde ich diese Liste?

                                sigi234S 1 Antwort Letzte Antwort
                                0
                                • Uli977U Uli977

                                  @sigi234

                                  6ad5cb5c-642e-48bc-9842-c4f7c60395b2-image.png

                                  Wo finde ich diese Liste?

                                  sigi234S Online
                                  sigi234S Online
                                  sigi234
                                  Forum Testing Most Active
                                  schrieb am zuletzt editiert von
                                  #59

                                  @Uli977 sagte in Test Coronavirus Statistics for ioBroker:

                                  Wo finde ich diese lIste?

                                  Das musst du im JS Adapter eintragen und Adapter neu starten!

                                  Screenshot (2068)_LI.jpg

                                  Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.
                                  Immer Daten sichern!

                                  Uli977U 1 Antwort Letzte Antwort
                                  0
                                  • sigi234S sigi234

                                    @Uli977 sagte in Test Coronavirus Statistics for ioBroker:

                                    @sigi234 Danke!

                                    Aber was habe ich vergessen?

                                    vis-materialdesign.0 ist installiert

                                    Das Skript von @Scrounger ?

                                    Soweit ich weis baut das @Dutchman aber ein.

                                    DutchmanD Offline
                                    DutchmanD Offline
                                    Dutchman
                                    Developer Most Active Administrators
                                    schrieb am zuletzt editiert von
                                    #60

                                    @sigi234 sagte in Test Coronavirus Statistics for ioBroker:

                                    Soweit ich weis baut das @Dutchman aber ein.

                                    das design, nope die sache mit den Kontinenten kommt noch

                                    1 Antwort Letzte Antwort
                                    0
                                    • sigi234S sigi234

                                      @Uli977 sagte in Test Coronavirus Statistics for ioBroker:

                                      Wo finde ich diese lIste?

                                      Das musst du im JS Adapter eintragen und Adapter neu starten!

                                      Screenshot (2068)_LI.jpg

                                      Uli977U Offline
                                      Uli977U Offline
                                      Uli977
                                      schrieb am zuletzt editiert von
                                      #61

                                      @sigi234 wieder was gelernt!

                                      Aber das View ist immer noch leer...

                                      af68c13b-e3fc-499c-ac34-e95bc31a7d07-image.png

                                      sigi234S 1 Antwort Letzte Antwort
                                      0
                                      • Uli977U Uli977

                                        @sigi234 wieder was gelernt!

                                        Aber das View ist immer noch leer...

                                        af68c13b-e3fc-499c-ac34-e95bc31a7d07-image.png

                                        sigi234S Online
                                        sigi234S Online
                                        sigi234
                                        Forum Testing Most Active
                                        schrieb am zuletzt editiert von
                                        #62

                                        @Uli977

                                        Kommen die Daten an?

                                        Screenshot (2070).png

                                        Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.
                                        Immer Daten sichern!

                                        Uli977U 1 Antwort Letzte Antwort
                                        0
                                        • sigi234S sigi234

                                          @Uli977

                                          Kommen die Daten an?

                                          Screenshot (2070).png

                                          Uli977U Offline
                                          Uli977U Offline
                                          Uli977
                                          schrieb am zuletzt editiert von
                                          #63

                                          @sigi234 Ja, kommen an

                                          1a618ea2-2987-47b9-8647-3d92a8688afa-image.png

                                          sigi234S 1 Antwort Letzte Antwort
                                          0
                                          Antworten
                                          • In einem neuen Thema antworten
                                          Anmelden zum Antworten
                                          • Älteste zuerst
                                          • Neuste zuerst
                                          • Meiste Stimmen


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          703

                                          Online

                                          32.4k

                                          Benutzer

                                          81.4k

                                          Themen

                                          1.3m

                                          Beiträge
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Anmelden

                                          • Du hast noch kein Konto? Registrieren

                                          • Anmelden oder registrieren, um zu suchen
                                          • Erster Beitrag
                                            Letzter Beitrag
                                          0
                                          • Home
                                          • Aktuell
                                          • Tags
                                          • Ungelesen 0
                                          • Kategorien
                                          • Unreplied
                                          • Beliebt
                                          • GitHub
                                          • Docu
                                          • Hilfe