Documentation ¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) DeviceInfo() (*types.DeviceInfo, error)
- func (c *Client) Hello() (*types.HelloResponse, error)
- func (c *Client) LastMessageAt() time.Time
- func (c *Client) ListEntities() error
- func (c *Client) Login(password string) error
- func (c *Client) Ping() error
- func (c *Client) Send(message proto.Message) error
- func (c *Client) SendAndWaitForResponse(message proto.Message, messageType uint64) (proto.Message, error)
- func (c *Client) SubscribeLogs(level types.LogLevel) error
- func (c *Client) SubscribeStates() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ID string CommunicationTimeout time.Duration // contains filtered or unexported fields }
Client struct.
func GetClient ¶ added in v1.3.0
func GetClient(clientID, address, encryptionKey string, timeout time.Duration, handlerFunc func(proto.Message)) (*Client, error)
GetClient returns esphome api client
func (*Client) DeviceInfo ¶
func (c *Client) DeviceInfo() (*types.DeviceInfo, error)
DeviceInfo queries the ESPHome device information.
func (*Client) LastMessageAt ¶
LastMessage returns the time of the last message received.
func (*Client) SendAndWaitForResponse ¶
func (*Client) SubscribeLogs ¶
SubscribeLogs func
Click to show internal directories.
Click to hide internal directories.