69 Commits

Author SHA1 Message Date
a8d4cefaab chore: remove extension from LICENSE file
Also slight refactor for NewBaseServiceRequest
2025-08-01 16:55:44 -05:00
7081d06001 refactor: rename files into common naming, rename GetId to NextId, document function 2025-08-01 16:55:44 -05:00
55a390e69c refactor: move parsing into internal/parse module, move other functions into misc 2025-08-01 16:55:44 -05:00
378bc29e7e refactor: use atomic.Int64 for underlying GetId implementation 2025-08-01 16:55:44 -05:00
393191ccb5 refactor: remove unused http.go post() method 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
b3001e7f6e fix: fix always cancelled connection context, improper ctx 2025-08-01 16:55:44 -05:00
2bcb4c2594 feat: better close message, add channel capacity 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
Sam Lewis
1700dbdeb9 add Timer service 2025-05-31 14:22:59 -04:00
saml-dev
cd839c618a Merge pull request #30 from zimnyjakub/main
Add List func  to state
2025-01-22 23:00:39 -05:00
Sam Lewis
65672dc311 add adaptive lighting service 2025-01-20 20:30:07 -05:00
Jakub Zimny
84f9726b09 Add functionality to list entities from REST endpoint 2025-01-20 23:32:12 +01:00
Sam Lewis
56ccdfbdb2 two url fixes:
- default scheme for legacy connection params
- set paths for http and websocket APIs
2025-01-19 20:58:16 -05:00
saml-dev
c27e596dad Merge pull request #26 from metalmatze/golanglint-ci-fixes
Fix default golanglint-ci errors
2025-01-17 21:25:44 -05:00
saml-dev
b37667f1db Merge pull request #24 from metalmatze/service-errors
Return Service errors
2025-01-17 20:36:30 -05:00
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
Matthias Loibl
02b6c413f1 Return Service errors
Additionally, removed the context that gets passed into the Services but isn't used in one of them. The websockets APIs also don't have any use for context.
2025-01-17 17:50:06 +01:00
Matthias Loibl
b5d35235f8 Parse URL and pass it to clients
Right now, this SDK only works with IP:Port.
I'm however running on https://home.example.com and need https or wss and an implicit port 443.

Using net/url should be the best option.
2025-01-17 01:46:35 +01:00
Michael Haggerty
261a628542 SetupConnection(): remove excess slash in URI
The extra slash was added (presumably by accident) in
https://github.com/saml-dev/gome-assistant/pull/17.
2024-03-23 23:48:10 +01:00
saml-dev
93600c2ed0 Merge pull request #17 from dsiebel/tls-support 2024-03-09 16:55:05 -05:00
Michael Haggerty
68398b02b0 Add a way to fire Home Assistant events 2024-03-09 17:31:25 +01:00
Sam Lewis
c28cba8e91 add Script service 2024-02-25 21:49:04 -05:00
Dominik Siebel
8b436ce4ee feat: support secure connections 2024-02-22 11:28:05 +01:00
Sam Lewis
a9aad16cf3 Merge branch 'main' of https://github.com/saml-dev/gome-assistant 2023-12-29 21:30:44 -05:00
Sam Lewis
47a9910fda add zwavejs service 2023-12-29 21:30:41 -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
Jiri Luzny
a4fbbe5ac3 Setup pretty logging and start refactoring of the library to slog 2023-12-09 21:08:50 +01:00
Sam Lewis
3ec6608714 began refactor, added interface to set up for unit testing 2023-10-22 00:56:12 -04:00
Sam Lewis
eb26a44459 two things:
fix bug with newer HA versions by sending int id instead of string
add warning to logs when receiving unsuccessful websocket response
2023-06-11 14:09:13 -04:00
Sam Lewis
1dd8eaa58d add climate service 2023-05-01 00:53:52 -04:00
Lubos Dolezel
754ffafeae Don't exit the app on connection failures, expose the error in the API 2023-03-07 18:30:40 +01:00
Lubos Dolezel
23f87fef8b Avoid panic on disconnect 2023-03-07 18:18:14 +01:00
saml-dev
531091dd66 Merge pull request #4 from LubosD/feature/ws_write_locking
Fix panics due to concurrent websocket writes
2023-02-26 17:57:40 -05:00
Lubos Dolezel
f27cbfb299 Fix panics due to concurrent websocket writes 2023-02-24 11:49:26 +01:00
Lubos Dolezel
0ec8f2ff4e Number.SetValue() should accept a float instead of int 2023-02-21 18:33:25 +01:00
jackson
6e49b13f89 add vacuum domain/services 2023-01-31 20:31:10 -05:00
jackson
47bff5da71 correct methods 2023-01-30 21:05:17 -05:00
jackson
cae0c275ca add tts domain/services 2023-01-30 21:00:03 -05:00
jackson
abf47b223f Use correct service 2023-01-30 20:59:41 -05:00
jackson
1f1f4e97ca add domains: alarm_control_panel, cover, media_player, scene 2023-01-29 19:14:10 -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
c8128b5dba change to vanity url saml.dev 2022-12-12 00:15:00 -05:00
Sam Lewis
ced79559e5 split daily schedule and interval 2022-11-13 20:17:00 -05:00
Sam Lewis
e9f07b9b32 add number service 2022-11-09 20:31:06 -05:00
Sam Lewis
ba9132745e add notify service 2022-11-06 15:00:39 -05:00
Sam Lewis
648eb62cfa fix bug when registering multiple schedules and >=1 are sunset/sunrise 2022-11-04 22:47:42 -04:00