Hi,
I don’t know, if it is possible to access the state of an entity directly in a change node, but you can use a current-state node in front of it.
Node Red sample flow
[{"id":"5806547d.b1e2b4","type":"api-current-state","z":"712b83e.e4801fc","name":"Read Sensor","server":"90f84041.e17b8","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.dwd_weather_warnings_current_warning_level","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":330,"y":300,"wires":[["c099337e.e69d28"]]},{"id":"93d4eea3.ea51f8","type":"debug","z":"712b83e.e4801fc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":300,"wires":[]},{"id":"4680f7ae.6628b8","type":"inject","z":"712b83e.e4801fc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":300,"wires":[["5806547d.b1e2b4"]]},{"id":"c099337e.e69d28","type":"change","z":"712b83e.e4801fc","name":"","rules":[{"t":"set","p":"region","pt":"msg","to":"data.attributes.region_name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":300,"wires":[["93d4eea3.ea51f8"]]},{"id":"90f84041.e17b8","type":"server","name":"Home Assistant","addon":true}]
The example is for “region_name” attribute, because there is no attribute description, but maybe it appears only, if there is a warning? Be sure to replace the entity id in the current-state node named “Read Sensor” with your correct entity id.