Skip to content

Commit

Permalink
used tip marker
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
  • Loading branch information
stefan-hoehn committed Dec 17, 2022
1 parent d578147 commit fb3fc4d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
12 changes: 10 additions & 2 deletions configuration/blockly/rules-blockly-date-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ The String may be one of the following formats (since 3.3) the following formats
The input String may also be provided via variable-block or a date from an item state.
In case parts of the date are not provided due to shorter pattern, the others are set to 0

Tip: if you want to create a datetime with your time zone use the "copy of"-block and overwrite its values
:::tip

if you want to create a datetime with your time zone use the "copy of"-block and overwrite its values

:::

More about that topic can be viewed at ![youtube](../images/blockly/youtube-logo-small.png) [Creating Datetimes and other datetime blocks](https://youtu.be/KwhYKy1_qVk?t=2010)

Expand All @@ -114,7 +118,11 @@ Creates a ZonedDateTime by providing all necessary six values
- minute of time
- second of time

Tip: if you want to create a datetime with your time zone use the "copy of"-block and overwrite its values
:::tip

if you want to create a datetime with your time zone use the "copy of"-block and overwrite its values

:::

### Create Datetime based on a specific date ("Copy Of")

Expand Down
20 changes: 17 additions & 3 deletions configuration/blockly/rules-blockly-items-things.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ See a video introduction at ![youtube](../images/blockly/youtube-logo-small.png)

Function: Retrieves a specific **Item** or **Group** for use in other item related functions.

- **Tip:** never use this block alone as it only returns the items name which alone does not make sense.
:::tip

never use this block alone as it only returns the items name which alone does not make sense.
Instead use the get-Item-Block below.

:::

- Clicking 'MyItem' displays a list of **Items** to pick from
- Technically this block returns the _name_ of the item as a String.
- As a result, this block can be used wherever the item name is required as a String.
Expand Down Expand Up @@ -76,7 +81,11 @@ Function: Get the current state of an **Item** or **Group**

Note that most of the states can and will be directly **converted automatically to a String** but be careful that some of the **more complex states may instead return a complex object instead**.

**Tip:** it is recommended in this case to assign this to a variable and use the "String-Append-Text" with an empty "" to convert it into a String for further processing.
:::tip

it is recommended in this case to assign this to a variable and use the "String-Append-Text" with an empty "" to convert it into a String for further processing.

:::

See the [Item-State documentation](https://www.openhab.org/docs/configuration/items.html#state) for more information

Expand Down Expand Up @@ -111,7 +120,12 @@ Function: Gets all items with the given tags which you can iterate over via a lo
- returns a collection of items which have the given tags
- multiple tags can be provided which then need to be separared with a comma
- if multiple tags are given, the item must have all of the tags ("and"-condition)
- tip: if you need an item that has one of multiple tags, then you need to use one block of each and then use the ["concatenate list block"](https://www.openhab.org/docs/configuration/blockly/rules-blockly-standard-ext.html#concatenate-list) to combine the results.

:::tip

If you need an item that has one of multiple tags, then you need to use one block of each and then use the ["concatenate list block"](https://www.openhab.org/docs/configuration/blockly/rules-blockly-standard-ext.html#concatenate-list) to combine the results.

:::

### Get particular attributes of an item

Expand Down
6 changes: 5 additions & 1 deletion configuration/blockly/rules-blockly-standard-ext.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ _Function:_ Returns a color by mixing the given values in a range from 0 - 255 f

_Function:_ Blends two colors chosen via a color picker into one color by the given ratio.

Tip: this could be used for example with a loop that changes the ratio from 0 to 1 to blend the first color into a second
:::tip

this could be used for example with a loop that changes the ratio from 0 to 1 to blend the first color into a second

:::

### Create HSB-color from RGB color (openHAB)

Expand Down

0 comments on commit fb3fc4d

Please sign in to comment.