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:
@@ -97,6 +97,7 @@ pub struct Config {
|
||||
pub struct Ntfy {
|
||||
config: Config,
|
||||
}
|
||||
crate::register_device!(Ntfy);
|
||||
|
||||
impl Ntfy {
|
||||
fn add_methods<M: mlua::UserDataMethods<Self>>(methods: &mut M) {
|
||||
|
||||
Reference in New Issue
Block a user