Commit Graph

36 Commits

Author SHA1 Message Date
Dreaded_X cd470cadaf feat!: Expanded add_methods to extra_user_data
Instead of being a function it now expects a struct with the
PartialUserData trait implemented. This in part ensures the correct
function signature.

It also adds another optional function to PartialUserData that returns
definitions for the added methods.
2025-10-15 03:44:17 +02:00
Dreaded_X 4b76bde2a6 feat: Specify (optional) interface name in PartialUserData 2025-10-15 03:44:17 +02:00
Dreaded_X 006a561307 feat: Use PartialUserData on proxy type to add trait methods 2025-10-15 03:44:17 +02:00
Dreaded_X 1532958a86 feat: Added Typed impl for all automation devices
To accomplish this a basic implementation was also provided for some
types in automation_lib
2025-10-15 00:45:37 +02:00
Dreaded_X 76eb63cd97 feat: Use same add_methods mechanic for Device as for other traits
Build and deploy / build (push) Successful in 9m57s
Build and deploy / Deploy container (push) Has been skipped
2025-10-10 03:33:28 +02:00
Dreaded_X 8982e9c165 feat(config)!: Put automation modules in namespace
Build and deploy / build (push) Successful in 13m33s
Build and deploy / Deploy container (push) Successful in 39s
All lua modules that originate from automation_rs are now prefixed with
`automation:`.
2025-09-11 04:12:15 +02:00
Dreaded_X 4e28ad0f85 feat!: Improve device type registration
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.
2025-09-10 03:02:05 +02:00
Dreaded_X 5271e5ad81 refactor(config)!: Moved Timeout into utils module and moved module
Build and deploy / build (push) Successful in 10m43s
Build and deploy / Deploy container (push) Successful in 39s
The module is now setup in automation_lib::lua::utils.
2025-09-10 02:11:11 +02:00
Dreaded_X 1d28b43264 refactor: Move module load code into separate function 2025-09-10 02:11:11 +02:00
Dreaded_X 84e4b30b6a feat!: Improve lua module registration
Instead of having to call all the module registration functions in one
place it is possible for each module to register itself in a global registry.
During startup all the all the modules will be registered
automatically.

This does currently have one weakness, to need to ensure that the crate
is linked.
2025-09-10 02:10:45 +02:00
Dreaded_X 95a8a377e8 feat!: Removed AddAdditionalMethods
It has been replaced with the add_methods device attribute.
2025-09-10 01:58:48 +02:00
Dreaded_X 1925bac73c fix: Front door presence does not get cleared properly 2025-09-10 01:46:16 +02:00
Dreaded_X 5383e7265d feat!: ActionCallback can now receive any amount of arguments
ActionCallback now only has one generics argument that has to implement
IntoLuaMulti, this makes ActionCallback much more flexible as it no
longer always requires two arguments.
2025-09-10 01:46:12 +02:00
Dreaded_X 3be11b0c6a feat: Allow for multiple callbacks inside of an ActionCallback
This also results in the conversion being performed when the
ActionCallback is instantiated instead of when it is called, this should
make it easier to catch errors.
2025-09-08 04:02:47 +02:00
Dreaded_X e880efe4cf refactor: Store callback function directly instead of in the registry 2025-09-08 04:02:47 +02:00
Dreaded_X 0090a77dc1 style: Sort crates by name 2025-09-05 03:55:03 +02:00
Dreaded_X 8109dcf2f5 feat: Added low battery notification and made mqtt message parsing more robust
Resolves: #1
2025-09-04 04:26:34 +02:00
Dreaded_X 1b8566e593 refactor: Switch to async closures 2025-09-04 04:15:08 +02:00
Dreaded_X fb7e1f1472 Small cleanup 2025-09-01 02:47:29 +02:00
Dreaded_X 45de83ef2f Removed old presence system 2025-08-31 23:57:59 +02:00
Dreaded_X 6db5831571 Removed old darkness system 2025-08-31 23:56:28 +02:00
Dreaded_X dd379e4077 Feature: Send mqtt messages from lua 2025-08-31 05:41:48 +02:00
Dreaded_X eb36d41f17 Move ntfy and presence to automation_devices 2025-08-31 04:57:31 +02:00
Dreaded_X 03dcd44e0e Removed old notification system
Build and deploy / build (push) Successful in 8m50s
Build and deploy / Deploy container (push) Successful in 39s
2025-08-31 03:55:08 +02:00
Dreaded_X 6c9d2c16c1 Converted presence notification into lua callback 2025-08-31 03:55:08 +02:00
Dreaded_X 64c7d950c5 Make it possible to send notifications from lua 2025-08-31 03:55:07 +02:00
Dreaded_X 5d342afb1f Converted macro to derive macro 2025-08-31 03:54:20 +02:00
Dreaded_X d2b01123b8 Made the impl_device macro more explicit about the implemented traits
This also converts impl_device into a procedural macro and get rid of a
lot of "magic" that was happening.
2025-08-31 00:38:58 +02:00
Dreaded_X c5262dcf35 Update to rust 1.89 and edition 2024 2025-08-31 00:38:58 +02:00
Dreaded_X 9f3b927cb6 Update dependencies and remove unused dependencies 2025-08-31 00:38:56 +02:00
Dreaded_X e27412339c Allow timeout to be a fraction of a second instead of always whole seconds 2025-08-22 23:27:05 +02:00
Dreaded_X d9e83a49a1 Improved long press behaviour when there is no long press callback
Build and deploy / Build application (push) Successful in 3m23s
Build and deploy / Build container (push) Successful in 52s
Build and deploy / Deploy container (push) Successful in 47s
2025-01-29 00:55:00 +01:00
Dreaded_X 3905df690b Reworked air filter integration
Build and deploy / Build application (push) Successful in 5m8s
Build and deploy / Build container (push) Successful in 2m19s
Build and deploy / Deploy container (push) Successful in 35s
2025-01-22 03:12:13 +01:00
Dreaded_X e4c211a278 Added dedicated light device and updated hallway logic 2024-12-08 05:34:51 +01:00
Dreaded_X 41d2af655b ActionCallback now always returns self and state can be anything serializable 2024-12-08 02:50:52 +01:00
Dreaded_X 8877b24e84 Reorganized project 2024-12-08 00:15:03 +01:00