|
|
@ -175,9 +175,14 @@ func (b *Bridge) refreshDevice(id string, bus *lucifer3.EventBus) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if luciferState.Color != nil && luciferState.Color.XY != nil { |
|
|
|
newX := luciferState.Color.XY.X |
|
|
|
newY := luciferState.Color.XY.Y |
|
|
|
if luciferState.Color != nil { |
|
|
|
col, ok := luciferState.Color.ToXY() |
|
|
|
if !ok { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
newX := col.XY.X |
|
|
|
newY := col.XY.Y |
|
|
|
diffX := math.Abs(newX - currX) |
|
|
|
diffY := math.Abs(newY - currY) |
|
|
|
|
|
|
|