<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_temperature(self):
 """Get current temperature in celsius."""

        try:
            request = requests.get(
                '{}/temp'.format(self.resource), timeout=self.timeout, allow_redirects=False)
            self.temperature = request.json()['compensated']
            return self.temperature
        except requests.exceptions.ConnectionError:
            raise exceptions.MyStromConnectionError()
        except ValueError:
            raise exceptions.MyStromNotVersionTwoSwitch()