Skip to content

Commit

Permalink
+ Added missing expose modelling on z2m (albeit incomplete)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrivers committed Aug 24, 2024
1 parent c5556a2 commit 11c20b6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/z2m/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,12 @@ pub enum Expose {
Lock(ExposeLock),
Numeric(ExposeNumeric),
Switch(ExposeSwitch),

/* FIXME: Not modelled yet */
Text(Value),
Cover(Value),
Fan(Value),
Climate(Value),
}

impl Expose {
Expand All @@ -384,7 +390,14 @@ impl Expose {
Self::Composite(obj) => Some(obj.name.as_str()),
Self::Enum(obj) => Some(obj.name.as_str()),
Self::Numeric(obj) => Some(obj.name.as_str()),
Self::Light(_) | Self::List(_) | Self::Switch(_) | Self::Lock(_) => None,
Self::Light(_)
| Self::List(_)
| Self::Switch(_)
| Self::Lock(_)
| Self::Text(_)
| Self::Cover(_)
| Self::Fan(_)
| Self::Climate(_) => None,
}
}
}
Expand Down

0 comments on commit 11c20b6

Please sign in to comment.