<commit_before>

vis.binds.buzzhome.wetter = {


    init: function (wid, view, data, style, wType) {

        var $div = $('#' + wid).addClass('buzzhome-Root');
        if (!$div.length) {
            setTimeout(function () {
                vis.binds.buzzhome.wetter.init(wid, view, data, style, wType);
            }, 100);
            return;
        }


        //DataHandling
        var _data = { wid: wid, view: view, wType: wType };

        for (var a in data) {
            if (!data.hasOwnProperty(a) || typeof data[a] == 'function') continue;
            if (a[0] != '_') {
                _data[a] = data[a];
            }
        }
        data = _data;

        if (data['oid-icon']) {
            vis.states.bind(data['oid-icon'] + '.val', function (e, newVal, oldVal) {
                data.icon = newVal;
                var iconPath = vis.binds.buzzhome.wetter.setIconPath(data.icon);
                $('#buzzhome-wetter-icon').html('<path d="' + iconPath + '" />');
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }

        if (data['oid-wetterstation']) {
            vis.states.bind(data['oid-wetterstation'] + '.val', function (e, newVal, oldVal) {
                data.wetterstation = newVal;
                $('#buzzhome-wetter-city').html(data.wetterstation);
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }

        if (data['oid-temperatur']) {
            vis.states.bind(data['oid-temperatur'] + '.val', function (e, newVal, oldVal) {
                data.temperatur = newVal;
                $('#buzzhome-wetter-TemperatureValue').html(data.temperatur);
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }

        if (data['oid-windrichtg']) {
            vis.states.bind(data['oid-windrichtg'] + '.val', function (e, newVal, oldVal) {
                data.windrichtg = newVal;
                vis.binds.buzzhome.wetter.setWindDirection(data.windrichtg);
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }

        if (data['oid-windgeschindigkeit']) {
            vis.states.bind(data['oid-windgeschindigkeit'] + '.val', function (e, newVal, oldVal) {
                data.windgeschindigkeit = newVal;
                $('#wind-wetter-value').html(data.windgeschindigkeit);
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }

        if (data['oid-luftfeuchte']) {
            vis.states.bind(data['oid-luftfeuchte'] + '.val', function (e, newVal, oldVal) {
                data.luftfeuchte = newVal;
                $('#luftfeuchte-wetter-value').html(data.luftfeuchte);
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }

        if (data['oid-luftdruck']) {
            vis.states.bind(data['oid-luftdruck'] + '.val', function (e, newVal, oldVal) {
                data.luftdruck = newVal;
                $('#luftdruck-wetter-value').html(data.luftdruck);
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }



        if (data['oid-aktualisierung']) data.aktualisierung = vis.states.attr(data['oid-aktualisierung'] + '.val');
        if (data['oid-bedingung']) data.bedingung = vis.states.attr(data['oid-bedingung'] + '.val');
        if (data['oid-luftdruck']) data.luftdruck = vis.states.attr(data['oid-luftdruck'] + '.val');
        if (data['oid-luftdrucktrend']) data.luftdrucktrend = vis.states.attr(data['oid-luftdrucktrend'] + '.val');
        if (data['oid-luftfeuchte']) data.luftfeuchte = vis.states.attr(data['oid-luftfeuchte'] + '.val');
        if (data['oid-wetterstation']) data.wetterstation = vis.states.attr(data['oid-wetterstation'] + '.val');
        if (data['oid-taupunkt']) data.taupunkt = vis.states.attr(data['oid-taupunkt'] + '.val');
        if (data['oid-temperatur']) data.temperatur = vis.states.attr(data['oid-temperatur'] + '.val');
        if (data['oid-uv']) data.uv = vis.states.attr(data['oid-uv'] + '.val');
        if (data['oid-windbedingungen']) data.windbedingungen = vis.states.attr(data['oid-windbedingungen'] + '.val');
        if (data['oid-windboeen']) data.windboeen = vis.states.attr(data['oid-windboeen'] + '.val');
        if (data['oid-windgeschindigkeit']) data.windgeschindigkeit = vis.states.attr(data['oid-windgeschindigkeit'] + '.val');
        if (data['oid-windrichtg']) data.windrichtg = vis.states.attr(data['oid-windrichtg'] + '.val');
        if (data['oid-windrichtung']) data.windrichtung = vis.states.attr(data['oid-windrichtung'] + '.val');
        if (data['oid-icon']) data.icon = vis.states.attr(data['oid-icon'] + '.val');
        //forecast
        if (data['oid-fct1-high']) data.icon = vis.states.attr(data['oid-fct1-high'] + '.val');
        if (data['oid-fct1-low']) data.icon = vis.states.attr(data['oid-fct1-low'] + '.val');
        if (data['oid-fct1-weekday']) data.icon = vis.states.attr(data['oid-fct1-weekday'] + '.val');
        if (data['oid-fct1-icon']) data.icon = vis.states.attr(data['oid-fct1-icon'] + '.val');
        if (data['oid-fct1-pop']) data.icon = vis.states.attr(data['oid-fct1-pop'] + '.val');
        if (data['oid-fct1-qpf']) data.icon = vis.states.attr(data['oid-fct1-qpf'] + '.val');
        if (data['oid-fct2-high']) data.icon = vis.states.attr(data['oid-fct2-high'] + '.val');
        if (data['oid-fct2-low']) data.icon = vis.states.attr(data['oid-fct2-low'] + '.val');
        if (data['oid-fct2-weekday']) data.icon = vis.states.attr(data['oid-fct2-weekday'] + '.val');
        if (data['oid-fct2-icon']) data.icon = vis.states.attr(data['oid-fct2-icon'] + '.val');
        if (data['oid-fct3-high']) data.icon = vis.states.attr(data['oid-fct3-high'] + '.val');
        if (data['oid-fct3-low']) data.icon = vis.states.attr(data['oid-fct3-low'] + '.val');
        if (data['oid-fct3-weekday']) data.icon = vis.states.attr(data['oid-fct3-weekday'] + '.val');
        if (data['oid-fct3-icon']) data.icon = vis.states.attr(data['oid-fct3-icon'] + '.val');
        if (data['oid-fct4-high']) data.icon = vis.states.attr(data['oid-fct4-high'] + '.val');
        if (data['oid-fct4-low']) data.icon = vis.states.attr(data['oid-fct4-low'] + '.val');
        if (data['oid-fct4-weekday']) data.icon = vis.states.attr(data['oid-fct4-weekday'] + '.val');
        if (data['oid-fct4-icon']) data.icon = vis.states.attr(data['oid-fct4-icon'] + '.val');


        console.log(
            "Blahaktualisierung: " + data.aktualisierung +
            ", bedingung: " + data.bedingung +
            ", luftdruck:" + data.luftdruck +
            ", luftdrucktrend:" + data.luftdrucktrend +
            ", luftfeuchte:" + data.luftfeuchte +
            ", wetterstation: " + data.wetterstation +
            ", taupunkt:" + data.taupunkt +
            ", temperatur:" + data.temperatur +
            ", uv:" + data.uv +
            ", windbedingungen: " + data.windbedingungen +
            ", windboeen:" + data.windboeen +
            ", windgeschindigkeit:" + data.windgeschindigkeit +
            ", windrichtg:" + data.windrichtg +
            ", icon:" + data.icon +
            ", windrichtung:" + data.windrichtung);



        var $Title = (data.Title).toString();
        var $Temperature = Math.round(data.temperatur);
        var $Taupunkt = Math.round(data.taupunkt);
        //var $Value = (data.value).toString().replace('.', ',');
        var $PrimaryColor = data.maincolor;
        var $invertColors = data.invertColors;
        var iconPath = vis.binds.buzzhome.wetter.setIconPath(data.icon);






        //HTML Zeichnen
        vis.binds.buzzhome.wetter.draw($div, $Title, $Temperature, data.luftfeuchte, data.luftdruck, data.windgeschindigkeit, data.wetterstation, $Taupunkt, iconPath);

        //Windrose
        vis.binds.buzzhome.wetter.setWindDirection(data.windrichtg);

    },

    setWindDirection: function (windrichtung) {
        $("#buzzhome-windrotate-icon").css("transform", "rotate(" + windrichtung + "deg)");
    },

    draw: function (container, title, temperature, luftfeuchte, luftdruck, windgeschwindigkeit, wetterstation, taupunkt, iconPath) {
        //Hier wird das HTML zusammengebaut und an den Container übergeben

        var $TitleHtml = '<span id="buzzhome-wetter-Title" class="buzzhome-Title">' + title + '</span>';

        var $TableHtml = '<table class="buzzhome-table" width="100%" height="100%">' +
            '<tr>' +
            '<td width="50%" height="100%" style="text-align:center;">' +
            '<svg id="buzzhome-wetter-icon" class="buzzhome-wetter-icon" viewBox="0 0 26 26">' +
            '<path d="' + iconPath + '" />' +
            '</svg><br/>' +
            ' <span id="buzzhome-wetter-city" class="buzzhome-Label">' + wetterstation + '</span> <br /> <span id="buzzhome-wetter-TemperatureValue" class="buzzhome-ValueSmall">' + temperature + '</span><span class="buzzhome-ValueSmall">&ordm;C</span>' +
            '</td>' +
            '<td width="50%" height="100%">' +
            '<span class="buzzhome-Label">Humidity: </span><span class="buzzhome-ValueSmall" id="luftfeuchte-wetter-value">' + luftfeuchte + '</span><span class="buzzhome-Label"> %</span><br>' +
            '<span class="buzzhome-Label">Pressure: </span><span class="buzzhome-ValueSmall" id="luftdruck-wetter-value">' + luftdruck + '</span><span class="buzzhome-Label"> mb</span><br>' +
            '<span class="buzzhome-Label">Wind: </span><span class="buzzhome-ValueSmall" id="wind-wetter-value">' + windgeschwindigkeit + '</span><span class="buzzhome-Label"> km/h</span>' +
            '   <span id="buzzhome-windrotate-container">' +
            ' <svg id="buzzhome-windrose" viewBox="0 0 26 26">' +
            ' <path d="M13,0C5.82,0,0,5.82,0,13s5.82,13,13,13s13-5.82,13-13S20.18,0,13,0zM13.984,23.953L13,21l-0.983,2.95c-5.281-0.471-9.496-4.686-9.967-9.967L5,13l-2.95-0.983c0.471-5.281,4.686-9.496,9.967-9.967L13,5l0.984-2.953c5.28,0.471,9.495,4.688,9.966,9.969L21,13l2.95,0.983C23.479,19.264,19.265,23.482,13.984,23.953z" /></svg>' +
            '<svg id="buzzhome-windrotate-icon" viewBox="0 0 6 24">' +
            '<path d="M0,12L3,0l3,12l-1.5,6l-0.75-3l0.75-3h-3L2,14l1,4l0.75,3L3,24L0,12z" /> </svg>' +
            '</span>' +
            '<path d="M25.56,51.12L0,85.56L25.56,0l25.56,85.56L25.56,51.12z" />' +
            '</svg></br>' +
            '<span class="buzzhome-Label">Dewpoint: </span><span class="buzzhome-ValueSmall" id="wind-wetter-value">' + taupunkt + '</span><span class="buzzhome-Label"> °C</span><br>' +
            '</td>' +
            ' </tr>' +
            ' </table>';



        var $ForecastContainerHtml = '<div id="buzzhome-forecast-container" style="width:100%; height:32px;" >' +
            '<table style="text-align:center; border-collapse: separate; border-spacing: 0px; " width="100% " height="32px">' +
            '<tr>' +
            '<td style="background-color:rgba(165, 124, 52, 0.40);">' +
            '<span class="buzzhome-forecast-Label">Mon</span>' +
            '<svg id="buzzhome-forecast-icon1" viewBox="0 0 26 26">' +
            '<path d="M24,20.538C24,22.45,22.45,24,20.538,24H14H7.462C5.55,24,4,22.45,4,20.538c0-1.215,0.629-2.28,1.576-2.898c-0.023-0.185-0.038-0.373-0.038-0.564c0-1.07,0.379-2.042,0.989-2.824C6.343,14.04,6.167,13.82,6.019,13.58l-4.676,2.885c-0.505-0.82-0.901-1.7-1.176-2.617l5.269-1.578c-0.269-0.895-0.317-1.868-0.087-2.842L0,8.162C0.217,7.248,0.554,6.346,1.021,5.48l4.842,2.61C6.327,7.228,7.002,6.518,7.81,6.019L4.925,1.343c0.82-0.505,1.7-0.901,2.617-1.176L9.12,5.435c0.895-0.269,1.868-0.317,2.842-0.087L13.229,0c0.914,0.217,1.815,0.554,2.682,1.021L13.3,5.863c0.862,0.464,1.573,1.139,2.071,1.948l4.676-2.885c0.505,0.82,0.901,1.7,1.176,2.617L15.955,9.12c0.181,0.602,0.246,1.241,0.209,1.891c0.004-0.001,0.007-0.002,0.011-0.003c-0.002,0.028-0.008,0.055-0.01,0.084c-0.002,0.023,0.003,0.044,0.001,0.067c-0.003,0.031-0.002,0.064-0.006,0.095c-0.01,0.094-0.032,0.188-0.047,0.282c-0.008,0.051-0.016,0.103-0.026,0.153c-0.012,0.061-0.017,0.123-0.031,0.184c-0.011,0.048-0.018,0.096-0.03,0.143l-0.016,0.003c-0.116,0.458-0.283,0.895-0.507,1.298c-0.468,0.247-0.88,0.602-1.193,1.048l-1.112,1.58l-1.617-1.057c-0.426-0.279-0.919-0.426-1.426-0.426c-1.442,0-2.615,1.173-2.615,2.615c0,0.089,0.008,0.194,0.023,0.321l0.151,1.237l-1.044,0.681C6.25,19.589,6,20.046,6,20.538C6,21.344,6.656,22,7.462,22H14h6.538C21.344,22,22,21.344,22,20.538c0-0.51-0.27-0.975-0.721-1.245l-1.264-0.756l0.346-1.432c0.068-0.279,0.1-0.54,0.1-0.798c0-1.613-1.136-2.962-2.649-3.299c0.209-0.624,0.33-1.286,0.364-1.972c2.446,0.508,4.285,2.674,4.285,5.271c0,0.438-0.058,0.861-0.157,1.269C23.316,18.181,24,19.275,24,20.538z" />' +
            '</svg>' +
            '<span class="buzzhome-forecast-Label">27°C</span>' +
            '<span class="buzzhome-forecast-Label">12°C</span>' +
            '</td>' +

            '<td style="background-color:rgba(165, 124, 52, 0.35);">' +
            ' <span class="buzzhome-forecast-Label">Thue</span>' +
            '<svg id="buzzhome-forecast-icon2" viewBox="0 0 26 26">' +
            '<path d="M24,20.538C24,22.45,22.45,24,20.538,24H14H7.462C5.55,24,4,22.45,4,20.538c0-1.215,0.629-2.28,1.576-2.898c-0.023-0.185-0.038-0.373-0.038-0.564c0-1.07,0.379-2.042,0.989-2.824C6.343,14.04,6.167,13.82,6.019,13.58l-4.676,2.885c-0.505-0.82-0.901-1.7-1.176-2.617l5.269-1.578c-0.269-0.895-0.317-1.868-0.087-2.842L0,8.162C0.217,7.248,0.554,6.346,1.021,5.48l4.842,2.61C6.327,7.228,7.002,6.518,7.81,6.019L4.925,1.343c0.82-0.505,1.7-0.901,2.617-1.176L9.12,5.435c0.895-0.269,1.868-0.317,2.842-0.087L13.229,0c0.914,0.217,1.815,0.554,2.682,1.021L13.3,5.863c0.862,0.464,1.573,1.139,2.071,1.948l4.676-2.885c0.505,0.82,0.901,1.7,1.176,2.617L15.955,9.12c0.181,0.602,0.246,1.241,0.209,1.891c0.004-0.001,0.007-0.002,0.011-0.003c-0.002,0.028-0.008,0.055-0.01,0.084c-0.002,0.023,0.003,0.044,0.001,0.067c-0.003,0.031-0.002,0.064-0.006,0.095c-0.01,0.094-0.032,0.188-0.047,0.282c-0.008,0.051-0.016,0.103-0.026,0.153c-0.012,0.061-0.017,0.123-0.031,0.184c-0.011,0.048-0.018,0.096-0.03,0.143l-0.016,0.003c-0.116,0.458-0.283,0.895-0.507,1.298c-0.468,0.247-0.88,0.602-1.193,1.048l-1.112,1.58l-1.617-1.057c-0.426-0.279-0.919-0.426-1.426-0.426c-1.442,0-2.615,1.173-2.615,2.615c0,0.089,0.008,0.194,0.023,0.321l0.151,1.237l-1.044,0.681C6.25,19.589,6,20.046,6,20.538C6,21.344,6.656,22,7.462,22H14h6.538C21.344,22,22,21.344,22,20.538c0-0.51-0.27-0.975-0.721-1.245l-1.264-0.756l0.346-1.432c0.068-0.279,0.1-0.54,0.1-0.798c0-1.613-1.136-2.962-2.649-3.299c0.209-0.624,0.33-1.286,0.364-1.972c2.446,0.508,4.285,2.674,4.285,5.271c0,0.438-0.058,0.861-0.157,1.269C23.316,18.181,24,19.275,24,20.538z" />' +
            '  </svg>' +
            '  <span class="buzzhome-forecast-Label">27°C</span>' +
            '  <span class="buzzhome-forecast-Label">12°C</span>' +
            '  </td>' +

            '  <td style="background-color:rgba(165, 124, 52, 0.25);">' +
            '  <span class="buzzhome-forecast-Label">Wed</span>' +
            '  <svg id="buzzhome-forecast-icon3" viewBox="0 0 26 26">' +
            '     <path d="M24,20.538C24,22.45,22.45,24,20.538,24H14H7.462C5.55,24,4,22.45,4,20.538c0-1.215,0.629-2.28,1.576-2.898c-0.023-0.185-0.038-0.373-0.038-0.564c0-1.07,0.379-2.042,0.989-2.824C6.343,14.04,6.167,13.82,6.019,13.58l-4.676,2.885c-0.505-0.82-0.901-1.7-1.176-2.617l5.269-1.578c-0.269-0.895-0.317-1.868-0.087-2.842L0,8.162C0.217,7.248,0.554,6.346,1.021,5.48l4.842,2.61C6.327,7.228,7.002,6.518,7.81,6.019L4.925,1.343c0.82-0.505,1.7-0.901,2.617-1.176L9.12,5.435c0.895-0.269,1.868-0.317,2.842-0.087L13.229,0c0.914,0.217,1.815,0.554,2.682,1.021L13.3,5.863c0.862,0.464,1.573,1.139,2.071,1.948l4.676-2.885c0.505,0.82,0.901,1.7,1.176,2.617L15.955,9.12c0.181,0.602,0.246,1.241,0.209,1.891c0.004-0.001,0.007-0.002,0.011-0.003c-0.002,0.028-0.008,0.055-0.01,0.084c-0.002,0.023,0.003,0.044,0.001,0.067c-0.003,0.031-0.002,0.064-0.006,0.095c-0.01,0.094-0.032,0.188-0.047,0.282c-0.008,0.051-0.016,0.103-0.026,0.153c-0.012,0.061-0.017,0.123-0.031,0.184c-0.011,0.048-0.018,0.096-0.03,0.143l-0.016,0.003c-0.116,0.458-0.283,0.895-0.507,1.298c-0.468,0.247-0.88,0.602-1.193,1.048l-1.112,1.58l-1.617-1.057c-0.426-0.279-0.919-0.426-1.426-0.426c-1.442,0-2.615,1.173-2.615,2.615c0,0.089,0.008,0.194,0.023,0.321l0.151,1.237l-1.044,0.681C6.25,19.589,6,20.046,6,20.538C6,21.344,6.656,22,7.462,22H14h6.538C21.344,22,22,21.344,22,20.538c0-0.51-0.27-0.975-0.721-1.245l-1.264-0.756l0.346-1.432c0.068-0.279,0.1-0.54,0.1-0.798c0-1.613-1.136-2.962-2.649-3.299c0.209-0.624,0.33-1.286,0.364-1.972c2.446,0.508,4.285,2.674,4.285,5.271c0,0.438-0.058,0.861-0.157,1.269C23.316,18.181,24,19.275,24,20.538z" />' +<commit_msg>added rain forecast<commit_after>

vis.binds.buzzhome.wetter = {


    init: function (wid, view, data, style, wType) {

        var $div = $('#' + wid).addClass('buzzhome-Root');
        if (!$div.length) {
            setTimeout(function () {
                vis.binds.buzzhome.wetter.init(wid, view, data, style, wType);
            }, 100);
            return;
        }


        //DataHandling
        var _data = { wid: wid, view: view, wType: wType };

        for (var a in data) {
            if (!data.hasOwnProperty(a) || typeof data[a] == 'function') continue;
            if (a[0] != '_') {
                _data[a] = data[a];
            }
        }
        data = _data;

        if (data['oid-icon']) {
            vis.states.bind(data['oid-icon'] + '.val', function (e, newVal, oldVal) {
                data.icon = newVal;
                var iconPath = vis.binds.buzzhome.wetter.setIconPath(data.icon);
                $('#buzzhome-wetter-icon').html('<path d="' + iconPath + '" />');
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }

        if (data['oid-wetterstation']) {
            vis.states.bind(data['oid-wetterstation'] + '.val', function (e, newVal, oldVal) {
                data.wetterstation = newVal;
                $('#buzzhome-wetter-city').html(data.wetterstation);
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }

        if (data['oid-temperatur']) {
            vis.states.bind(data['oid-temperatur'] + '.val', function (e, newVal, oldVal) {
                data.temperatur = newVal;
                $('#buzzhome-wetter-TemperatureValue').html(data.temperatur);
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }

        if (data['oid-windrichtg']) {
            vis.states.bind(data['oid-windrichtg'] + '.val', function (e, newVal, oldVal) {
                data.windrichtg = newVal;
                vis.binds.buzzhome.wetter.setWindDirection(data.windrichtg);
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }

        if (data['oid-windgeschindigkeit']) {
            vis.states.bind(data['oid-windgeschindigkeit'] + '.val', function (e, newVal, oldVal) {
                data.windgeschindigkeit = newVal;
                $('#wind-wetter-value').html(data.windgeschindigkeit);
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }

        if (data['oid-luftfeuchte']) {
            vis.states.bind(data['oid-luftfeuchte'] + '.val', function (e, newVal, oldVal) {
                data.luftfeuchte = newVal;
                $('#luftfeuchte-wetter-value').html(data.luftfeuchte);
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }

        if (data['oid-luftdruck']) {
            vis.states.bind(data['oid-luftdruck'] + '.val', function (e, newVal, oldVal) {
                data.luftdruck = newVal;
                $('#luftdruck-wetter-value').html(data.luftdruck);
                //console.log("value oid-battery changed - old: " + oldVal + " newValue: "+ newVal);
            });
        }



        if (data['oid-aktualisierung']) data.aktualisierung = vis.states.attr(data['oid-aktualisierung'] + '.val');
        if (data['oid-bedingung']) data.bedingung = vis.states.attr(data['oid-bedingung'] + '.val');
        if (data['oid-luftdruck']) data.luftdruck = vis.states.attr(data['oid-luftdruck'] + '.val');
        if (data['oid-luftdrucktrend']) data.luftdrucktrend = vis.states.attr(data['oid-luftdrucktrend'] + '.val');
        if (data['oid-luftfeuchte']) data.luftfeuchte = vis.states.attr(data['oid-luftfeuchte'] + '.val');
        if (data['oid-wetterstation']) data.wetterstation = vis.states.attr(data['oid-wetterstation'] + '.val');
        if (data['oid-taupunkt']) data.taupunkt = vis.states.attr(data['oid-taupunkt'] + '.val');
        if (data['oid-temperatur']) data.temperatur = vis.states.attr(data['oid-temperatur'] + '.val');
        if (data['oid-uv']) data.uv = vis.states.attr(data['oid-uv'] + '.val');
        if (data['oid-windbedingungen']) data.windbedingungen = vis.states.attr(data['oid-windbedingungen'] + '.val');
        if (data['oid-windboeen']) data.windboeen = vis.states.attr(data['oid-windboeen'] + '.val');
        if (data['oid-windgeschindigkeit']) data.windgeschindigkeit = vis.states.attr(data['oid-windgeschindigkeit'] + '.val');
        if (data['oid-windrichtg']) data.windrichtg = vis.states.attr(data['oid-windrichtg'] + '.val');
        if (data['oid-windrichtung']) data.windrichtung = vis.states.attr(data['oid-windrichtung'] + '.val');
        if (data['oid-icon']) data.icon = vis.states.attr(data['oid-icon'] + '.val');
        //forecast
        if (data['oid-fct1-high']) data.high1 = vis.states.attr(data['oid-fct1-high'] + '.val');
        if (data['oid-fct1-low']) data.low1 = vis.states.attr(data['oid-fct1-low'] + '.val');
        if (data['oid-fct1-weekday']) data.weekday1 = vis.states.attr(data['oid-fct1-weekday'] + '.val');
        if (data['oid-fct1-icon']) data.icon1 = vis.states.attr(data['oid-fct1-icon'] + '.val');
        if (data['oid-fct1-pop']) data.pop = vis.states.attr(data['oid-fct1-pop'] + '.val');
        if (data['oid-fct1-qpf']) data.qpf = vis.states.attr(data['oid-fct1-qpf'] + '.val');
        if (data['oid-fct2-high']) data.high2 = vis.states.attr(data['oid-fct2-high'] + '.val');
        if (data['oid-fct2-low']) data.low2 = vis.states.attr(data['oid-fct2-low'] + '.val');
        if (data['oid-fct2-weekday']) data.weekday2 = vis.states.attr(data['oid-fct2-weekday'] + '.val');
        if (data['oid-fct2-icon']) data.icon2 = vis.states.attr(data['oid-fct2-icon'] + '.val');
        if (data['oid-fct3-high']) data.high3 = vis.states.attr(data['oid-fct3-high'] + '.val');
        if (data['oid-fct3-low']) data.low3 = vis.states.attr(data['oid-fct3-low'] + '.val');
        if (data['oid-fct3-weekday']) data.weekday3 = vis.states.attr(data['oid-fct3-weekday'] + '.val');
        if (data['oid-fct3-icon']) data.icon3 = vis.states.attr(data['oid-fct3-icon'] + '.val');
        if (data['oid-fct4-high']) data.high4 = vis.states.attr(data['oid-fct4-high'] + '.val');
        if (data['oid-fct4-low']) data.low4 = vis.states.attr(data['oid-fct4-low'] + '.val');
        if (data['oid-fct4-weekday']) data.weekday4 = vis.states.attr(data['oid-fct4-weekday'] + '.val');
        if (data['oid-fct4-icon']) data.icon4 = vis.states.attr(data['oid-fct4-icon'] + '.val');


        console.log(
            "Blahaktualisierung: " + data.aktualisierung +
            ", bedingung: " + data.bedingung +
            ", luftdruck:" + data.luftdruck +
            ", luftdrucktrend:" + data.luftdrucktrend +
            ", luftfeuchte:" + data.luftfeuchte +
            ", wetterstation: " + data.wetterstation +
            ", taupunkt:" + data.taupunkt +
            ", temperatur:" + data.temperatur +
            ", uv:" + data.uv +
            ", windbedingungen: " + data.windbedingungen +
            ", windboeen:" + data.windboeen +
            ", windgeschindigkeit:" + data.windgeschindigkeit +
            ", windrichtg:" + data.windrichtg +
            ", icon:" + data.icon +
            ", windrichtung:" + data.windrichtung);



        var $Title = (data.Title).toString();
        var $Temperature = Math.round(data.temperatur);
        var $Taupunkt = Math.round(data.taupunkt);
        //var $Value = (data.value).toString().replace('.', ',');
        var $PrimaryColor = data.maincolor;
        var $invertColors = data.invertColors;
        var iconPath = vis.binds.buzzhome.wetter.setIconPath(data.icon);






        //HTML Zeichnen
        vis.binds.buzzhome.wetter.draw($div, $Title, $Temperature, data.luftfeuchte, data.luftdruck, data.windgeschindigkeit, data.wetterstation, $Taupunkt, iconPath, data.pop, data.qpf);

        //Windrose
        vis.binds.buzzhome.wetter.setWindDirection(data.windrichtg);

    },

    setWindDirection: function (windrichtung) {
        $("#buzzhome-windrotate-icon").css("transform", "rotate(" + windrichtung + "deg)");
    },

    draw: function (container, title, temperature, luftfeuchte, luftdruck, windgeschwindigkeit, wetterstation, taupunkt, iconPath, pop, qpf) {
        //Hier wird das HTML zusammengebaut und an den Container übergeben

        var $TitleHtml = '<span id="buzzhome-wetter-Title" class="buzzhome-Title">' + title + '</span>';

        var $TableHtml = '<table class="buzzhome-table" width="100%" height="100%">' +
            '<tr>' +
            '<td width="50%" height="100%" style="text-align:center;">' +
            '<svg id="buzzhome-wetter-icon" class="buzzhome-wetter-icon" viewBox="0 0 26 26">' +
            '<path d="' + iconPath + '" />' +
            '</svg><br/>' +
            ' <span id="buzzhome-wetter-city" class="buzzhome-Label">' + wetterstation + '</span> <br /> <span id="buzzhome-wetter-TemperatureValue" class="buzzhome-ValueSmall">' + temperature + '</span><span class="buzzhome-ValueSmall">&ordm;C</span>' +
            '</td>' +
            '<td width="50%" height="100%">' +
            '<span class="buzzhome-Label">Humidity: </span><span class="buzzhome-ValueSmall" id="luftfeuchte-wetter-value">' + luftfeuchte + '</span><span class="buzzhome-Label"> %</span><br>' +
            '<span class="buzzhome-Label">Pressure: </span><span class="buzzhome-ValueSmall" id="luftdruck-wetter-value">' + luftdruck + '</span><span class="buzzhome-Label"> mb</span><br>' +
            '<span class="buzzhome-Label">Wind: </span><span class="buzzhome-ValueSmall" id="wind-wetter-value">' + windgeschwindigkeit + '</span><span class="buzzhome-Label"> km/h</span>' +
            '   <span id="buzzhome-windrotate-container">' +
            ' <svg id="buzzhome-windrose" viewBox="0 0 26 26">' +
            ' <path d="M13,0C5.82,0,0,5.82,0,13s5.82,13,13,13s13-5.82,13-13S20.18,0,13,0zM13.984,23.953L13,21l-0.983,2.95c-5.281-0.471-9.496-4.686-9.967-9.967L5,13l-2.95-0.983c0.471-5.281,4.686-9.496,9.967-9.967L13,5l0.984-2.953c5.28,0.471,9.495,4.688,9.966,9.969L21,13l2.95,0.983C23.479,19.264,19.265,23.482,13.984,23.953z" /></svg>' +
            '<svg id="buzzhome-windrotate-icon" viewBox="0 0 6 24">' +
            '<path d="M0,12L3,0l3,12l-1.5,6l-0.75-3l0.75-3h-3L2,14l1,4l0.75,3L3,24L0,12z" /> </svg>' +
            '</span>' +
            '<path d="M25.56,51.12L0,85.56L25.56,0l25.56,85.56L25.56,51.12z" />' +
            '</svg></br>' +
            '<span class="buzzhome-Label">Rain: </span><span class="buzzhome-ValueSmall" id="rain-pop-value">' + pop +'</span><span class="buzzhome-Label"> %</span><br>' +
            '<span class="buzzhome-ValueSmall" id="rain-qpf.value"> |' + qpf + '</span><span class="buzzhome-Label"> mm</span><br>' +
            '</td>' +
            ' </tr>' +
            ' </table>';



        var $ForecastContainerHtml = '<div id="buzzhome-forecast-container" style="width:100%; height:32px;" >' +
            '<table style="text-align:center; border-collapse: separate; border-spacing: 0px; " width="100% " height="32px">' +
            '<tr>' +
            '<td style="background-color:rgba(165, 124, 52, 0.40);">' +
            '<span class="buzzhome-forecast-Label">Mon</span>' +
            '<svg id="buzzhome-forecast-icon1" viewBox="0 0 26 26">' +
            '<path d="M24,20.538C24,22.45,22.45,24,20.538,24H14H7.462C5.55,24,4,22.45,4,20.538c0-1.215,0.629-2.28,1.576-2.898c-0.023-0.185-0.038-0.373-0.038-0.564c0-1.07,0.379-2.042,0.989-2.824C6.343,14.04,6.167,13.82,6.019,13.58l-4.676,2.885c-0.505-0.82-0.901-1.7-1.176-2.617l5.269-1.578c-0.269-0.895-0.317-1.868-0.087-2.842L0,8.162C0.217,7.248,0.554,6.346,1.021,5.48l4.842,2.61C6.327,7.228,7.002,6.518,7.81,6.019L4.925,1.343c0.82-0.505,1.7-0.901,2.617-1.176L9.12,5.435c0.895-0.269,1.868-0.317,2.842-0.087L13.229,0c0.914,0.217,1.815,0.554,2.682,1.021L13.3,5.863c0.862,0.464,1.573,1.139,2.071,1.948l4.676-2.885c0.505,0.82,0.901,1.7,1.176,2.617L15.955,9.12c0.181,0.602,0.246,1.241,0.209,1.891c0.004-0.001,0.007-0.002,0.011-0.003c-0.002,0.028-0.008,0.055-0.01,0.084c-0.002,0.023,0.003,0.044,0.001,0.067c-0.003,0.031-0.002,0.064-0.006,0.095c-0.01,0.094-0.032,0.188-0.047,0.282c-0.008,0.051-0.016,0.103-0.026,0.153c-0.012,0.061-0.017,0.123-0.031,0.184c-0.011,0.048-0.018,0.096-0.03,0.143l-0.016,0.003c-0.116,0.458-0.283,0.895-0.507,1.298c-0.468,0.247-0.88,0.602-1.193,1.048l-1.112,1.58l-1.617-1.057c-0.426-0.279-0.919-0.426-1.426-0.426c-1.442,0-2.615,1.173-2.615,2.615c0,0.089,0.008,0.194,0.023,0.321l0.151,1.237l-1.044,0.681C6.25,19.589,6,20.046,6,20.538C6,21.344,6.656,22,7.462,22H14h6.538C21.344,22,22,21.344,22,20.538c0-0.51-0.27-0.975-0.721-1.245l-1.264-0.756l0.346-1.432c0.068-0.279,0.1-0.54,0.1-0.798c0-1.613-1.136-2.962-2.649-3.299c0.209-0.624,0.33-1.286,0.364-1.972c2.446,0.508,4.285,2.674,4.285,5.271c0,0.438-0.058,0.861-0.157,1.269C23.316,18.181,24,19.275,24,20.538z" />' +
            '</svg>' +
            '<span class="buzzhome-forecast-Label">27°C</span>' +
            '<span class="buzzhome-forecast-Label">12°C</span>' +
            '</td>' +

            '<td style="background-color:rgba(165, 124, 52, 0.35);">' +
            ' <span class="buzzhome-forecast-Label">Thue</span>' +
            '<svg id="buzzhome-forecast-icon2" viewBox="0 0 26 26">' +
            '<path d="M24,20.538C24,22.45,22.45,24,20.538,24H14H7.462C5.55,24,4,22.45,4,20.538c0-1.215,0.629-2.28,1.576-2.898c-0.023-0.185-0.038-0.373-0.038-0.564c0-1.07,0.379-2.042,0.989-2.824C6.343,14.04,6.167,13.82,6.019,13.58l-4.676,2.885c-0.505-0.82-0.901-1.7-1.176-2.617l5.269-1.578c-0.269-0.895-0.317-1.868-0.087-2.842L0,8.162C0.217,7.248,0.554,6.346,1.021,5.48l4.842,2.61C6.327,7.228,7.002,6.518,7.81,6.019L4.925,1.343c0.82-0.505,1.7-0.901,2.617-1.176L9.12,5.435c0.895-0.269,1.868-0.317,2.842-0.087L13.229,0c0.914,0.217,1.815,0.554,2.682,1.021L13.3,5.863c0.862,0.464,1.573,1.139,2.071,1.948l4.676-2.885c0.505,0.82,0.901,1.7,1.176,2.617L15.955,9.12c0.181,0.602,0.246,1.241,0.209,1.891c0.004-0.001,0.007-0.002,0.011-0.003c-0.002,0.028-0.008,0.055-0.01,0.084c-0.002,0.023,0.003,0.044,0.001,0.067c-0.003,0.031-0.002,0.064-0.006,0.095c-0.01,0.094-0.032,0.188-0.047,0.282c-0.008,0.051-0.016,0.103-0.026,0.153c-0.012,0.061-0.017,0.123-0.031,0.184c-0.011,0.048-0.018,0.096-0.03,0.143l-0.016,0.003c-0.116,0.458-0.283,0.895-0.507,1.298c-0.468,0.247-0.88,0.602-1.193,1.048l-1.112,1.58l-1.617-1.057c-0.426-0.279-0.919-0.426-1.426-0.426c-1.442,0-2.615,1.173-2.615,2.615c0,0.089,0.008,0.194,0.023,0.321l0.151,1.237l-1.044,0.681C6.25,19.589,6,20.046,6,20.538C6,21.344,6.656,22,7.462,22H14h6.538C21.344,22,22,21.344,22,20.538c0-0.51-0.27-0.975-0.721-1.245l-1.264-0.756l0.346-1.432c0.068-0.279,0.1-0.54,0.1-0.798c0-1.613-1.136-2.962-2.649-3.299c0.209-0.624,0.33-1.286,0.364-1.972c2.446,0.508,4.285,2.674,4.285,5.271c0,0.438-0.058,0.861-0.157,1.269C23.316,18.181,24,19.275,24,20.538z" />' +
            '  </svg>' +
            '  <span class="buzzhome-forecast-Label">27°C</span>' +
            '  <span class="buzzhome-forecast-Label">12°C</span>' +
            '  </td>' +

            '  <td style="background-color:rgba(165, 124, 52, 0.25);">' +
            '  <span class="buzzhome-forecast-Label">Wed</span>' +
            '  <svg id="buzzhome-forecast-icon3" viewBox="0 0 26 26">' +
            '     <path d="M24,20.538C24,22.45,22.45,24,20.538,24H14H7.462C5.55,24,4,22.45,4,20.538c0-1.215,0.629-2.28,1.576-2.898c-0.023-0.185-0.038-0.373-0.038-0.564c0-1.07,0.379-2.042,0.989-2.824C6.343,14.04,6.167,13.82,6.019,13.58l-4.676,2.885c-0.505-0.82-0.901-1.7-1.176-2.617l5.269-1.578c-0.269-0.895-0.317-1.868-0.087-2.842L0,8.162C0.217,7.248,0.554,6.346,1.021,5.48l4.842,2.61C6.327,7.228,7.002,6.518,7.81,6.019L4.925,1.343c0.82-0.505,1.7-0.901,2.617-1.176L9.12,5.435c0.895-0.269,1.868-0.317,2.842-0.087L13.229,0c0.914,0.217,1.815,0.554,2.682,1.021L13.3,5.863c0.862,0.464,1.573,1.139,2.071,1.948l4.676-2.885c0.505,0.82,0.901,1.7,1.176,2.617L15.955,9.12c0.181,0.602,0.246,1.241,0.209,1.891c0.004-0.001,0.007-0.002,0.011-0.003c-0.002,0.028-0.008,0.055-0.01,0.084c-0.002,0.023,0.003,0.044,0.001,0.067c-0.003,0.031-0.002,0.064-0.006,0.095c-0.01,0.094-0.032,0.188-0.047,0.282c-0.008,0.051-0.016,0.103-0.026,0.153c-0.012,0.061-0.017,0.123-0.031,0.184c-0.011,0.048-0.018,0.096-0.03,0.143l-0.016,0.003c-0.116,0.458-0.283,0.895-0.507,1.298c-0.468,0.247-0.88,0.602-1.193,1.048l-1.112,1.58l-1.617-1.057c-0.426-0.279-0.919-0.426-1.426-0.426c-1.442,0-2.615,1.173-2.615,2.615c0,0.089,0.008,0.194,0.023,0.321l0.151,1.237l-1.044,0.681C6.25,19.589,6,20.046,6,20.538C6,21.344,6.656,22,7.462,22H14h6.538C21.344,22,22,21.344,22,20.538c0-0.51-0.27-0.975-0.721-1.245l-1.264-0.756l0.346-1.432c0.068-0.279,0.1-0.54,0.1-0.798c0-1.613-1.136-2.962-2.649-3.299c0.209-0.624,0.33-1.286,0.364-1.972c2.446,0.508,4.285,2.674,4.285,5.271c0,0.438-0.058,0.861-0.157,1.269C23.316,18.181,24,19.275,24,20.538z" />' +
{'fraction_non_alphanumeric': 0.22985907222548443, 'fraction_numerical': 0.20240751614797417, 'mean_word_length': 2.7026850744646156, 'pattern_counts': {'":': 0, '<': 188, '<?xml version=': 0, '>': 188, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3733011', 'n_tokens_mistral': 18509, 'n_tokens_neox': 15209, 'n_words': 1249}