'Return the state attributes of the device.'

@property
def device_state_attributes(self):

    attrs = {}
    if (self.data.has_powermeter and (self.data.current_consumption != STATE_UNKNOWN) and (self.data.total_consumption != STATE_UNKNOWN)):
        attrs[ATTR_CURRENT_CONSUMPTION] = '{:.1f}'.format(self.data.current_consumption)
        attrs[ATTR_CURRENT_CONSUMPTION_UNIT] = '{}'.format(ATTR_CURRENT_CONSUMPTION_UNIT_VALUE)
        attrs[ATTR_TOTAL_CONSUMPTION] = '{:.3f}'.format(self.data.total_consumption)
        attrs[ATTR_TOTAL_CONSUMPTION_UNIT] = '{}'.format(ATTR_TOTAL_CONSUMPTION_UNIT_VALUE)
    if (self.data.has_temperature and (self.data.temperature != STATE_UNKNOWN)):
        attrs[ATTR_TEMPERATURE] = '{}'.format(self.units.temperature(self.data.temperature, TEMP_CELSIUS))
        attrs[ATTR_TEMPERATURE_UNIT] = '{}'.format(self.units.temperature_unit)
    return attrs
