Musisz sobie dodać node debug zmienić opcje debugowania na kompletna wiadomość

Wtedy w oknie debugowania będziesz miał kompletną wiadomość z encji wraz z atrybutami
Rozwijasz interesujące cię atrybuty, po najechaniu wskaźnikiem wyświetla ci się 3 małe ikonki

klikasz copy path i filtrujesz sobie to nodem switch

Można również napisać funkcje
Tu jest przykład z użyciem funkcji, nie sprawdzałem.
https://www.reddit.com/r/homeassistant/comments/e7rxu4/newbie_question_how_to_get_state_attributes_in/
Nodered :
[{"id":"b7083727.0e7be8","type":"function","z":"8391625f.bea6b8","name":"temp","func":"\nvar temp= msg.data.attributes.temperature;\nvar target = 10;\n\nif(flow.get(stopPoll)){ //don't let any more \n msg.payload = \"haltPoll\"\n}\nelse{\n if(target-temp > 1 ){\n flow.set(diff, target-temp);\n flow.set(stopPoll, true);\n }\n else{\n //stop everything if the temp is within spec \n msg.payload = \"stop\"\n flow.set(stopPoll, false);\n }\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"x":330,"y":260,"wires":[["f12d224c.88be28"]]},{"id":"408eae98.36eb7","type":"poll-state","z":"8391625f.bea6b8","name":"","server":"9981860d.dc4f4","version":1,"updateinterval":"1","updateIntervalUnits":"hours","outputinitially":false,"outputonchanged":false,"entity_id":"climate.living","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":120,"y":260,"wires":[["b7083727.0e7be8"]]},{"id":"ef2184eb.0a4f98","type":"stoptimer","z":"8391625f.bea6b8","duration":"30","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":660,"y":260,"wires":[["732dbf40.2186a8"],[]]},{"id":"732dbf40.2186a8","type":"api-current-state","z":"8391625f.bea6b8","name":"get temp","server":"9981860d.dc4f4","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"climate.living","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":860,"y":260,"wires":[["da8e114a.b1c8e"]]},{"id":"193816d.4cc08e9","type":"switch","z":"8391625f.bea6b8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"boiler failed","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1110,"y":260,"wires":[[]]},{"id":"da8e114a.b1c8e","type":"function","z":"8391625f.bea6b8","name":"temp","func":"var temp = msg.data.attributes.temperature;\nvar target = 10;\n\n//if((target-temp) > flow.get(diff)){\nif(true ){\n msg.payload = \"boiler failed\"\n}\nelse{\n msg.payload = \"getting better\"\n}\n\nflow.set(stopPoll, false);\nreturn msg;\n\n","outputs":1,"noerr":0,"x":990,"y":260,"wires":[["193816d.4cc08e9"]]},{"id":"f12d224c.88be28","type":"switch","z":"8391625f.bea6b8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"neq","v":"haltPoll","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":260,"wires":[["ef2184eb.0a4f98"]]},{"id":"9981860d.dc4f4","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]