Commit Graph

33 Commits

Author SHA1 Message Date
8010f7a404 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-10 03:56:33 +02:00
76eb63cd97 feat: Use same add_methods mechanic for Device as for other traits
All checks were successful
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
8982e9c165 feat(config)!: Put automation modules in namespace
All checks were successful
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
4e28ad0f85 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.
2025-09-10 03:02:05 +02:00
5271e5ad81 refactor(config)!: Moved Timeout into utils module and moved module
All checks were successful
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
1d28b43264 refactor: Move module load code into separate function 2025-09-10 02:11:11 +02:00
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
95a8a377e8 feat!: Removed AddAdditionalMethods
It has been replaced with the add_methods device attribute.
2025-09-10 01:58:48 +02:00
1925bac73c fix: Front door presence does not get cleared properly 2025-09-10 01:46:16 +02:00
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
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
e880efe4cf refactor: Store callback function directly instead of in the registry 2025-09-08 04:02:47 +02:00
0090a77dc1 style: Sort crates by name 2025-09-05 03:55:03 +02:00
8109dcf2f5 feat: Added low battery notification and made mqtt message parsing more robust
Resolves: #1
2025-09-04 04:26:34 +02:00
1b8566e593 refactor: Switch to async closures 2025-09-04 04:15:08 +02:00
fb7e1f1472 Small cleanup 2025-09-01 02:47:29 +02:00
45de83ef2f Removed old presence system 2025-08-31 23:57:59 +02:00
6db5831571 Removed old darkness system 2025-08-31 23:56:28 +02:00
dd379e4077 Feature: Send mqtt messages from lua 2025-08-31 05:41:48 +02:00
eb36d41f17 Move ntfy and presence to automation_devices 2025-08-31 04:57:31 +02:00
03dcd44e0e Removed old notification system
All checks were successful
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
6c9d2c16c1 Converted presence notification into lua callback 2025-08-31 03:55:08 +02:00
64c7d950c5 Make it possible to send notifications from lua 2025-08-31 03:55:07 +02:00
5d342afb1f Converted macro to derive macro 2025-08-31 03:54:20 +02:00
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
c5262dcf35 Update to rust 1.89 and edition 2024 2025-08-31 00:38:58 +02:00
9f3b927cb6 Update dependencies and remove unused dependencies 2025-08-31 00:38:56 +02:00
e27412339c Allow timeout to be a fraction of a second instead of always whole seconds 2025-08-22 23:27:05 +02:00
d9e83a49a1 Improved long press behaviour when there is no long press callback
All checks were successful
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
3905df690b Reworked air filter integration
All checks were successful
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
e4c211a278 Added dedicated light device and updated hallway logic 2024-12-08 05:34:51 +01:00
41d2af655b ActionCallback now always returns self and state can be anything serializable 2024-12-08 02:50:52 +01:00
8877b24e84 Reorganized project 2024-12-08 00:15:03 +01:00