'Return the state.'

@property
def state(self):

    state = None
    if (self.type == 'status'):
        state = self.device.getStatus()
    elif (self.type == 'temperature'):
        state = self.device.getTemperature()
    elif (self.type == 'voltage'):
        state = self.device.getVoltage()
    elif (self.type == 'amps'):
        state = self.device.getAmps()
    elif (self.type == 'watts'):
        state = self.device.getWatts()
    elif (self.type == 'charge_time'):
        state = self.device.getChargeTime()
    elif (self.type == 'energy_added'):
        state = self.device.getEnergyAdded()
    else:
        state = 'Unknown'
    return state
