'Get the monitored data from the charger.'

def update(self):

    try:
        if (self.type == 'status'):
            self._state = self.charger.getStatus()
        elif (self.type == 'charge_time'):
            self._state = (self.charger.getChargeTimeElapsed() / 60)
        elif (self.type == 'ambient_temp'):
            self._state = self.charger.getAmbientTemperature()
        elif (self.type == 'ir_temp'):
            self._state = self.charger.getIRTemperature()
        elif (self.type == 'rtc_temp'):
            self._state = self.charger.getRTCTemperature()
        elif (self.type == 'usage_session'):
            self._state = (float(self.charger.getUsageSession()) / 1000)
        elif (self.type == 'usage_total'):
            self._state = (float(self.charger.getUsageTotal()) / 1000)
        else:
            self._state = 'Unknown'
    except (RequestException, ValueError, KeyError):
        _LOGGER.warning('Could    not    update    status    for    %s', self.name)
