Ale chyba chodzi o to, żeby tą “zmienną” podawać prosto z pulpitu. Załączam proste flow, kóre pobiera dane z pomocnika input_number.przyklad i zwraca liczbę calkowitą.
[{"id":"e52f842ccde0b8c8","type":"function","z":"ff702456051d2b8c","name":"","func":"let number = msg.payload;\nnumber = Number(number);\n\nmsg.payload = number;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":700,"y":560,"wires":[["46eb8c1906b995a6"]]},{"id":"a49ed3f5d83d8663","type":"api-current-state","z":"ff702456051d2b8c","name":"","server":"935df828.6f77d8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.przyklad","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":450,"y":560,"wires":[["e52f842ccde0b8c8"]]},{"id":"46eb8c1906b995a6","type":"debug","z":"ff702456051d2b8c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":870,"y":560,"wires":[]},{"id":"671bf2983906c038","type":"inject","z":"ff702456051d2b8c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":560,"wires":[["a49ed3f5d83d8663"]]},{"id":"935df828.6f77d8","type":"server","name":"Home Assistant Miras","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]