more tinkering.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
lucifer3 "git.aiterp.net/lucifer3/server"
|
||||
"git.aiterp.net/lucifer3/server/internal/formattools"
|
||||
)
|
||||
|
||||
type Assign struct {
|
||||
IDs []string `json:"ids"`
|
||||
Effect lucifer3.Effect `json:"effect"`
|
||||
}
|
||||
|
||||
func (c Assign) CommandDescription() string {
|
||||
return fmt.Sprintf("Assign(%v, %s)", formattools.CompactIDList(c.IDs), c.Effect.EffectDescription())
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.aiterp.net/lucifer3/server/internal/formattools"
|
||||
)
|
||||
|
||||
type ReplaceScene struct {
|
||||
IDs []string `json:"ids"`
|
||||
SceneID int64 `json:"sceneId"`
|
||||
}
|
||||
|
||||
func (c ReplaceScene) CommandDescription() string {
|
||||
return fmt.Sprintf("ReplaceScene(%v, %d)", formattools.CompactIDList(c.IDs), c.SceneID)
|
||||
}
|
||||
|
||||
type ClearScene struct {
|
||||
IDs []string `json:"ids"`
|
||||
}
|
||||
|
||||
func (c ClearScene) CommandDescription() string {
|
||||
return fmt.Sprintf("ClearScene(%v)", formattools.CompactIDList(c.IDs))
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.aiterp.net/lucifer3/server/device"
|
||||
)
|
||||
|
||||
type SetState struct {
|
||||
ID string
|
||||
State device.State
|
||||
}
|
||||
|
||||
func (c SetState) CommandDescription() string {
|
||||
return fmt.Sprintf("SetState(%s, %s)", c.ID, c.State)
|
||||
}
|
||||
Reference in New Issue
Block a user