fix bug when registering multiple listeners and change sunrise/sunset to non-ha impl

This commit is contained in:
Sam Lewis
2023-01-12 22:33:38 -05:00
parent a868c08d40
commit e58a75388e
10 changed files with 112 additions and 62 deletions

View File

@@ -15,8 +15,8 @@ type HttpClient struct {
token string
}
func NewHttpClient(url, token string) *HttpClient {
url = fmt.Sprintf("http://%s/api", url)
func NewHttpClient(ip, port, token string) *HttpClient {
url := fmt.Sprintf("http://%s:%s/api", ip, port)
return &HttpClient{url, token}
}