Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { EntityID string `json:"entity_id,omitempty"` EventType string `json:"data,omitempty"` TimeFired time.Time `json:"time_fired,omitempty"` Origin string `json:"origin,omitempty"` Context *HaContext `json:"context,omitempty"` NewState *State `json:"new_state,omitempty"` OldState map[string]interface{} `json:"old_state,omitempty"` }
type HaClient ¶
type HaClient struct { URI string Token string Conn *websocket.Conn AuthChannel chan *Message OtherChannel chan *Message EventChannel chan *Message ID int64 // contains filtered or unexported fields }
func (*HaClient) CallService ¶
type Message ¶
type Message struct { ID int64 `json:"id,omitempty"` AccessToken string `json:"access_token,omitempty"` Type string `json:"type,omitempty"` Event *Event `json:"event,omitempty"` EventType string `json:"event_type,omitempty"` Domain string `json:"domain,omitempty"` Service string `json:"service,omitempty"` ServiceData interface{} `json:"service_data,omitempty"` Target map[string]string `json:"target,omitempty"` Success bool `json:"success,omitempty"` Result *HaContext `json:"result,omitempty"` }
type State ¶
type State struct { DeviceClass string `json:"device_class,omitempty"` FriendlyName string `json:"friendly_name,omitempty"` Icon string `json:"icon,omitempty"` StateClass string `json:"state_class,omitempty"` UnitOfMeasurement string `json:"unit_of_measurement,omitempty"` Context *HaContext `json:"context,omitempty"` EntityID string `json:"entity_id,omitempty"` LastChanged time.Time `json:"last_changed,omitempty"` LastUpdated time.Time `json:"last_updated,omitempty"` State interface{} `json:"state,omitempty"` }
Click to show internal directories.
Click to hide internal directories.