Commit Graph

51 Commits

Author SHA1 Message Date
79f810b1f8 docs: improve schedule.go 2025-08-01 23:29:48 -05:00
292879a8a9 docs: normalize & make basic corrections to documentation 2025-08-01 21:27:21 -05:00
e13fd6ab5b chore: update carbon pkg to v2 latest, bump version 2025-08-01 21:02:21 -05:00
d51f6d5946 refactor: move 'parse' back to internal root 2025-08-01 18:18:16 -05:00
26b8892ff6 refactor: move event_types into types/ pkg, make methods public, small fixes 2025-08-01 18:16:25 -05:00
21358b73e1 refactor: move types out of app.go into types/, renamed module files 2025-08-01 18:08:01 -05:00
c91c4f85c3 refactor: rename module to github.com/Xevion/go-ha 2025-08-01 17:04:11 -05:00
55a390e69c refactor: move parsing into internal/parse module, move other functions into misc 2025-08-01 16:55:44 -05:00
e35f296d70 refactor: remove internal priority_queue module, switch to Workiva implementation 2025-08-01 16:55:44 -05:00
1226867b8e refactor: make fork independent, rename PriorityQueue 2025-08-01 16:55:44 -05:00
e608843b09 feat: add Close() method to app, context aware channels 2025-08-01 16:55:44 -05:00
Jiri Luzny
628544c7a0 Log and propagate error instead of using Fatal 2023-12-26 23:28:41 +01:00
Jiri Luzny
ccb0f19d41 Migrated rest of the obvious logs/prints to slog. 2023-12-09 22:01:32 +01:00
Jiri Luzny
b3a38013c6 Added daily schedule test. Migrated relevant files to slog. 2023-12-09 21:08:50 +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
447400868d switch back to pointers, but this time add etl := etl when iterating over list to set correct pointer 2023-01-13 21:57:08 -05:00
Sam Lewis
e58a75388e fix bug when registering multiple listeners and change sunrise/sunset to non-ha impl 2023-01-12 22:33:38 -05:00
Sam Lewis
ac97d82cfe fix sun offset 2022-12-28 17:53:59 -05:00
Sam Lewis
c8128b5dba change to vanity url saml.dev 2022-12-12 00:15:00 -05:00
Sam Lewis
60349852e6 add OnlyOnDates to schedule, change exceptionday to exceptiondates everywhere 2022-11-26 23:36:19 -05:00
Sam Lewis
ced79559e5 split daily schedule and interval 2022-11-13 20:17:00 -05:00
Sam Lewis
f7e212e1d1 fix sunset/sunrise schedule bug 2022-11-09 17:41:13 -05:00
Sam Lewis
5afa301f36 add before/after sunset/sunrise to state 2022-11-06 16:10:05 -05:00
Sam Lewis
e3e7889574 adjust next schedule message 2022-11-04 23:03:16 -04:00
Sam Lewis
2575525528 make App exported 2022-11-04 21:10:14 -04:00
Sam Lewis
b0804e39d0 some tweaks/renames, schedule documentation 2022-11-01 01:20:15 -04:00
Sam Lewis
b2a4e26946 add Exceptions to schedules 2022-10-31 02:29:48 -04:00
Sam Lewis
d077c3feec DRY duration parsing 2022-10-31 01:36:40 -04:00
Sam Lewis
b22b544437 add Duration for entityListener and rename TimeString to DurationString 2022-10-30 23:07:54 -04:00
Sam Lewis
5e2d6cb092 export strucs 2022-10-26 23:05:14 -04:00
Sam Lewis
66e179c568 sunrise sunset working, not the cleanest solution but it works 2022-10-24 23:03:04 -04:00
Sam Lewis
e2fb6872ae make some things private 2022-10-23 18:53:38 -04:00
Sam Lewis
2c5e68903a added Throttle to entityListener 2022-10-16 23:41:21 -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
7f9e346d34 design and impl BaseServiceRequest 2022-10-12 01:14:32 -04:00
Sam Lewis
b3e45f46a4 just have TimeOfDay and Duration ¯\_(ツ)_/¯ 2022-10-11 09:52:58 -04:00
Sam Lewis
7c1e8faa43 change helper from TimeOfDay to Duration 2022-10-11 02:24:48 -04:00
Sam Lewis
911c3521ba switched to time.Duration 2022-10-11 02:17:02 -04:00
Sam Lewis
44678ae762 commit before try switching to duration 2022-10-11 01:44:53 -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
2597711973 websocket initialization done in App 2022-10-09 23:35:01 -04:00