feat!: Improve device type registration
Instead of one function that contains all the device types available in `automation_devices` a global registry is used were each device can register itself.
This commit is contained in:
@@ -38,6 +38,7 @@ pub struct Washer {
|
||||
config: Config,
|
||||
state: Arc<RwLock<State>>,
|
||||
}
|
||||
crate::register_device!(Washer);
|
||||
|
||||
impl Washer {
|
||||
async fn state(&self) -> RwLockReadGuard<'_, State> {
|
||||
|
||||
Reference in New Issue
Block a user