Matthias Loibl
ccebcb869f
Fix default golanglint-ci errors
...
These errors show up when simply running `golangci-lint run ./...` on the project.
2025-01-17 17:59:30 +01:00
Sam Lewis
1932f1edf7
make an interface for State object
2023-10-22 18:16:20 -04:00
Sam Lewis
824d6c12d1
refactor all automation types to take a list
2023-10-22 18:07:42 -04:00
Sam Lewis
3ec6608714
began refactor, added interface to set up for unit testing
2023-10-22 00:56:12 -04:00
Sam Lewis
3cb96800f9
allow empty string for state
2023-10-08 19:29:28 -04:00
Sam Lewis
9d7701c481
rename to DisabledWhen and EnabledWhen
2023-10-07 14:36:42 -04:00
Sam Lewis
a06f62d1ba
add enable/disable function to every builder
2023-10-07 14:02:24 -04:00
Sam Lewis
c8128b5dba
change to vanity url saml.dev
2022-12-12 00:15:00 -05:00
Sam Lewis
40c5fe76ba
fix bug with entityListeners using .Duration
2022-12-09 19:40:51 -05:00
Sam Lewis
ffb9c9f08b
continue instead of return
2022-11-27 23:46:02 -05:00
Sam Lewis
60349852e6
add OnlyOnDates to schedule, change exceptionday to exceptiondates everywhere
2022-11-26 23:36:19 -05:00
Sam Lewis
83998b5e7e
only trigger ETL if newState != oldState
2022-11-10 20:32:32 -05:00
Sam Lewis
7fda113913
add etl.RunOnStartup
2022-11-09 20:16:35 -05:00
Sam Lewis
1ec5878ff9
add state as second arg for eventListenerCallback
2022-11-08 22:48:34 -05:00
Sam Lewis
2575525528
make App exported
2022-11-04 21:10:14 -04:00
Sam Lewis
33a92d96bd
documented general use cases
2022-11-02 00:04:40 -04:00
Sam Lewis
b0804e39d0
some tweaks/renames, schedule documentation
2022-11-01 01:20:15 -04:00
Sam Lewis
b1928496cc
add exceptions to entityListener
2022-10-31 02:14:13 -04:00
Sam Lewis
d077c3feec
DRY duration parsing
2022-10-31 01:36:40 -04:00
Sam Lewis
8a59770936
enforce ToState when using Duration
2022-10-31 01:17:20 -04:00
Sam Lewis
b22b544437
add Duration for entityListener and rename TimeString to DurationString
2022-10-30 23:07:54 -04:00
Sam Lewis
5dda691455
2 things:
...
make entityListener private on builders
fix: subsequent listeners not called if one fails checks
2022-10-27 01:57:49 -04:00
Sam Lewis
5e2d6cb092
export strucs
2022-10-26 23:05:14 -04:00
Sam Lewis
e2fb6872ae
make some things private
2022-10-23 18:53:38 -04:00
Sam Lewis
83789184f0
event listeners working
2022-10-19 00:25:15 -04:00
Sam Lewis
b92147a6a6
remove unnecessary check from throttle check
2022-10-17 12:32:26 -04:00
Sam Lewis
2c5e68903a
added Throttle to entityListener
2022-10-16 23:41:21 -04:00
Sam Lewis
7ed5cbcf94
time constraints on listener are working
2022-10-16 23:03:19 -04:00
Sam Lewis
145c12dd25
all builders now take duration strings
2022-10-16 22:45:13 -04:00
Sam Lewis
6ca78e88dd
listeners working, sunrise/sunset working with string offset
2022-10-16 22:23:46 -04:00
Sam Lewis
8b888a2d89
set up entityListener and switch websocket library
2022-10-16 15:20:04 -04:00
Sam Lewis
2d77c4b657
schedule works! 🎉 🔥
2022-10-15 22:22:59 -04:00
Sam Lewis
911c3521ba
switched to time.Duration
2022-10-11 02:17:02 -04:00
Sam Lewis
7bcca889f9
good progress yay:
...
- impl http client
- create http client in App()
- generic builder for Service.*
- set Service on app to pass to callbacks later
- impl State
- set State on app to pass to callbacks later
- change panic to log.Fatalln
2022-10-11 01:22:23 -04:00
Sam Lewis
25a843fc7b
few things:
...
- easy comparison of hourMinute with .int()
- created Sunset/Sunrise vars of type hourMinute for easy end-user use
2022-10-10 00:11:41 -04:00
Sam Lewis
bdc5e9295d
figured out how to get conn/ctx into users method calls - by passing a configured service object to their callback functions
2022-10-09 16:28:42 -04:00