Skip to content

Commit

Permalink
* Fix z2m models: Expose.label property is sometimes optional (bug r…
Browse files Browse the repository at this point in the history
…eported by tbgoose on discord)
  • Loading branch information
chrivers committed Sep 16, 2024
1 parent 9ef5d36 commit 64e57ac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/z2m/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ pub struct ExposeBinary {
pub property: String,

pub name: String,
pub label: String,
pub label: Option<String>,
pub description: Option<String>,

pub value_off: Value,
Expand All @@ -411,11 +411,11 @@ pub struct ExposeBinary {

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ExposeComposite {
pub access: u8,
pub access: Option<u8>,
pub property: String,

pub name: String,
pub label: String,
pub label: Option<String>,
pub description: Option<String>,

pub category: Option<String>,
Expand All @@ -430,7 +430,7 @@ pub struct ExposeEnum {
pub property: String,

pub name: String,
pub label: String,
pub label: Option<String>,
pub description: Option<String>,

pub category: Option<String>,
Expand All @@ -445,7 +445,7 @@ pub struct ExposeLight {
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ExposeLock {
pub features: Vec<Expose>,
pub label: String,
pub label: Option<String>,
}

impl ExposeLight {
Expand All @@ -463,7 +463,7 @@ pub struct ExposeNumeric {
pub access: u8,
pub property: String,
pub name: String,
pub label: String,
pub label: Option<String>,

pub description: Option<String>,

Expand Down

0 comments on commit 64e57ac

Please sign in to comment.