Change device attribute information from Piston


#1

1) Give a description of the problem
Do not remember how to send information from Piston to one of the virtual devices in Hubitat.

2) What is the expected behaviour?
Send information and information updates on one of the virtual devices attributes

3) What is happening/not happening?
Nothing because cannot remember how to send information from Piston to device

image

I have a complete blackout. I have built this kind of Piston before but haven’t used it and removed it long time ago. Anyway I’m trying to build a piston that calculates washing machine energy * euro and then sends “energy_times_cost” to one of the attributes on virtual device that I created.

image

I would use “variable” or “energy” but how do I make that happen in piston so that 60.68 would be printed out as “Variable: 60.68”?


#3

attributes for a device are set by the device. In many devices sending a command can have the ‘side-effect’ of change a device attribute.

For example, changing a thermostats setpoint, will typically result in the attribute setPoint being changed.

It does depend on the device on what happens here. Of course custom devices can do whatever they want.


#4

I just do not remember…this is killing me :smiley:

I still have old ■■■■ left to pistons and virtual devices.
image

I was able to send “Ei käynnissä” from piston to that particual virtual device so that it changed attribute “variable” to “Ei käynnissä”.
I also have left old stuff to pistons:
image
…but it’s missing the part how to send that text from piston to virtual device.


#5

okey I got it.
image

It is just empty variable and when its sent out to device it will update variable to whatever it says.

image

Now I have to figure out how to print that energy_times_cost to that part. I’m slowly getting there… :slight_smile:

EDIT: and now it is working.