diff options
Diffstat (limited to 'examples/binary_sensor.rs')
| -rw-r--r-- | examples/binary_sensor.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/binary_sensor.rs b/examples/binary_sensor.rs index 2809255..c0afa4a 100644 --- a/examples/binary_sensor.rs +++ b/examples/binary_sensor.rs | |||
| @@ -23,8 +23,13 @@ async fn main_task(spawner: Spawner) { | |||
| 23 | 23 | ||
| 24 | let sensor = device.create_binary_sensor( | 24 | let sensor = device.create_binary_sensor( |
| 25 | "binary-sensor-id", | 25 | "binary-sensor-id", |
| 26 | "Binary Sensor", | 26 | embassy_ha::BinarySensorConfig { |
| 27 | embassy_ha::constants::HA_DEVICE_CLASS_BINARY_SENSOR_SMOKE, | 27 | common: embassy_ha::EntityCommonConfig { |
| 28 | name: Some("Binary Sensor"), | ||
| 29 | ..Default::default() | ||
| 30 | }, | ||
| 31 | class: embassy_ha::BinarySensorClass::Smoke, | ||
| 32 | }, | ||
| 28 | ); | 33 | ); |
| 29 | 34 | ||
| 30 | spawner.must_spawn(binary_sensor_class(sensor)); | 35 | spawner.must_spawn(binary_sensor_class(sensor)); |
