Skip to content

Commit bfdf803

Browse files
authored
Templates: fix azimuth 0 not allowed (#26997)
1 parent ac72064 commit bfdf803

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎templates/definition/tariff/forecast-solar.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ params:
1616
help:
1717
en: -180 = north, -90 = east, 0 = south, 90 = west, 180 = north
1818
de: -180 = Norden, -90 = Osten, 0 = Süden, 90 = Westen, 180 = Norden
19-
example: 180
19+
type: int
20+
example: 0
2021
required: true
2122
- name: horizon
2223
description:

‎util/templates/types.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,9 @@ func (p *Param) IsDeprecated() bool {
273273
func (p *Param) IsZero(s string) bool {
274274
switch p.Type {
275275
case TypeInt:
276-
return cast.ToInt64(s) == 0
276+
return cast.ToInt64(s) == 0 && p.Name != "az"
277277
case TypeFloat:
278-
return cast.ToFloat64(s) == 0
278+
return cast.ToFloat64(s) == 0 && p.Name != "az"
279279
case TypeDuration:
280280
return cast.ToDuration(s) == 0
281281
default:

0 commit comments

Comments
 (0)