Skip to content

Commit

Permalink
Fix links
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 committed Dec 27, 2023
1 parent 5b55b2b commit 68fe133
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tutorials/getting_started/auto_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ This will open a form with customization options.
##### Basic Settings

Instead of using the Item's Label and parent Group as the Title and Subtitle of the card, these can be overridden and manually set.
[Expressions]({{base}}/ui/building-pages.html#dynamically-configuring-components-with-expressions) can be used to make the Title and Subtitle change based on the states of Items or other conditions.
[Expressions]({{base}}/ui/widget-expressions-variables.html) can be used to make the Title and Subtitle change based on the states of Items or other conditions.

By default a background color is chosen based on the semantic tag.
This default can be overridden here.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/getting_started/item_widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ One can also set the "Default Stand Alone Widget" and "Default Cell Widget" to c
Many portions of a widget can be configured to change dynamically based on the states of Items.
This can be a powerful way to combine multiple Items into one widget (e.g. an oh-label widget showing the current state of a garage door that sends a command to a Switch Item to trigger the garage door opener when the widget is clicked).
Common things one might use an expression for are to change an icon or color based on the state of an Item, to hide a widget entirely if an Item isn't in a given state, or to change the colors of the widget elements.
For full details on expressions see the [Expressions docs]({{base}}/ui/building-pages.html#dynamically-configuring-components-with-expressions).
For full details on expressions see the [Expressions docs]({{base}}/ui/widget-expressions-variables.html).

Note that when working with Units of Masurement, the state of the Item needs to be parsed into a number for comparisons.
For example -
Expand Down
1 change: 1 addition & 0 deletions ui/personal-widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ This is accomplished by adding a `config` section to the component's YAML.
```

Some of the available configuration parameters are specific to a certain component while others, such as `visible` or `class` are available in most components.
[Expressions](widget-expressions-variables.html) can be used to dynamically set configuration parameters depending on dynamic, changing data, e.g. Item states.

### Component slots

Expand Down
4 changes: 2 additions & 2 deletions ui/widget-expressions-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Stacked ternary statements to translate the state of Item `xxx` to a description
Do the same using an object and the Item state shortcut:

```js
={0:'Off',1:'Heat',11:'Economy Heat', 15:'Full Power',31:'Manual'}[@@xxx] || 'Not Set'
={0:'Off',1:'Heat',11:'Economy Heat',15:'Full Power',31:'Manual'}[@@xxx] || 'Not Set'
```

Substract one week from the state of `DateTime` and return a relative time representation in the current locale ("3 weeks ago"):
Expand All @@ -214,4 +214,4 @@ Substract one week from the state of `DateTime` and return a relative time repre
## Debugging Expressions

Expressions can be tested in the Widgets Expression Tester found in the Developer Sidebar
(<kbd>Shift+Alt+D</kbd>).
(<kbd>Shift</kbd><kbd>Alt</kbd><kbd>D</kbd>).

0 comments on commit 68fe133

Please sign in to comment.