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:
@@ -59,6 +59,7 @@ struct State {
|
||||
pub struct HueSwitch {
|
||||
config: Config,
|
||||
}
|
||||
crate::register_device!(HueSwitch);
|
||||
|
||||
impl Device for HueSwitch {
|
||||
fn get_id(&self) -> String {
|
||||
|
||||
Reference in New Issue
Block a user