mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-06 01:15:10 -06:00
add enable/disable function to every builder
This commit is contained in:
2
state.go
2
state.go
@@ -36,7 +36,7 @@ func newState(c *http.HttpClient, homeZoneEntityId string) (*State, error) {
|
||||
func (s *State) getLatLong(c *http.HttpClient, homeZoneEntityId string) error {
|
||||
resp, err := s.Get(homeZoneEntityId)
|
||||
if err != nil {
|
||||
return errors.New(fmt.Sprintf("couldn't get latitude/longitude from home assistant entity '%s'. Did you type it correctly? It should be a zone like 'zone.home'.\n", homeZoneEntityId))
|
||||
return fmt.Errorf("couldn't get latitude/longitude from home assistant entity '%s'. Did you type it correctly? It should be a zone like 'zone.home'", homeZoneEntityId)
|
||||
}
|
||||
|
||||
if resp.Attributes["latitude"] != nil {
|
||||
|
||||
Reference in New Issue
Block a user