'Get the latest state of the sensor.'

def update(self):

    data = ecobee.NETWORK
    data.update()
    for sensor in data.ecobee.get_remote_sensors(self.index):
        for item in sensor['capability']:
            if ((item['type'] == self.type) and (self.sensor_name == sensor['name'])):
                if ((self.type == 'temperature') and (item['value'] != 'unknown')):
                    self._state = (float(item['value']) / 10)
                else:
                    self._state = item['value']
