more tinkering.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package effects
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.aiterp.net/lucifer3/server/device"
|
||||
"git.aiterp.net/lucifer3/server/internal/color"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Manual struct {
|
||||
Power *bool `json:"power,omitempty"`
|
||||
Color *color.Color `json:"color,omitempty"`
|
||||
Intensity *float64 `json:"intensity,omitempty"`
|
||||
Temperature *float64 `json:"temperature,omitempty"`
|
||||
}
|
||||
|
||||
func (e *Manual) EffectDescription() string {
|
||||
return fmt.Sprintf("Manual%s", e.State(0, 0, 0).String())
|
||||
}
|
||||
|
||||
func (e *Manual) Frequency() time.Duration {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (e *Manual) State(int, int, int) device.State {
|
||||
return device.State{
|
||||
Power: e.Power,
|
||||
Temperature: e.Temperature,
|
||||
Intensity: e.Intensity,
|
||||
Color: e.Color,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user