func (sm *SMA) CurrentPower() (float64, error) {
	values, err := sm.hasValue()

	var power float64
	if sm.device.IsEnergyMeter() {
		power = sm.asFloat(values["active_power_plus"]) - sm.asFloat(values["active_power_minus"])
	} else {
		power = sm.asFloat(values["power_ac_total"])
	}

	return sm.scale * power, err
}
// CurrentPower implements the api.Meter interface
CurrentPower implements the api.Meter interface
// CurrentPower implements the api . Meter interface
func (sm *SMA) CurrentPower() (float64, error) {
	values, err := sm.hasValue()
	var power float64
	if sm.device.IsEnergyMeter() {
		power = sm.asFloat(values["active_power_plus"]) - sm.asFloat(values["active_power_minus"])
	} else {
		power = sm.asFloat(values["power_ac_total"])
	}
	return sm.scale * power, err
}
func ( sm * SMA ) CurrentPower ( ) ( float64 , error ) { values , err := sm . hasValue ( ) var power float64 if sm . device . IsEnergyMeter ( ) { power = sm . asFloat ( values [ " " ] ) - sm . asFloat ( values [ " " ] ) } else { power = sm . asFloat ( values [ " " ] ) } return sm . scale * power , err }
CurrentPower implements the api.Meter interface
CurrentPower implements the api . Meter interface