Debian Codegraph @

plyer/facades/temperature.py

raw symbols SCIP
1 # coding=utf-8
2
3
4 class Temperature:
5 '''Temperature facade.
6
7 Temperature sensor is used to measure the ambient room temperature in
8 degrees Celsius (°C)
9 With method `enable` you can turn on temperature sensor and 'disable'
10 method stops the sensor.
11 Use property `temperature` to get ambient air temperature in degree C.
12
13 .. versionadded:: 1.2.5
14
15 Supported Platforms:: Android
16
17 '''
18
19 @property
20 def temperature(self):
21 '''Current air temperature in degree C.'''
22 return self._get_temperature()
23
24 def enable(self):
25 '''Enable temperature sensor.'''
26 self._enable()
27
28 def disable(self):
29 '''Disable temperature sensor.'''
30 self._disable()
31
32 # private
33
34 def _get_temperature(self, **kwargs):
35 raise NotImplementedError()
36
37 def _enable(self, **kwargs):
38 raise NotImplementedError()
39
40 def _disable(self, **kwargs):
41 raise NotImplementedError()