17a68e8991
feat: Added optional definition function to module
2025-10-15 03:53:55 +02:00
54164c517b
feat: Remove automatic automation: module prefix
...
Instead the prefix should be manually specified if it is desired.
2025-10-15 03:50:36 +02:00
30ea9b2737
feat: Use Typed type_name for registering proxy
2025-10-15 03:44:17 +02:00
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
4b76bde2a6
feat: Specify (optional) interface name in PartialUserData
2025-10-15 03:44:17 +02:00
745a1025bb
feat!: Improved attribute parsing in device macro
2025-10-15 03:44:13 +02:00
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
06b3154733
feat!: Use type alias instead of generic parameters in device macro
...
Build and deploy / build (push) Successful in 10m11s
Build and deploy / Deploy container (push) Successful in 2m8s
This enforced the idea that all generics must be specified for the type
when using the device macro. It will also come into play later when the
Typed macro gets introduced, as the name will be used when generating
definitions.
2025-09-17 00:35:30 +02:00
580a5187bd
feat!: Made ntfy notification title required
Build and deploy / build (push) Successful in 12m26s
Build and deploy / Deploy container (push) Successful in 43s
2025-09-13 04:04:51 +02:00
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
f0e4c9dd21
chore!: Remove unused notification setters
...
Since the creation of notifications has moved entirely to lua these
setters were not being used anymore.
2025-09-10 02:56:56 +02:00
da04fad520
refactor(config)!: Move device proxies into module
...
Instead of registering the device proxies in the global namespace they
are now registered in a module called `devices`.
2025-09-10 02:11:09 +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
2dbd491b81
refactor!: Rewrote device implementation macro once again
...
This time with a bit more though put into the design of the code, as a
result the macro should be a lot more robust.
This did result in the macro getting renamed from LuaDevice to Device as
this should be _the_ Device macro.
The attribute also got renamed from traits() to device(traits()) and the
syntax got overhauled to allow for a bit more expression.
2025-09-10 01:58:48 +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
352654107a
feat: Added derive macro to implement IntoLua on structs that implement Serialize
...
This can be very useful if you want to convert a data struct to a lua
table without having to write the boilerplane (however small it may
be).
It also adds the macro on several state structs so they can be
converted to lua in the upcoming ActionCallback refactor.
2025-09-08 04:06:00 +02:00
3a7f2f9bd7
fix: IkeaRemote callback is missing default specifier
2025-09-08 04:05:43 +02:00
77d7881a57
chore: Update/upgrade dependencies
...
There was a potential vulnerability in tracing-subscriber, so I took
this as an opportunity to update/upgrade all dependencies
2025-09-04 04:28:02 +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
45de83ef2f
Removed old presence system
2025-08-31 23:57:59 +02:00
2a1f75f158
Move front door presence logic to lua
2025-08-31 23:57:59 +02:00
74568b4e1f
Handle turning off devices when away through lua
2025-08-31 23:57:59 +02:00
fefccf03d7
Removed DebugBridge as it no longer served a purpose
2025-08-31 23:57:59 +02:00
b56a16d0d7
Moved presence debug mqtt message to lua
2025-08-31 23:57:59 +02:00
6db5831571
Removed old darkness system
2025-08-31 23:56:28 +02:00
aa730c9738
Moved darkness debug mqtt message to lua
2025-08-31 05:41:49 +02:00
549d821e3a
Moved hue bridge on darkness to lua
2025-08-31 05:41:46 +02:00
4980f4888e
Removed unused event code
2025-08-31 05:01:56 +02:00
eb36d41f17
Move ntfy and presence to automation_devices
2025-08-31 04:57:31 +02:00
2d9e3d26f2
Send laundy notification from lua
2025-08-31 03:55:08 +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
3c5bd9ffb8
Add color temperature light
2025-08-22 23:27:05 +02:00
73218bb9b9
Store brightness in f32 instead of f64
2025-08-22 23:27:05 +02:00
fe83568839
Added color temperature support with ColorSetting
2025-08-22 23:27:05 +02:00
5730d9db03
Fixed struct name for temperature control
2025-08-22 02:15:26 +02:00
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
746e19eb8c
Use own struct to deserialize hue switch state and added hold actions
2025-01-28 22:48:02 +01:00
47d509cec1
Unneeded mqtt client in huegroup
Build and deploy / Build application (push) Failing after 2m57s
Build and deploy / Build container (push) Has been skipped
Build and deploy / Deploy container (push) Has been skipped
2025-01-28 22:43:50 +01:00
fbabc978b1
Reworked IkeaOutlet into more generic outlet that also (optionally) supports power measurement
...
Build and deploy / Build application (push) Successful in 4m15s
Build and deploy / Build container (push) Successful in 1m16s
Build and deploy / Deploy container (push) Successful in 19s
This new power measurement feature is used to turn the kettle off
automatically once it is done boiling
2025-01-26 04:48:59 +01:00
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
90a94934fb
Added open close trait and google home support for contact sensor
2024-12-11 22:19:31 +01:00
175056416e
Updated is_on -> on to be consistent with rust
Build and deploy / Build application (push) Successful in 3m23s
Build and deploy / Build container (push) Successful in 1m2s
Build and deploy / Deploy container (push) Successful in 18s
2024-12-08 05:35:48 +01:00
e4c211a278
Added dedicated light device and updated hallway logic
2024-12-08 05:34:51 +01:00
8c9e93dcc4
Added brightness trait
2024-12-08 05:19:27 +01:00
41d2af655b
ActionCallback now always returns self and state can be anything serializable
2024-12-08 02:50:52 +01:00
14aabe202d
Updated rust toolchain
Build and deploy / Build application (push) Successful in 4m7s
Build and deploy / Build container (push) Successful in 1m2s
Build and deploy / Deploy container (push) Successful in 35s
2024-12-08 00:57:57 +01:00