mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-09 22:07:20 -06:00
fix bug when registering multiple listeners and change sunrise/sunset to non-ha impl
This commit is contained in:
@@ -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}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user