Lüfter Dasboard 2

For the future, please post flows inline, it is much easier then to copy it. See this post for more details - How to share code or flow json

For others finding this, here it is

[
    {
        "id": "e19031902fb31d65",
        "type": "tab",
        "label": "Test Lüfter",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "de27dbcd5b8dc223",
        "type": "debug",
        "z": "e19031902fb31d65",
        "name": "Zustand",
        "active": false,
        "tosidebar": false,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 1160,
        "y": 260,
        "wires": []
    },
    {
        "id": "0e6cf6b90d87062a",
        "type": "ui-template",
        "z": "e19031902fb31d65",
        "group": "38b5cd254674a4de",
        "page": "",
        "ui": "",
        "name": "Ventilator-Symbol",
        "order": 4,
        "width": "0",
        "height": "0",
        "head": "",
        "format": "<div style=\"width: 80px; height: 80px;\">\n    <style>\n        .rotating {\n            animation: rotate 2s linear infinite;\n        }\n\n        @keyframes rotate {\n            from {\n                transform: rotate(0deg);\n            }\n\n            to {\n                transform: rotate(360deg);\n            }\n        }\n    </style>\n    <svg viewBox=\"0 0 360 360\" style=\"width: 80%; height: 80%;\" class=\"rotating\">\n        <path style=\"fill: {{msg.color}};\"\n            d=\"M 163.00,3.87 C 172.05,6.13 181.92,7.37 188.96,14.10 201.20,25.82 197.64,38.32 196.17,53.00 196.17,53.00 188.84,120.00 188.84,120.00 188.84,120.00 185.26,137.00 185.26,137.00 185.40,140.88 189.22,144.48 191.23,151.00 193.58,158.64 192.59,164.52 193.60,166.78 194.94,169.77 199.13,170.44 202.00,171.34 202.00,171.34 226.00,178.57 226.00,178.57 226.00,178.57 271.00,191.00 271.00,191.00 278.21,193.38 287.22,196.72 292.53,202.30 299.34,209.45 301.11,218.51 301.00,228.00 300.93,233.39 300.02,237.11 297.67,242.00 295.13,247.29 289.11,253.57 285.07,258.00 274.68,269.40 268.78,274.19 253.00,274.00 238.83,273.83 223.18,259.30 212.00,251.15 212.00,251.15 170.00,220.11 170.00,220.11 161.60,213.60 161.38,209.94 157.90,208.02 155.00,206.42 148.60,207.21 145.00,206.83 137.69,206.05 131.47,202.81 130.28,202.57 127.06,201.93 124.16,205.09 122.00,207.09 122.00,207.09 107.00,221.91 107.00,221.91 107.00,221.91 80.00,247.01 80.00,247.01 68.72,258.02 57.57,271.02 40.00,269.68 17.95,267.99 11.09,255.30 5.58,236.00 3.53,228.81 2.04,225.67 2.00,218.00 1.98,214.39 1.80,210.49 2.79,207.00 7.76,189.52 26.90,184.04 42.00,178.00 42.00,178.00 93.00,155.86 93.00,155.86 93.00,155.86 110.79,150.40 110.79,150.40 113.99,148.01 114.95,143.25 119.33,138.00 124.14,132.24 128.56,130.49 130.57,127.82 132.80,124.69 131.47,121.40 130.57,118.00 130.57,118.00 125.87,98.00 125.87,98.00 125.87,98.00 119.35,71.00 119.35,71.00 114.09,48.10 102.25,18.68 130.00,4.81 134.10,2.76 136.59,2.26 141.00,1.44 148.96,0.42 155.33,1.96 163.00,3.87 Z M 173.28,103.00 C 173.28,103.00 178.17,58.00 178.17,58.00 178.75,52.17 181.51,37.77 180.01,33.00 177.45,24.86 171.19,23.93 164.00,22.13 152.31,19.20 138.60,14.37 131.44,28.00 127.22,36.04 132.03,48.63 134.13,57.00 134.13,57.00 144.88,102.00 144.88,102.00 144.88,102.00 150.00,124.00 150.00,124.00 159.52,124.01 160.17,124.49 169.00,128.00 172.54,119.55 172.23,111.77 173.28,103.00 Z M 127.19,167.00 C 128.30,180.42 140.27,191.62 154.00,189.70 157.28,189.24 161.15,188.09 164.00,186.39 186.34,173.03 175.22,139.23 147.00,140.37 135.98,142.93 126.23,155.48 127.19,167.00 Z M 70.00,185.28 C 70.00,185.28 38.00,199.14 38.00,199.14 32.59,201.53 25.10,204.29 21.21,209.04 17.43,214.23 19.37,220.32 21.21,226.00 24.00,236.46 26.83,250.33 40.00,251.81 48.65,252.79 54.03,246.58 60.00,241.42 60.00,241.42 80.00,222.01 80.00,222.01 80.00,222.01 99.00,204.00 99.00,204.00 99.00,204.00 109.00,194.17 109.00,194.17 110.80,192.52 113.86,190.32 114.60,187.96 114.60,187.96 110.00,169.00 110.00,169.00 100.67,170.90 80.07,180.94 70.00,185.28 Z M 178.34,200.99 C 179.23,204.46 191.62,213.39 195.00,215.85 195.00,215.85 238.00,246.87 238.00,246.87 242.86,250.52 250.54,257.42 257.00,256.38 262.74,255.45 267.81,249.17 271.42,245.00 279.93,235.18 291.25,224.99 276.96,213.53 271.04,208.78 257.65,206.05 250.00,203.86 250.00,203.86 210.00,192.00 210.00,192.00 204.49,190.41 195.38,186.95 190.04,186.92 186.67,188.42 177.31,197.00 178.34,200.99 Z\" />\n    </svg>\n</div>",
        "storeOutMessages": true,
        "passthru": true,
        "resendOnRefresh": true,
        "templateScope": "local",
        "className": "",
        "x": 950,
        "y": 260,
        "wires": [
            [
                "de27dbcd5b8dc223"
            ]
        ]
    },
    {
        "id": "c1e0871ef8d26d3f",
        "type": "inject",
        "z": "e19031902fb31d65",
        "name": "Ein",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "Ein",
        "payloadType": "str",
        "x": 390,
        "y": 240,
        "wires": [
            [
                "508260cca3a6942f"
            ]
        ]
    },
    {
        "id": "e47f3489df445b7d",
        "type": "inject",
        "z": "e19031902fb31d65",
        "name": "Aus",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "Aus",
        "payloadType": "str",
        "x": 390,
        "y": 280,
        "wires": [
            [
                "508260cca3a6942f"
            ]
        ]
    },
    {
        "id": "508260cca3a6942f",
        "type": "change",
        "z": "e19031902fb31d65",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload.class",
                "pt": "msg",
                "to": "rotating",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 670,
        "y": 260,
        "wires": [
            [
                "0e6cf6b90d87062a",
                "b7de13d3e073c016"
            ]
        ]
    },
    {
        "id": "b7de13d3e073c016",
        "type": "debug",
        "z": "e19031902fb31d65",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 960,
        "y": 380,
        "wires": []
    },
    {
        "id": "38b5cd254674a4de",
        "type": "ui-group",
        "name": "Lüfter Wr. Schrank Handbetrieb",
        "page": "6159669995343365",
        "width": "5",
        "height": "11",
        "order": 3,
        "showTitle": true,
        "className": "",
        "visible": "true",
        "disabled": "false",
        "groupType": "default"
    },
    {
        "id": "6159669995343365",
        "type": "ui-page",
        "name": "Visu Lüftersteuerung Wechselrichterschrank + Temperatur Logger Schaltschränke",
        "ui": "08ae0883f7a46568",
        "path": "/page1",
        "icon": "home",
        "layout": "flex",
        "theme": "c9f3473fae20b646",
        "breakpoints": [
            {
                "name": "Default",
                "px": "0",
                "cols": "3"
            },
            {
                "name": "Tablet",
                "px": "576",
                "cols": "6"
            },
            {
                "name": "Small Desktop",
                "px": "768",
                "cols": "9"
            },
            {
                "name": "Desktop",
                "px": "1024",
                "cols": "12"
            }
        ],
        "order": 1,
        "className": "",
        "visible": true,
        "disabled": false
    },
    {
        "id": "08ae0883f7a46568",
        "type": "ui-base",
        "name": "Mein Dashboard",
        "path": "/dashboard",
        "appIcon": "",
        "includeClientData": true,
        "acceptsClientConfig": [
            "ui-notification",
            "ui-control",
            "ui-led"
        ],
        "showPathInSidebar": false,
        "headerContent": "page",
        "navigationStyle": "default",
        "titleBarStyle": "default",
        "showReconnectNotification": true,
        "notificationDisplayTime": 1,
        "showDisconnectNotification": true,
        "allowInstall": false
    },
    {
        "id": "c9f3473fae20b646",
        "type": "ui-theme",
        "name": "Standardthema",
        "colors": {
            "surface": "#768983",
            "primary": "#e2fb97",
            "bgPage": "#a6b8a0",
            "groupBg": "#c1c100",
            "groupOutline": "#3e3e3e"
        },
        "sizes": {
            "density": "default",
            "pagePadding": "12px",
            "groupGap": "12px",
            "groupBorderRadius": "4px",
            "widgetGap": "12px"
        }
    },
    {
        "id": "f376d784b3ac6aef",
        "type": "global-config",
        "env": [],
        "modules": {
            "@flowfuse/node-red-dashboard": "1.30.2"
        }
    }
]

You have asked the change node to set msg.payload.class, but msg.payload is a string, which cannot have properties beneath it. Perhaps you meant to set msg.class.
Also you have set msg.payload in the inject nodes, but I don't see that being used in the template. The only property used seems to be msg.color.