Mirror temperature sensor to virtual device

The following is the sample code. Copy the code and paste it into a text editor such as Notepad or even better Notepad++. Save the file with a name like Name.json

You can change the Name in the first line to what ever you want. You can change the refresh time in line 8. The 1st long string of numbers and letters is the Device ID for the target device which is your virtual temperature sensor. The 2nd long string of numbers and letters is the Device ID for the source device which is Qubino Flush 1. You can get the device ID numbers from the API Brower+ or my.smartthings.com

Save the file after editing and create your rule using the API Brower+. Go the Automations button, Rules button, Create Rules button, and follow the prompts.

{
  "name": "Freezer Temperature update every 5 minutes",
  "actions": [
        {
            "every": {
                "interval": {
                    "value": {
                        "integer": 5
                    },
                    "unit": "Minute"
                  },
			  "actions": [
						 {
						"command": {
						  "devices": [
							"f20f7564-9af4-4e68-991a-aa066c75bce1"
						  ],
						  "commands": [
							{
							  "component": "main",
							  "capability": "partyvoice23922.vtempset",
							  "command": "setvTemp",
							  "arguments": [
								{
								  "device": {
									"devices": [
									  "c344957b-2da8-452d-9e4c-f86569162240"
									],
									"component": "main",
									"capability": "temperatureMeasurement",
									"attribute": "temperature"
								  }
								}
							  ]
							}
						  ]
						}
					  }
					]
	         }
	     }
	]
}
2 Likes