From a11b9d04bcff88335d77c662762e404b8fcee688 Mon Sep 17 00:00:00 2001 From: andig Date: Sun, 31 Mar 2024 12:35:00 +0200 Subject: [PATCH] Messaging: add more vehicle properties (#13229) --- push/hub.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/push/hub.go b/push/hub.go index cb9007435..410938828 100644 --- a/push/hub.go +++ b/push/hub.go @@ -79,6 +79,10 @@ func (h *Hub) apply(ev Event, tmpl string) (string, error) { // add missing attributes if name, ok := attr["vehicleName"].(string); ok { if v, err := h.vehicles.ByName(name); err == nil { + attr["vehicleLimitSoc"] = v.GetLimitSoc() + attr["vehicleMinSoc"] = v.GetMinSoc() + attr["vehiclePlanTime"], attr["vehiclePlanSoc"] = v.GetPlanSoc() + instance := v.Instance() attr["vehicleTitle"] = instance.Title() attr["vehicleIcon"] = instance.Icon()