Cannot setCapabilityValue measure_temperature

I’ve created an App that adds a thermostat to Homey and I don’t seem to be able to change the value of measure_temperature capability. I have a temp sensor connected to Homey and want to show the current temperature in the thermostat.

I found this issue: Cannot update measure_temperature for Virtual Thermostate Device · Issue #65 · ArjanKranenburg/virtual-devices · GitHub
But it’s old and I can’t figure out how to make this setable…

You get errors? It’s not showing the correct temperature? Are you passing a correct value to it? What’s the code that you use?

Sorry, should have posted the code with it.
You did fix it, just by asking the question. It made me realise it should just work and it turns out I was using the wrong function call.

This in device.js works fine now:

'use strict';

const { Device } = require('homey');
const DeviceApi = require('./device-api');

class MyDevice extends Device {

    async onInit() {
         this.setCapabilityValue('measure_temperature', 13);

@robertklep: thanks !