Documentation ¶
Index ¶
- Constants
- func EventName(event interface{}) string
- type CommandClearStorage
- type CommandCreateBackup
- type CommandDisableTask
- type CommandDisableTrigger
- type CommandEnableTask
- type CommandEnableTrigger
- type CommandLoadEntity
- type CommandSendFileToTelegram
- type CommandTerminal
- type CommandUnloadEntity
- type Common
- type EntityState
- type EventActionCompleted
- type EventActionLoaded
- type EventActionUnloaded
- type EventAddedActionModel
- type EventAddedConditionModel
- type EventCallAction
- type EventCallEntityAction
- type EventCallScene
- type EventCallTaskAction
- type EventCallTrigger
- type EventCreatedBackup
- type EventCreatedEntityModel
- type EventCreatedScriptModel
- type EventCreatedTaskModel
- type EventCreatedTriggerModel
- type EventCreatedZigbee2mqttModel
- type EventDirectMessage
- type EventEntityLoaded
- type EventEntitySetState
- type EventEntityState
- type EventEntityUnloaded
- type EventGetLastState
- type EventGetServerVersion
- type EventGetStateById
- type EventLastStateChanged
- type EventMqttNewClient
- type EventPluginLoaded
- type EventPluginUnloaded
- type EventRemovedActionModel
- type EventRemovedBackup
- type EventRemovedConditionModel
- type EventRemovedScriptModel
- type EventRemovedTaskModel
- type EventRemovedTriggerModel
- type EventRemovedVariableModel
- type EventRemovedZigbee2mqttModel
- type EventServerVersion
- type EventServiceRestarted
- type EventServiceStarted
- type EventServiceStopped
- type EventStartedRestore
- type EventStateById
- type EventStateChanged
- type EventTaskCompleted
- type EventTaskLoaded
- type EventTaskUnloaded
- type EventTriggerCompleted
- type EventTriggerLoaded
- type EventTriggerUnloaded
- type EventUpdateUserLocation
- type EventUpdatedActionModel
- type EventUpdatedConditionModel
- type EventUpdatedEntityModel
- type EventUpdatedMetric
- type EventUpdatedScriptModel
- type EventUpdatedTaskModel
- type EventUpdatedTriggerModel
- type EventUpdatedVariableModel
- type EventUpdatedZigbee2mqttModel
- type EventUploadedBackup
- type EventUserSignedIn
- type OwnerType
- type TriggerMessage
Constants ¶
const ( OwnerUser = OwnerType("user") OwnerSystem = OwnerType("system") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommandClearStorage ¶ added in v0.13.0
type CommandClearStorage struct {
Num int64 `json:"num"`
}
type CommandCreateBackup ¶ added in v0.13.0
type CommandCreateBackup struct {
Scheduler bool `json:"scheduler"`
}
type CommandDisableTask ¶ added in v0.12.0
type CommandDisableTask struct {
Id int64 `json:"id"`
}
CommandDisableTask ...
type CommandDisableTrigger ¶ added in v0.12.0
type CommandDisableTrigger struct {
Id int64 `json:"id"`
}
CommandDisableTrigger ...
type CommandEnableTask ¶ added in v0.12.0
type CommandEnableTask struct {
Id int64 `json:"id"`
}
CommandEnableTask ...
type CommandEnableTrigger ¶ added in v0.12.0
type CommandEnableTrigger struct {
Id int64 `json:"id"`
}
CommandEnableTrigger ...
type CommandLoadEntity ¶ added in v0.12.0
CommandLoadEntity ...
type CommandSendFileToTelegram ¶ added in v0.13.0
type CommandTerminal ¶ added in v0.15.0
CommandTerminal ...
type CommandUnloadEntity ¶ added in v0.12.0
CommandUnloadEntity ...
type Common ¶ added in v0.15.0
type EntityState ¶ added in v0.15.0
type EntityState struct { Name string `json:"name"` Description string `json:"description"` ImageUrl *string `json:"image_url"` Icon *string `json:"icon"` }
EntityState ...
type EventActionCompleted ¶ added in v0.12.0
type EventActionLoaded ¶ added in v0.12.0
type EventActionLoaded struct {
Id int64 `json:"id"`
}
EventActionLoaded ...
type EventActionUnloaded ¶ added in v0.12.0
type EventActionUnloaded struct {
Id int64 `json:"id"`
}
EventActionUnloaded ...
type EventAddedActionModel ¶ added in v0.12.0
type EventAddedActionModel struct {
Id int64 `json:"id"`
}
EventAddedActionModel ...
type EventAddedConditionModel ¶ added in v0.12.0
type EventAddedConditionModel struct {
Id int64 `json:"id"`
}
EventAddedConditionModel ...
type EventCallAction ¶
EventCallAction ...
type EventCallEntityAction ¶ added in v0.12.0
type EventCallEntityAction struct { PluginName *string `json:"plugin_name"` EntityId *common.EntityId `json:"entity_id"` ActionName string `json:"action_name"` Args map[string]interface{} `json:"args"` AreaId *int64 `json:"area_id"` Tags []string `json:"tags"` }
EventCallEntityAction ...
type EventCallScene ¶
type EventCallScene struct { PluginName string `json:"type"` EntityId common.EntityId `json:"entity_id"` Args map[string]interface{} `json:"args"` }
EventCallScene ...
type EventCallTaskAction ¶
EventCallTaskAction ...
type EventCallTrigger ¶ added in v0.12.0
EventCallTrigger ...
type EventCreatedBackup ¶ added in v0.12.0
type EventCreatedEntityModel ¶ added in v0.12.0
EventCreatedEntityModel ...
type EventCreatedScriptModel ¶ added in v0.12.0
type EventCreatedScriptModel struct { Common ScriptId int64 `json:"script_id"` Script *m.Script `json:"script"` }
EventCreatedScriptModel ...
type EventCreatedTaskModel ¶ added in v0.12.0
type EventCreatedTaskModel struct {
Id int64 `json:"id"`
}
EventCreatedTaskModel ...
type EventCreatedTriggerModel ¶ added in v0.12.0
type EventCreatedTriggerModel struct {
Id int64 `json:"id"`
}
EventCreatedTriggerModel ...
type EventCreatedZigbee2mqttModel ¶ added in v0.12.0
type EventCreatedZigbee2mqttModel struct { Id int64 `json:"id"` Bridge *m.Zigbee2mqtt `json:"bridge"` }
EventCreatedZigbee2mqttModel ...
type EventDirectMessage ¶ added in v0.9.5
type EventEntityLoaded ¶ added in v0.12.0
type EventEntityLoaded struct { EntityId common.EntityId `json:"entity_id"` PluginName string `json:"plugin_name"` }
EventEntityLoaded ...
type EventEntitySetState ¶
type EventEntitySetState struct { EntityId common.EntityId `json:"entity_id"` NewState *string `json:"new_state"` AttributeValues m.AttributeValue `json:"attribute_values"` SettingsValue m.AttributeValue `json:"settings_value"` StorageSave bool `json:"storage_save"` }
EventEntitySetState ...
type EventEntityState ¶ added in v0.15.0
type EventEntityState struct { EntityId common.EntityId `json:"entity_id"` Value interface{} `json:"value"` State *EntityState `json:"state"` Attributes m.Attributes `json:"attributes"` Settings m.Attributes `json:"settings"` LastChanged *time.Time `json:"last_changed"` LastUpdated *time.Time `json:"last_updated"` }
EventEntityState ...
func (EventEntityState) Compare ¶ added in v0.15.0
func (e1 EventEntityState) Compare(e2 EventEntityState) (ident bool)
Compare ...
type EventEntityUnloaded ¶ added in v0.12.0
type EventEntityUnloaded struct { EntityId common.EntityId `json:"entity_id"` PluginName string `json:"plugin_name"` }
EventEntityUnloaded ...
type EventGetLastState ¶
EventGetLastState ...
type EventGetServerVersion ¶ added in v0.17.0
type EventGetServerVersion struct {
Common
}
EventGetServerVersion ...
type EventGetStateById ¶ added in v0.18.2
type EventGetStateById struct { Common EntityId common.EntityId `json:"entity_id"` StorageId int64 `json:"storage_id"` }
EventGetStateById ...
type EventLastStateChanged ¶ added in v0.8.6
type EventLastStateChanged struct { PluginName string `json:"plugin_name"` EntityId common.EntityId `json:"entity_id"` OldState EventEntityState `json:"old_state"` NewState EventEntityState `json:"new_state"` }
EventLastStateChanged ...
type EventMqttNewClient ¶ added in v0.12.0
type EventMqttNewClient struct {
ClientId string
}
type EventPluginLoaded ¶ added in v0.12.0
type EventPluginLoaded struct {
PluginName string `json:"plugin_name"`
}
EventPluginLoaded ...
type EventPluginUnloaded ¶ added in v0.12.0
type EventPluginUnloaded struct {
PluginName string `json:"plugin_name"`
}
EventPluginUnloaded ...
type EventRemovedActionModel ¶ added in v0.12.0
type EventRemovedActionModel struct {
Id int64 `json:"id"`
}
EventRemovedActionModel ...
type EventRemovedBackup ¶ added in v0.12.0
type EventRemovedBackup struct {
Name string `json:"name"`
}
type EventRemovedConditionModel ¶ added in v0.12.0
type EventRemovedConditionModel struct {
Id int64 `json:"id"`
}
EventRemovedConditionModel ...
type EventRemovedScriptModel ¶ added in v0.12.0
type EventRemovedScriptModel struct { Common ScriptId int64 `json:"script_id"` Script *m.Script `json:"script"` }
EventRemovedScriptModel ...
type EventRemovedTaskModel ¶ added in v0.12.0
type EventRemovedTaskModel struct {
Id int64 `json:"id"`
}
EventRemovedTaskModel ...
type EventRemovedTriggerModel ¶ added in v0.12.0
type EventRemovedTriggerModel struct {
Id int64 `json:"id"`
}
EventRemovedTriggerModel ...
type EventRemovedVariableModel ¶ added in v0.12.0
type EventRemovedVariableModel struct {
Name string `json:"name"`
}
EventRemovedVariableModel ...
type EventRemovedZigbee2mqttModel ¶ added in v0.12.0
type EventRemovedZigbee2mqttModel struct {
Id int64 `json:"id"`
}
EventRemovedZigbee2mqttModel ...
type EventServerVersion ¶ added in v0.17.0
EventServerVersion ...
type EventServiceRestarted ¶ added in v0.12.0
type EventServiceRestarted struct {
Service string `json:"service"`
}
type EventServiceStarted ¶ added in v0.12.0
type EventServiceStarted struct {
Service string `json:"service"`
}
type EventServiceStopped ¶ added in v0.12.0
type EventServiceStopped struct {
Service string `json:"service"`
}
type EventStartedRestore ¶ added in v0.12.0
type EventStartedRestore struct {
Name string `json:"name"`
}
type EventStateById ¶ added in v0.18.2
type EventStateById struct { UserID int64 `json:"user_id"` SessionID string `json:"session_id"` EntityId common.EntityId `json:"entity_id"` StorageId int64 `json:"storage_id"` PluginName string `json:"plugin_name"` OldState EventEntityState `json:"old_state"` NewState EventEntityState `json:"new_state"` }
EventStateById ...
type EventStateChanged ¶
type EventStateChanged 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"` }
EventStateChanged ...
type EventTaskCompleted ¶ added in v0.12.0
type EventTaskLoaded ¶ added in v0.12.0
type EventTaskLoaded struct {
Id int64 `json:"id"`
}
EventTaskLoaded ...
type EventTaskUnloaded ¶ added in v0.12.0
type EventTaskUnloaded struct {
Id int64 `json:"id"`
}
EventTaskUnloaded ...
type EventTriggerCompleted ¶ added in v0.12.0
type EventTriggerLoaded ¶ added in v0.12.0
type EventTriggerLoaded struct {
Id int64 `json:"id"`
}
EventTriggerLoaded ...
type EventTriggerUnloaded ¶ added in v0.12.0
type EventTriggerUnloaded struct {
Id int64 `json:"id"`
}
EventTriggerUnloaded ...
type EventUpdateUserLocation ¶ added in v0.9.5
type EventUpdateUserLocation struct { UserID int64 `json:"user_id"` Lat float32 `json:"lat"` Lon float32 `json:"lon"` Accuracy float32 `json:"accuracy"` }
EventUpdateUserLocation ...
type EventUpdatedActionModel ¶ added in v0.12.0
EventUpdatedActionModel ...
type EventUpdatedConditionModel ¶ added in v0.12.0
type EventUpdatedConditionModel struct {
Id int64 `json:"id"`
}
EventUpdatedConditionModel ...
type EventUpdatedEntityModel ¶ added in v0.12.0
EventUpdatedEntityModel ...
type EventUpdatedMetric ¶ added in v0.13.0
EventUpdatedMetric ...
type EventUpdatedScriptModel ¶ added in v0.12.0
type EventUpdatedScriptModel struct { Common ScriptId int64 `json:"script_id"` Script *m.Script `json:"script"` OldScript *m.Script `json:"old_script"` }
EventUpdatedScriptModel ...
type EventUpdatedTaskModel ¶ added in v0.12.0
type EventUpdatedTaskModel struct {
Id int64 `json:"id"`
}
EventUpdatedTaskModel ...
type EventUpdatedTriggerModel ¶ added in v0.12.0
type EventUpdatedTriggerModel struct {
Id int64 `json:"id"`
}
EventUpdatedTriggerModel ...
type EventUpdatedVariableModel ¶ added in v0.12.0
EventUpdatedVariableModel ...
type EventUpdatedZigbee2mqttModel ¶ added in v0.12.0
type EventUpdatedZigbee2mqttModel struct { Id int64 `json:"id"` Bridge *m.Zigbee2mqtt `json:"bridge"` }
EventUpdatedZigbee2mqttModel ...
type EventUploadedBackup ¶ added in v0.12.0
type EventUploadedBackup struct {
Name string `json:"name"`
}