def __init__(self, device_id, device):
        """Initalize temperature sensor."""
        self._temperature = device['state'].get('temperature')
        super().__init__(device_id, device)
        self._sensor_class = 'temperature'
        self._sensor_icon = 'mdi:thermometer'
        self._sensor_unit = '°C'
def __init__ ( self , device_id , device ) : self . _temperature = device [ 'state' ] . get ( 'temperature' ) super ( ) . __init__ ( device_id , device ) self . _sensor_class = 'temperature' self . _sensor_icon = 'mdi:thermometer' self . _sensor_unit = '°C'
Initalize temperature sensor.