Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "2fe3cc0e.355e24",
- "type": "switch",
- "z": "37bfc263.794bfe",
- "name": "",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "eq",
- "v": "on",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "off",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "outputs": 2,
- "x": 290,
- "y": 900,
- "wires": [
- [
- "7009f041.04a2a"
- ],
- []
- ]
- },
- {
- "id": "4f0109b8.0b7a78",
- "type": "server-state-changed",
- "z": "37bfc263.794bfe",
- "name": "Kjøkkenknapp",
- "server": "768a91a6.ea7b8",
- "entityidfilter": "binary_sensor.switch_158d00016d7a5e",
- "haltifstate": "",
- "x": 150,
- "y": 900,
- "wires": [
- [
- "2fe3cc0e.355e24"
- ]
- ]
- },
- {
- "id": "7009f041.04a2a",
- "type": "api-current-state",
- "z": "37bfc263.794bfe",
- "name": "Vær",
- "server": "768a91a6.ea7b8",
- "halt_if": "",
- "entity_id": "sensor.dark_sky_summary",
- "x": 450,
- "y": 920,
- "wires": [
- [
- "d4f56576.17dbb8"
- ]
- ]
- },
- {
- "id": "d4f56576.17dbb8",
- "type": "function",
- "z": "37bfc263.794bfe",
- "name": "Lagre",
- "func": "flow.set('weather_message','Det er nå ' + msg.payload.toLowerCase() + ' ');\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 550,
- "y": 840,
- "wires": [
- [
- "da7092c0.d2414"
- ]
- ]
- },
- {
- "id": "5d026f79.814cc",
- "type": "inject",
- "z": "37bfc263.794bfe",
- "name": "",
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "x": 280,
- "y": 940,
- "wires": [
- [
- "7009f041.04a2a"
- ]
- ]
- },
- {
- "id": "da7092c0.d2414",
- "type": "api-current-state",
- "z": "37bfc263.794bfe",
- "name": "Utetemp",
- "server": "768a91a6.ea7b8",
- "halt_if": "",
- "entity_id": "sensor.dark_sky_temperature",
- "x": 620,
- "y": 920,
- "wires": [
- [
- "cc905c73.9100f"
- ]
- ]
- },
- {
- "id": "cc905c73.9100f",
- "type": "function",
- "z": "37bfc263.794bfe",
- "name": "Lagre",
- "func": "flow.set('weather_message',flow.get('weather_message') + 'med ' + Math.round(parseFloat(msg.payload)) + ' grader. ');\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 690,
- "y": 840,
- "wires": [
- [
- "16350341.5596cd"
- ]
- ]
- },
- {
- "id": "16350341.5596cd",
- "type": "api-current-state",
- "z": "37bfc263.794bfe",
- "name": "Værmld",
- "server": "768a91a6.ea7b8",
- "halt_if": "",
- "entity_id": "sensor.dark_sky_hourly_summary",
- "x": 760,
- "y": 920,
- "wires": [
- [
- "9142393b.e21d08"
- ]
- ]
- },
- {
- "id": "9142393b.e21d08",
- "type": "function",
- "z": "37bfc263.794bfe",
- "name": "Lagre",
- "func": "flow.set('weather_message',flow.get('weather_message') + 'Her er dagens værvarsel: ' + msg.payload + ' ');\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 850,
- "y": 840,
- "wires": [
- [
- "1bbab5b9.f71eda"
- ]
- ]
- },
- {
- "id": "1bbab5b9.f71eda",
- "type": "api-current-state",
- "z": "37bfc263.794bfe",
- "name": "Lavest temp",
- "server": "768a91a6.ea7b8",
- "halt_if": "",
- "entity_id": "sensor.dark_sky_daily_low_temperature",
- "x": 930,
- "y": 920,
- "wires": [
- [
- "ef58a07a.45c17"
- ]
- ]
- },
- {
- "id": "ef58a07a.45c17",
- "type": "function",
- "z": "37bfc263.794bfe",
- "name": "Lagre",
- "func": "flow.set('weather_message',flow.get('weather_message') + 'Lavest temperatur ' + Math.round(parseFloat(msg.payload)) + ' grader ');\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 1030,
- "y": 840,
- "wires": [
- [
- "31ebb895.e7bff8"
- ]
- ]
- },
- {
- "id": "31ebb895.e7bff8",
- "type": "api-current-state",
- "z": "37bfc263.794bfe",
- "name": "Høy. temp",
- "server": "768a91a6.ea7b8",
- "halt_if": "",
- "entity_id": "sensor.dark_sky_daily_high_temperature",
- "x": 1110,
- "y": 920,
- "wires": [
- [
- "1ede5db4.10fa42"
- ]
- ]
- },
- {
- "id": "1ede5db4.10fa42",
- "type": "function",
- "z": "37bfc263.794bfe",
- "name": "Lagre",
- "func": "flow.set('weather_message',flow.get('weather_message') + 'og høyest ' + Math.round(parseFloat(msg.payload)) + ' grader. ');\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 1210,
- "y": 840,
- "wires": [
- [
- "a34420b2.2f255"
- ]
- ]
- },
- {
- "id": "a34420b2.2f255",
- "type": "api-current-state",
- "z": "37bfc263.794bfe",
- "name": "Nedbør?",
- "server": "768a91a6.ea7b8",
- "halt_if": "",
- "entity_id": "sensor.dark_sky_precip_probability",
- "x": 1260,
- "y": 920,
- "wires": [
- [
- "5e25cde2.fe0264"
- ]
- ]
- },
- {
- "id": "5e25cde2.fe0264",
- "type": "function",
- "z": "37bfc263.794bfe",
- "name": "Lagre",
- "func": "flow.set('weather_message',flow.get('weather_message') + 'Det er ' + Math.round(parseFloat(msg.payload)) + ' prosent sjanse for nedbør i dag. ');\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 1370,
- "y": 840,
- "wires": [
- [
- "675f450e.3f258c"
- ]
- ]
- },
- {
- "id": "675f450e.3f258c",
- "type": "change",
- "z": "37bfc263.794bfe",
- "name": "Format",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "{}",
- "tot": "json"
- },
- {
- "t": "set",
- "p": "payload.data",
- "pt": "msg",
- "to": "{}",
- "tot": "json"
- },
- {
- "t": "set",
- "p": "payload.data.message",
- "pt": "msg",
- "to": "weather_message",
- "tot": "flow"
- },
- {
- "t": "set",
- "p": "payload.data.delay",
- "pt": "msg",
- "to": "00:00:20",
- "tot": "str"
- },
- {
- "t": "set",
- "p": "payload.data.volume",
- "pt": "msg",
- "to": "0.4",
- "tot": "str"
- },
- {
- "t": "set",
- "p": "payload.data.sonos_entity",
- "pt": "msg",
- "to": "media_player.kitchen",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 1680,
- "y": 920,
- "wires": [
- [
- "a63230b8.1b2d7"
- ]
- ]
- },
- {
- "id": "a63230b8.1b2d7",
- "type": "api-call-service",
- "z": "37bfc263.794bfe",
- "name": "Sonos say",
- "server": "768a91a6.ea7b8",
- "service_domain": "script",
- "service": "sonos_say",
- "data": "{}",
- "x": 1830,
- "y": 920,
- "wires": [
- []
- ]
- },
- {
- "id": "768a91a6.ea7b8",
- "type": "server",
- "z": "",
- "name": "Home Assistant",
- "url": "https://myhaserver:8123",
- "pass": "my pass"
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement