more scene stuff. There's still no command and API to push scenes and unassign (aside from setting a temporary scene and waiting it out).
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
+2
-4
@@ -56,7 +56,7 @@ func (s *Scene) RoleIndex(device *Device) int {
|
||||
type SceneEffect string
|
||||
|
||||
const (
|
||||
SEStatic SceneEffect = "Plain"
|
||||
SEStatic SceneEffect = "Static"
|
||||
SERandom SceneEffect = "Random"
|
||||
SEGradient SceneEffect = "Gradient"
|
||||
SEWalkingGradient SceneEffect = "WalkingGradient"
|
||||
@@ -120,7 +120,7 @@ func (r *SceneRole) Validate() error {
|
||||
}
|
||||
|
||||
switch r.Effect {
|
||||
case SEStatic, SERandom, SEGradient, SETransition:
|
||||
case SEStatic, SERandom, SEGradient, SEWalkingGradient, SETransition:
|
||||
default:
|
||||
return ErrSceneRoleUnknownEffect
|
||||
}
|
||||
@@ -201,8 +201,6 @@ func (r *SceneRole) State(fac float64) NewDeviceState {
|
||||
return r.States[0]
|
||||
}
|
||||
|
||||
|
||||
|
||||
if r.Interpolate {
|
||||
if len(r.States) == 2 {
|
||||
return r.States[0].Interpolate(r.States[1], fac)
|
||||
|
||||
Reference in New Issue
Block a user