aboutsummaryrefslogtreecommitdiff
path: root/examples/switch.rs
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-12-05 12:17:01 +0000
committerdiogo464 <[email protected]>2025-12-05 12:17:01 +0000
commit0c86da392af50c7588b087c3f72602e8368af65e (patch)
tree894cd2f353298b83a56cde06eafd7b1e366aa6b3 /examples/switch.rs
parent1d2ee64d0ec917a2c2b66f8d58e1f37dd174a89d (diff)
reworked entity creation
Diffstat (limited to 'examples/switch.rs')
-rw-r--r--examples/switch.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/examples/switch.rs b/examples/switch.rs
index a12b8d0..815a0f9 100644
--- a/examples/switch.rs
+++ b/examples/switch.rs
@@ -21,7 +21,16 @@ async fn main_task(spawner: Spawner) {
21 }, 21 },
22 ); 22 );
23 23
24 let switch = device.create_switch("switch-id", "Example Switch"); 24 let switch = device.create_switch(
25 "switch-id",
26 embassy_ha::SwitchConfig {
27 common: embassy_ha::EntityCommonConfig {
28 name: Some("Example Switch"),
29 ..Default::default()
30 },
31 ..Default::default()
32 },
33 );
25 34
26 spawner.must_spawn(switch_task(switch)); 35 spawner.must_spawn(switch_task(switch));
27 36