Thanks for your creative suggestion For some reason, it still doesn’t work. I send the message to the output, but msg.lux_entity is an empty string. It’s as if the settings aren’t there. I triple-checked for typos but everything looks fine. This is the flow I’m testing with:
[{"id":"c1a182a1.99598","type":"subflow","name":"TestLuxEntity","info":"","category":"","in":[{"x":50,"y":30,"wires":[{"id":"f8a802dc.73e25"}]}],"out":[{"x":600,"y":60,"wires":[{"id":"76221184.d60eb","port":0}]}],"env":[{"name":"lux_enitity","type":"str","value":"defValue"}],"meta":{},"color":"#DDAA99"},{"id":"76221184.d60eb","type":"api-current-state","z":"c1a182a1.99598","name":"","server":"9679e544.6229a8","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"{{lux_entity}}","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":420,"y":40,"wires":[[]]},{"id":"f8a802dc.73e25","type":"change","z":"c1a182a1.99598","name":"","rules":[{"t":"set","p":"lux_entity","pt":"msg","to":"lux_entity","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":190,"y":40,"wires":[["76221184.d60eb"]]},{"id":"9679e544.6229a8","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"7b32a410.c40f6c","type":"debug","z":"e02c5e58.56078","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":710,"y":2040,"wires":[]},{"id":"fa052628.f13848","type":"inject","z":"e02c5e58.56078","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":370,"y":2040,"wires":[["8f131613.565518"]]},{"id":"8f131613.565518","type":"subflow:c1a182a1.99598","z":"e02c5e58.56078","name":"","env":[{"name":"lux_enitity","value":"sensor.hal_lux","type":"str"}],"x":540,"y":2040,"wires":[["7b32a410.c40f6c"]]}]