fix color in tradfri
This commit is contained in:
@@ -175,9 +175,14 @@ func (b *Bridge) refreshDevice(id string, bus *lucifer3.EventBus) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if luciferState.Color != nil && luciferState.Color.XY != nil {
|
if luciferState.Color != nil {
|
||||||
newX := luciferState.Color.XY.X
|
col, ok := luciferState.Color.ToXY()
|
||||||
newY := luciferState.Color.XY.Y
|
if !ok {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
newX := col.XY.X
|
||||||
|
newY := col.XY.Y
|
||||||
diffX := math.Abs(newX - currX)
|
diffX := math.Abs(newX - currX)
|
||||||
diffY := math.Abs(newY - currY)
|
diffY := math.Abs(newY - currY)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user