Skip to content

Commit 57d9b8f

Browse files
authored
Refactor network component documentation structure
1 parent 0feb270 commit 57d9b8f

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

content/components/network.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ The optimization level depends on whether PSRAM is guaranteed to be available (c
5151
> This has various security and privacy implications decribed in [RFC7721](https://datatracker.ietf.org/doc/rfc7721/), as this might leak outside of the smart home network and makes the device uniquely identifiable.
5252
> Therefore, the address generation does not comply to [RFC7217](https://datatracker.ietf.org/doc/rfc7217/).
5353

54-
## Lambda: Check if any network component is available
54+
## Lambda
55+
56+
### Check if any network component is available
5557

5658
This function is more useful for developing external components, such as a status indicator.
5759

@@ -60,16 +62,17 @@ network:
6062
id: network_id
6163
6264
button:
63-
id: update_now
64-
name: "Update now"
65-
on_press:
66-
then:
67-
- if:
68-
condition:
69-
lambda: |-
70-
return id(network_id).is_available();
71-
then:
72-
- logger.log: "A Network component is available!"
65+
- platform: template
66+
id: update_now
67+
name: "Update now"
68+
on_press:
69+
then:
70+
- if:
71+
condition:
72+
lambda: |-
73+
return id(network_id).is_available();
74+
then:
75+
- logger.log: "A Network component is available!"
7376
```
7477

7578
## See Also

0 commit comments

Comments
 (0)