Skip to content

Commit ad3d1ae

Browse files
authored
Merge branch 'current' into dependabot/github_actions/actions/stale-10.1.0
2 parents 9bb50d6 + c02c4b3 commit ad3d1ae

File tree

597 files changed

+5261
-3980
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

597 files changed

+5261
-3980
lines changed

.github/workflows/component-image.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,20 @@ jobs:
3232
3333
- name: Get Component name
3434
id: get_component
35-
run: |-
36-
comment="${{ github.event.comment.body }}"
37-
component=$(echo $comment | sed -n 's/^@esphomebot generate image //p')
38-
echo "name=$component" >> $GITHUB_OUTPUT
39-
echo "name_lower=${component,,}" >> $GITHUB_OUTPUT
35+
env:
36+
COMMENT_BODY: ${{ github.event.comment.body }}
37+
run: |
38+
# Extract component name using bash parameter expansion (no external commands)
39+
component="${COMMENT_BODY#@esphomebot generate image }"
40+
41+
# Validate component name: only lowercase alphanumeric and underscores
42+
if [[ "$component" =~ ^[a-z0-9_]+$ ]]; then
43+
echo "name=$component" >> $GITHUB_OUTPUT
44+
echo "name_lower=${component,,}" >> $GITHUB_OUTPUT
45+
else
46+
echo "::error::Invalid component name. Must contain only lowercase letters, numbers, and underscores."
47+
exit 1
48+
fi
4049
4150
generate:
4251
name: Generate
@@ -50,7 +59,7 @@ jobs:
5059
component: ${{ needs.prepare.outputs.name }}
5160

5261
- name: Upload
53-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
62+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
5463
id: upload-artifact
5564
with:
5665
name: ${{ needs.prepare.outputs.name }}

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM python:3.13-slim
33
RUN apt-get update && apt-get install -y --no-install-recommends \
44
curl \
55
git \
6+
jq \
67
make \
78
openssh-client \
89
hugo \

content/automations/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ params:
77
image: auto-fix.svg
88
---
99

10+
{{< anchor "automation" >}}
11+
1012
Automations are a very powerful aspect of ESPHome; they allow you to easily perform actions given some condition(s).
1113

1214
When you want your ESPHome device to respond to its environment, you use an automation. Here are some examples:

content/automations/actions.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ switch:
6262
id: dehumidifier1
6363
```
6464
65-
First, we have to give the dehumidifier `switch` an [ID](#config-id) so that we can refer to it inside of our
65+
First, we have to give the dehumidifier `switch` an [ID](/guides/configuration-types#id) so that we can refer to it inside of our
6666
automation.
6767

6868
{{< anchor "actions-trigger" >}}
@@ -213,19 +213,19 @@ on_...:
213213

214214
At least one of `condition`, `all` or `any` must be provided.
215215

216-
- **condition** (*Optional*, [Condition](#config-condition)): The condition to check to determine which branch to take.
216+
- **condition** (*Optional*, [Condition](#all-conditions)): The condition to check to determine which branch to take.
217217
If this is configured with a list of conditions then they must all be true for the condition to be true.
218218

219-
- **all** (*Optional*, [Condition](#config-condition)): Takes a list of conditions, all of which must be true (and is
219+
- **all** (*Optional*, [Condition](#all-conditions)): Takes a list of conditions, all of which must be true (and is
220220
therefore equivalent to `condition` .)
221221

222-
- **any** (*Optional*, [Condition](#config-condition)): Takes a list of conditions; if at least one is true, the
222+
- **any** (*Optional*, [Condition](#all-conditions)): Takes a list of conditions; if at least one is true, the
223223
condition will be true.
224224

225-
- **then** (*Optional*, [Action](#config-action)): The action to perform if the condition evaluates to true.
225+
- **then** (*Optional*, [Action](#all-actions)): The action to perform if the condition evaluates to true.
226226
Defaults to doing nothing.
227227

228-
- **else** (*Optional*, [Action](#config-action)): The action to perform if the condition evaluates to false.
228+
- **else** (*Optional*, [Action](#all-actions)): The action to perform if the condition evaluates to false.
229229
Defaults to doing nothing.
230230

231231
{{< anchor "lambda_action" >}}
@@ -253,18 +253,20 @@ on_...:
253253
- repeat:
254254
count: 5
255255
then:
256+
- lambda: ESP_LOGI("main", "Turning lights on for iteration [%d]", iteration);
256257
- light.turn_on: some_light
257258
- delay: 1s
259+
- lambda: ESP_LOGI("main", "Turning lights off for iteration [%d]", iteration);
258260
- light.turn_off: some_light
259261
- delay: 10s
260262
```
261263

262264
#### Configuration variables
263265

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

267-
- **then** (**Required**, [Action](#config-action)): The action to repeat.
269+
- **then** (**Required**, [Action](#all-actions)): The action to repeat.
268270

269271
{{< anchor "wait_until_action" >}}
270272

@@ -297,8 +299,8 @@ on_...:
297299

298300
#### Configuration variables
299301

300-
- **condition** (**Required**, [Condition](#config-condition)): The condition to wait to become true.
301-
- **timeout** (*Optional*, [Time](#config-time)): Time to wait before timing out. Defaults to never timing out.
302+
- **condition** (**Required**, [Condition](#all-conditions)): The condition to wait to become true.
303+
- **timeout** (*Optional*, [Time](/guides/configuration-types#time)): Time to wait before timing out. Defaults to never timing out.
302304

303305
{{< anchor "while_action" >}}
304306

@@ -321,10 +323,10 @@ on_...:
321323

322324
#### Configuration variables
323325

324-
- **condition** (**Required**, [Condition](#config-condition)): The condition to check to determine whether or not to
326+
- **condition** (**Required**, [Condition](#all-conditions)): The condition to check to determine whether or not to
325327
execute.
326328

327-
- **then** (**Required**, [Action](#config-action)): The action to perform until the condition evaluates to false.
329+
- **then** (**Required**, [Action](#all-actions)): The action to perform until the condition evaluates to false.
328330

329331
{{< anchor "component-update_action" >}}
330332

@@ -455,10 +457,10 @@ on_...:
455457

456458
#### Configuration variables
457459

458-
- **time** (**Required**, [templatable](#config-templatable), [Time](#config-time)):
460+
- **time** (**Required**, [templatable](/automations/templates), [Time](/guides/configuration-types#time)):
459461
The time for which the condition has to have been true.
460462

461-
- **condition** (**Required**, [condition](#config-condition)): The condition to check.
463+
- **condition** (**Required**, [condition](#all-conditions)): The condition to check.
462464

463465
{{< anchor "lambda_condition" >}}
464466

content/changelog/2022.1.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ With ESPHome Web we took the installation bits of the ESPHome dashboard and made
4444
over HTTPS. It works 100% in your browser without a backend or data leaving your computer. Now anyone can easily
4545
install ESPHome on their devices to get started.
4646

47-
`Visit ESPHome Web`_
47+
[Visit ESPHome Web](https://web.esphome.io)
4848

4949
## JSON
5050

content/changelog/2023.12.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This is a common source of issues and generally a pin does not need to be reused
3232
in a single configuration. Pins should only be reused in a very limited set of circumstances and seeing the
3333
error will generally mean that you need to reorganise your configuration to not reuse the pins.
3434
The error can be bypassed by specifically adding another config item to all of the
35-
duplicate pin definitions. See the [Pin Schema](#config-pin_schema) for details.
35+
duplicate pin definitions. See the [Pin Schema](/guides/configuration-types#pin-schema) for details.
3636

3737
## Touchscreen internal changes
3838

0 commit comments

Comments
 (0)