TargetComponentswas reworked. It now is a type alias forTargetIds | TargetCategories:TargetIdscan be used to specify one or more specific target IDs:TargetIds(1, 2, 3)orTargetIds(ComponentIds(1), ComponentIds(2), ComponentIds(3))TargetCategoriescan be used to specify one or more target categories:TargetCategories(ComponentCategory.BATTERY, ComponentCategory.SOLAR)
dispatch-clisupports now the parameter--typeand--runningto filter the list of running services by type and status, respectively.- Every call now has a default timeout of 60 seconds, streams terminate after five minutes. This can be influenced by the two new parameters for
DispatchApiClient.__init__():default_timeout: timedelta(default: 60 seconds)stream_timeout: timedelta(default: 5 minutes)
- With the new
TargetCategoryclass (providing.categoryand.type) we can now specify subtypes of the categories: ComponentCategory.BATTERYusesBatteryTypewith possible values:LI_ION,NA_IONComponentCategory.INVERTERusesInverterTypewith possible values:BATTERY,SOLAR,HYBRIDComponentCategory.EV_CHARGERusesEvChargerType: with possible valuesAC,DC,HYBRID- A few examples on how to use the new
TargetCategory:TargetCategory(BatteryType.LI_ION)categoryisComponentCategory.BATTERYtypeisBatteryType.LI_ION
TargetCategory(ComponentCategory.BATTERY)categoryisComponentCategory.BATTERYtypeisNone
TargetCategories(InverterType.SOLAR)categoryisComponentCategory.INVERTERtypeisInverterType.SOLAR