Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/automations/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ params:
image: auto-fix.svg
---

{{< anchor "automation" >}}

Automations are a very powerful aspect of ESPHome; they allow you to easily perform actions given some condition(s).

When you want your ESPHome device to respond to its environment, you use an automation. Here are some examples:
Expand Down
4 changes: 3 additions & 1 deletion content/automations/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,16 +253,18 @@ on_...:
- repeat:
count: 5
then:
- lambda: ESP_LOGI("main", "Turning lights on for iteration [%d]", iteration);
- light.turn_on: some_light
- delay: 1s
- lambda: ESP_LOGI("main", "Turning lights off for iteration [%d]", iteration);
- light.turn_off: some_light
- delay: 10s
```

#### Configuration variables

- **count** (**Required**, int): The number of times the action should be repeated. The counter is available to
lambdas using the reserved word "iteration".
lambdas using the implicit script parameter `iteration`.

- **then** (**Required**, [Action](#config-action)): The action to repeat.

Expand Down
10 changes: 0 additions & 10 deletions content/components/display/max7219digit.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,34 +75,24 @@ display:
- **chip_lines_style** (*Optional*): How are the lines in Multiline Mode connected? Possible values are `zigzag` and `snake`. Defaults to `snake`
- **flip_x** (*Optional*, boolean): Flip the horizontal axis on the screen. Defaults to `false`.

{{< anchor "display-max7219digit_actions" >}}

## Actions

The following actions are replicas of the LAMBDA functions shown in the next section.

{{< anchor "display-max7219digit_actions_invert_on_off>" >}}

### `MAX7219.invert_on` & `MAX7219.invert_off` Action

This action `MAX7219.invert_on` will invert the display. So background pixels are on and texts pixels are
off. `MAX7219.invert_off` sets the display back to normal. The background pixels are only set at the next update, the pixels drawn in
the various function like print, line, etc. are directly influenced by the invert command.

{{< anchor "display-max7219digit_actions_turn_on_off" >}}

### `MAX7219.turn_on` & `MAX7219.turn_off` Action

The display can be switched on and off "dynamically" with the actions `MAX7219.turn_on` & `MAX7219.turn_off`.

{{< anchor "display-max7219digit_actions_reverse_off" >}}

## `MAX7219.reverse_on` & `MAX7219.reverse_off` Action

With this actions you can reverse the display direction from left to right to right to left.

{{< anchor "display-max7219digit_actions_intensity" >}}

## `MAX7219.intensity` Action

The intensity of the screen can be set "dynamically" within the lambda code with the following command: it.intensity(`0` .. `15` ).
Expand Down
2 changes: 1 addition & 1 deletion content/components/display/mipi_spi.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ using an octal SPI bus, so references here to parallel and octal SPI are equival
| JC3636W518 | Guition | <https://www.aliexpress.com/item/1005007890666293.html> |
| JC3636W518V2 | Guition | <https://www.aliexpress.com/item/1005007890666293.html> |
| LANBON-L8 | Lanbon | <https://www.lanbon.cn/product/lanbon-l8> |
| T4-S3-AMOLED | Lilygo | <https://www.lilygo.cc/products/t4-s3> |
| T4-S3 | Lilygo | <https://www.lilygo.cc/products/t4-s3> |
| T-EMBED | Lilygo | <https://www.lilygo.cc/products/t-embed> |
| T-DISPLAY | Lilygo | <https://www.lilygo.cc/products/t-display> |
| T-DISPLAY-S3 | Lilygo | <https://www.lilygo.cc/products/t-display-s3> |
Expand Down
11 changes: 11 additions & 0 deletions content/components/nrf52.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ nrf52:

- **reset_pin** (*Required*, [Pin](#config-pin)): The pin to use for trigger a hardware reset. This pin should be connected to the MCU's reset line or to a circuit that causes the bootloader to enter DFU mode after reset.

## Nordic UART Service (NUS)

The Bluetooth® Low Energy (LE) GATT Nordic UART Service is a custom service that receives and writes data and serves as a bridge to the UART interface.

### Example Configuration

```yaml
ble_nus:
type: logs
```

## See Also

- {{< docref "esphome/" >}}
Expand Down
2 changes: 1 addition & 1 deletion script/md_anchors.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def process_markdown_file(file_path):
continue

# Shortcodes
shortcode_match = re.search(r'{{<\s*anchor\s*"([^"]+)"\s*>}}', line)
shortcode_match = re.search(r'\{\{<\s*anchor\s+"([^\s>]+)"\s*>}}', line)
if shortcode_match:
anchor_id = shortcode_match.group(1)
# Look ahead for heading
Expand Down