Copy value from one device to another (virtual) device

I have a illuminance sensor from Homematic IP which is implemented in Home assistant.
this works perfectly.
I have also Smart home leds (Smartlife) and i want to use the value from the sensor for controling those leds.
smartlife is also implemented in home assistant through Tuya IOT platform.
I made a Virtual sensor device in Tuya (smartlife) and i want to copy the value of the Homematic IP sensor to the virtual sensor from tuya. (this is not directly posible).
i’ve tryed this to do through node red aswell in directly home assistant, but whatever i do i can’t get it done.
can anyone help me with this?
(i’m not that farmiliar with home assistant, i just began using it. so if you explain it to me in home assitant, pls do this extensive).
thx
Peter

What is it is you actually want to do? It’s not clear what “copying” lux from an illuminance sensor over to another sensor means to you. Nor what you mean by a virtual sensor in smartlife (I think most people, like me, use Tuya Smart rather than smartlife). Explain what you want to end up with, rather than the problems you’re having along the way, as you might be doing it sub-optimally. For example, if the lux drops below a certain level, I want to turn a light on.

I have a Homematic IP light sensor and i want to copy the value of light (lux) into a virtual made device in smartlife.
this can not be done directly, because homematic doesn’t support it.
with me homematic IP only works in homeassistant, through homeassistant i can get the value into nodered, but i can’t get it back to the device in homeassistant (tuya iot)
i’ve tryed this to do in node red through tuya device, but wenn i uses tuya in node red, node red crashes. so that doesn’t work either.
my question is : “is it possible to do this in homeassistant itself?”

I use Tuya Smart rather than Smart Life, so I don’t really know what you mean by a virtual device there. However, Home Assistant reads the value of sensors from the device. Although you can “write” a value (eg. using Dev Tools), it is only updating HA, not the device. Next time HA reads the sensor, it will overwrite whatever you just wrote.

What’s the purpose of this virtual device in SmartLife? Can you just create a sensor in HA instead? For example a template sensor to calculate a value from the light sensor, or an MQTT sensor that Node Red can write a value to.

Note that as a general rule you’re better of using Tuya Smart rather than Smart Life. They’re both the same under the hood, but Tuya Smart is sort of like the base - all manufacturers that use Tuya’s software can be added into Tuya Smart. Whereas Smart Life is for Tuya-branded products, and another manufacturer will have their own equivalent app to Smart Life for their products. Therefore you end up with multiple apps on your phone.

there is no need for this anymore, i found it .
now the only problem is that it only works in homeassistant.
in homeassistant the value is there where i wanted it, but homeassistant doesn’t send it back to tuya.
i did a work around by giving the needed commands in homeassistant.
problem solved.

here the command to put the value through node red back to home assistant

for the record, the solving can by done directly in homeassistant without using node red, but what i wanted does not work with me. I wanted the value from the homematic IP illumination sensor (which i only could get in Homeassistant) put it in a virtual device smartlife (tuya iot).
what i did find , after long searching, a way to put a value from node red back into homeassistant.
this can be used for controle the existing devices (because this do works in homeassistant) (it only doesn’t work for virtual sensors)