Site: show vehicle detection warning only if no identifiers configured

This commit is contained in:
andig 2024-11-08 18:23:59 +01:00
parent bcc405217a
commit 9887fec26a

View file

@ -338,7 +338,7 @@ func (site *Site) DumpConfig() {
// verify vehicle detection
if vehicles := site.Vehicles().Instances(); len(vehicles) > 1 {
for _, v := range vehicles {
if _, ok := v.(api.ChargeState); !ok {
if _, ok := v.(api.ChargeState); !ok && len(v.Identifiers()) == 0 {
site.log.WARN.Printf("vehicle '%s' does not support automatic detection", v.Title())
}
}