Commit Graph

61 Commits

Author SHA1 Message Date
aad089aa10 chore: Removed old leftover contact sensor presence config 2025-09-10 01:46:16 +02:00
18e40726fe refactor: Remove unneeded wrapper functions when specifying callbacks
These wrappers can be moved up to where the callback itself is defined
instead of having to wrap the call manually. This also works a lot nicer
now that it is possible to provide multiple callback functions.
2025-09-10 01:46:16 +02:00
1925bac73c fix: Front door presence does not get cleared properly 2025-09-10 01:46:16 +02:00
8bb17e1440 feat(config)!: Reworked how configuration is loaded
The environment variable `AUTOMATION_CONFIG` has been renamed to
`AUTOMATION__ENTRYPOINT` and can now also be set in `automation.toml` by
specifying:
```
automation = "<path>"
```

Directly accessing the environment variables in lua in no longer
possible. To pass in configuration or secrets you can now instead make
use of the `variables` and `secrets` modules.

To set values in these modules you can either specify them in
`automation.toml`:
```
[variables]
<name> = <value>

[secrets]
<name> = <value>
```
Note that these values will get converted to a string.

You can also specify the environment variables
`AUTOMATION__VARIABLES__<name>` and `AUTOMATION__SECRETS__<name>` to
set variables and secrets respectively. By adding the suffix `__FILE` to
the environment variable name the contents of a file can be loaded into
the variable or secret.

