Commit Graph

6 Commits

Author SHA1 Message Date
5aaa8b43e9 feat: Add proper type definition for devices
All checks were successful
Build and deploy / build (push) Successful in 10m19s
Build and deploy / Deploy container (push) Has been skipped
Depending on the implemented traits the lua class will inherit from the
associated interface class.

It also specifies the constructor function for each of the devices.
2025-10-11 00:44:18 +02:00
c1475370a9 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-11 00:44:00 +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
06b3154733 feat!: Use type alias instead of generic parameters in device macro
All checks were successful
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
23355190ca feat: Added attribute to easily register additional lua methods
Previously this could only be done by implementing a trait, like
`AddAdditionalMethods`, that that has an add_methods function where you
can put your custom methods. With this new attribute you can pass in a
register function directly!
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