Commit Graph

39 Commits

Author SHA1 Message Date
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
Sam Lewis
d077c3feec DRY duration parsing 2022-10-31 01:36:40 -04:00
Sam Lewis
ce6649dd29 fix refactor error 2022-10-31 01:20:52 -04:00
Sam Lewis
8a59770936 enforce ToState when using Duration 2022-10-31 01:17:20 -04:00
Sam Lewis
83789184f0 event listeners working 2022-10-19 00:25:15 -04:00
Sam Lewis
ccd6805d40 cleanup todos that are done 2022-10-17 12:37:36 -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
e476a06aca remove log statements 2022-10-13 02:20:28 -04:00
Sam Lewis
b99c1e5925 Added lots of services and fixed bug with ID for websocket calls 2022-10-13 02:17:36 -04:00
Sam Lewis
7f9e346d34 design and impl BaseServiceRequest 2022-10-12 01:14:32 -04:00
Sam Lewis
4cf16d0d41 moved websocket code to websocket package 2022-10-11 22:58:44 -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
689a6ce4d3 add TODOs 2022-10-10 00:21:14 -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
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
Sam Lewis
889d7ab993 checkin before rename 2022-10-07 20:59:04 -04:00