power method
override
Get the power (watts)
var power = await myPowerSensor.power();
For more information, see Power Sensor component.
Implementation
@override
Future<double> power({Map<String, dynamic>? extra}) async {
final request = GetPowerRequest()
..name = name
..extra = extra?.toStruct() ?? Struct();
final response = await client.getPower(request);
return response.watts;
}