Skip to content

Commit cdff755

Browse files
committed
Merge branch 'current' into next
2 parents b66581f + 6211537 commit cdff755

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

content/components/switch/_index.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ advanced stuff (see the full API Reference for more info).
182182
>
183183
> For example, if you are using a {{< docref "/components/switch/gpio" >}}, calling `publish_state()` will
184184
> not change the GPIO pin level. To do that, you need to call `turn_on()`,
185-
> `turn_off()` or `toggle()`. The same applies to other switch platforms.
185+
> `turn_off()`, `toggle()` or `control()`. The same applies to other switch platforms.
186186

187187
- `state` : Retrieve the current state of the switch.
188188

@@ -206,6 +206,16 @@ advanced stuff (see the full API Reference for more info).
206206
id(my_switch).toggle();
207207
```
208208

209+
- `control()` : Control the switch state using a boolean parameter.
210+
This provides a unified interface for setting switch state dynamically.
211+
212+
```yaml
213+
// Within lambda, control switch based on a condition
214+
id(my_switch).control(true); // Turn ON
215+
id(my_switch).control(false); // Turn OFF
216+
id(my_switch).control(some_condition); // Set based on condition
217+
```
218+
209219
{{< anchor "switch-on_turn_on_off_trigger" >}}
210220

211221
### `switch.on_turn_on` / `switch.on_turn_off` Trigger

content/guides/installing_esphome.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: "Installing ESPHome Manually"
55

66
## Windows
77

8-
Download Python from [the official site](https://www.python.org/downloads/).
8+
Download Python from [the official site](https://www.python.org/downloads/). Confirm that the version is at least 3.11; versions 3.14 or higher are not yet recommended.
99

1010
{{< img src="python-win-installer.png"
1111
alt="Python installer window with arrows pointing to \"Add Python to PATH\" and \"Install Now\""

0 commit comments

Comments
 (0)