# SiWeatherWidgetData Type documentation

## TypeScript declaration

### [SiWeatherWidgetData](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L123-L127>)

**Kind:** interface

```
import type { SiWeatherWidgetData } from '@siemens/element-ng/dashboard';
```

Composite payload accepted by the body component. Granular widget/body inputs (`current`, `metrics`, `forecast`) take precedence when set.

```
interface SiWeatherWidgetData
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [current](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L124-L124>) | `SiWeatherWidgetCurrent` |  |
| [forecast](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L126-L126>) (optional) | `SiWeatherWidgetForecast` |  |
| [metrics](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L125-L125>) (optional) | `readonly SiWeatherWidgetMetric[]` |  |

### Types Documentation

### [SiWeatherWidgetCurrent](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L45-L58>)

**Kind:** interface

```
import type { SiWeatherWidgetCurrent } from '@siemens/element-ng/dashboard';
```

Today block of the weather widget.

```
interface SiWeatherWidgetCurrent
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [condition](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L49-L49>) (optional) | `TranslatableString` | Translatable condition label, e.g. `"Sunny"`. |
| [illustration](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L51-L51>) (optional) | `string \| SiWeatherIcon` | Weather illustration. A string is shorthand for `{ src }`. |
| [illustrationAlt](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L53-L53>) (optional) | `TranslatableString` | Optional alt text used when [illustration](<index.html#t:SiWeatherWidgetCurrent.illustration>) is given as a string. |
| [maxTemperature](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L57-L57>) (optional) | `string \| number` | Today's maximum temperature, pre-formatted by the caller. |
| [minTemperature](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L55-L55>) (optional) | `string \| number` | Today's minimum temperature, pre-formatted by the caller. |
| [temperature](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L47-L47>) | `string \| number` | Current temperature, pre-formatted by the caller (e.g. `"26°"` or `26`). |

### [SiWeatherWidgetForecast](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L111-L117>)

**Kind:** interface

```
import type { SiWeatherWidgetForecast } from '@siemens/element-ng/dashboard';
```

Forecast block of the weather widget.

The vertical layout supports up to five optional [columns](<index.html#t:SiWeatherWidgetForecast.columns>) in addition to the mandatory rightmost min/max temperature column. The horizontal layout ignores [columns](<index.html#t:SiWeatherWidgetForecast.columns>) and renders only day label, illustration and min/max temperature per column. A horizontal forecast should provide at least three days for a visually balanced layout.

```
interface SiWeatherWidgetForecast
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [columns](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L116-L116>) (optional) | `readonly SiWeatherWidgetForecastColumn[]` | Optional extra columns (vertical layout only). At most five are rendered. |
| [days](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L113-L113>) | `readonly SiWeatherWidgetForecastDay[]` | The forecast days in display order. |

### [SiWeatherWidgetMetric](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L63-L68>)

**Kind:** interface

```
import type { SiWeatherWidgetMetric } from '@siemens/element-ng/dashboard';
```

A single metric row in the additional-data block (e.g. wind, precipitation).

```
interface SiWeatherWidgetMetric
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L65-L65>) | `TranslatableString` | Translatable label, e.g. `"Wind"`. |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L67-L67>) | `string \| number` | Pre-formatted value, e.g. `"7km/h"`. |

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```

### [SiWeatherIcon](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L33-L40>)

**Kind:** interface

```
import type { SiWeatherIcon } from '@siemens/element-ng/dashboard';
```

Describes how a weather illustration should be resolved. Callers can either provide a direct [SiWeatherIcon.src](<index.html#t:SiWeatherIcon.src>) or a semantic [SiWeatherIcon.condition](<index.html#t:SiWeatherIcon.condition>) token resolved by a [SiWeatherIconResolver](<../../injectables/SiWeatherIconResolver/index.html#SiWeatherIconResolver>).

```
interface SiWeatherIcon
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [alt](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L39-L39>) (optional) | `TranslatableString` | Translatable alt text for accessibility. |
| [condition](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L35-L35>) (optional) | `string` | Semantic condition token, used by the resolver. Apps with custom resolvers may pass any string. |
| [src](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L37-L37>) (optional) | `string` | Direct URL/path. Wins over [condition](<index.html#t:SiWeatherIcon.condition>). |

### [SiWeatherWidgetForecastDay](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L91-L100>)

**Kind:** interface

```
import type { SiWeatherWidgetForecastDay } from '@siemens/element-ng/dashboard';
```

A single day in the forecast block.

```
interface SiWeatherWidgetForecastDay
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [illustration](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L95-L95>) (optional) | `string \| SiWeatherIcon` | Weather illustration for the day. A string is shorthand for `{ src }`. |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L93-L93>) | `TranslatableString` | Translatable day label, e.g. `"Mon"`. |
| [maxTemperature](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L99-L99>) | `string \| number` | Maximum temperature, pre-formatted by the caller. |
| [minTemperature](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L97-L97>) | `string \| number` | Minimum temperature, pre-formatted by the caller. |

### [SiWeatherWidgetForecastColumn](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L76-L86>)

**Kind:** interface

```
import type { SiWeatherWidgetForecastColumn } from '@siemens/element-ng/dashboard';
```

An optional forecast column shown left of the temperature column in vertical layouts. The widget supports up to five of these columns; additional columns are ignored. The temperature column is mandatory and always rendered on the right; it does not need to be modelled as a column here.

```
interface SiWeatherWidgetForecastColumn
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L80-L80>) (optional) | `string` | element-icons icon name shown next to each row value. |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L78-L78>) (optional) | `TranslatableString` | Translatable column label, used as `aria-label` for the column. |
| [values](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-weather-widget/si-weather-widget.types.ts#L85-L85>) | `readonly (string \| number \| undefined)[]` | Per-day values, aligned by index with [SiWeatherWidgetForecast.days](<index.html#t:SiWeatherWidgetForecast.days>). Missing entries are rendered as empty cells. |
