refactor: move http module into internal root, remove deprecated handling

This commit is contained in:
2025-08-01 17:03:28 -05:00
parent a8d4cefaab
commit 5698a30b37
6 changed files with 87 additions and 91 deletions

View File

@@ -8,7 +8,7 @@ import (
"github.com/golang-module/carbon"
"github.com/Xevion/gome-assistant/internal/http"
internal "github.com/Xevion/gome-assistant/internal"
)
type State interface {
@@ -23,7 +23,7 @@ type State interface {
// State is used to retrieve state from Home Assistant.
type StateImpl struct {
httpClient *http.HttpClient
httpClient *internal.HttpClient
latitude float64
longitude float64
}
@@ -35,7 +35,7 @@ type EntityState struct {
LastChanged time.Time `json:"last_changed"`
}
func newState(c *http.HttpClient, homeZoneEntityId string) (*StateImpl, error) {
func newState(c *internal.HttpClient, homeZoneEntityId string) (*StateImpl, error) {
state := &StateImpl{httpClient: c}
// Ensure the zone exists and has required attributes