Compare commits

..

15 Commits

Author SHA1 Message Date
bb554b2c31 refactor: Split config
Some checks failed
Build and deploy / Deploy container (push) Blocked by required conditions
Build and deploy / build (push) Has been cancelled
2025-10-20 04:47:11 +02:00
956f818a3b feat(config)!: Device creation function is now named entry
It now has to be called 'setup', this makes it possible to just
include the table as a whole in devices and it will automatically call
the correct function.
2025-10-20 04:41:27 +02:00
a0c5189ada feat(config)!: Changed default config location
All checks were successful
Build and deploy / build (push) Successful in 10m26s
Build and deploy / Deploy container (push) Has been skipped
2025-10-19 05:43:43 +02:00
3676aafa23 feat(config)!: Remove device manager lua code
With the recent changes the device manager no longer needs to be
available in lua.
2025-10-19 05:43:43 +02:00
95ec3f28ff feat(config)!: Config now returns the mqtt config instead of the client
Instead the client is now created on the rust side based on the config.
Devices that require the mqtt client will now instead need to be
constructor using a function. This function receives the mqtt client.
2025-10-19 05:43:43 +02:00
303541929c chore: Restructured config to not rely on mqtt client being available
All checks were successful
Build and deploy / build (push) Successful in 10m27s
Build and deploy / Deploy container (push) Has been skipped
In preparation of changes to the mqtt client the config is rewritten to
use a device creation function for devices that need the mqtt client.

This also fixes a but where hallway_top_light was not actually added to
the device manager.
2025-10-19 04:31:25 +02:00
a26a93550b feat(config)!: In config devices can now also be a (table of) function(s)
Some checks failed
Build and deploy / Deploy container (push) Blocked by required conditions
Build and deploy / build (push) Has been cancelled
This function receives the mqtt client as an argument. In the future
this will be the only way to create devices that require the mqtt client.
2025-10-19 04:18:26 +02:00
88a7acd55d feat: Improved device conversion error message
All checks were successful
Build and deploy / build (push) Successful in 10m37s
Build and deploy / Deploy container (push) Has been skipped
2025-10-19 03:40:16 +02:00
3b7579878b feat: Use ActionCallback for schedule
This has two advantages:
- Each schedule entry can take either a single function or table of
  functions.
- We get a better type definition.
2025-10-19 03:40:16 +02:00
46c32c3605 refactor(config)!: Move scheduler out of device_manager
Due to changes made in mlua the new scheduler is much simpler. It also
had no real business being part of the device manager, so it has now been
moved to be part of the returned config.
2025-10-19 03:40:16 +02:00
d1e7988117 feat: Receive devices through config return 2025-10-19 03:40:15 +02:00
93b0a526b1 feat: Ensure consistent ordering device definitions 2025-10-19 03:40:15 +02:00
7bb5e65c1c feat: Generate definitions for config 2025-10-19 03:40:15 +02:00
a0ed373971 refactor: Move definition writing into separate function
Some checks failed
Build and deploy / Deploy container (push) Blocked by required conditions
Build and deploy / build (push) Has been cancelled
2025-10-17 03:12:40 +02:00
5e13dff2b5 chore: Move main.rs to bin/automation.rs 2025-10-17 03:08:37 +02:00

Diff Content Not Available