Documentation
¶
Overview ¶
http is used to interact with the home assistant REST API. Currently only used to retrieve state for a single entity_id
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEquivalentWebsocketScheme ¶ added in v0.7.1
GetEquivalentWebsocketScheme returns the equivalent websocket scheme for the given scheme. If the scheme is http or https, it returns ws or wss respectively. If the scheme is ws or wss, it returns the same scheme. If the scheme is not any of the above, it returns an error.
func GetFunctionName ¶
func GetFunctionName(i interface{}) string
GetFunctionName returns the name of the function that the interface is a pointer to.
func NextId ¶
func NextId() int64
NextId returns a unique integer (for the given process), often used for providing a uniquely identifiable id for a request. This function is thread-safe.
func ParseDuration ¶ added in v0.7.1
Types ¶
type EnabledDisabledInfo ¶
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶
func (*HttpClient) GetStates ¶ added in v0.7.1
func (c *HttpClient) GetStates() ([]byte, error)
GetStates returns the states of all entities.