Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallResponse ¶
type CallResponse struct {
ChangedStates []*State `json:"changed_states"`
ServiceResponse map[string]any `json:"service_response"`
}
CallResponse is returned when calling a service with return_response=true.
type Domain ¶
type Field ¶
type Service ¶
type State ¶
type State struct {
Entity string `json:"entity_id"`
LastChanged time.Time `json:"last_changed"`
LastReported time.Time `json:"last_reported"`
LastUpdated time.Time `json:"last_updated"`
State string `json:"state"`
Attributes map[string]any `json:"attributes"`
Context struct {
Id string `json:"id,omitempty"`
ParentId string `json:"parent_id,omitempty"`
UserId string `json:"user_id,omitempty"`
} `json:"context"`
}
func (State) Class ¶
Class determines how the state should be interpreted, or will return "" if it's unknown
func (State) UnitOfMeasurement ¶
UnitOfMeasurement provides the unit of measurement for the state, or "" if there is no unit of measurement
Click to show internal directories.
Click to hide internal directories.