feat!: Improve device type registration
All checks were successful
Build and deploy / build (push) Successful in 10m37s
Build and deploy / Deploy container (push) Successful in 38s

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:
2025-09-10 02:59:32 +02:00
parent f0e4c9dd21
commit 4e28ad0f85
16 changed files with 58 additions and 36 deletions

View File

@@ -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) {