Note that variables and secrets are identical in functionality and the
name difference exists purely to make it clear that secret values are
meant to be kept secret.
2025-09-05 04:48:00 +02:00
ba37de3939 feat(config)!: Move new_mqtt_client out of global automation table into separate module
The function `new_mqtt_client` was the last remaining entry in the
global `automation` table. The function was renamed to `new` and placed
in the new `mqtt` module. As `automation` is now empty, it has been
removed.
2025-09-05 03:55:04 +02:00
22fee0ed77 feat(config)!: Move device_manager out of global automation table into separate module
Moved `automation.device_manager` into a separate module called
`device_manager`
2025-09-05 03:55:03 +02:00
5aebab28ed feat(config)!: Move util out of global automation table into separate module
Move `automation.util` into a separate module called `utils`.
2025-09-05 03:55:03 +02:00
e626caad8a feat(config)!: Fulfillment config is now returned at the end of the config
Previously the fulfillment config was set by setting
`automation.fulfillment`, this will no longer work in the future when
the global automation gets split into modules.
2025-09-05 03:55:03 +02:00
f3b1854beb fix: Crash if hallway automation is called before door/trash have been initialized
Resolves: #4
2025-09-04 04:27:49 +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
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
1530875045 Presence and light sensor call all function in array 2025-08-31 23:57:58 +02:00
9616017c8f Print lua version on startup 2025-08-31 23:57:56 +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
6c9d2c16c1 Converted presence notification into lua callback 2025-08-31 03:55:08 +02:00
2d9e3d26f2 Send laundy notification from lua 2025-08-31 03:55:08 +02:00
7f41132965 Switch workbench light to new color temperature light
All checks were successful
Build and deploy / Build application (push) Successful in 5m55s
Build and deploy / Build container (push) Successful in 2m16s
Build and deploy / Deploy container (push) Successful in 34s
2025-08-22 23:27:05 +02:00
00cd0366fd Added hue groups for bedroom lights controlled by hue switch
All checks were successful
Build and deploy / Build application (push) Successful in 3m34s
Build and deploy / Build container (push) Successful in 57s
Build and deploy / Deploy container (push) Successful in 32s
2025-01-28 23:33:30 +01:00
68684d9410 Added hue groups for kitchen and living room lights controlled by hue switch
All checks were successful
Build and deploy / Build application (push) Successful in 3m50s
Build and deploy / Build container (push) Successful in 1m21s
Build and deploy / Deploy container (push) Successful in 35s
2025-01-28 22:49:37 +01:00
47d509cec1 Unneeded mqtt client in huegroup
Some checks failed
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
856bc3cc96 Updated airfilter ip
All checks were successful
Build and deploy / Build application (push) Successful in 4m16s
Build and deploy / Build container (push) Successful in 1m25s
Build and deploy / Deploy container (push) Successful in 35s
2025-01-27 02:21:13 +01:00
fbabc978b1 Reworked IkeaOutlet into more generic outlet that also (optionally) supports power measurement
All checks were successful
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
48c600b9cb Use ip instead of dns name for airfilter
All checks were successful
Build and deploy / Build application (push) Successful in 4m13s
Build and deploy / Build container (push) Successful in 1m0s
Build and deploy / Deploy container (push) Successful in 33s
The dns name does not resolve properly in the container
2025-01-22 03:55:28 +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
5af713cf8f Switched speaker and mixer from KasaOutlet to IkeaOutlet
All checks were successful
Build and deploy / Build application (push) Successful in 4m47s
Build and deploy / Build container (push) Successful in 1m21s
Build and deploy / Deploy container (push) Successful in 33s
2025-01-11 17:55:20 +01:00
ae61cf5dd2 Updated ips
All checks were successful
Build and deploy / Build application (push) Successful in 3m35s
Build and deploy / Build container (push) Successful in 1m22s
Build and deploy / Deploy container (push) Successful in 33s
2024-12-27 22:24:31 +01:00
8ad75a1148 Added workbench light (no color temp control for now)
All checks were successful
Build and deploy / Build application (push) Successful in 3m30s
Build and deploy / Build container (push) Successful in 1m6s
Build and deploy / Deploy container (push) Successful in 33s
2024-12-17 19:59:08 +01:00
ef180f6261 Added automatic storage room light
All checks were successful
Build and deploy / Build application (push) Successful in 3m30s
Build and deploy / Build container (push) Successful in 1m18s
Build and deploy / Deploy container (push) Successful in 31s
2024-12-16 23:15:45 +01:00
1462755f36 Added window sensors, updated room names, and improved hallway automation
All checks were successful
Build and deploy / Build application (push) Successful in 3m16s
Build and deploy / Build container (push) Successful in 52s
Build and deploy / Deploy container (push) Successful in 31s
2024-12-12 17:17:50 +01:00
24815edd34 Increased hallway light timeout back to two minutes
All checks were successful
Build and deploy / Build application (push) Successful in 3m59s
Build and deploy / Build container (push) Successful in 1m18s
Build and deploy / Deploy container (push) Successful in 34s
2024-12-10 22:23:07 +01:00
175056416e Updated is_on -> on to be consistent with rust
All checks were successful
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
41d2af655b ActionCallback now always returns self and state can be anything serializable 2024-12-08 02:50:52 +01:00
e9f080ef19 Moved and improved hallways logic with lua
All checks were successful
Build and deploy / Build application (push) Successful in 4m7s
Build and deploy / Build container (push) Successful in 1m18s
Build and deploy / Deploy container (push) Successful in 21s
2024-12-06 01:27:35 +01:00
9d4b52b511 Implemented new timeout mechanism for ikea_outlet
All checks were successful
Build and deploy / Build application (push) Successful in 5m24s
Build and deploy / Build container (push) Successful in 1m8s
Build and deploy / Deploy container (push) Successful in 19s
2024-12-04 03:03:53 +01:00
6b8d0b7d56 Added hue wall switches
All checks were successful
Build and deploy / Build application (push) Successful in 4m9s
Build and deploy / Build container (push) Successful in 53s
Build and deploy / Deploy container (push) Successful in 32s
2024-11-30 22:17:16 +01:00
5185b0d3ba Added guest room light
All checks were successful
Build and deploy / Build application (push) Successful in 3m23s
Build and deploy / Build container (push) Successful in 55s
Build and deploy / Deploy container (push) Successful in 31s
2024-11-30 18:44:48 +01:00
4bb49a381b Use IkeaRemote to control devices and completely replace AudioSetup
All checks were successful
Build and deploy / Build application (push) Successful in 3m24s
Build and deploy / Build container (push) Successful in 43s
Build and deploy / Deploy container (push) Successful in 18s
2024-11-30 06:06:30 +01:00
b0467b8012 Fixed kasa ip addresses
All checks were successful
Build and deploy / Build application (push) Successful in 3m39s
Build and deploy / Build container (push) Successful in 1m5s
Build and deploy / Deploy container (push) Successful in 37s
2024-08-08 00:24:14 +02:00
3105c266b0 Updated hue ip
All checks were successful
Build and deploy / Build application (push) Successful in 3m59s
Build and deploy / Build container (push) Successful in 1m24s
Build and deploy / Deploy container (push) Successful in 38s
2024-08-07 23:22:11 +02:00
006320be18 Added trash light automation
All checks were successful
Build and deploy / Build application (push) Successful in 3m49s
Check / Run checks (push) Successful in 2m16s
Build and deploy / Build container (push) Successful in 49s
Build and deploy / Deploy container (push) Successful in 32s
2024-07-15 00:37:24 +02:00
c6e63750d0 Fixed bathroom light
All checks were successful
Build and deploy / Build application (push) Successful in 3m48s
Check / Run checks (push) Successful in 3m20s
Build and deploy / Build container (push) Successful in 1m49s
Build and deploy / Deploy container (push) Successful in 38s
2024-07-08 23:25:24 +02:00
d8d348d906 Fixed presence topic
All checks were successful
Build and deploy automation_rs / Run pre-commit checks (push) Successful in 6m50s
Build and deploy automation_rs / Build automation_rs (push) Successful in 4m47s
Build and deploy automation_rs / Build Docker image (push) Successful in 1m11s
Build and deploy automation_rs / Deploy Docker container (push) Successful in 33s
2024-05-24 22:43:03 +02:00