Documentation ¶
Index ¶
Constants ¶
View Source
const ( Name = "state_change" FunctionName = "automationTriggerStateChanged" Version = "0.0.1" )
Variables ¶
View Source
var F embed.FS
Functions ¶
func NewTriggerParams ¶
func NewTriggerParams() m.TriggerParams
Types ¶
type EventEntityState ¶
type EventEntityState struct { EntityId common.EntityId `json:"entity_id"` Value interface{} `json:"value"` State *events.EntityState `json:"state"` Attributes m.AttributeValue `json:"attributes"` Settings m.AttributeValue `json:"settings"` LastChanged *time.Time `json:"last_changed"` LastUpdated *time.Time `json:"last_updated"` }
type Trigger ¶
type Trigger struct {
// contains filtered or unexported fields
}
func (*Trigger) AsyncAttach ¶
func (*Trigger) Subscribe ¶
func (t *Trigger) Subscribe(options triggers.Subscriber) error
Subscribe ...
func (*Trigger) Unsubscribe ¶
func (t *Trigger) Unsubscribe(options triggers.Subscriber) error
Unsubscribe ...
type TriggerStateChangedMessage ¶
type TriggerStateChangedMessage struct { StorageSave bool `json:"storage_save"` DoNotSaveMetric bool `json:"do_not_save_metric"` PluginName string `json:"plugin_name"` EntityId common.EntityId `json:"entity_id"` OldState EventEntityState `json:"old_state"` NewState EventEntityState `json:"new_state"` }
Click to show internal directories.
Click to hide internal directories.