How do i set favorite speed in node-red for xiaomi air purifier.
Since i’m using EU version and EU server it lacks automotion in app. I want to set favorite level based on AQI level i can extract aqi level and speed but how do I set speed ?
My current automotion:
[{"id":"16ba5014.5977c","type":"server-events","z":"62680cb3.8eee74","name":"","server":"db5e6215.95c2","event_type":"","x":115.5,"y":206,"wires":[["8f4df04.c4ea91"]]},{"id":"8f4df04.c4ea91","type":"switch","z":"62680cb3.8eee74","name":"","property":"payload.entity_id","propertyType":"msg","rules":[{"t":"eq","v":"fan.air_purifier","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":262,"y":203,"wires":[["929cca32.09a5c8"]]},{"id":"929cca32.09a5c8","type":"switch","z":"62680cb3.8eee74","name":"","property":"payload.event.new_state.attributes.aqi","propertyType":"msg","rules":[{"t":"lt","v":"30","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":398,"y":212,"wires":[["c5352919.860658","154d0145.b808cf"]]},{"id":"c5352919.860658","type":"api-call-service","z":"62680cb3.8eee74","name":"","server":"db5e6215.95c2","version":1,"service_domain":"homeassistant","service":"update_entity","entityId":"fan.air.purifier","data":"{\"level\":1}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":651.5,"y":258,"wires":[[]]},{"id":"154d0145.b808cf","type":"debug","z":"62680cb3.8eee74","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":580,"y":181,"wires":[]},{"id":"db5e6215.95c2","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]