mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-05 23:15:07 -06:00
began refactor, added interface to set up for unit testing
This commit is contained in:
9
state.go
9
state.go
@@ -10,6 +10,15 @@ import (
|
||||
"saml.dev/gome-assistant/internal/http"
|
||||
)
|
||||
|
||||
type StateInterface interface {
|
||||
AfterSunrise() bool
|
||||
BeforeSunrise() bool
|
||||
AfterSunset() bool
|
||||
BeforeSunset() bool
|
||||
Get() (EntityState, error)
|
||||
Equals() (bool, error)
|
||||
}
|
||||
|
||||
// State is used to retrieve state from Home Assistant.
|
||||
type State struct {
|
||||
httpClient *http.HttpClient
|
||||
|
||||
Reference in New Issue
Block a user