Skip to content

Instantly share code, notes, and snippets.

@sschuste
Created July 6, 2019 22:02
Show Gist options
  • Save sschuste/c8d18af733cf4ec694c5c1ceae6e20ec to your computer and use it in GitHub Desktop.
Save sschuste/c8d18af733cf4ec694c5c1ceae6e20ec to your computer and use it in GitHub Desktop.
Pollenwarnung

This flow shows the current pollen situation in Germany, divided into 26 regions across Germany.

Current pollen data is retrieved from the DWD and then displayed on the dashboard. The DWD makes the data available daily at 11:00 am.

The specific region can be selected via a pull-down menu.

Despite this description being written in English, the output on the dashboard is in German.

[{"id":"c7c2ef31.04449","type":"comment","z":"ce22bfd3.2e565","name":"Pollen Warning","info":"Germany only\n\nThis flow retrieves current pollen data from the DWD and displays it on the dashboard. ","x":120,"y":220,"wires":[]},{"id":"a686ea99.920ca8","type":"comment","z":"ce22bfd3.2e565","name":"possible values","info":"\"-1\" \"keine Werte vorhanden\"\n\nid1 \"0\"\nid1_desc \"keine Belastung\"\nid2 \"0-1\"\nid2_desc \"keine bis geringe Belastung\"\nid3 \"1\"\nid3_desc \"geringe Belastung\"\nid4 \"1-2\"\nid4_desc \"geringe bis mittlere Belastung\"\nid5 \"2\"\nid5_desc \"mittlere Belastung\"\nid6 \"2-3\"\nid6_desc \"mittlere bis hohe Belastung\"\nid7 \"3\"\nid7_desc \"hohe Belastung\"","x":1480,"y":180,"wires":[]},{"id":"aaf84384.0e07","type":"function","z":"ce22bfd3.2e565","name":"Erle","func":"msg.payload = msg.payload.content[msg.select].Pollen.Erle.today;\nmsg.topic = node.name; \n\nreturn msg;","outputs":1,"noerr":0,"x":1230,"y":160,"wires":[["df5e75f2.0c9bc8"]]},{"id":"d32cfa41.cdbe88","type":"function","z":"ce22bfd3.2e565","name":"Ambrosia","func":"msg.payload = msg.payload.content[msg.select].Pollen.Ambrosia.today;\nmsg.topic = node.name; \n\nreturn msg;","outputs":1,"noerr":0,"x":1240,"y":200,"wires":[["df5e75f2.0c9bc8"]]},{"id":"a17d0108.2d7d4","type":"function","z":"ce22bfd3.2e565","name":"Roggen","func":"msg.payload = msg.payload.content[msg.select].Pollen.Roggen.today;\nmsg.topic = node.name; \n\nreturn msg;","outputs":1,"noerr":0,"x":1240,"y":240,"wires":[["df5e75f2.0c9bc8"]]},{"id":"a97267f3.ca40e8","type":"function","z":"ce22bfd3.2e565","name":"Esche","func":"msg.payload = msg.payload.content[msg.select].Pollen.Esche.today;\nmsg.topic = node.name; \n\nreturn msg;","outputs":1,"noerr":0,"x":1230,"y":280,"wires":[["df5e75f2.0c9bc8"]]},{"id":"7687fcfd.9ab444","type":"function","z":"ce22bfd3.2e565","name":"Hasel","func":"msg.payload = msg.payload.content[msg.select].Pollen.Hasel.today;\nmsg.topic = node.name; \n\nreturn msg;","outputs":1,"noerr":0,"x":1230,"y":320,"wires":[["df5e75f2.0c9bc8"]]},{"id":"8544b6b5.dd3ff8","type":"function","z":"ce22bfd3.2e565","name":"Beifuß","func":"msg.payload = msg.payload.content[msg.select].Pollen.Beifuss.today;\nmsg.topic = node.name; \n\nreturn msg;","outputs":1,"noerr":0,"x":1230,"y":360,"wires":[["df5e75f2.0c9bc8"]]},{"id":"77af9b09.61a164","type":"function","z":"ce22bfd3.2e565","name":"Birke","func":"msg.payload = msg.payload.content[msg.select].Pollen.Birke.today;\nmsg.topic = node.name; \n\nreturn msg;","outputs":1,"noerr":0,"x":1230,"y":400,"wires":[["df5e75f2.0c9bc8"]]},{"id":"6592703e.60be7","type":"http request","z":"ce22bfd3.2e565","name":"Data from DWD","method":"GET","ret":"obj","paytoqs":false,"url":"https://opendata.dwd.de/climate_environment/health/alerts/s31fg.json","tls":"","proxy":"","authType":"basic","x":960,"y":260,"wires":[["a7ea0e5c.20b22","20576a57.35e966","aaf84384.0e07","d32cfa41.cdbe88","a17d0108.2d7d4","a97267f3.ca40e8","7687fcfd.9ab444","8544b6b5.dd3ff8","77af9b09.61a164"]]},{"id":"df5e75f2.0c9bc8","type":"switch","z":"ce22bfd3.2e565","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"0-1","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"1-2","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"2-3","vt":"str"},{"t":"eq","v":"3","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":1450,"y":260,"wires":[["14bdaaec.de81e5"],["e5bde0af.2835a"],["32415787.508998"],["f33b9c49.9b458"],["697c6360.aa55bc"],["5dc78855.3ebb58"],["84b26e8c.0cd91"]]},{"id":"a7ea0e5c.20b22","type":"ui_text","z":"ce22bfd3.2e565","group":"5a92396f.316998","order":10,"width":0,"height":0,"name":"Last Update","label":"Letztes Update: ","format":"{{msg.payload.last_update}}","layout":"row-center","x":1250,"y":480,"wires":[]},{"id":"89968405.2c6218","type":"change","z":"ce22bfd3.2e565","name":"","rules":[{"t":"set","p":"select","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":260,"wires":[["6592703e.60be7"]]},{"id":"20576a57.35e966","type":"function","z":"ce22bfd3.2e565","name":"Gräser","func":"msg.payload = msg.payload.content[msg.select].Pollen.Graeser.today;\nmsg.topic = node.name; \n\nreturn msg;","outputs":1,"noerr":0,"x":1230,"y":120,"wires":[["df5e75f2.0c9bc8"]]},{"id":"2ea2d59f.026bfa","type":"change","z":"ce22bfd3.2e565","name":"Set default to Hessen","rules":[{"t":"set","p":"payload","pt":"msg","to":"16","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":260,"wires":[["494e0bff.d785d4"]]},{"id":"14bdaaec.de81e5","type":"change","z":"ce22bfd3.2e565","name":"Convert for Dashboard","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":140,"wires":[["4078faa2.060644"]],"outputLabels":["== 0"]},{"id":"e5bde0af.2835a","type":"change","z":"ce22bfd3.2e565","name":"Convert for Dashboard","rules":[{"t":"set","p":"payload","pt":"msg","to":"0.5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":180,"wires":[["4078faa2.060644"]],"outputLabels":["== 1"]},{"id":"32415787.508998","type":"change","z":"ce22bfd3.2e565","name":"Convert for Dashboard","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":220,"wires":[["4078faa2.060644"]],"outputLabels":["== 2"]},{"id":"f33b9c49.9b458","type":"change","z":"ce22bfd3.2e565","name":"Convert for Dashboard","rules":[{"t":"set","p":"payload","pt":"msg","to":"1.5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":260,"wires":[["4078faa2.060644"]],"outputLabels":["== 3"]},{"id":"697c6360.aa55bc","type":"change","z":"ce22bfd3.2e565","name":"Convert for Dashboard","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":300,"wires":[["4078faa2.060644"]],"outputLabels":["== 4"]},{"id":"5dc78855.3ebb58","type":"change","z":"ce22bfd3.2e565","name":"Convert for Dashboard","rules":[{"t":"set","p":"payload","pt":"msg","to":"2.5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":340,"wires":[["4078faa2.060644"]],"outputLabels":["== 5"]},{"id":"84b26e8c.0cd91","type":"change","z":"ce22bfd3.2e565","name":"Convert for Dashboard","rules":[{"t":"set","p":"payload","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":380,"wires":[["4078faa2.060644"]],"outputLabels":["== 6"]},{"id":"494e0bff.d785d4","type":"ui_dropdown","z":"ce22bfd3.2e565","name":"Pulldown Menu","label":"","tooltip":"Region auswählen","place":"Region auswählen","group":"5a92396f.316998","order":1,"width":0,"height":0,"passthru":true,"options":[{"label":"Schleswig-Holstein und Hamburg: Inseln und Marschen","value":"0","type":"str"},{"label":"Schleswig-Holstein und Hamburg: Geest","value":"1","type":"str"},{"label":"Mecklenburg-Vorpommern","value":"2","type":"str"},{"label":"Niedersachsen: Bremen und westliches Gebiet","value":"3","type":"str"},{"label":"Niedersachsen: östliches Gebiet","value":"4","type":"str"},{"label":"NRW: rheinisch-westfälisches Tiefland","value":"5","type":"str"},{"label":"NRW: Ostwestfalen","value":"6","type":"str"},{"label":"NRW: Mittelgebirge","value":"7","type":"str"},{"label":"Brandenburg und Berlin","value":"8","type":"str"},{"label":"Sachsen-Anhalt: Tiefland","value":"9","type":"str"},{"label":"Sachsen-Anhalt: Harz","value":"10","type":"str"},{"label":"Thüringen: Tiefland","value":"11","type":"str"},{"label":"Thüringen: Mittelgebirge","value":"12","type":"str"},{"label":"Sachsen: Tiefland","value":"13","type":"str"},{"label":"Sachsen: Mittelgebirge","value":"14","type":"str"},{"label":"Hessen: Nordhessen und hessisches Mittelgebirge","value":"15","type":"str"},{"label":"Hessen: Rhein-Main","value":"16","type":"str"},{"label":"Saarland","value":"17","type":"str"},{"label":"Rheinland-Pfalz: Rhein, Pfalz, Nahe und Mosel","value":"18","type":"str"},{"label":"Rheinland-Pfalz: Mittelgebirge","value":"19","type":"str"},{"label":"Baden-Württemberg: Oberrhein und unteres Neckartal","value":"20","type":"str"},{"label":"Baden-Württemberg: Hohenlohe, mittlerer Neckar und Oberschwaben","value":"21","type":"str"},{"label":"Baden-Württemberg: Mittelgebirge","value":"22","type":"str"},{"label":"Bayern: Allgäu, Oberbayern und Bayrischer Wald","value":"23","type":"str"},{"label":"Bayern: Donauniederungen","value":"24","type":"str"},{"label":"Bayern: nahe der Donau, oberer Bayrischer Wald, oberes Mainfranken","value":"25","type":"str"},{"label":"Bayern: Mainfranken","value":"26","type":"str"}],"payload":"","topic":"","x":560,"y":260,"wires":[["89968405.2c6218"]]},{"id":"4239eb28.49a3e4","type":"inject","z":"ce22bfd3.2e565","name":"Daily at 11:15","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"15 11 * * *","once":false,"onceDelay":0.1,"x":120,"y":260,"wires":[["2ea2d59f.026bfa"]]},{"id":"4078faa2.060644","type":"switch","z":"ce22bfd3.2e565","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"Gräser","vt":"str"},{"t":"eq","v":"Erle","vt":"str"},{"t":"eq","v":"Ambrosia","vt":"str"},{"t":"eq","v":"Roggen","vt":"str"},{"t":"eq","v":"Esche","vt":"str"},{"t":"eq","v":"Hasel","vt":"str"},{"t":"eq","v":"Beifuß","vt":"str"},{"t":"eq","v":"Birke","vt":"str"}],"checkall":"true","repair":false,"outputs":8,"x":1970,"y":260,"wires":[["eec049b5.08b138"],["8ed47d2d.421fc"],["e2199dee.9ab44"],["693cdd2b.031ff4"],["2873c547.850c4a"],["6cd69e5b.c6769"],["c1e4d90a.c15bd8"],["bbb1722d.4b163","7b7c20a6.3b625"]]},{"id":"eec049b5.08b138","type":"ui_gauge","z":"ce22bfd3.2e565","name":"Gräser","group":"5a92396f.316998","order":7,"width":"5","height":"4","gtype":"donut","title":"","label":"{{msg.topic}}","format":"{{value}}","min":0,"max":"3","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":2190,"y":120,"wires":[]},{"id":"8ed47d2d.421fc","type":"ui_gauge","z":"ce22bfd3.2e565","name":"Erle","group":"5a92396f.316998","order":5,"width":"5","height":"4","gtype":"donut","title":"","label":"{{msg.topic}}","format":"{{value}}","min":0,"max":"3","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":2190,"y":160,"wires":[]},{"id":"e2199dee.9ab44","type":"ui_gauge","z":"ce22bfd3.2e565","name":"Ambrosia","group":"5a92396f.316998","order":2,"width":"5","height":"4","gtype":"donut","title":"","label":"{{msg.topic}}","format":"{{value}}","min":0,"max":"3","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":2200,"y":200,"wires":[]},{"id":"693cdd2b.031ff4","type":"ui_gauge","z":"ce22bfd3.2e565","name":"Roggen","group":"5a92396f.316998","order":9,"width":"5","height":"4","gtype":"donut","title":"","label":"{{msg.topic}}","format":"{{value}}","min":0,"max":"3","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":2200,"y":240,"wires":[]},{"id":"2873c547.850c4a","type":"ui_gauge","z":"ce22bfd3.2e565","name":"Esche","group":"5a92396f.316998","order":6,"width":"5","height":"4","gtype":"donut","title":"","label":"{{msg.topic}}","format":"{{value}}","min":0,"max":"3","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":2190,"y":280,"wires":[]},{"id":"6cd69e5b.c6769","type":"ui_gauge","z":"ce22bfd3.2e565","name":"Hasel","group":"5a92396f.316998","order":8,"width":"5","height":"4","gtype":"donut","title":"","label":"{{msg.topic}}","format":"{{value}}","min":0,"max":"3","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":2190,"y":320,"wires":[]},{"id":"c1e4d90a.c15bd8","type":"ui_gauge","z":"ce22bfd3.2e565","name":"Beifuß","group":"5a92396f.316998","order":3,"width":"5","height":"4","gtype":"donut","title":"","label":"{{msg.topic}}","format":"{{value}}","min":0,"max":"3","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":2190,"y":360,"wires":[]},{"id":"bbb1722d.4b163","type":"ui_gauge","z":"ce22bfd3.2e565","name":"Birke","group":"5a92396f.316998","order":4,"width":"5","height":"4","gtype":"donut","title":"","label":"{{msg.topic}}","format":"{{value}}","min":0,"max":"3","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":2190,"y":400,"wires":[]},{"id":"7b7c20a6.3b625","type":"debug","z":"ce22bfd3.2e565","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":2190,"y":500,"wires":[]},{"id":"5a92396f.316998","type":"ui_group","z":"","name":"POLLEN","tab":"ee3ac985.61ca48","order":3,"disp":true,"width":"10","collapse":false},{"id":"ee3ac985.61ca48","type":"ui_tab","z":"","name":"Außen","icon":"wb_sunny","order":1,"disabled":false,"hidden":false}]
@MiMoertel
Copy link

Moinsen, bin über deinen Flow gestolpert. Super Klasse, Danke.
Ihn ein wenig umgebaut, vielleicht interessant.

[ { "id": "272d507b.b4cb2", "type": "tab", "label": "Pollen", "disabled": false, "info": "" }, { "id": "c7c2ef31.04449", "type": "comment", "z": "272d507b.b4cb2", "name": "Pollen Warning", "info": "Germany only\n\nThis flow retrieves current pollen data from the DWD and displays it on the dashboard. ", "x": 100, "y": 40, "wires": [] }, { "id": "6592703e.60be7", "type": "http request", "z": "272d507b.b4cb2", "name": "Data from DWD", "method": "GET", "ret": "obj", "paytoqs": false, "url": "https://opendata.dwd.de/climate_environment/health/alerts/s31fg.json", "tls": "", "proxy": "", "authType": "basic", "x": 180, "y": 380, "wires": [ [ "a7ea0e5c.20b22", "cced5160.d9868", "d5449bf3.22a788", "80681b8a.b2d808", "ac576055.80835", "e926f958.5ce6d8", "6fe7b70d.7e0648", "2ae26a21.36f266", "c3735eea.6b311", "fc95d953.765138" ] ] }, { "id": "a7ea0e5c.20b22", "type": "ui_text", "z": "272d507b.b4cb2", "group": "5a92396f.316998", "order": 1, "width": 0, "height": 0, "name": "Letzte Aktualisierung", "label": "Letztes Update: ", "format": "{{msg.payload.last_update}}", "layout": "row-center", "x": 900, "y": 400, "wires": [] }, { "id": "89968405.2c6218", "type": "change", "z": "272d507b.b4cb2", "name": "", "rules": [ { "t": "set", "p": "select", "pt": "msg", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 190, "y": 340, "wires": [ [ "6592703e.60be7" ] ] }, { "id": "2ea2d59f.026bfa", "type": "change", "z": "272d507b.b4cb2", "name": "Set default Region", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "1", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 190, "y": 260, "wires": [ [ "89968405.2c6218" ] ] }, { "id": "4239eb28.49a3e4", "type": "inject", "z": "272d507b.b4cb2", "name": "Daily at 11:15", "props": [ { "p": "payload", "v": "", "vt": "date" }, { "p": "topic", "v": "", "vt": "string" } ], "repeat": "", "crontab": "15 11 * * *", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 180, "y": 100, "wires": [ [ "a99f70d8.cf39a" ] ] }, { "id": "4078faa2.060644", "type": "switch", "z": "272d507b.b4cb2", "name": "", "property": "topic", "propertyType": "msg", "rules": [ { "t": "eq", "v": "Gräser", "vt": "str" }, { "t": "eq", "v": "Erle", "vt": "str" }, { "t": "eq", "v": "Ambrosia", "vt": "str" }, { "t": "eq", "v": "Roggen", "vt": "str" }, { "t": "eq", "v": "Esche", "vt": "str" }, { "t": "eq", "v": "Hasel", "vt": "str" }, { "t": "eq", "v": "Beifuß", "vt": "str" }, { "t": "eq", "v": "Birke", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 8, "x": 650, "y": 220, "wires": [ [ "eec049b5.08b138" ], [ "8ed47d2d.421fc" ], [ "e2199dee.9ab44" ], [ "693cdd2b.031ff4" ], [ "2873c547.850c4a" ], [ "6cd69e5b.c6769" ], [ "c1e4d90a.c15bd8" ], [ "bbb1722d.4b163" ] ] }, { "id": "eec049b5.08b138", "type": "ui_gauge", "z": "272d507b.b4cb2", "name": "Gräser", "group": "5a92396f.316998", "order": 8, "width": 5, "height": 4, "gtype": "donut", "title": "", "label": "{{msg.topic}}", "format": "{{value}}", "min": 0, "max": "3", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 850, "y": 80, "wires": [] }, { "id": "8ed47d2d.421fc", "type": "ui_gauge", "z": "272d507b.b4cb2", "name": "Erle", "group": "5a92396f.316998", "order": 6, "width": 5, "height": 4, "gtype": "donut", "title": "", "label": "{{msg.topic}}", "format": "{{value}}", "min": 0, "max": "3", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 850, "y": 120, "wires": [] }, { "id": "e2199dee.9ab44", "type": "ui_gauge", "z": "272d507b.b4cb2", "name": "Ambrosia", "group": "5a92396f.316998", "order": 3, "width": 5, "height": 4, "gtype": "donut", "title": "", "label": "{{msg.topic}}", "format": "{{value}}", "min": 0, "max": "3", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 860, "y": 160, "wires": [] }, { "id": "693cdd2b.031ff4", "type": "ui_gauge", "z": "272d507b.b4cb2", "name": "Roggen", "group": "5a92396f.316998", "order": 10, "width": 5, "height": 4, "gtype": "donut", "title": "", "label": "{{msg.topic}}", "format": "{{value}}", "min": 0, "max": "3", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 860, "y": 200, "wires": [] }, { "id": "2873c547.850c4a", "type": "ui_gauge", "z": "272d507b.b4cb2", "name": "Esche", "group": "5a92396f.316998", "order": 7, "width": 5, "height": 4, "gtype": "donut", "title": "", "label": "{{msg.topic}}", "format": "{{value}}", "min": 0, "max": "3", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 850, "y": 240, "wires": [] }, { "id": "6cd69e5b.c6769", "type": "ui_gauge", "z": "272d507b.b4cb2", "name": "Hasel", "group": "5a92396f.316998", "order": 9, "width": 5, "height": 4, "gtype": "donut", "title": "", "label": "{{msg.topic}}", "format": "{{value}}", "min": 0, "max": "3", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 850, "y": 280, "wires": [] }, { "id": "c1e4d90a.c15bd8", "type": "ui_gauge", "z": "272d507b.b4cb2", "name": "Beifuß", "group": "5a92396f.316998", "order": 4, "width": 5, "height": 4, "gtype": "donut", "title": "", "label": "{{msg.topic}}", "format": "{{value}}", "min": 0, "max": "3", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 850, "y": 320, "wires": [] }, { "id": "bbb1722d.4b163", "type": "ui_gauge", "z": "272d507b.b4cb2", "name": "Birke", "group": "5a92396f.316998", "order": 5, "width": 5, "height": 4, "gtype": "donut", "title": "", "label": "{{msg.topic}}", "format": "{{value}}", "min": 0, "max": "3", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 850, "y": 360, "wires": [] }, { "id": "aa242a9f.a99d08", "type": "ui_multistate_switch", "z": "272d507b.b4cb2", "name": "", "group": "5a92396f.316998", "order": 2, "width": 0, "height": 0, "label": "wann", "options": [ { "label": "aktuell", "value": "today", "valueType": "str" }, { "label": "morgen", "value": "tomorrow", "valueType": "str" }, { "label": "übermorgen", "value": "dayafter_to", "valueType": "str" } ], "x": 150, "y": 180, "wires": [ [ "d6a8193e.475ca8" ] ] }, { "id": "d6a8193e.475ca8", "type": "change", "z": "272d507b.b4cb2", "name": "", "rules": [ { "t": "set", "p": "wann", "pt": "msg", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 180, "y": 220, "wires": [ [ "2ea2d59f.026bfa" ] ] }, { "id": "a99f70d8.cf39a", "type": "change", "z": "272d507b.b4cb2", "name": "Set default", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "today", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 170, "y": 140, "wires": [ [ "aa242a9f.a99d08" ] ] }, { "id": "3f7561ee.26d04e", "type": "function", "z": "272d507b.b4cb2", "name": "Erle", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Erle.today;\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;\n} else {\n if (msg.payload === \"1-2\"){\n msg.payload = 1.5;\n} else {if (msg.payload === \"2-3\"){\n msg.payload = 2.5;\n} else {\n return [msg];\n}}}\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 450, "y": 540, "wires": [ [ "5329f12.575f11", "a60b7111.9713b" ] ] }, { "id": "70cc09ea.1e01b8", "type": "function", "z": "272d507b.b4cb2", "name": "Ambrosia", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Ambrosia.today;\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;\n} else {\n if (msg.payload === \"1-2\"){\n msg.payload = 1.5;\n} else {if (msg.payload === \"2-3\"){\n msg.payload = 2.5;\n} else {\n return [msg];\n}}} \n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 460, "y": 580, "wires": [ [ "5329f12.575f11", "a60b7111.9713b" ] ] }, { "id": "a1a97bdc.7ebeb8", "type": "function", "z": "272d507b.b4cb2", "name": "Roggen", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Roggen.today;\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;\n} else {\n if (msg.payload === \"1-2\"){\n msg.payload = 1.5;\n} else {if (msg.payload === \"2-3\"){\n msg.payload = 2.5;\n} else {\n return [msg];\n}}} \n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 460, "y": 620, "wires": [ [ "5329f12.575f11", "a60b7111.9713b" ] ] }, { "id": "aee7ccff.56c4d", "type": "function", "z": "272d507b.b4cb2", "name": "Esche", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Esche.today;\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;\n} else {\n if (msg.payload === \"1-2\"){\n msg.payload = 1.5;\n} else {if (msg.payload === \"2-3\"){\n msg.payload = 2.5;\n} else {\n return [msg];\n}}}\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 450, "y": 660, "wires": [ [ "5329f12.575f11", "a60b7111.9713b" ] ] }, { "id": "4bd8c089.e1078", "type": "function", "z": "272d507b.b4cb2", "name": "Hasel", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Hasel.today;\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;\n} else {\n if (msg.payload === \"1-2\"){\n msg.payload = 1.5;\n} else {if (msg.payload === \"2-3\"){\n msg.payload = 2.5;\n} else {\n return [msg];\n}}} \n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 450, "y": 700, "wires": [ [ "5329f12.575f11", "a60b7111.9713b" ] ] }, { "id": "c74ffe45.19b17", "type": "function", "z": "272d507b.b4cb2", "name": "Beifuß", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Beifuss.today;\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;\n} else {\n if (msg.payload === \"1-2\"){\n msg.payload = 1.5;\n} else {if (msg.payload === \"2-3\"){\n msg.payload = 2.5;\n} else {\n return [msg];\n}}} \n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 450, "y": 740, "wires": [ [ "5329f12.575f11", "a60b7111.9713b" ] ] }, { "id": "8bf41a0f.3ad158", "type": "function", "z": "272d507b.b4cb2", "name": "Birke", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Birke.today;\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;\n} else {\n if (msg.payload === \"1-2\"){\n msg.payload = 1.5;\n} else {if (msg.payload === \"2-3\"){\n msg.payload = 2.5;\n} else {\n return [msg];\n}}} \n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 450, "y": 780, "wires": [ [ "5329f12.575f11", "a60b7111.9713b" ] ] }, { "id": "52c3ae3d.9e146", "type": "function", "z": "272d507b.b4cb2", "name": "Gräser", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Graeser.today;\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;\n} else {\n if (msg.payload === \"1-2\"){\n msg.payload = 1.5;\n} else {if (msg.payload === \"2-3\"){\n msg.payload = 2.5;\n} else {\n return [msg];\n}}}\n\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 450, "y": 500, "wires": [ [ "5329f12.575f11", "a60b7111.9713b" ] ] }, { "id": "5329f12.575f11", "type": "ui_chart", "z": "272d507b.b4cb2", "name": "", "group": "5a92396f.316998", "order": 11, "width": 0, "height": 0, "label": "Historie", "chartType": "line", "legend": "true", "xformat": "DD.MM", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "removeOlder": "52", "removeOlderPoints": "365", "removeOlderUnit": "604800", "cutout": 0, "useOneColor": false, "useUTC": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "outputs": 1, "useDifferentColor": false, "x": 860, "y": 640, "wires": [ [] ] }, { "id": "cced5160.d9868", "type": "rbe", "z": "272d507b.b4cb2", "name": "", "func": "rbei", "gap": "", "start": "", "inout": "out", "property": "payload.last_update", "x": 150, "y": 620, "wires": [ [ "52c3ae3d.9e146", "3f7561ee.26d04e", "70cc09ea.1e01b8", "a1a97bdc.7ebeb8", "aee7ccff.56c4d", "4bd8c089.e1078", "c74ffe45.19b17", "8bf41a0f.3ad158" ] ] }, { "id": "c3735eea.6b311", "type": "function", "z": "272d507b.b4cb2", "name": "Erle", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Erle[msg.wann];\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;} \nelse if (msg.payload === \"1-2\"){\n msg.payload = 1.5;}\nelse if (msg.payload === \"2-3\"){\n msg.payload = 2.5;} \nelse if (msg.payload === \"-1\"){\n msg.payload = \"nur freitags\";} \nelse {\n return [msg];}\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 450, "y": 120, "wires": [ [ "4078faa2.060644" ] ] }, { "id": "2ae26a21.36f266", "type": "function", "z": "272d507b.b4cb2", "name": "Ambrosia", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Ambrosia[msg.wann];\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;} \nelse if (msg.payload === \"1-2\"){\n msg.payload = 1.5;}\nelse if (msg.payload === \"2-3\"){\n msg.payload = 2.5;} \nelse if (msg.payload === \"-1\"){\n msg.payload = \"nur freitags\";} \nelse {\n return [msg];}\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 460, "y": 160, "wires": [ [ "4078faa2.060644" ] ] }, { "id": "6fe7b70d.7e0648", "type": "function", "z": "272d507b.b4cb2", "name": "Roggen", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Roggen[msg.wann];\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;} \nelse if (msg.payload === \"1-2\"){\n msg.payload = 1.5;}\nelse if (msg.payload === \"2-3\"){\n msg.payload = 2.5;} \nelse if (msg.payload === \"-1\"){\n msg.payload = \"nur freitags\";} \nelse {\n return [msg];}\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 460, "y": 200, "wires": [ [ "4078faa2.060644" ] ] }, { "id": "e926f958.5ce6d8", "type": "function", "z": "272d507b.b4cb2", "name": "Esche", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Esche[msg.wann];\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;} \nelse if (msg.payload === \"1-2\"){\n msg.payload = 1.5;}\nelse if (msg.payload === \"2-3\"){\n msg.payload = 2.5;} \nelse if (msg.payload === \"-1\"){\n msg.payload = \"nur freitags\";} \nelse {\n return [msg];}\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 450, "y": 240, "wires": [ [ "4078faa2.060644" ] ] }, { "id": "ac576055.80835", "type": "function", "z": "272d507b.b4cb2", "name": "Hasel", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Hasel[msg.wann];\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;} \nelse if (msg.payload === \"1-2\"){\n msg.payload = 1.5;}\nelse if (msg.payload === \"2-3\"){\n msg.payload = 2.5;} \nelse if (msg.payload === \"-1\"){\n msg.payload = \"nur freitags\";} \nelse {\n return [msg];}\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 450, "y": 280, "wires": [ [ "4078faa2.060644" ] ] }, { "id": "80681b8a.b2d808", "type": "function", "z": "272d507b.b4cb2", "name": "Beifuß", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Beifuss[msg.wann];\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;} \nelse if (msg.payload === \"1-2\"){\n msg.payload = 1.5;}\nelse if (msg.payload === \"2-3\"){\n msg.payload = 2.5;} \nelse if (msg.payload === \"-1\"){\n msg.payload = \"nur freitags\";} \nelse {\n return [msg];}\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 450, "y": 320, "wires": [ [ "4078faa2.060644" ] ] }, { "id": "d5449bf3.22a788", "type": "function", "z": "272d507b.b4cb2", "name": "Birke", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Birke[msg.wann];\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;} \nelse if (msg.payload === \"1-2\"){\n msg.payload = 1.5;}\nelse if (msg.payload === \"2-3\"){\n msg.payload = 2.5;} \nelse if (msg.payload === \"-1\"){\n msg.payload = \"nur freitags\";} \nelse {\n return [msg];}\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 450, "y": 360, "wires": [ [ "4078faa2.060644" ] ] }, { "id": "fc95d953.765138", "type": "function", "z": "272d507b.b4cb2", "name": "Gräser", "func": "msg.topic = node.name; \nmsg.payload = msg.payload.content[msg.select].Pollen.Graeser[msg.wann];\nif (msg.payload === \"0-1\"){\n msg.payload = 0.5;} \nelse if (msg.payload === \"1-2\"){\n msg.payload = 1.5;}\nelse if (msg.payload === \"2-3\"){\n msg.payload = 2.5;} \nelse if (msg.payload === \"-1\"){\n msg.payload = \"nur freitags\";} \nelse {\n return [msg];}\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 450, "y": 80, "wires": [ [ "4078faa2.060644" ] ] }, { "id": "a60b7111.9713b", "type": "ui_chart", "z": "272d507b.b4cb2", "name": "", "group": "5a92396f.316998", "order": 12, "width": "0", "height": "0", "label": "chart", "chartType": "horizontalBar", "legend": "false", "xformat": "DD.MM", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "0", "ymax": "3", "removeOlder": "52", "removeOlderPoints": "365", "removeOlderUnit": "604800", "cutout": 0, "useOneColor": false, "useUTC": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "outputs": 1, "useDifferentColor": false, "x": 850, "y": 600, "wires": [ [] ] }, { "id": "5a92396f.316998", "type": "ui_group", "name": "POLLEN", "tab": "3b8d5a1f.cd0126", "order": 3, "disp": true, "width": "10", "collapse": false }, { "id": "3b8d5a1f.cd0126", "type": "ui_tab", "name": "Wetter", "icon": "wb_sunny", "order": 6, "disabled": false, "hidden": false } ]

@sschuste
Copy link
Author

sschuste commented Mar 7, 2021

Ja geil, super Sache. Hab ich mir sofort geschnappt. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment